hook up path config for intellivision and change erom and grom to use it. now you need erom.bin and grom.bin in the Intellivision directory by default.
This commit is contained in:
parent
8eba3fb37c
commit
cfe1e749a1
|
@ -22,36 +22,26 @@ namespace BizHawk.Emulation.Consoles.Intellivision
|
|||
Stic.SetSst(Cpu.GetBusAk());
|
||||
}
|
||||
|
||||
public void LoadExecutiveRom()
|
||||
public void LoadExecutiveRom(string path)
|
||||
{
|
||||
FileStream fs = new FileStream("C:/erom.int", FileMode.Open, FileAccess.Read);
|
||||
BinaryReader r = new BinaryReader(fs);
|
||||
byte[] erom = r.ReadBytes(8192);
|
||||
var erom = File.ReadAllBytes(path);
|
||||
if (erom.Length != 8192) throw new ApplicationException("EROM file is wrong size - expected 8192 bytes");
|
||||
int index = 0;
|
||||
// Combine every two bytes into a word.
|
||||
while (index + 1 < erom.Length)
|
||||
ExecutiveRom[index / 2] = (ushort)((erom[index++] << 8) | erom[index++]);
|
||||
r.Close();
|
||||
fs.Close();
|
||||
}
|
||||
|
||||
public void LoadGraphicsRom()
|
||||
public void LoadGraphicsRom(string path)
|
||||
{
|
||||
FileStream fs = new FileStream("C:/grom.int", FileMode.Open, FileAccess.Read);
|
||||
BinaryReader r = new BinaryReader(fs);
|
||||
byte[] grom = r.ReadBytes(2048);
|
||||
for (int index = 0; index < grom.Length; index++)
|
||||
GraphicsRom[index] = grom[index];
|
||||
r.Close();
|
||||
fs.Close();
|
||||
GraphicsRom = File.ReadAllBytes(path);
|
||||
if (GraphicsRom.Length != 2048) throw new ApplicationException("GROM file is wrong size - expected 2048 bytes");
|
||||
}
|
||||
|
||||
public Intellivision(GameInfo game, byte[] rom)
|
||||
{
|
||||
Rom = rom;
|
||||
Game = game;
|
||||
LoadExecutiveRom();
|
||||
LoadGraphicsRom();
|
||||
Cart = new Intellicart();
|
||||
if (Cart.Parse(Rom) == -1)
|
||||
{
|
||||
|
|
|
@ -144,7 +144,7 @@ namespace BizHawk
|
|||
case ".A26": Game.System = "A26"; break;
|
||||
case ".COL": Game.System = "COLV"; break;
|
||||
case ".ROM":
|
||||
case ".INT": Game.System = "INTV"; break;
|
||||
case ".INT": Game.System = "INTV"; break;
|
||||
}
|
||||
|
||||
Game.Name = Path.GetFileNameWithoutExtension(fileName).Replace('_', ' ');
|
||||
|
|
|
@ -58,6 +58,13 @@ namespace BizHawk.MultiClient
|
|||
public string LastRomPath = ".";
|
||||
public string BasePath = ".";
|
||||
|
||||
public string BaseINTV = Path.Combine(".", "Intellivision");
|
||||
public string PathINTVROMs = ".";
|
||||
public string PathINTVSavestates = Path.Combine(".", "State");
|
||||
public string PathINTVSaveRAM = Path.Combine(".", "SaveRAM");
|
||||
public string PathINTVScreenshots = Path.Combine(".", "Screenshots");
|
||||
public string PathINTVCheats = Path.Combine(".", "Cheats");
|
||||
|
||||
public string BaseNES = Path.Combine(".", "NES");
|
||||
public string PathNESROMs = ".";
|
||||
public string PathNESSavestates = Path.Combine(".", "State");
|
||||
|
@ -136,6 +143,8 @@ namespace BizHawk.MultiClient
|
|||
|
||||
//BIOS Paths
|
||||
public string PathPCEBios = Path.Combine(".", "PCECDBios.pce"); //TODO: better default filename
|
||||
public string PathINTVGROM = Path.Combine(".", "grom.bin");
|
||||
public string PathINTVEROM = Path.Combine(".", "erom.bin");
|
||||
|
||||
public string FFMpegPath = "%exe%/ffmpeg.exe";
|
||||
|
||||
|
|
|
@ -1387,8 +1387,18 @@ namespace BizHawk.MultiClient
|
|||
nextEmulator = c;
|
||||
break;
|
||||
case "INTV":
|
||||
Intellivision intv = new Intellivision(game, rom.RomData);
|
||||
nextEmulator = intv;
|
||||
{
|
||||
Intellivision intv = new Intellivision(game, rom.RomData);
|
||||
string eromPath = PathManager.MakeAbsolutePath(Global.Config.PathINTVEROM, "INTV");
|
||||
if (!File.Exists(eromPath))
|
||||
throw new InvalidOperationException("Specified EROM path does not exist:\n\n" + eromPath);
|
||||
intv.LoadExecutiveRom(eromPath);
|
||||
string gromPath = PathManager.MakeAbsolutePath(Global.Config.PathINTVGROM, "INTV");
|
||||
if (!File.Exists(gromPath))
|
||||
throw new InvalidOperationException("Specified GROM path does not exist:\n\n" + gromPath);
|
||||
intv.LoadGraphicsRom(gromPath);
|
||||
nextEmulator = intv;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -20,6 +20,8 @@ namespace BizHawk.MultiClient
|
|||
//Think of other modifiers (perhaps all environment paths?)
|
||||
//If enough modifiers, path boxes can do a pull down of suggestions when user types %
|
||||
|
||||
//also....... this isnt really scalable. we need some more fancy system probably which is data-driven
|
||||
|
||||
//******************
|
||||
//Modifiers
|
||||
//%exe% - path of EXE
|
||||
|
@ -48,6 +50,15 @@ namespace BizHawk.MultiClient
|
|||
RecentForROMs.Checked = Global.Config.UseRecentForROMs;
|
||||
BasePathBox.Text = Global.Config.BasePath;
|
||||
|
||||
INTVBaseBox.Text = Global.Config.BaseINTV;
|
||||
INTVRomsBox.Text = Global.Config.PathINTVROMs;
|
||||
INTVSavestatesBox.Text = Global.Config.PathINTVSavestates;
|
||||
INTVSaveRAMBox.Text = Global.Config.PathINTVSaveRAM; ;
|
||||
INTVScreenshotsBox.Text = Global.Config.PathINTVScreenshots;
|
||||
INTVCheatsBox.Text = Global.Config.PathINTVCheats;
|
||||
INTVEROMBox.Text = Global.Config.PathINTVEROM;
|
||||
INTVGROMBox.Text = Global.Config.PathINTVGROM;
|
||||
|
||||
NESBaseBox.Text = Global.Config.BaseNES;
|
||||
NESROMsBox.Text = Global.Config.PathNESROMs;
|
||||
NESSavestatesBox.Text = Global.Config.PathNESSavestates;
|
||||
|
@ -132,6 +143,14 @@ namespace BizHawk.MultiClient
|
|||
Global.Config.UseRecentForROMs = RecentForROMs.Checked;
|
||||
Global.Config.BasePath = BasePathBox.Text;
|
||||
|
||||
Global.Config.BaseINTV = INTVBaseBox.Text;
|
||||
Global.Config.PathINTVROMs = INTVRomsBox.Text;
|
||||
Global.Config.PathINTVSavestates = INTVSavestatesBox.Text;
|
||||
Global.Config.PathINTVScreenshots = INTVScreenshotsBox.Text;
|
||||
Global.Config.PathINTVCheats = INTVCheatsBox.Text;
|
||||
Global.Config.PathINTVEROM = INTVEROMBox.Text;
|
||||
Global.Config.PathINTVGROM = INTVGROMBox.Text;
|
||||
|
||||
Global.Config.BaseNES = NESBaseBox.Text;
|
||||
Global.Config.PathNESROMs = NESROMsBox.Text;
|
||||
Global.Config.PathNESSavestates = NESSavestatesBox.Text;
|
||||
|
@ -227,58 +246,32 @@ namespace BizHawk.MultiClient
|
|||
private void RecentForROMs_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
Global.Config.UseRecentForROMs = RecentForROMs.Checked;
|
||||
if (RecentForROMs.Checked)
|
||||
{
|
||||
NESROMsBox.Enabled = false;
|
||||
BrowseNESROMs.Enabled = false;
|
||||
Sega8ROMsBox.Enabled = false;
|
||||
Sega8BrowseROMs.Enabled = false;
|
||||
GGROMBox.Enabled = false;
|
||||
GGROMsDescription.Enabled = false;
|
||||
SGROMsBox.Enabled = false;
|
||||
SGROMsDescription.Enabled = false;
|
||||
GenesisROMsBox.Enabled = false;
|
||||
GenesisBrowseROMs.Enabled = false;
|
||||
PCEROMsBox.Enabled = false;
|
||||
PCEBrowseROMs.Enabled = false;
|
||||
GBROMsBox.Enabled = false;
|
||||
GBBrowseROMs.Enabled = false;
|
||||
TI83ROMsBox.Enabled = false;
|
||||
TI83BrowseROMs.Enabled = false;
|
||||
INTVRomsBox.Enabled = !RecentForROMs.Checked;
|
||||
INTVBrowseROMs.Enabled = !RecentForROMs.Checked;
|
||||
NESROMsBox.Enabled = !RecentForROMs.Checked;
|
||||
BrowseNESROMs.Enabled = !RecentForROMs.Checked;
|
||||
Sega8ROMsBox.Enabled = !RecentForROMs.Checked;
|
||||
Sega8BrowseROMs.Enabled = !RecentForROMs.Checked;
|
||||
GGROMBox.Enabled = !RecentForROMs.Checked;
|
||||
GGROMsDescription.Enabled = !RecentForROMs.Checked;
|
||||
SGROMsBox.Enabled = !RecentForROMs.Checked;
|
||||
SGROMsDescription.Enabled = !RecentForROMs.Checked;
|
||||
GenesisROMsBox.Enabled = !RecentForROMs.Checked;
|
||||
GenesisBrowseROMs.Enabled = !RecentForROMs.Checked;
|
||||
PCEROMsBox.Enabled = !RecentForROMs.Checked;
|
||||
PCEBrowseROMs.Enabled = !RecentForROMs.Checked;
|
||||
GBROMsBox.Enabled = !RecentForROMs.Checked;
|
||||
GBBrowseROMs.Enabled = !RecentForROMs.Checked;
|
||||
TI83ROMsBox.Enabled = !RecentForROMs.Checked;
|
||||
TI83BrowseROMs.Enabled = !RecentForROMs.Checked;
|
||||
|
||||
NESROMsDescription.Enabled = false;
|
||||
Sega8ROMsDescription.Enabled = false;
|
||||
GenesisROMsDescription.Enabled = false;
|
||||
PCEROMsDescription.Enabled = false;
|
||||
GBROMsDescription.Enabled = false;
|
||||
TI83ROMsDescription.Enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
NESROMsBox.Enabled = true;
|
||||
BrowseNESROMs.Enabled = true;
|
||||
Sega8ROMsBox.Enabled = true;
|
||||
Sega8BrowseROMs.Enabled = true;
|
||||
GGROMBox.Enabled = true;
|
||||
GGROMsDescription.Enabled = true;
|
||||
SGROMsBox.Enabled = true;
|
||||
SGROMsDescription.Enabled = true;
|
||||
GenesisROMsBox.Enabled = true;
|
||||
GenesisBrowseROMs.Enabled = true;
|
||||
PCEROMsBox.Enabled = true;
|
||||
PCEBrowseROMs.Enabled = true;
|
||||
GBROMsBox.Enabled = true;
|
||||
GBBrowseROMs.Enabled = true;
|
||||
TI83ROMsBox.Enabled = true;
|
||||
TI83BrowseROMs.Enabled = true;
|
||||
|
||||
NESROMsDescription.Enabled = true;
|
||||
Sega8ROMsDescription.Enabled = true;
|
||||
GenesisROMsDescription.Enabled = true;
|
||||
PCEROMsDescription.Enabled = true;
|
||||
GBROMsDescription.Enabled = true;
|
||||
TI83ROMsDescription.Enabled = true;
|
||||
}
|
||||
INTVROMsDescription.Enabled = !RecentForROMs.Checked;
|
||||
NESROMsDescription.Enabled = !RecentForROMs.Checked;
|
||||
Sega8ROMsDescription.Enabled = !RecentForROMs.Checked;
|
||||
GenesisROMsDescription.Enabled = !RecentForROMs.Checked;
|
||||
PCEROMsDescription.Enabled = !RecentForROMs.Checked;
|
||||
GBROMsDescription.Enabled = !RecentForROMs.Checked;
|
||||
TI83ROMsDescription.Enabled = !RecentForROMs.Checked;
|
||||
}
|
||||
|
||||
private void BrowseFolder(TextBox box, string Name)
|
||||
|
@ -571,23 +564,6 @@ namespace BizHawk.MultiClient
|
|||
BrowseFolder(NESPaletteBox, NESPaletteDescription.Text, "NES");
|
||||
}
|
||||
|
||||
private void PCEBrowseBios_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenFileDialog ofd = new OpenFileDialog();
|
||||
ofd.InitialDirectory = Path.GetDirectoryName(Global.Config.PathPCEBios);
|
||||
ofd.Filter = "PCE CD BIOS (*.pce)|*.pce|All Files|*.*";
|
||||
ofd.FileName = Path.GetFileName(Global.Config.PathPCEBios);
|
||||
|
||||
var result = ofd.ShowDialog();
|
||||
if (result != DialogResult.OK)
|
||||
return;
|
||||
|
||||
if (File.Exists(ofd.FileName) == false)
|
||||
return;
|
||||
|
||||
PCEBiosBox.Text = ofd.FileName;
|
||||
}
|
||||
|
||||
private void BrowseAtariBase_Click(object sender, EventArgs e)
|
||||
{
|
||||
BrowseFolder(AtariBaseBox, AtariBaseDescription.Text);
|
||||
|
@ -617,5 +593,83 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
BrowseFolder(AtariCheatsBox, AtariCheatsDescription.Text, "Atari");
|
||||
}
|
||||
|
||||
private void INTVBrowseBase_Click(object sender, EventArgs e)
|
||||
{
|
||||
BrowseFolder(INTVBaseBox, INTVBaseDescription.Text);
|
||||
}
|
||||
|
||||
private void INTVBrowseROMs_Click(object sender, EventArgs e)
|
||||
{
|
||||
BrowseFolder(INTVRomsBox, INTVROMsDescription.Text, "INTV");
|
||||
}
|
||||
|
||||
private void INTVBrowseSavestates_Click(object sender, EventArgs e)
|
||||
{
|
||||
BrowseFolder(INTVSavestatesBox, INTVSavestatesDescription.Text, "INTV");
|
||||
}
|
||||
|
||||
private void INTVBrowseSaveRAM_Click(object sender, EventArgs e)
|
||||
{
|
||||
BrowseFolder(INTVSaveRAMBox, INTVSaveRAMDescription.Text, "INTV");
|
||||
}
|
||||
|
||||
private void INTVBrowseScreenshots_Click(object sender, EventArgs e)
|
||||
{
|
||||
BrowseFolder(INTVScreenshotsBox, INTVScreenshotsDescription.Text, "INTV");
|
||||
}
|
||||
|
||||
private void INTVBrowseCheats_Click(object sender, EventArgs e)
|
||||
{
|
||||
BrowseFolder(INTVCheatsBox, INTVCheatsDescription.Text, "INTV");
|
||||
}
|
||||
|
||||
void BrowseForBios(string filter, string config, TextBox tb)
|
||||
{
|
||||
OpenFileDialog ofd = new OpenFileDialog();
|
||||
ofd.InitialDirectory = Path.GetDirectoryName(config);
|
||||
ofd.Filter = filter;
|
||||
ofd.FileName = Path.GetFileName(config);
|
||||
|
||||
var result = ofd.ShowDialog();
|
||||
if (result != DialogResult.OK)
|
||||
return;
|
||||
|
||||
|
||||
if (File.Exists(ofd.FileName) == false)
|
||||
return;
|
||||
|
||||
tb.Text = ofd.FileName;
|
||||
}
|
||||
|
||||
|
||||
private void INTVBrowseEROM_Click(object sender, EventArgs e)
|
||||
{
|
||||
BrowseForBios(
|
||||
"Intellivision EROM (*.bin)|*.bin|All Files|*.*",
|
||||
Global.Config.PathINTVEROM,
|
||||
INTVEROMBox);
|
||||
}
|
||||
|
||||
private void INTVBroseGROM_Click(object sender, EventArgs e)
|
||||
{
|
||||
BrowseForBios(
|
||||
"Intellivision GROM (*.bin)|*.bin|All Files|*.*",
|
||||
Global.Config.PathINTVGROM,
|
||||
INTVGROMBox);
|
||||
}
|
||||
|
||||
|
||||
private void PCEBrowseBios_Click(object sender, EventArgs e)
|
||||
{
|
||||
BrowseForBios(
|
||||
"PCE CD BIOS (*.pce)|*.pce|All Files|*.*",
|
||||
Global.Config.PathPCEBios,
|
||||
PCEBiosBox);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -68,6 +68,8 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
switch (system)
|
||||
{
|
||||
case "INTV":
|
||||
return Global.Config.BaseINTV;
|
||||
case "A26":
|
||||
return Global.Config.BaseAtari;
|
||||
case "NES":
|
||||
|
@ -209,6 +211,9 @@ namespace BizHawk.MultiClient
|
|||
|
||||
switch (sysID)
|
||||
{
|
||||
case "INTV":
|
||||
path = PathManager.MakeAbsolutePath(Global.Config.PathSNESROMs, "INTV");
|
||||
break;
|
||||
case "SNES":
|
||||
path = PathManager.MakeAbsolutePath(Global.Config.PathSNESROMs, "SNES");
|
||||
break;
|
||||
|
@ -281,6 +286,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
switch (game.System)
|
||||
{
|
||||
case "INTV": return Path.Combine(MakeAbsolutePath(Global.Config.PathAtariSaveRAM, "INTV"), name + ".SaveRAM");
|
||||
case "A26": return Path.Combine(MakeAbsolutePath(Global.Config.PathAtariSaveRAM, "A26"), name + ".SaveRAM");
|
||||
case "SMS": return Path.Combine(MakeAbsolutePath(Global.Config.PathSMSSaveRAM, "SMS"), name + ".SaveRAM");
|
||||
case "GG": return Path.Combine(MakeAbsolutePath(Global.Config.PathGGSaveRAM, "GG"), name + ".SaveRAM");
|
||||
|
@ -302,6 +308,7 @@ namespace BizHawk.MultiClient
|
|||
switch (game.System)
|
||||
{
|
||||
default: return GetRomsPath(game.System);
|
||||
case "INTV": return MakeAbsolutePath(Global.Config.PathAtariSavestates, "INTV");
|
||||
case "A26": return MakeAbsolutePath(Global.Config.PathAtariSavestates, "A26");
|
||||
case "SMS": return MakeAbsolutePath(Global.Config.PathSMSSavestates, "SMS");
|
||||
case "GG": return MakeAbsolutePath(Global.Config.PathGGSavestates, "GG");
|
||||
|
@ -328,6 +335,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
switch (game.System)
|
||||
{
|
||||
case "INTV": return Path.Combine(MakeAbsolutePath(Global.Config.PathAtariSavestates, "INTV"), name);
|
||||
case "A26": return Path.Combine(MakeAbsolutePath(Global.Config.PathAtariSavestates, "A26"), name);
|
||||
case "SMS": return Path.Combine(MakeAbsolutePath(Global.Config.PathSMSSavestates, "SMS"), name);
|
||||
case "GG": return Path.Combine(MakeAbsolutePath(Global.Config.PathGGSavestates, "GG"), name);
|
||||
|
@ -349,6 +357,7 @@ namespace BizHawk.MultiClient
|
|||
string name = FilesystemSafeName(game);
|
||||
switch (game.System)
|
||||
{
|
||||
case "INTV": return Path.Combine(MakeAbsolutePath(Global.Config.PathAtariScreenshots, "INTV"), name);
|
||||
case "A26": return Path.Combine(MakeAbsolutePath(Global.Config.PathAtariScreenshots, "A26"), name);
|
||||
case "SMS": return Path.Combine(MakeAbsolutePath(Global.Config.PathSMSScreenshots, "SMS"), name);
|
||||
case "GG": return Path.Combine(MakeAbsolutePath(Global.Config.PathGGScreenshots, "GG"), name);
|
||||
|
|
Loading…
Reference in New Issue