// Memory on the Gameboy is mapped. A memory read to a specific address can read the cart, ram, IO, OAM etc depending on the address public Memory(DmgSystem dmg) { this.dmg = dmg; GameRom = dmg.rom; BootstrapRom = dmg.bootstrapRom; ppu = dmg.ppu; interrupts = dmg.interrupts; Ram = new byte[0x2000]; VRam = new byte[0x2000]; OamRam = new Byte[0x100]; Io = new Byte[0x100]; HRam = new Byte[0x80]; }
public Interrupts(DmgSystem dmg) { this.dmg = dmg; }
public Ppu(DmgSystem dmg) { this.dmg = dmg; }
public DmgTimer(DmgSystem dmg) { this.dmg = dmg; }
public Joypad(Interrupts interrupts, DmgSystem dmg) { this.dmg = dmg; this.interrupts = interrupts; }