{"id":19608956,"url":"https://github.com/davecom/ddnes","last_synced_at":"2026-07-18T12:32:13.775Z","repository":{"id":66360380,"uuid":"80126804","full_name":"davecom/DDNES","owner":"davecom","description":"Personal Learning Project Hacking Together a NES Emulator in C w/ SDL","archived":false,"fork":false,"pushed_at":"2023-05-15T18:10:59.000Z","size":7900,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-14T04:14:42.016Z","etag":null,"topics":["emulator","nes-emulator","nintendo-nes"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davecom.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-01-26T15:28:36.000Z","updated_at":"2025-06-10T14:42:01.000Z","dependencies_parsed_at":"2025-10-14T04:14:38.326Z","dependency_job_id":"e9566a13-8f63-4655-84f4-c20c197d742b","html_url":"https://github.com/davecom/DDNES","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/davecom/DDNES","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davecom%2FDDNES","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davecom%2FDDNES/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davecom%2FDDNES/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davecom%2FDDNES/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davecom","download_url":"https://codeload.github.com/davecom/DDNES/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davecom%2FDDNES/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35618185,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-18T02:00:07.223Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-emulator","nintendo-nes"],"created_at":"2024-11-11T10:18:44.012Z","updated_at":"2026-07-18T12:32:13.770Z","avatar_url":"https://github.com/davecom.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DDNES\nDDNES is a primitive NES emulator. This is a personal learning project for me, and not an attempt to make something generally usable for the public. As I have time, I'm implementing an NES emulator in C with SDL. I'm doing this through a combination of my own code, information from the guides at [nesdev.com](https://www.nesdev.com/), various bits and pieces of documentation all over the Web, and porting the PPU background rendering of [Michael Fogleman's excellent Go NES emulator](https://github.com/fogleman/nes). I'm not being a purist about this—I am looking at other people's emulators as I get stuck. Right now the 6502 CPU core works well, the PPU (picture processing unit) works for most games I've tested, and the APU has some static but basically gets the main melodies and sound effects right. At present, it can play the games Donkey Kong, Tennis, Baseball, Super Mario Brothers, The Legend of Zelda, Bubble Bobble, Dr. Mario, Jimmy Connor's Tennis, Contra, Mega Man, and 1942 pretty much correctly, albeit with the sound a bit off.\n\n![dk1](dk1.png) ![dk2](dk2.png)\n![tennis1](tennis1.png) ![tennis2](tennis2.png)\n![mm1](mm1.png) ![mm2](mm2.png)\n![jct1](jct1.png) ![jct2](jct2.png)\n![ctra1](ctra1.png) ![ctra2](ctra2.png)\n![bb1](bb1.png) ![bb2](bb2.png)\n![z1](z1.png) ![z2](z2.png)\n![dm1](dm1.png) ![dm2](dm2.png)\n\nThis will never be anything impressive, and it's not code I'm proud of... it's more of a hack as I have time. If you want to look at good code, please checkout Michael's project. My original plan was just to get Donkey Kong working and call it a day. So, I've already achieved my goals with the project. It currently has support for iNES mappers 0, 1, and 2.\n\n## Building\n\nIf for some very strange reason you wanted to build this code it comes bundled as a project for Xcode w/ SDL included in this repository, as well as a separate solution for Visual Studio 2019. It takes the file containing the game to play as the single command-line argument, which is specified in Xcode's Scheme configuration window, or Visual Studio's project properties debugging tab.\n\n## Controls\n\na -\u003e x  \nb -\u003e z  \nstart -\u003e s  \nselect -\u003e a  \nd-pad -\u003e arrow keys\n\n## License\n\nLicensed under the [Apache License](LICENSE).\n\nMichael Fogleman's emulator that the PPU background rendering is a port of is licensed under the [MIT License](https://github.com/fogleman/nes/blob/master/LICENSE.md).\n\n## To-Do\n- [X] Memory Map\n- [X] CPU Core\n- [X] Basic PPU Background Rendering\n- [X] Basic Sprites\n- [X] Controller Support through keyboard\n- [X] Playable Donkey Kong\n- [X] APU (Audio Processing Unit)... work in progress but sorta kinda working a bit\n\n## Useful Links\n- [Michael Fogleman's Go NES Emulator](https://github.com/fogleman/nes) - the background rendering of the PPU is largely a port of his code from Go to C along with some bits from nesdev forums\n- [Stanislav Yaglo's mynes](https://github.com/yaglo/mynes) - I looked at some of his code when I ran into bugs in my ADC \u0026 SBC instructions' overflow flag setting as well as some sprite rendering bugs\n- [nesdev.com](https://www.nesdev.com/)\n- [Nintaco](http://nintaco.com) - one of the only NES emulators with a good debugger that runs on macOS (Java)\n- [Maciform](https://github.com/macifom/macifom) - an NES emulator with a very basic debugger written in Objective-C that you can build for the Mac natively (at least as of 10.13, although builds you'll find online don't work; you need to build it yourself)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavecom%2Fddnes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavecom%2Fddnes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavecom%2Fddnes/lists"}