Atari 2600 - implement mapper FE

This commit is contained in:
adelikat 2014-04-12 03:48:18 +00:00
parent 50c8e05d65
commit a1cb4b151e
3 changed files with 11 additions and 5 deletions

View File

@ -68,8 +68,8 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
public byte ReadMemory(ushort addr)
{
_mapper.Bit13 = addr.Bit(13);
var temp = _mapper.ReadMemory((ushort)(addr & 0x1FFF));
CoreComm.MemoryCallbackSystem.CallRead(addr);
return temp;

View File

@ -39,5 +39,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
public virtual void HardReset() { }
// THis is here purely for mapper 3E because it needs the 13th bit to determine bankswitching (but only receives the first 12 on read memory)
public bool Bit13 { get; set; }
}
}

View File

@ -1,4 +1,4 @@
using System;
using BizHawk.Common;
namespace BizHawk.Emulation.Cores.Atari.Atari2600
{
@ -56,12 +56,16 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
Using emulators or similar there is a large cheat that can be used. A13 can be used
to simply select which 8K bank to be in.
*/
internal class mFE : MapperBase
{
public mFE()
public override byte ReadMemory(ushort addr)
{
throw new NotImplementedException();
if (addr < 0x1000)
{
return base.ReadMemory(addr);
}
return Core.Rom[(addr & 0x0FFF) + (Bit13 ? 0 : 4096)];
}
}
}