Technology1 min read

A NES emulator written in Odin

By · Published by Everything Blog

In short

The creator developed the application between late June 2024 and January 2025, marking their first serious venture using this specific language. Beyond core gameplay, the system incorporates quality-of-life tools such as a debugger, save states, menu views, controller support, and a CRT shader toggle. Development required surmounting severe timing hurdles between the CPU and Picture Processing Unit, alongside programming specific cartridge mappers like MMC1 and MMC3. Although early calculation bugs arose from the absence of automatic integer promotion, the environment offered extensive control over manual memory strategies.

Key points

  • Synchronizing parallel timing between the central processor and the Picture Processing Un…: Synchronizing parallel timing between the central processor and the Picture Processing Unit proved to be the most difficult challenge.
  • Nesdev community resources, Discord discussions, and dedicated test ROMs were vital for r…: Nesdev community resources, Discord discussions, and dedicated test ROMs were vital for resolving hardware emulation complexities.
  • The developer praised the language's manual memory management capabilities despite encoun…: The developer praised the language's manual memory management capabilities despite encountering early calculation bugs caused by the lack of automatic integer promotion.

Sources checked by our analysis pipeline: 1

I made a NES emulator in Odin!

Intro

I’ve started this project in late June of 2024. I’ve worked on it in my spare time off and on. I decided to put a pause on this project in January 2025 to focus on other things.

I’ve learned so much about:

- The NES architecture, and possibly about game console architectures in general

- Bits and bytes, hex notation, and bitwise operations.

- The Odin programming language. I haven’t used it on a serious project before.

- How computers work. CPU instructions, “cycles”, etc

- Emulation. It’s very hard. Respect to emulator developers!

It’s been a wild ride. I’ve had a lot of fun, but I’ve also suffered more towards the end, when trying to make the emulator “fully” accurate.

You can read the Github Readme for more info about the project.

Features

- Enough emulation accuracy to run Battletoads and hundreds of other games perfectly.

- Debugger view with some debugging features

- Menu view to interact with the emulator

- Save states

- Controller support

- CRT Shader toggle

Technology