Atari 2600 - a bit mroe reorg

This commit is contained in:
adelikat 2014-04-05 15:04:03 +00:00
parent a230210565
commit 696affa5be
3 changed files with 33 additions and 27 deletions

View File

@ -181,6 +181,7 @@
<Compile Include="Consoles\Atari\2600\Mappers\m3E.cs" />
<Compile Include="Consoles\Atari\2600\Mappers\m3F.cs" />
<Compile Include="Consoles\Atari\2600\Mappers\m4A50.cs" />
<Compile Include="Consoles\Atari\2600\Mappers\MapperBase.cs" />
<Compile Include="Consoles\Atari\2600\Mappers\mAR.cs" />
<Compile Include="Consoles\Atari\2600\Mappers\mDPC.cs" />
<Compile Include="Consoles\Atari\2600\Mappers\mDPCPlus.cs" />

View File

@ -193,7 +193,8 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
_mapper = new mSB();
break;
default: throw new InvalidOperationException("mapper not supported: " + this._game.GetOptionsDict()["m"]);
default:
throw new InvalidOperationException("mapper not supported: " + _game.GetOptionsDict()["m"]);
}
_mapper.Core = this;
@ -314,30 +315,4 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
return value;
}
}
public class MapperBase
{
public Atari2600 Core { get; set; }
public virtual byte ReadMemory(ushort addr)
{
return Core.BaseReadMemory(addr);
}
public virtual byte PeekMemory(ushort addr)
{
return Core.BasePeekMemory(addr);
}
public virtual void WriteMemory(ushort addr, byte value)
{
Core.BaseWriteMemory(addr, value);
}
public virtual void SyncState(Serializer ser) { }
public virtual void Dispose() { }
public virtual void ClockCpu() { }
}
}

View File

@ -0,0 +1,30 @@
using BizHawk.Common;
namespace BizHawk.Emulation.Cores.Atari.Atari2600
{
public class MapperBase
{
public Atari2600 Core { get; set; }
public virtual byte ReadMemory(ushort addr)
{
return Core.BaseReadMemory(addr);
}
public virtual byte PeekMemory(ushort addr)
{
return Core.BasePeekMemory(addr);
}
public virtual void WriteMemory(ushort addr, byte value)
{
Core.BaseWriteMemory(addr, value);
}
public virtual void SyncState(Serializer ser) { }
public virtual void Dispose() { }
public virtual void ClockCpu() { }
}
}