{"id":24333775,"url":"https://github.com/gargakshit/nes","last_synced_at":"2025-10-21T18:26:53.798Z","repository":{"id":199190777,"uuid":"698885080","full_name":"gargakshit/nes","owner":"gargakshit","description":"Yet another NES emulator in C++","archived":false,"fork":false,"pushed_at":"2023-10-13T07:03:14.000Z","size":745,"stargazers_count":4,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-21T13:54:16.955Z","etag":null,"topics":["cpp","emulation","hacktoberfest","nes","opengl"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gargakshit.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,"zenodo":null}},"created_at":"2023-10-01T09:22:03.000Z","updated_at":"2025-05-15T20:58:18.000Z","dependencies_parsed_at":"2025-06-29T00:33:16.117Z","dependency_job_id":null,"html_url":"https://github.com/gargakshit/nes","commit_stats":null,"previous_names":["gargakshit/nes"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gargakshit/nes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gargakshit%2Fnes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gargakshit%2Fnes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gargakshit%2Fnes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gargakshit%2Fnes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gargakshit","download_url":"https://codeload.github.com/gargakshit/nes/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gargakshit%2Fnes/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262518102,"owners_count":23323301,"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":["cpp","emulation","hacktoberfest","nes","opengl"],"created_at":"2025-01-18T03:46:32.878Z","updated_at":"2025-10-21T18:26:53.685Z","avatar_url":"https://github.com/gargakshit.png","language":"C++","readme":"# Yet another NES emulator.\n\n![Screenshot](./screenshots/1.png)\n\n## Why?\n\nIt's been quite long since I last wrote an emulator, and I wanted to get into\nemulating a classic system.\n\n## Why C++? Isn't it unsafe bla bla?\n\nWell personally, I find C++ to be good while writing emulators. I should\nprobably try rust or zig, but it is what it is.\n\n## Umm how does it work?\n\nThe emulator is divided into several different subsystems,\n\n- **Graphics and GUI subsystem** – The name says it all. I use OpenGL (yes even\n  on Apple systems, it is \"good enough\" for my use-case) along with\n  [GLFW](https://github.com/glfw/glfw) and\n  [Dear ImGui](https://github.com/ocornut/imgui).\n\n  I have a custom [image class](./src/image.cpp) to send images to the GPU for\n  drawing. Other than the image class, and the application entrypoint, nothing\n  is coupled to OpenGL, and in theory I can replace it with Vulkan, or even use\n  it platform specific implementations for Metal and DirectX in the future.\n\n- **CPU** – The classic MOS 6502 without the decimal mode.\n\n- **Bus** - Technically the whole NES system, as everything comes together here.\n  What even is CPU in isolation?\n\n- **PPU** – The picture processing unit of the NES.\n\n- **APU** (WIP) – Audio processing unit. I haven't implemented this yet.\n\n- **Carts and mappers** – The plasic with a PCB inside.\n\n## How to build?\n\nYou'll need a couple things installed before you can get going,\n\n- CMake\n- Ninja (or `make`)\n- Clang (Can probably use GCC but MSVC won't work for sure)\n- vcpkg\n- XCode on macOS / Visual Studio with the C++ desktop workload on Windows\n\nYou can then build it in release mode using\n\n```sh\n$ cmake -Bcmake-build-release -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake\n$ ninja -Ccmake-build-release\n```\n\n### What about debug mode?\n\nWell you can build it in debug mode as-well, but keep in mind that it enabled `trace`\nlevel logging which logs ~50 lines per machine cycle, and the machine runs at 5.3MHz.\nYou run the risk of logging **gigabytes** of logs.\n\nAlso, it enables address sanitizer which decreases program speed by a factor of two.\nIt is recommended to build in release unless you know what you are doing.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgargakshit%2Fnes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgargakshit%2Fnes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgargakshit%2Fnes/lists"}