How senior-wanillah/gb-emulator works
This is a learning-focused Game Boy emulator prototype. The user runs the executable, optionally supplies a ROM, and the runtime loads it (or installs a demo program), steps the CPU, and prints CPU and PPU test output. The graph separates orchestration, core emulation, and cartridge/display behavior. It reflects the sampled implementation and documented capabilities; it does not imply complete PPU timing, memory banking, or full hardware emulation.
Main entry points: main.c Emulator runtime · cpu.c CPU execution · ppu.c PPU test renderer · cartridge.c ROM loading
Components 9
Runtime orchestration
- Emulator runtime
src/main.c
Emulation core
- CPU execution
src/cpu.c - Address space
src/memory.c
Cartridge and display
- ROM loading
src/cartridge.c - Header inspection
src/cartridge.c - PPU test renderer
src/ppu.c
Other components
- User
- ROM file
- Console output
Connections 14
- User → Emulator runtime: runs
README.md - Emulator runtime → Address space: resets
src/main.c - Emulator runtime → CPU execution: resets
src/main.c - Emulator runtime → PPU test renderer: resets
src/main.c - Emulator runtime → ROM loading: loads ROM
src/main.c - Emulator runtime → Header inspection: inspects header
src/main.c - Emulator runtime → CPU execution: steps execution
src/main.c - CPU execution → Address space: reads instructions
src/cpu.c - ROM loading → ROM file: reads ROM
src/cartridge.c - Emulator runtime → PPU test renderer: renders pattern
src/main.c - Emulator runtime → PPU test renderer: prints framebuffer
src/main.c - Emulator runtime → Console output: prints status
src/main.c - PPU test renderer → Console output: prints ASCII
src/ppu.c - Emulator runtime → CPU execution: dumps registers
src/main.c