BizHawk/BizHawk.Emulation.Cores/Consoles/Atari/2600/Mappers/MapperBase.cs

44 lines
982 B
C#

using BizHawk.Common;
namespace BizHawk.Emulation.Cores.Atari.Atari2600
{
public class MapperBase
{
public MapperBase(Atari2600 core)
{
Core = core;
}
protected readonly Atari2600 Core;
public virtual byte[] CartRam => new byte[0];
public virtual byte ReadMemory(ushort addr)
=> Core.BaseReadMemory(addr);
public virtual byte PeekMemory(ushort addr)
=> Core.BasePeekMemory(addr);
public virtual void WriteMemory(ushort addr, byte value)
=> Core.BaseWriteMemory(addr, value);
public virtual void PokeMemory(ushort addr, byte value)
=> Core.BasePokeMemory(addr, value);
public virtual void SyncState(Serializer ser)
{
}
public virtual void ClockCpu()
{
}
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; }
}
}