Devlog #2 - NES emulation
Published date: 3-02-2026
This month since I was done with all of my exams and had some time before the next semester starts. I had the opportunity to finally work on writing one of my favorite emulators of all time. I was wondering if I should write the emulator in C or Zig. I initially started off with zig, but decided to switch to C since I was more comfortable with it and would be spending with the language more in the future, though I may use zig in some other future projects. I’ve been working on a NES emulator this month using C and raylib. It has been a fun and challenging experience. The main part that has been finished is the 6502 cpu. I decided to write a cycle accurate NES emulator. I wanted to make sure that the CPU was able to pass the nestest.nes rom, which covers all the official opcodes (+ a few unofficial ones).
During this i discovered that nvim has a diff tool that allows me to see the diffs in the my output log and the log nestest.nes expects. What I like about the nvim diff tool is that I can view it side by side. After I got the nes cpu to work, i started work on the PPU. Thought, when I started I did feel the burnout after finishing writing all the opcodes. For the PPU part, I managed to atleast get the data from the name tables.
This is the sprite data from Donkey Kong. It’s interesting to see how the PPU actually read the data from the cartridge.
