How f-biondi/nth-boy works
Main Components
a) Core Emulation Layer (gbcore):
• CPU Module
• Memory Management Unit (MMU)
• Picture Processing Unit (PPU)
• Memory Bank Controllers (MBC)
• I/O Controllers
b) Platform-Specific Implementations:
• Desktop Application (nth-boy-desktop)
• WebAssembly Interface (nth-boy-wasm)
Detailed Component Breakdown
CPU Module:
• Registers subsystem
• Instruction execution flow
Memory Management Unit (MMU):
• Different address spaces:
• Cartridge (ROM/RAM)
• I/O Registers
• OAM (Object Attribute Memory)
• Memory bank controllers (MBC1, MBC2, MBC3, MBC5)
PPU (Graphics):
• Pixel fetcher subsystem
• Pixel FIFO components
• Background and sprite fetcher paths
I/O Components:
• LCD Controller
• Joypad Input
• Timer System
[Platform Layer]
• ↑↓
[Core Emulation Layer]
• ↑↓
[Hardware Emulation Components]
Key Relationships to Highlight
• MMU's central role in connecting components
• PPU's pixel pipeline flow
• Memory bank controller interaction with cartridge data
• Platform interface with core emulation layer
Implementation Details
For each major component, include:
• Input/output interfaces
• Key state management
• Communication protocols between components
[Desktop UI] ←→ [WASM/Web UI]
• ↓ ↓
• [Platform Interfaces]
• ↓
• [Core Emulator]
• ↙ ↓ ↘
[CPU] ← [MMU] → [PPU]
• ↘ ↑ ↗
• [I/O System]