apply new firmware load system to ColecoVision and Intellivision
This commit is contained in:
parent
39ff347483
commit
87f8d13ca5
|
@ -3151,6 +3151,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
game.System = "SNES";
|
||||
nextComm.SNES_ExePath = SNES_Prepare(Global.Config.SNESProfile);
|
||||
|
||||
// need to get rid of this hack at some point
|
||||
((CoreFileProvider)nextComm.CoreFileProvider).SubfileDirectory = Path.GetDirectoryName(path.Replace("|", "")); //Dirty hack to get around archive filenames (since we are just getting the directory path, it is safe to mangle the filename
|
||||
|
||||
var snes = new LibsnesCore(nextComm);
|
||||
|
@ -3264,34 +3265,14 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
break;
|
||||
case "Coleco":
|
||||
var colbiosPath = Global.FirmwareManager.Request("Coleco", "Bios");
|
||||
var colfile = colbiosPath != null ? new FileInfo(colbiosPath) : null;
|
||||
if (colfile == null || !colfile.Exists)
|
||||
{
|
||||
MessageBox.Show("Unable to find the required ColecoVision BIOS file - \n" + colbiosPath, "Unable to load BIOS", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
throw new Exception();
|
||||
}
|
||||
else
|
||||
{
|
||||
var c = new ColecoVision(nextComm, game, rom.RomData, colbiosPath, Global.Config.ColecoSkipBiosIntro);
|
||||
var c = new ColecoVision(nextComm, game, rom.RomData, Global.Config.ColecoSkipBiosIntro);
|
||||
nextEmulator = c;
|
||||
}
|
||||
break;
|
||||
case "INTV":
|
||||
{
|
||||
var intv = new Intellivision(nextComm, game, rom.RomData);
|
||||
var eromPath = Global.FirmwareManager.Request("INTV", "EROM");
|
||||
if (!File.Exists(eromPath))
|
||||
{
|
||||
throw new InvalidOperationException("Specified EROM path does not exist:\n\n" + eromPath);
|
||||
}
|
||||
intv.LoadExecutiveRom(eromPath);
|
||||
var gromPath = Global.FirmwareManager.Request("INTV", "GROM");
|
||||
if (!File.Exists(gromPath))
|
||||
{
|
||||
throw new InvalidOperationException("Specified GROM path does not exist:\n\n" + gromPath);
|
||||
}
|
||||
intv.LoadGraphicsRom(gromPath);
|
||||
nextEmulator = intv;
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace BizHawk.Emulation.Cores.ColecoVision
|
|||
public SN76489 PSG;
|
||||
public byte[] Ram = new byte[1024];
|
||||
|
||||
public ColecoVision(CoreComm comm, GameInfo game, byte[] rom, string biosPath, bool skipbios)
|
||||
public ColecoVision(CoreComm comm, GameInfo game, byte[] rom, bool skipbios)
|
||||
{
|
||||
CoreComm = comm;
|
||||
|
||||
|
@ -37,6 +37,7 @@ namespace BizHawk.Emulation.Cores.ColecoVision
|
|||
PSG = new SN76489();
|
||||
|
||||
// TODO: hack to allow bios-less operation would be nice, no idea if its feasible
|
||||
string biosPath = CoreComm.CoreFileProvider.GetFirmwarePath("Coleco", "Bios", true, "Coleco BIOS file is required.");
|
||||
BiosRom = File.ReadAllBytes(biosPath);
|
||||
|
||||
if (game["NoSkip"])
|
||||
|
|
|
@ -83,6 +83,9 @@ namespace BizHawk.Emulation.Cores.Intellivision
|
|||
Connect();
|
||||
|
||||
Cpu.LogData();
|
||||
|
||||
LoadExecutiveRom(CoreComm.CoreFileProvider.GetFirmwarePath("INTV", "EROM", true, "Executive ROM is required."));
|
||||
LoadGraphicsRom(CoreComm.CoreFileProvider.GetFirmwarePath("INTV", "GROM", true, "Graphics ROM is required."));
|
||||
}
|
||||
|
||||
public void FrameAdvance(bool render, bool rendersound)
|
||||
|
|
Loading…
Reference in New Issue