{"id":22886414,"url":"https://github.com/dexter-xd/chip8-emulator","last_synced_at":"2025-05-08T22:15:54.225Z","repository":{"id":267453228,"uuid":"852968331","full_name":"dexter-xD/chip8-emulator","owner":"dexter-xD","description":"Simple CHIP-8 emulator with SDL2","archived":false,"fork":false,"pushed_at":"2024-12-10T13:29:01.000Z","size":25,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-08T22:15:50.561Z","etag":null,"topics":["c","chip8","sdl2"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dexter-xD.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-05T18:37:35.000Z","updated_at":"2025-04-21T16:54:03.000Z","dependencies_parsed_at":"2024-12-10T13:29:17.440Z","dependency_job_id":null,"html_url":"https://github.com/dexter-xD/chip8-emulator","commit_stats":null,"previous_names":["dexter-xd/chip8-emulator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dexter-xD%2Fchip8-emulator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dexter-xD%2Fchip8-emulator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dexter-xD%2Fchip8-emulator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dexter-xD%2Fchip8-emulator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dexter-xD","download_url":"https://codeload.github.com/dexter-xD/chip8-emulator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253154983,"owners_count":21862624,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","chip8","sdl2"],"created_at":"2024-12-13T20:18:42.339Z","updated_at":"2025-05-08T22:15:54.192Z","avatar_url":"https://github.com/dexter-xD.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CHIP-8 Emulator\n\nThis project is a CHIP-8 emulator written in C, utilizing SDL2 for graphics and input. This guide will walk you through setting up, compiling, and running the emulator on Linux systems using CMake.\n\n---\n\n## Prerequisites\n\nTo build and run this emulator, ensure you have the following installed:\n\n- Linux OS (Tested on Ubuntu 20.04 LTS, but should work on other distributions)\n- GCC or another C compiler\n- CMake (version 3.10 or higher)\n- SDL2 development libraries\n\n---\n\n## Installing Dependencies\n\n### Install CMake\n```bash\nsudo apt-get update\nsudo apt-get install cmake\n```\n\n### Install SDL2 Development Libraries\n```bash\nsudo apt-get install libsdl2-dev\n```\n\n---\n\n## Project Setup\n\n### Clone the Repository\n```bash\ngit clone \u003chttps://github.com/dexter-xD/chip8-emulator.git\ncd chip8-emulator\n```\n\n### Directory Structure\nEnsure your project structure matches the following:\n```\nchip8-emulator/\n├── include/\n│   └── chip8.h\n├── src/\n│   ├── chip8.c\n│   ├── chip8_op.c\n│   ├── sdl_config.c\n│   └── main.c\n└── CMakeLists.txt\n```\n\n### Configure the Project\nCreate a build directory to separate build files from the source:\n```bash\nmkdir build\ncd build\n```\n\nRun CMake to generate the build system:\n```bash\ncmake ..\n```\n\n### Build the Project\n```bash\nmake\n```\n\n---\n\n## Running the Emulator\n\nRun the compiled executable, providing a ROM file as input:\n```bash\n./chip8 path/to/your/rom.ch8\n```\n\n---\n\n### Observations\n- **Visual Tests**: Check for correct screen updates, sprite rendering, and collision detection.\n- **Opcode Tests**: Verify that all opcodes are correctly implemented by observing emulator behavior or debug logs.\n\n---\n\n## Troubleshooting\n\n### Common Issues and Fixes\n1. **Screen not updating**: Review the `update_screen` function.\n2. **Incorrect opcode behavior**: Debug the `emulate_instruction` function.\n3. **Sound or timing issues**: Check `update_timers` and SDL audio setup.\n\n---\n\nThis guide should help you set up and run your CHIP-8 emulator on Linux. If you encounter any issues, consult the [SDL2](https://wiki.libsdl.org/) and [CMake](https://cmake.org/documentation/) documentation or open an issue in the repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdexter-xd%2Fchip8-emulator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdexter-xd%2Fchip8-emulator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdexter-xd%2Fchip8-emulator/lists"}