How oscarpitcho/gameboj works
Main Components
a. Core Emulator Components:
• CPU Emulation (src/ch/epfl/gameboj/component/cpu)
• Memory Management (src/ch/epfl/gameboj/component/memory)
• LCD Controller (src/ch/epfl/gameboj/component/lcd)
• Cartridge System (src/ch/epfl/gameboj/component/cartridge)
• Timer (src/ch/epfl/gameboj/component/Timer.java)
• Joypad (src/ch/epfl/gameboj/component/Joypad.java)
b. Supporting Systems:
• Bus System (src/ch/epfl/gameboj/Bus.java)
• Bit Operations (src/ch/epfl/gameboj/bits)
• GUI Interface (src/ch/epfl/gameboj/gui)
┌─────────────────────┐
• JavaFX GUI │
• (Main.java) │
• ┘
┌─────────────────────────────────────────────┐
• GameBoy.java │
• ┌─────────┐ ┌─────────┐ ┌──────────────┐ │
• CPU │ │ Timer │ │LCD Controller │ │
• ┘ └─────────┘ └──────────────┘ │
• ┌─────────┐ ┌─────────┐ ┌──────────────┐ │
• Joypad │ │ MBC0/1 │ │BootRom Ctrl │ │
• ┘ └─────────┘ └──────────────┘ │
• ┘
┌─────────────────────────────────────────────┐
• Bus │
• ┤
• RAM │ ROM │ Address Map │
• ┘
Key Elements to Highlight
• Blue for core hardware emulation components (CPU, LCD, etc.)
• Green for memory components (RAM, ROM)
• Yellow for interface components (GUI, Joypad)
• Red for control components (Bus, AddressMap)
• Data flow between components through the bus
• Control flow from the GUI to emulated components
• Clock signal distribution to Clocked components
Important Relationships
• All components implement the Component interface
• Clocked components implement the Clocked interface
• The Bus connects all components together
• The CPU's interaction with other components through the bus
• Memory controllers' relationship with actual memory components
• Cartridge system's relationship with MBC implementations
Implementation Details
• The component-based architecture
• The bus-centered communication
• The clear separation between hardware emulation and user interface
• The memory management hierarchy
• The clock-driven nature of the system
• Nested components
• Clear labeling
• Export to high-resolution formats