{"id":19958365,"url":"https://github.com/binji/binjnes","last_synced_at":"2025-05-03T21:30:46.645Z","repository":{"id":146246355,"uuid":"334263620","full_name":"binji/binjnes","owner":"binji","description":"NES emulator implemented in C, that also runs in the browser","archived":false,"fork":false,"pushed_at":"2025-01-02T19:34:28.000Z","size":2549,"stargazers_count":22,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-07T21:26:49.121Z","etag":null,"topics":["emulator","nes","nes-emulator","nintendo"],"latest_commit_sha":null,"homepage":"https://binji.github.io/binjnes/","language":"C","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/binji.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":"2021-01-29T21:09:57.000Z","updated_at":"2025-02-21T09:56:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"57dc3b70-5bf8-4eff-b555-95bc2fa791df","html_url":"https://github.com/binji/binjnes","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binji%2Fbinjnes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binji%2Fbinjnes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binji%2Fbinjnes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binji%2Fbinjnes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/binji","download_url":"https://codeload.github.com/binji/binjnes/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252259302,"owners_count":21719658,"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":["emulator","nes","nes-emulator","nintendo"],"created_at":"2024-11-13T01:42:21.303Z","updated_at":"2025-05-03T21:30:46.631Z","avatar_url":"https://github.com/binji.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Github CI Status](https://github.com/binji/binjnes/workflows/CI/badge.svg)](https://github.com/binji/binjnes)\n\n# binjnes\n\nA simple NES emulator.\n\n## Features\n\n* Cycle accurate, passes many timing tests (see below)\n* Supports quite a few mappers\n  * 0, 1, 2, 3, 4, 5, 7, 9, 10, 11, 16, 18, 19, 21, 22, 23, 24, 25, 26, 28, 30, 33, 34, 66, 69, 71, 76, 78, 79, 85, 87, 118, 146, 163, 206, 210, 232\n  * Has built-in cart database\n  * Supports additional audio channels for mapper 19, 24, 26\n* Save/load battery backup\n* Save/load emulator state to file\n* Pause and step one frame\n* **Rewind** and seek to specific cycle\n* Convenient Python test harness using hashes to validate\n\n## Cloning\n\nUse a recursive clone, to include the submodules:\n\n```\n$ git clone --recursive https://github.com/binji/binjnes\n```\n\nIf you've already cloned without initializing submodules, you can run this:\n\n```\n$ git submodule update --init\n```\n\n## Building\n\nRequires [CMake](https://cmake.org) and\n[sokol](https://github.com/floooh/sokol).\n\n### Building (Linux/Mac)\n\nIf you run `make`, it will run CMake for you and put the output in the `bin/`\ndirectory.\n\n```\n$ make\n$ bin/binjnes foo.nes\n```\n\nYou can also just use cmake directly:\n\n```\n$ mkdir build\n$ cd build\n$ cmake ..\n$ make\n```\n\n### Building WebAssembly\n\nYou can build binjnes as a WebAssembly module. You'll need an incoming build of\nemscripten. See https://github.com/kripken/emscripten/wiki/WebAssembly and\nhttp://kripken.github.io/emscripten-site/docs/building_from_source/index.html#installing-from-source.\n\nPut a symlink to Emscripten in the `emscripten` directory, then run make.\n\n```\n$ ln -s ${PATH_TO_EMSCRIPTEN} emscripten\n$ make wasm\n```\nOr set Makefile variables via command line:\n```\n$ make wasm EMSCRIPTEN_CMAKE=\"/path/to/Emscripten.cmake\"\n```\n\n### Changing the Build Configuration\n\nIf you change the build config (e.g. update the submodules), you may need to run CMake again.\nThe simplest way to do this is to remove the `out/` directory.\n\n```\n$ rm -rf out/\n$ make\n```\n\n## Running\n\n```\n$ bin/binjnes \u003cfilename\u003e\n```\n\nKeys:\n\n| Action | Key |\n| --- | --- |\n| P0 DPAD-UP | \u003ckbd\u003e↑\u003c/kbd\u003e |\n| P0 DPAD-DOWN | \u003ckbd\u003e↓\u003c/kbd\u003e |\n| P0 DPAD-LEFT | \u003ckbd\u003e←\u003c/kbd\u003e |\n| P0 DPAD-RIGHT | \u003ckbd\u003e→\u003c/kbd\u003e |\n| P0 B | \u003ckbd\u003eZ\u003c/kbd\u003e |\n| P0 A | \u003ckbd\u003eX\u003c/kbd\u003e |\n| P0 START | \u003ckbd\u003eEnter\u003c/kbd\u003e |\n| P0 SELECT | \u003ckbd\u003eTab\u003c/kbd\u003e |\n| P1 DPAD-UP | \u003ckbd\u003eY\u003c/kbd\u003e |\n| P1 DPAD-DOWN | \u003ckbd\u003eH\u003c/kbd\u003e |\n| P1 DPAD-LEFT | \u003ckbd\u003eG\u003c/kbd\u003e |\n| P1 DPAD-RIGHT | \u003ckbd\u003eJ\u003c/kbd\u003e |\n| P1 B | \u003ckbd\u003eK\u003c/kbd\u003e |\n| P1 A | \u003ckbd\u003eL\u003c/kbd\u003e |\n| P1 START | \u003ckbd\u003eO\u003c/kbd\u003e |\n| P1 SELECT | \u003ckbd\u003eI\u003c/kbd\u003e |\n| Reset | \u003ckbd\u003eDelete\u003c/kbd\u003e |\n| Save state | \u003ckbd\u003eF6\u003c/kbd\u003e |\n| Load state | \u003ckbd\u003eF9\u003c/kbd\u003e |\n| Rewind | \u003ckbd\u003eBackspace\u003c/kbd\u003e |\n| Pause | \u003ckbd\u003eSpace\u003c/kbd\u003e |\n| Step one frame | \u003ckbd\u003eN\u003c/kbd\u003e |\n\n## Running tests\n\n`scripts/tester.py` will only run the tests that match a filter passed on the\ncommand line. Some examples:\n\n```\n# Run all tests\n$ scripts/tester.py\n\n# Run all apu tests\n$ scripts/tester.py apu\n```\n\n## Test status\n\n[See test results](test_results.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinji%2Fbinjnes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbinji%2Fbinjnes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinji%2Fbinjnes/lists"}