A tiny Game Boy emulator in C, targeted at Pokemon Red.
- boots and plays Pokemon Red
- SDL windowed output
- readable main source
make run47-line source:
make run-mintinyred.c- readable, commented versiontinyred_min.c- 47-line code-golf version
- starts after the boot ROM with normal DMG register values
- emulates the LR35902 CPU with compact opcode patterns
- maps ROM, VRAM, WRAM, OAM, IO, HRAM, and interrupts through one bus
- implements just enough MBC3 banking for Pokemon Red
- draws the Game Boy background, window, and sprites scanline by scanline
- advances DIV, TIMA, LCD modes, VBlank, STAT, and joypad polling once per frame
w/a/s/dor arrows - d-padj/x- Ak/z- Bspace- Selectenter- Startq/ Esc - quit