ColecoVision merge MemoryMap.cs into ColecoVision.cs
This commit is contained in:
parent
44ef1f9568
commit
d7928377f2
|
@ -416,7 +416,6 @@
|
|||
<Compile Include="Consoles\Coleco\ColecoVision.ISoundProvider.cs">
|
||||
<DependentUpon>ColecoVision.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Consoles\Coleco\MemoryMap.cs" />
|
||||
<Compile Include="Consoles\Coleco\TMS9918A.cs" />
|
||||
<Compile Include="Consoles\Coleco\ColecoControllerDeck.cs" />
|
||||
<Compile Include="Consoles\Coleco\ColecoControllers.cs" />
|
||||
|
|
|
@ -197,5 +197,37 @@ namespace BizHawk.Emulation.Cores.ColecoVision
|
|||
}
|
||||
|
||||
private int frame;
|
||||
|
||||
public byte ReadMemory(ushort addr)
|
||||
{
|
||||
if (addr >= 0x8000)
|
||||
{
|
||||
return RomData[addr & 0x7FFF];
|
||||
}
|
||||
|
||||
if (addr >= 0x6000)
|
||||
{
|
||||
return Ram[addr & 1023];
|
||||
}
|
||||
|
||||
if (addr < 0x2000)
|
||||
{
|
||||
return BiosRom[addr];
|
||||
}
|
||||
|
||||
//Console.WriteLine("Unhandled read at {0:X4}", addr);
|
||||
return 0xFF;
|
||||
}
|
||||
|
||||
public void WriteMemory(ushort addr, byte value)
|
||||
{
|
||||
if (addr >= 0x6000 && addr < 0x8000)
|
||||
{
|
||||
Ram[addr & 1023] = value;
|
||||
return;
|
||||
}
|
||||
|
||||
//Console.WriteLine("Unhandled write at {0:X4}:{1:X2}", addr, value);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,37 +0,0 @@
|
|||
namespace BizHawk.Emulation.Cores.ColecoVision
|
||||
{
|
||||
public partial class ColecoVision
|
||||
{
|
||||
public byte ReadMemory(ushort addr)
|
||||
{
|
||||
if (addr >= 0x8000)
|
||||
{
|
||||
return RomData[addr & 0x7FFF];
|
||||
}
|
||||
|
||||
if (addr >= 0x6000)
|
||||
{
|
||||
return Ram[addr & 1023];
|
||||
}
|
||||
|
||||
if (addr < 0x2000)
|
||||
{
|
||||
return BiosRom[addr];
|
||||
}
|
||||
|
||||
//Console.WriteLine("Unhandled read at {0:X4}", addr);
|
||||
return 0xFF;
|
||||
}
|
||||
|
||||
public void WriteMemory(ushort addr, byte value)
|
||||
{
|
||||
if (addr >= 0x6000 && addr < 0x8000)
|
||||
{
|
||||
Ram[addr & 1023] = value;
|
||||
return;
|
||||
}
|
||||
|
||||
//Console.WriteLine("Unhandled write at {0:X4}:{1:X2}", addr, value);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue