{"id":15099792,"url":"https://github.com/mattkolega/zig-8","last_synced_at":"2026-01-07T03:44:05.589Z","repository":{"id":254978127,"uuid":"848153615","full_name":"mattkolega/zig-8","owner":"mattkolega","description":"🕹️ CHIP-8 interpreter written in Zig","archived":false,"fork":false,"pushed_at":"2025-01-31T09:46:15.000Z","size":96,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-31T10:33:02.575Z","etag":null,"topics":["chip-8","chip8","emulator","retro","sokol","zig"],"latest_commit_sha":null,"homepage":"","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mattkolega.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-08-27T08:28:05.000Z","updated_at":"2025-01-30T11:25:47.000Z","dependencies_parsed_at":"2025-01-31T10:27:47.273Z","dependency_job_id":"c05d29e3-a261-415f-83dd-58bacf29ed5b","html_url":"https://github.com/mattkolega/zig-8","commit_stats":{"total_commits":31,"total_committers":1,"mean_commits":31.0,"dds":0.0,"last_synced_commit":"da9df9a7b2b6c1e7f8dedb7e6b3316815aae27ab"},"previous_names":["mattkolega/zig-8"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattkolega%2Fzig-8","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattkolega%2Fzig-8/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattkolega%2Fzig-8/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattkolega%2Fzig-8/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mattkolega","download_url":"https://codeload.github.com/mattkolega/zig-8/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245858876,"owners_count":20684057,"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":["chip-8","chip8","emulator","retro","sokol","zig"],"created_at":"2024-09-25T17:27:40.146Z","updated_at":"2026-01-07T03:44:00.557Z","avatar_url":"https://github.com/mattkolega.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ZIG-8\nA rewrite of my CHIP-8 interpreter using Zig.\n\nIn 2023, I wrote a CHIP-8 interpreter in C. I recently had another look at the code and thought it would a cool exercise to rewrite it in a different language. Zig was chosen to be used because it's fairly similar to C and I thought this project would provide a good opportunity to learn it.\n\n**CHIP-8** (COSMAC VIP) and **SCHIP** (SUPER-CHIP 1.1) behaviours are implemented.\n\nSokol is used for graphics and input, and miniaudio is used for audio.\n\n## Build\nRequires version 0.13 of the Zig compiler. Tested on macOS, but it should work on any OS supported by Zig.\n\n```bash\n# Clone the repo along with submodules\ngit clone --recursive https://github.com/mattkolega/zig-8.git\n\n# Navigate to the repo directory\ncd zig-8\n\n# Build and run executable\n# The executable will be located in the zig-out folder\nzig build run\n```\n\n## Usage\nEither run `zig build run` at the root directory, or navigate to the output directory (default is *zig-out*) and run `./zig-8`.\n\nLaunching the interpreter will open a file dialog to load `.ch8` ROM files.\n\n### Program Arguments\nCommand line arguments can optionally be given to the interpreter to alter its execution.\n\n```\n-h, --help\n        Display this help message and exit.\n\n-c, --cycles \u003cusize\u003e\n        Set the number of cycles per second for the interpreter.\n\n-m, --machine \u003cstr\u003e\n        Set the interpreter type. Possible values: chip8 | schip\n```\n\n### Controls\nOriginal CHIP-8 computers supported hexadecimal keypads for input. This interpreter maps those keys to the left side of a QWERTY keyboard.\nThe keys needed to be pressed during execution depend on the ROM file.\n\n```\n1 2 3 C      1 2 3 4\n4 5 6 D  -\u003e  Q W E R\n7 8 9 E      A S D F\nA 0 B F      Z X C V\n```\n\n## Acknowledgements\n- [Tobias V. Langhoff](https://tobiasvl.github.io/blog/write-a-chip-8-emulator/) for his overview and guide on implementing a CHIP-8 interpreter.\n- [Timendus](https://github.com/Timendus/chip8-test-suite) for his test ROM collection, which greatly helped with getting all the opcodes working properly.\n- [Gulrak's CHIP-8 Variant Opcode Table](https://chip8.gulrak.net/) for aiding with identifying quirks associated with different CHIP-8 implementations.\n- [CHIP-8 Extensions](https://chip-8.github.io/extensions/) for providing valuable insight into the different CHIP-8 extension variations.\n- John Earnest's [Octo](https://johnearnest.github.io/Octo/) IDE for serving as a reference which I could compare my interpreter's behaviour to.\n\n## Licence\n[MIT](LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattkolega%2Fzig-8","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattkolega%2Fzig-8","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattkolega%2Fzig-8/lists"}