NES: MMC5: add "ExRAM" as memory domain, for debugging purposes

This commit is contained in:
goyuken 2012-10-29 17:11:19 +00:00
parent e3e52ed305
commit 8a67af227e
2 changed files with 8 additions and 2 deletions

View File

@ -44,6 +44,11 @@ namespace BizHawk.Emulation.Consoles.Nintendo
byte product_low, product_high;
int last_nt_read;
public MemoryDomain GetExRAM()
{
return new MemoryDomain("ExRAM", EXRAM.Length, Endian.Little, (addr) => EXRAM[addr], (addr, val) => EXRAM[addr] = val);
}
public override void SyncState(Serializer ser)
{
base.SyncState(ser);

View File

@ -427,10 +427,11 @@ namespace BizHawk.Emulation.Consoles.Nintendo
domains.Add(WRAM);
}
// if there were more boards with special ram sets, we'd want to do something more general
if (board is FDS)
{
domains.Add((board as FDS).GetDiskPeeker());
}
else if (board is ExROM)
domains.Add((board as ExROM).GetExRAM());
memoryDomains = domains.AsReadOnly();
}