{"id":21038598,"url":"https://github.com/irdcat/wasm-nes","last_synced_at":"2025-05-15T15:33:47.516Z","repository":{"id":196363798,"uuid":"695951238","full_name":"irdcat/wasm-nes","owner":"irdcat","description":"NES emulator compiled to WebAssembly","archived":false,"fork":false,"pushed_at":"2024-10-11T22:45:01.000Z","size":611,"stargazers_count":3,"open_issues_count":12,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-03T11:11:29.488Z","etag":null,"topics":["6502","cpp","cpp20","emscripten","emulator","nes","wasm","webassembly"],"latest_commit_sha":null,"homepage":"https://irdcat.github.io/wasm-nes/","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/irdcat.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":"2023-09-24T17:47:12.000Z","updated_at":"2024-10-11T22:45:01.000Z","dependencies_parsed_at":"2023-12-22T22:26:44.229Z","dependency_job_id":"7167aab3-e9a8-4725-8bc1-56d3c98b46ef","html_url":"https://github.com/irdcat/wasm-nes","commit_stats":null,"previous_names":["irdcat/wasm-nes"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irdcat%2Fwasm-nes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irdcat%2Fwasm-nes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irdcat%2Fwasm-nes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irdcat%2Fwasm-nes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/irdcat","download_url":"https://codeload.github.com/irdcat/wasm-nes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254367931,"owners_count":22059587,"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":["6502","cpp","cpp20","emscripten","emulator","nes","wasm","webassembly"],"created_at":"2024-11-19T13:33:33.419Z","updated_at":"2025-05-15T15:33:46.762Z","avatar_url":"https://github.com/irdcat.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wasm-nes\n\n## Overview\n\nWasm NES is a NES emulator compiled to WebAssembly. It is developed with emscripten and emscripten SDL2 port.\n\n![Adventure Island](./images/island.png)\n\n### Supported games\n\nVarious cartridges contained different integrated circuits that extended capabilities of the NES.\nMost commonly these ICs enabled the game to use more ROM/RAM memory than it was accessible by the NES buses alone.\n\nThese ICs needs to be emulated in order to support the games that were using them. Different kinds of circuit boards incorporated by the cartridges are called [Mappers](https://www.nesdev.org/wiki/Mapper).\nSee the list below for the current status of implementation of the mappers, to see if the game you wish to run is supported.\n\n| Mapper ID | Mapper name | Games                                                |\n|-----------|-------------|------------------------------------------------------|\n| 0         | NROM        | [57 Games](https://nescartdb.com/search/advanced?region_op=equal\u0026region=USA\u0026system_op=equal\u0026system=NTSC\u0026ines_op=equal\u0026ines=0\u0026page=1) |\n| 1         | SNROM       | [224 Games](https://nescartdb.com/search/advanced?region_op=equal\u0026region=USA\u0026system_op=equal\u0026system=NTSC\u0026ines_op=equal\u0026ines=1\u0026page=1) |\n| 2         | UNROM       | [94 Games](https://nescartdb.com/search/advanced?region_op=equal\u0026region=USA\u0026system_op=equal\u0026system=NTSC\u0026ines_op=equal\u0026ines=2\u0026page=1) |\n| 3         | CNROM       | [62 Games](https://nescartdb.com/search/advanced?region_op=equal\u0026region=USA\u0026system_op=equal\u0026system=NTSC\u0026ines_op=equal\u0026ines=3\u0026page=1) |\n| 7         | ANROM       | [31 Games](https://nescartdb.com/search/advanced?region_op=equal\u0026region=USA\u0026system_op=equal\u0026system=NTSC\u0026ines_op=equal\u0026ines=7\u0026page=1) |\n\n### Known issues\n\n[Bugs](https://github.com/irdcat/wasm-nes/issues?q=is%3Aissue+is%3Aopen+label%3Abug)\u003cbr\u003e\n[Open tasks](https://github.com/irdcat/wasm-nes/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement)\n\n### Controls\n\nControls are not customizable yet, and only Player 1 controls are hardcoded.\n\n| NES button | Keyboard button |\n|------------|-----------------|\n| Select     | Space           |\n| Start      | Enter           |\n| A          | Z               |\n| B          | X               |\n| Up         | ↑               |\n| Down       | ↓               |\n| Left       | ←               |\n| Right      | →               |\n\n## Local development\n\n### Prerequisites\n\n- [emscripten](https://emscripten.org/docs/getting_started/downloads.html)\n- [node](https://nodejs.org/en/download)\n- make\n- [cmake](https://cmake.org/)\n\n### Running locally\n\nIn order to run the application locally, application must be hosted on a server, because browsers are forbidding loading WASM files from the disk.\n\n#### Install http-server from npm\n\nIn this document, tool used to host files on a local server is a **http-server** from NPM.\n\n```\nnpm install -g http-server\n```\n\n#### Build the emulator\n\nScripts included in the project handle things like building C++ sources into binaries and handling NPM dependencies (like TailwindCSS used in the project). After building, all of the required files are put in the `./build` directory.\n\n```\n./build.sh\n```\n\n#### Serve build files on a local server\n\nCommand below serves directory with built files at port 8080\n\n```\nhttp-server ./build -p8080 -c-1\n```\n\n#### Open application in web browser\n\nOpen *localhost:8080* in web browser\n\n### Running tests\n\nTests uses core modules of the emulator as a library that is linked to test executable. This project is using [GoogleTest](https://google.github.io/googletest/) framework to run tests.\n\nTest are compiled to WASM and are meant to run on node. Scripts included in the project cover all of the setup required to build and run the tests.\n\n#### Build tests\n\n```\n./build-tests.sh\n```\n\n#### Run tests\n\n```\n./run-tests.sh\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firdcat%2Fwasm-nes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Firdcat%2Fwasm-nes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firdcat%2Fwasm-nes/lists"}