Menu

An NES emulator, written in Odin
📰

An NES emulator, written in Odin

Adafruit Industries – Makers, hackers, artists, designers and engineers!·Anne Barela·2 days ago
#52inweUM
#adafruit#emulator#odin#project#lucypero
Reading 0:00
15s threshold

Lucy built a NES emulator in Odin, a simple C-like language, and wrote up the project on lucypero.com. Work started in late June 2024 and paused in January 2025, done off and on in spare time.

The write-up pushes back on the idea that a NES emulator is a weekend project. Getting Donkey Kong on screen is quick, and 80 or 90 percent of the way there comes fast. The last 10 percent took months. The CPU and the PPU, the chip that draws the graphics, run in parallel and talk to each other, so the timing has to be right or games misbehave. Then there are mappers, the circuitry inside the cartridges themselves, which have their own memory and behavior and have to be emulated too.

Odin has no automatic integer promotion, which caused a few bugs, and no automatic memory management, so the emulator uses a temporary allocator cleared each frame, a global heap allocator, and an arena for a NES session.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.