[NES] setup a tiny bit of infrastructure for peeking the ppu instead of reading it, but really it isnt necessary until some of the more sophisticated mappers are made

This commit is contained in:
zeromus 2011-03-13 19:35:50 +00:00
parent 0eda3bd2ab
commit aa6e1872df
2 changed files with 7 additions and 1 deletions

View File

@ -176,7 +176,7 @@ namespace BizHawk.Emulation.Consoles.Nintendo
var SystemBus = new MemoryDomain("System Bus", 0x10000, Endian.Little,
addr => ReadMemory((ushort)addr), (addr, value) => WriteMemory((ushort)addr, value));
var PPUBus = new MemoryDomain("PPU Bus", 0x4000, Endian.Little,
addr => ppu.ppubus_read(addr), (addr, value) => ppu.ppubus_write(addr, value));
addr => ppu.ppubus_peek(addr), (addr, value) => ppu.ppubus_write(addr, value));
var dCIRAM = new MemoryDomain("CIRAM (nametables)", 0x800, Endian.Little,
addr => CIRAM[addr & 0x07FF], (addr, value) => CIRAM[addr & 0x07FF] = value);

View File

@ -25,6 +25,12 @@ namespace BizHawk.Emulation.Consoles.Nintendo
return nes.board.ReadPPU(addr);
}
//debug tools peek into the ppu through this
public byte ppubus_peek(int addr)
{
return nes.board.PeekPPU(addr);
}
enum PPUPHASE {
VBL, BG, OBJ
};