AprNes (C# NES emulator) — 10-year-old abandoned project revived with AI assistance, now passing blargg 174/174 + AccuracyCoin 136/136

GitHub: https://github.com/erspicu/AprNes

AprNes website https://baxermux.org/myemu/AprNes/index.html

The AI collaboration model

I didn't just use AI for code generation. The workflow was:

AI reads NESdev Wiki, Mesen2/TriCNES source, and test ROM failure CRCs

AI proposes a hypothesis and fix strategy

I review, approve, and run the test suite

If regression → analyze together, fix the root cause (never patch over correct behavior)

The strict rule: no compensation hacks. No special-casing to make a test pass if it means the underlying hardware behavior is wrong.

---

What was hardest

DMA timing (AccuracyCoin P13/P14):

The key insight was that Load DMA start parity is `(apucycle & 1) != 0 ? 2 : 3` — not a fixed value. Getting `double_2007_read`, `count_errors`, `count_errors_fast`, and the implicit abort behavior all correct simultaneously took several iterations.

PPU sprite evaluation (AccuracyCoin SprSL0):

The secondary OAM clear during dots 1–64 must write `$FF` (not `$00`) into `oamCopyBuffer` on each write cycle, and `$2004` reads during rendering (dots 1–256) must return `oamCopyBuffer` — not the actual secondary OAM data. Getting this right required implementing the full per-dot FSM rather than a simplified model.

---

Posted Mar 14, 2026, 6:29 AM UTC

1210
Loading comments…