Atari 2600 - DPC memory domain (added when using the DPC mapper)

This commit is contained in:
adelikat 2014-04-11 01:05:50 +00:00
parent bbbc219105
commit 2200b05dc2
3 changed files with 14 additions and 11 deletions
BizHawk.Emulation.Cores/Consoles/Atari/2600

View File

@ -49,7 +49,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
addr => _mapper.PeekMemory((ushort) addr),
(addr, value) => { })
};
MemoryDomains = new MemoryDomainList(domains);
CoreComm.CpuTraceAvailable = true;
Rom = rom;
_game = game;
@ -61,6 +61,18 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
Console.WriteLine("Game uses mapper " + game.GetOptionsDict()["m"]);
RebootCore();
if (_mapper is mDPC) // TODO: also mDPCPlus
{
domains.Add(new MemoryDomain(
"DPC",
2048,
MemoryDomain.Endian.Little,
addr => (_mapper as mDPC).DspData[addr],
(addr, value) => (_mapper as mDPC).DspData[addr] = value));
}
MemoryDomains = new MemoryDomainList(domains);
}
public string SystemId { get { return "A26"; } }

View File

@ -237,7 +237,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
private float _fractionalClocks; // Fractional DPC music OSC clocks unused during the last update
private byte[] _dspData;
private byte[] DspData
public byte[] DspData
{
get
{

View File

@ -66,15 +66,6 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
{
_bank4K = temp & myStartBank;
}
//switch (addr & 0x1840)
//{
// case 0x0800:
// _bank4K = 0;
// break;
// case 0x0840:
// _bank4K = 1;
// break;
//}
}
}
}