-Made Executive ROM and Graphics ROM read-only. I still haven't made the memory map accessibility limited by the VBlank Period, but I'm assuming that should come way later.
-Initialized the memory devices with a tentative size that ignores the unofficial ranges. -Masked addresses to match those sizes (That's my understanding of what the memory map needs to do based on other examples). -Added the ICart interface. -Started the Intellicart parser; got far enough to know that the files I'm working with are not Intellicarts. ^_^
This commit is contained in:
parent
bd1aaf7ff7
commit
4f9539b73c
|
@ -114,6 +114,7 @@
|
|||
<Compile Include="Consoles\GB\Input.cs" />
|
||||
<Compile Include="Consoles\GB\MemoryMap.cs" />
|
||||
<Compile Include="Consoles\GB\GB.cs" />
|
||||
<Compile Include="Consoles\Intellivision\Intellicart.cs" />
|
||||
<Compile Include="Consoles\Intellivision\Intellivision.cs" />
|
||||
<Compile Include="Consoles\Intellivision\MemoryMap.cs" />
|
||||
<Compile Include="Consoles\Nintendo\NES\APU.cs" />
|
||||
|
@ -311,6 +312,7 @@
|
|||
<Compile Include="Interfaces\Base Implementations\NullController.cs" />
|
||||
<Compile Include="Interfaces\Base Implementations\NullEmulator.cs" />
|
||||
<Compile Include="Interfaces\CoreComms.cs" />
|
||||
<Compile Include="Interfaces\ICart.cs" />
|
||||
<Compile Include="Properties\svnrev.cs" />
|
||||
<Compile Include="QuickCollections.cs" />
|
||||
<Compile Include="Sound\CDAudio.cs" />
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace BizHawk.Emulation.Consoles.Intellivision
|
||||
{
|
||||
public sealed partial class Intellivision : ICart
|
||||
{
|
||||
private ushort[] memory = new ushort[65536];
|
||||
|
||||
public void Parse()
|
||||
{
|
||||
// Check to see if the header is valid.
|
||||
if (Rom[0] != 0xA8 || Rom[1] != (0xFF ^ Rom[2]))
|
||||
throw new ArgumentException();
|
||||
}
|
||||
|
||||
public ushort ReadMemory(ushort addr, out bool responded)
|
||||
{
|
||||
responded = false;
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void WriteMemory(ushort addr, ushort value, out bool responded)
|
||||
{
|
||||
responded = false;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -16,6 +16,7 @@ namespace BizHawk.Emulation.Consoles.Intellivision
|
|||
{
|
||||
Rom = rom;
|
||||
Game = game;
|
||||
Parse();
|
||||
|
||||
Cpu = new CP1610();
|
||||
Cpu.ReadMemory = ReadMemory;
|
||||
|
|
|
@ -7,13 +7,13 @@ namespace BizHawk.Emulation.Consoles.Intellivision
|
|||
{
|
||||
public sealed partial class Intellivision
|
||||
{
|
||||
private ushort[] STIC_Registers;
|
||||
private ushort[] Scratchpad_RAM;
|
||||
private ushort[] PSG_Registers;
|
||||
private ushort[] System_RAM;
|
||||
private ushort[] Executive_ROM;
|
||||
private ushort[] Graphics_ROM;
|
||||
private ushort[] Graphics_RAM;
|
||||
private ushort[] STIC_Registers = new ushort[64];
|
||||
private ushort[] Scratchpad_RAM = new ushort[240];
|
||||
private ushort[] PSG_Registers = new ushort[16];
|
||||
private ushort[] System_RAM = new ushort[352];
|
||||
private ushort[] Executive_ROM = new ushort[4096];
|
||||
private ushort[] Graphics_ROM = new ushort[2048];
|
||||
private ushort[] Graphics_RAM = new ushort[512];
|
||||
|
||||
public ushort ReadMemory(ushort addr)
|
||||
{
|
||||
|
@ -21,19 +21,19 @@ namespace BizHawk.Emulation.Consoles.Intellivision
|
|||
{
|
||||
case 0x0000:
|
||||
if (addr >= 0x0100 && addr <= 0x01EF)
|
||||
return Scratchpad_RAM[addr];
|
||||
return Scratchpad_RAM[addr & 0x00EF];
|
||||
if (addr >= 0x01F0 && addr <= 0x01FF)
|
||||
return PSG_Registers[addr];
|
||||
return PSG_Registers[addr & 0x000F];
|
||||
if (addr >= 0x0200 && addr <= 0x035F)
|
||||
return System_RAM[addr];
|
||||
return System_RAM[addr & 0x015F];
|
||||
break;
|
||||
case 0x1000:
|
||||
return Executive_ROM[addr];
|
||||
return Executive_ROM[addr & 0x0FFF];
|
||||
case 0x3000:
|
||||
if (addr >= 0x3000 && addr <= 0x37FF)
|
||||
return Graphics_ROM[addr];
|
||||
return Graphics_ROM[addr & 0x07FF];
|
||||
if (addr >= 0x3800 && addr <= 0x39FF)
|
||||
return Graphics_RAM[addr];
|
||||
return Graphics_RAM[addr & 0x01FF];
|
||||
break;
|
||||
}
|
||||
throw new NotImplementedException();
|
||||
|
@ -46,32 +46,24 @@ namespace BizHawk.Emulation.Consoles.Intellivision
|
|||
case 0x0000:
|
||||
if (addr >= 0x0100 && addr <= 0x01EF)
|
||||
{
|
||||
Scratchpad_RAM[addr] = value;
|
||||
Scratchpad_RAM[addr & 0x00EF] = value;
|
||||
return;
|
||||
}
|
||||
if (addr >= 0x01F0 && addr <= 0x01FF)
|
||||
{
|
||||
PSG_Registers[addr] = value;
|
||||
PSG_Registers[addr & 0x000F] = value;
|
||||
return;
|
||||
}
|
||||
if (addr >= 0x0200 && addr <= 0x035F)
|
||||
{
|
||||
System_RAM[addr] = value;
|
||||
System_RAM[addr & 0x015F] = value;
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 0x1000:
|
||||
Executive_ROM[addr] = value;
|
||||
return;
|
||||
case 0x3000:
|
||||
if (addr >= 0x3000 && addr <= 0x37FF)
|
||||
{
|
||||
Graphics_ROM[addr] = value;
|
||||
return;
|
||||
}
|
||||
if (addr >= 0x3800 && addr <= 0x39FF)
|
||||
{
|
||||
Graphics_RAM[addr] = value;
|
||||
Graphics_RAM[addr & 0x01FF] = value;
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace BizHawk
|
||||
{
|
||||
public interface ICart
|
||||
{
|
||||
ushort ReadMemory(ushort addr, out bool responded);
|
||||
void WriteMemory(ushort addr, ushort value, out bool responded);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue