Emulating a Nintendo DS in Go
summary
A Nintendo DS emulator implemented in Go that actually runs Zelda, Mario Kart and Metal Slug by emulating two ARM CPUs (66/33 MHz), GPUs and 4 MB RAM, using per-scanline interleaving instead of per-frame. Memory is a declarative memory map indexed by a radix tree; instruction handlers are produced by a generator that emits 30,000 lines generated. A hand‑written JIT via goji works but JIT crashes with GC because Go has no stack‑map API, and a bound‑check patch yields an 8% speedup in Go 1.11.
AI-written summary · about
chapters (9)
- 0:00Introduction to emulation
- 1:53Hardware architecture
- 7:31Emulator design and sync
- 14:17CPU emulation techniques
- 19:15Implementing a JIT compiler
- 22:18Memory map implementation
- 27:27Optimizing memory lookup
- 30:07Graphics and performance
- 34:28Conclusions and demo
related talks
42mCan you write an OS Kernel in Go?
40mCreating efficient VM with JIT in Go
51mTinyGo, small but mighty! 💪
05mWhat have the architects ever done for us?
06mMobile Game Development in Go
53mReconciling the irreconcilable and accelerating the unacceleratable using Go assembler☠️
23mAn Operating System in Go
39mIs Go A Good Language to Build Compilers?
