PCE - Implement PCECD system id in core and in game info. Also set cancel property of LogWindow winform
This commit is contained in:
parent
871ba80a76
commit
6bbab41b0c
|
@ -47,6 +47,8 @@ namespace BizHawk.Emulation.Consoles.TurboGrafx
|
|||
public byte[] SuperRam; // Super System Card 192K of additional RAM
|
||||
public byte[] ArcadeRam; // Arcade Card 2048K of additional RAM
|
||||
|
||||
private string systemid = "PCE";
|
||||
|
||||
// 21,477,270 Machine clocks / sec
|
||||
// 7,159,090 Cpu cycles / sec
|
||||
|
||||
|
@ -56,14 +58,21 @@ namespace BizHawk.Emulation.Consoles.TurboGrafx
|
|||
|
||||
switch (game.System)
|
||||
{
|
||||
case "PCE": Type = NecSystemType.TurboGrafx; break;
|
||||
case "SGX": Type = NecSystemType.SuperGrafx; break;
|
||||
case "PCE":
|
||||
systemid = "PCE";
|
||||
Type = NecSystemType.TurboGrafx;
|
||||
break;
|
||||
case "SGX":
|
||||
systemid = "SGX";
|
||||
Type = NecSystemType.SuperGrafx;
|
||||
break;
|
||||
}
|
||||
Init(game, rom);
|
||||
}
|
||||
|
||||
public PCEngine(GameInfo game, Disc disc, byte[] rom)
|
||||
{
|
||||
systemid = "PCECD";
|
||||
CoreOutputComm = new CoreOutputComm();
|
||||
Type = NecSystemType.TurboCD;
|
||||
this.disc = disc;
|
||||
|
@ -129,13 +138,17 @@ namespace BizHawk.Emulation.Consoles.TurboGrafx
|
|||
for (int i = 0; i < 0x60000; i++)
|
||||
RomData[i + 0x40000] = origRom[i];
|
||||
RomLength = RomData.Length;
|
||||
} else if (rom.Length > 1024 * 1024) {
|
||||
}
|
||||
else if (rom.Length > 1024 * 1024)
|
||||
{
|
||||
// If the rom is bigger than 1 megabyte, switch to Street Fighter 2 mapper
|
||||
Cpu.ReadMemory21 = ReadMemorySF2;
|
||||
Cpu.WriteMemory21 = WriteMemorySF2;
|
||||
RomData = rom;
|
||||
RomLength = RomData.Length;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
// normal rom.
|
||||
RomData = rom;
|
||||
RomLength = RomData.Length;
|
||||
|
@ -261,7 +274,7 @@ namespace BizHawk.Emulation.Consoles.TurboGrafx
|
|||
get { return soundProvider; }
|
||||
}
|
||||
|
||||
public string SystemId { get { return "PCE"; } }
|
||||
public string SystemId { get { return systemid; } }
|
||||
public string Region { get; set; }
|
||||
public bool DeterministicEmulation { get; set; }
|
||||
|
||||
|
@ -404,7 +417,9 @@ namespace BizHawk.Emulation.Consoles.TurboGrafx
|
|||
VCE.SaveStateBinary(writer);
|
||||
VDC1.SaveStateBinary(writer);
|
||||
PSG.SaveStateBinary(writer);
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
writer.Write(Ram);
|
||||
writer.Write(Frame);
|
||||
writer.Write(_lagcount);
|
||||
|
@ -447,7 +462,9 @@ namespace BizHawk.Emulation.Consoles.TurboGrafx
|
|||
VCE.LoadStateBinary(reader);
|
||||
VDC1.LoadStateBinary(reader);
|
||||
PSG.LoadStateBinary(reader);
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
Ram = reader.ReadBytes(0x8000);
|
||||
Frame = reader.ReadInt32();
|
||||
_lagcount = reader.ReadInt32();
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
//
|
||||
// btnClose
|
||||
//
|
||||
this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.btnClose.Location = new System.Drawing.Point(453, 3);
|
||||
this.btnClose.Name = "btnClose";
|
||||
this.btnClose.Size = new System.Drawing.Size(75, 23);
|
||||
|
@ -90,6 +91,7 @@
|
|||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.btnClose;
|
||||
this.ClientSize = new System.Drawing.Size(531, 302);
|
||||
this.Controls.Add(this.textBox1);
|
||||
this.Controls.Add(this.tableLayoutPanel1);
|
||||
|
|
|
@ -796,12 +796,12 @@ namespace BizHawk.MultiClient
|
|||
private string DisplayNameForSystem(string system)
|
||||
{
|
||||
string str = "";
|
||||
if (INTERIM) str += "(interim) ";
|
||||
switch (system)
|
||||
{
|
||||
case "SG": str += "SG-1000"; break;
|
||||
case "SMS": str += "Sega Master System"; break;
|
||||
case "GG": str += "Game Gear"; break;
|
||||
case "PCECD": str += "TurboGrafx-16 (CD)"; break;
|
||||
case "PCE": str += "TurboGrafx-16"; break;
|
||||
case "SGX": str += "SuperGrafx"; break;
|
||||
case "GEN": str += "Genesis"; break;
|
||||
|
@ -809,6 +809,7 @@ namespace BizHawk.MultiClient
|
|||
case "NES": str += "NES"; break;
|
||||
case "GB": str += "Game Boy"; break;
|
||||
}
|
||||
if (INTERIM) str += " (interim)";
|
||||
return str;
|
||||
}
|
||||
|
||||
|
@ -858,6 +859,7 @@ namespace BizHawk.MultiClient
|
|||
Global.AutoFireController = Global.AutofireSMSControls;
|
||||
break;
|
||||
case "PCE":
|
||||
case "PCECD":
|
||||
Global.ActiveController = Global.PCEControls;
|
||||
Global.AutoFireController = Global.AutofirePCEControls;
|
||||
break;
|
||||
|
@ -975,7 +977,7 @@ namespace BizHawk.MultiClient
|
|||
// what system the game is for.
|
||||
|
||||
game = new GameInfo();
|
||||
game.System = "PCE";
|
||||
game.System = "PCECD";
|
||||
game.Name = Path.GetFileNameWithoutExtension(file.Name);
|
||||
game.Hash = hash;
|
||||
}
|
||||
|
@ -983,6 +985,7 @@ namespace BizHawk.MultiClient
|
|||
switch (game.System)
|
||||
{
|
||||
case "PCE":
|
||||
case "PCECD":
|
||||
if (File.Exists(Global.Config.PathPCEBios) == false)
|
||||
{
|
||||
MessageBox.Show("PCE-CD System Card not found. Please check the BIOS path in Config->Paths->PC Engine.");
|
||||
|
@ -1034,6 +1037,7 @@ namespace BizHawk.MultiClient
|
|||
nextEmulator = new SMS(game, rom.RomData);
|
||||
break;
|
||||
case "PCE":
|
||||
case "PCECD":
|
||||
case "SGX":
|
||||
if (Global.Config.PceSpriteLimit) game.AddOption("ForceSpriteLimit");
|
||||
nextEmulator = new PCEngine(game, rom.RomData);
|
||||
|
|
|
@ -80,6 +80,7 @@ namespace BizHawk.MultiClient
|
|||
return Global.Config.BaseSMS;
|
||||
case "SGX":
|
||||
case "PCE":
|
||||
case "PCECD":
|
||||
return Global.Config.BasePCE;
|
||||
case "TI83":
|
||||
return Global.Config.BaseTI83;
|
||||
|
@ -245,6 +246,7 @@ namespace BizHawk.MultiClient
|
|||
break;
|
||||
case "SFX":
|
||||
case "PCE":
|
||||
case "PCECD":
|
||||
path = PathManager.MakeAbsolutePath(Global.Config.PathPCEROMs, "PCE");
|
||||
break;
|
||||
case "GB":
|
||||
|
@ -292,6 +294,7 @@ namespace BizHawk.MultiClient
|
|||
case "SG": return Path.Combine(MakeAbsolutePath(Global.Config.PathSGSaveRAM, "SG"), name + ".SaveRAM");
|
||||
case "SGX": return Path.Combine(MakeAbsolutePath(Global.Config.PathPCESaveRAM, "PCE"), name + ".SaveRAM");
|
||||
case "PCE": return Path.Combine(MakeAbsolutePath(Global.Config.PathPCESaveRAM, "PCE"), name + ".SaveRAM");
|
||||
case "PCECD": return Path.Combine(MakeAbsolutePath(Global.Config.PathPCESaveRAM, "PCE"), name + ".SaveRAM");
|
||||
case "GB": return Path.Combine(MakeAbsolutePath(Global.Config.PathGBSaveRAM, "GB"), name + ".SaveRAM");
|
||||
case "GEN": return Path.Combine(MakeAbsolutePath(Global.Config.PathGenesisSaveRAM, "GEN"), name + ".SaveRAM");
|
||||
case "NES": return Path.Combine(MakeAbsolutePath(Global.Config.PathNESSaveRAM, "NES"), name + ".SaveRAM");
|
||||
|
@ -312,6 +315,7 @@ namespace BizHawk.MultiClient
|
|||
case "SG": return Path.Combine(MakeAbsolutePath(Global.Config.PathSGSavestates, "SG"), name);
|
||||
case "SGX": return Path.Combine(MakeAbsolutePath(Global.Config.PathPCESavestates, "PCE"), name);
|
||||
case "PCE": return Path.Combine(MakeAbsolutePath(Global.Config.PathPCESavestates, "PCE"), name);
|
||||
case "PCECD": return Path.Combine(MakeAbsolutePath(Global.Config.PathPCESavestates, "PCE"), name);
|
||||
case "GB": return Path.Combine(MakeAbsolutePath(Global.Config.PathGBSavestates, "GB"), name);
|
||||
case "GEN": return Path.Combine(MakeAbsolutePath(Global.Config.PathGenesisSavestates, "GEN"), name);
|
||||
case "NES": return Path.Combine(MakeAbsolutePath(Global.Config.PathNESSavestates, "NES"), name);
|
||||
|
@ -330,6 +334,7 @@ namespace BizHawk.MultiClient
|
|||
case "SG": return Path.Combine(MakeAbsolutePath(Global.Config.PathSGScreenshots, "SG"), name);
|
||||
case "SGX": return Path.Combine(MakeAbsolutePath(Global.Config.PathPCEScreenshots, "PCE"), name);
|
||||
case "PCE": return Path.Combine(MakeAbsolutePath(Global.Config.PathPCEScreenshots, "PCE"), name);
|
||||
case "PCECD": return Path.Combine(MakeAbsolutePath(Global.Config.PathPCEScreenshots, "PCE"), name);
|
||||
case "GB": return Path.Combine(MakeAbsolutePath(Global.Config.PathGBScreenshots, "GB"), name);
|
||||
case "GEN": return Path.Combine(MakeAbsolutePath(Global.Config.PathGenesisScreenshots, "GEN"), name);
|
||||
case "NES": return Path.Combine(MakeAbsolutePath(Global.Config.PathNESScreenshots, "NES"), name);
|
||||
|
|
|
@ -521,6 +521,7 @@ namespace BizHawk.MultiClient
|
|||
else
|
||||
return frames / NES_NTSC;
|
||||
case "PCE":
|
||||
case "PCECD":
|
||||
return frames / PCE;
|
||||
|
||||
//One Day!
|
||||
|
|
Loading…
Reference in New Issue