// The Game Boy contains two 32x32 tile background maps in VRAM at addresses 9800h-9BFFh and 9C00h-9FFFh. // Each can be used either to display "normal" background, or "window" background. public TileMap(IPpu ppu, IMemoryReader memory, ushort vramOffset) { if (vramOffset != 0x9800 && vramOffset != 0x9C00) { throw new ArgumentException("Background map must be located at cofrrect address"); } this.vramOffset = vramOffset; this.ppu = ppu; this.memory = memory; }
public Emulator(ICpu cpu, IPpu ppu, IMemory memory) { this.cpu = cpu; this.ppu = ppu; this.memory = memory; }
public LcdControlRegister(IPpu ppu) { this.ppu = ppu; }
public PpuMemoryRegisters(IPpu ppu) { this.ppu = ppu; LCDC = new LcdControlRegister(ppu); STAT = new LcdStatusRegister(ppu); }
public LcdStatusRegister(IPpu ppu) { this.ppu = ppu; }
public Memory(IPpu ppu, Lazy<IIO> io) { this.ppu = ppu; this.io = io; ram = new byte[ushort.MaxValue]; }