Atri - implement mapper F6
This commit is contained in:
parent
79782defbe
commit
7e30f2844f
|
@ -78,8 +78,10 @@
|
|||
<Compile Include="Buffer.cs" />
|
||||
<Compile Include="Consoles\Atari\2600\Atari2600.cs" />
|
||||
<Compile Include="Consoles\Atari\2600\Atari2600.Core.cs" />
|
||||
<Compile Include="Consoles\Atari\2600\Mappers\mCV.cs" />
|
||||
<Compile Include="Consoles\Atari\2600\Mappers\m2K.cs" />
|
||||
<Compile Include="Consoles\Atari\2600\Mappers\m4K.cs" />
|
||||
<Compile Include="Consoles\Atari\2600\Mappers\mF6.cs" />
|
||||
<Compile Include="Consoles\Atari\2600\Mappers\mF8.cs" />
|
||||
<Compile Include="Consoles\Atari\2600\oldTIA.cs" />
|
||||
<Compile Include="Consoles\Atari\2600\M6532.cs" />
|
||||
|
|
|
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||
using System.IO;
|
||||
using BizHawk.Emulation.CPUs.M6502;
|
||||
using BizHawk.Emulation.Consoles.Atari;
|
||||
using BizHawk.Emulation.Consoles.Atari._2600;
|
||||
|
||||
namespace BizHawk
|
||||
{
|
||||
|
@ -109,7 +110,9 @@ namespace BizHawk
|
|||
{
|
||||
case "4K": mapper = new m4K(); break;
|
||||
case "2K": mapper = new m2K(); break;
|
||||
case "CV": mapper = new mCV(); break;
|
||||
case "F8": mapper = new mF8(); break;
|
||||
case "F6": mapper = new mF6(); break;
|
||||
default: throw new InvalidOperationException("mapper not supported: " + game.GetOptionsDict()["m"]);
|
||||
}
|
||||
mapper.core = this;
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace BizHawk.Emulation.Consoles.Atari._2600
|
||||
{
|
||||
class mCV: MapperBase
|
||||
{
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace BizHawk.Emulation.Consoles.Atari._2600
|
||||
{
|
||||
class mF6 : MapperBase
|
||||
{
|
||||
int toggle = 0;
|
||||
|
||||
public override byte ReadMemory(ushort addr)
|
||||
{
|
||||
Address(addr);
|
||||
if (addr < 0x1000) return base.ReadMemory(addr);
|
||||
return core.rom[toggle * 4 * 1024 + (addr & 0xFFF)];
|
||||
}
|
||||
public override void WriteMemory(ushort addr, byte value)
|
||||
{
|
||||
Address(addr);
|
||||
if (addr < 0x1000) base.WriteMemory(addr, value);
|
||||
}
|
||||
|
||||
public override void SyncState(Serializer ser)
|
||||
{
|
||||
base.SyncState(ser);
|
||||
ser.Sync("toggle", ref toggle);
|
||||
}
|
||||
|
||||
void Address(ushort addr)
|
||||
{
|
||||
if (addr == 0x1FF6) toggle = 0;
|
||||
if (addr == 0x1FF7) toggle = 1;
|
||||
if (addr == 0x1FF8) toggle = 2;
|
||||
if (addr == 0x1FF9) toggle = 3;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue