basic wire-up of Intellivision core

This commit is contained in:
beirich 2012-07-08 04:20:53 +00:00
parent 8d254113c2
commit 36ba018ae0
4 changed files with 141 additions and 1 deletions

View File

@ -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\Intellivision.cs" />
<Compile Include="Consoles\Nintendo\NES\APU.cs" />
<Compile Include="Consoles\Nintendo\NES\BoardSystem.cs" />
<Compile Include="Consoles\Nintendo\NES\Boards\AVE-NINA.cs" />
@ -237,6 +238,8 @@
<Compile Include="CPUs\68000\Memory.cs" />
<Compile Include="CPUs\68000\OpcodeTable.cs" />
<Compile Include="CPUs\68000\Tables.cs" />
<Compile Include="CPUs\CP1610\CP1610.cs" />
<Compile Include="CPUs\CP1610\Execute.cs" />
<Compile Include="CPUs\HuC6280\Disassembler.cs" />
<Compile Include="CPUs\HuC6280\Execute.cs" />
<Compile Include="CPUs\HuC6280\HuC6280.cs" />

View File

@ -0,0 +1,130 @@
using System;
using System.IO;
using System.Collections.Generic;
using BizHawk.Emulation.CPUs.CP1610;
namespace BizHawk.Emulation.Consoles.Mattel
{
public sealed partial class Intellivision : IEmulator
{
byte[] Rom;
GameInfo Game;
CP1610 Cpu ;
public Intellivision(GameInfo game, byte[] rom)
{
Rom = rom;
Game = game;
Cpu = new CP1610();
Cpu.ReadMemory = ReadMemory;
Cpu.WriteMemory = WriteMemory;
CoreOutputComm = new CoreOutputComm();
}
public byte ReadMemory(ushort addr)
{
return 0xFF; // TODO you need to implement a memory mapper.
}
public void WriteMemory(ushort addr, byte value)
{
// TODO
}
public void FrameAdvance(bool render)
{
Cpu.Execute(999); // execute some cycles. this will do nothing useful until a memory mapper is created.
}
// This is all crap to worry about later.
public IVideoProvider VideoProvider { get { return new NullEmulator(); } }
public ISoundProvider SoundProvider { get { return NullSound.SilenceProvider; } }
public ControllerDefinition ControllerDefinition
{
get { return null; }
}
public IController Controller { get; set; }
public int Frame
{
get { return 0; }
}
public int LagCount
{
get { return 0; }
set { }
}
public bool IsLagFrame { get { return false; } }
public string SystemId
{
get { return "INTV"; }
}
public bool DeterministicEmulation { get; set; }
public byte[] SaveRam { get { return null; } }
public bool SaveRamModified
{
get { return false; }
set { }
}
public void ResetFrameCounter()
{
}
public void SaveStateText(TextWriter writer)
{
throw new NotImplementedException();
}
public void LoadStateText(TextReader reader)
{
throw new NotImplementedException();
}
public void SaveStateBinary(BinaryWriter writer)
{
throw new NotImplementedException();
}
public void LoadStateBinary(BinaryReader reader)
{
throw new NotImplementedException();
}
public byte[] SaveStateBinary()
{
return new byte[0];
}
public CoreInputComm CoreInputComm { get; set; }
public CoreOutputComm CoreOutputComm { get; private set; }
public IList<MemoryDomain> MemoryDomains
{
get { throw new NotImplementedException(); }
}
public MemoryDomain MainMemory
{
get { throw new NotImplementedException(); }
}
public void Dispose()
{
}
}
}

View File

@ -139,6 +139,7 @@ namespace BizHawk
case ".NES": Game.System = "NES"; break;
case ".A26": Game.System = "A26"; break;
case ".COL": Game.System = "COLV"; break;
case ".INT": Game.System = "INTV"; break;
}
Game.Name = Path.GetFileNameWithoutExtension(fileName).Replace('_', ' ');

View File

@ -15,6 +15,7 @@ using BizHawk.Emulation.Consoles.Nintendo;
using BizHawk.Emulation.Consoles.Coleco;
using BizHawk.MultiClient.tools;
using System.Collections.Generic;
using BizHawk.Emulation.Consoles.Mattel;
namespace BizHawk.MultiClient
{
@ -1109,7 +1110,7 @@ namespace BizHawk.MultiClient
if (path == null) return false;
using (var file = new HawkFile())
{
string[] romExtensions = new string[] { "SMS", "PCE", "SGX", "GG", "SG", "BIN", "GEN", "SMD", "GB", "NES", "ROM" };
string[] romExtensions = new string[] { "SMS", "PCE", "SGX", "GG", "SG", "BIN", "GEN", "SMD", "GB", "NES", "ROM", "INT" };
//lets not use this unless we need to
//file.NonArchiveExtensions = romExtensions;
@ -1284,6 +1285,10 @@ namespace BizHawk.MultiClient
SMS c = new SMS(game, rom.RomData);//new ColecoVision(game, rom.FileData);
nextEmulator = c;
break;
case "INTV":
Intellivision intv = new Intellivision(game, rom.RomData);
nextEmulator = intv;
break;
}
}
@ -2488,6 +2493,7 @@ namespace BizHawk.MultiClient
"Genesis (experimental)", "*.gen;*.smd;*.bin;*.cue;%ARCH%",
"Gameboy (experimental)", "*.gb;%ARCH%",
"Colecovision (very experimental)", "*.col;%ARCH%",
"Intellivision (very experimental)", "*.int;%ARCH%",
"PSX Executables (experimental)", "*.exe",
"All Files", "*.*");
}