Skip to content

valerio/nessie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nessie

Yet another NES emulator, a small project with two goals:

  • learn a bit of Zig
  • get it to pass AccuracyCoin with disregard to quality/performance

Super Mario Bros. running in nessie AccuracyCoin running in nessie

Building & running

Requires Zig 0.16.0.

For the actual executable

zig build raylib --release=fast

# in the default zig-out/bin dir
./zig-out/bin/nessie-rl <path-to-.nes-file>

Running the AccuracyCoin harness (headless runner, reports test failures):

zig build accuracycoin
AccuracyCoin: 138/138 passed, 0 failed, 0 incomplete after 4670 polled frames

Controls

NES Keyboard
A X
B Z
Select Right Shift
Start Enter
D-pad
Pause emulation P

Notes

Main executable uses Raylib for video/audio/input.

This project contains code generated via agentic coding, examples can be seen in:

  • repetitive structural code (instruction tests in system.zig)
  • dmc/ppu code, started from handwritten structure and later driven by an agent trying to pass AccuracyCoin tests

The general approach was starting by handwriting core parts (cpu/cart/instructions/bg rendering) and once there was a working base, using an agent to drive experimentation/debugging and fixing AccuracyCoin test cases.

License

MIT

About

A basic NES emulator in Zig

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages