NES Memory domains - Add PRG & CHR Rom

This commit is contained in:
andres.delikat 2011-03-06 03:34:13 +00:00
parent 97ebb20edd
commit ed9930be62
1 changed files with 13 additions and 2 deletions

View File

@ -469,11 +469,22 @@ namespace BizHawk.Emulation.Consoles.Nintendo
domains.Add(BatteryRam);
}
if (board.
var PRGROM = new MemoryDomain("PRG Rom", romInfo.PRG_Size * 16384, Endian.Little,
addr => romInfo.ROM[addr], (addr, value) => romInfo.VROM[addr] = value);
domains.Add(PRGROM);
if (romInfo.CHR_Size > 0)
{
var CHRROM = new MemoryDomain("CHR Rom", romInfo.CHR_Size * 8192, Endian.Little,
addr => romInfo.VROM[addr], (addr, value) => romInfo.VROM[addr] = value);
domains.Add(CHRROM);
}
memoryDomains = domains.AsReadOnly();
}
//TODO: PRAM & CRAM
public string SystemId { get { return "NES"; } }
public IList<MemoryDomain> MemoryDomains { get { return memoryDomains; } }
public MemoryDomain MainMemory { get { return memoryDomains[0]; } }