SMS/GG: Implement SMS compatibility mode for some games
(Technically the screen is supposed to be modified too but not implementing yet)
This commit is contained in:
parent
0535223592
commit
942454e327
|
@ -137,7 +137,7 @@ C28AA80489A467BF54FC1403029A83D3 Champions of Europe (E) SMS Sports;Soccer Eur
|
|||
1F706162F833F1DCE9513988601D314B Championship Hockey (E) SMS Sports;Hockey Europe
|
||||
2C709BA8CDC3A1B7ADC5BC838EABF6F3 Chapolim x Dracula - Um Duelo Assustador (B) SMS Brazil
|
||||
08511C5CF0DF0941B10EBF28050AFE51 Chase H.Q. (E) SMS Racing Europe
|
||||
3CD1A4C27E330BBA7703EE22AC83B856 Chase H.Q. (J) (SMSGG) SMS Racing Japan
|
||||
3CD1A4C27E330BBA7703EE22AC83B856 Chase H.Q. (J) (SMSGG) SMS Racing GG_in_SMS Japan
|
||||
F90B86478445D220D386460E55F3B74F Cheese Cat-astrophe Starring Speedy Gonzales (E) (En,Fr,De,Es) SMS Europe
|
||||
747A206EAAADF48714695E8B4CCEAD7E Choplifter (UE) SMS StereoByte=203 USA;Europe
|
||||
B556297E5BA2B95ED3F3A76A47402E1A Choplifter (U) (Beta) SMS StereoByte=203 USA
|
||||
|
@ -368,7 +368,7 @@ A31CBBDED45F66633FB38B1C1BEF9B08 Opa Opa (J) SMS Japan
|
|||
2CA2064302F51F724E1F2593369A0696 Operation Wolf (E) SMS Light Gun;Arcade Europe
|
||||
F64EA159120C018E05FB95AC8533E9EB The Ottifants (E) (En,Fr,De,Es,It) SMS Europe
|
||||
558C793AAB09B46BED78431348191060 Out Run 3-D (E) SMS Racing;PaddleSupported 3D;FM;PaddleOptional Europe
|
||||
2A3BDD1A6C35EEEDBF1A794ABFB57B87 Out Run Europa (U) (SMSGG) SMS Racing USA
|
||||
2A3BDD1A6C35EEEDBF1A794ABFB57B87 Out Run Europa (U) (SMSGG) SMS Racing GG_in_SMS USA
|
||||
458FC29765865FDAAF3F56808C94D8A6 Out Run Europa (E) SMS Racing Europe
|
||||
029EE92155247F8A282D63B8A6DD23C4 Out Run (W) SMS Racing;Arcade FM;WhenFMDisablePSG;PaddleOptional World
|
||||
946F3E6C2F0F546A8EBE55C8170ECC78 Pac-Mania (E) SMS Arcade Europe
|
||||
|
@ -409,7 +409,7 @@ FC40576778DE28CC254B588A3A46D2A6 Putt & Putter (E) (Beta) SMS Europe
|
|||
58B89D62438407F242BBE713F1D945CA Quest for the Shaven Yak Starring Ren Hoek & Stimpy (B) SMS Brazil
|
||||
B30E60B91960A0F2A89FC133410770DF R.C. Grand Prix (UE) SMS Racing USA;Europe
|
||||
61AA7404E23836C79E2A689322FFE190 R.C. Grand Prix (UE) (Beta) SMS Racing USA;Europe
|
||||
D087B25D96F3F3E9338B0B5EC4FC2AA5 R.C. Grand Prix (UE) (SMSGG) SMS Racing USA;Europe
|
||||
D087B25D96F3F3E9338B0B5EC4FC2AA5 R.C. Grand Prix (UE) (SMSGG) SMS Racing GG_in_SMS USA;Europe
|
||||
FFBA9869948E2CEF2BDA6F805CC72087 Rainbow Islands - Story of the Bubble Bobble 2 (E) SMS Europe
|
||||
E80AE00D8924F2BADA5949BF75995D87 Rainbow Islands - The Story of Bubble Bobble 2 (B) SMS Brazil
|
||||
7A080A155AD6A806DA88AA1D3576D78C Rambo - First Blood Part II (U) SMS USA
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem
|
|||
{
|
||||
get
|
||||
{
|
||||
if (IsGameGear)
|
||||
if (IsGameGear_C)
|
||||
{
|
||||
return GGController;
|
||||
}
|
||||
|
@ -58,10 +58,14 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem
|
|||
Cpu.TraceCallback = null;
|
||||
}
|
||||
|
||||
if (IsGameGear == false)
|
||||
if (IsGameGear_C == false)
|
||||
{
|
||||
Cpu.NonMaskableInterrupt = controller.IsPressed("Pause");
|
||||
}
|
||||
else
|
||||
{
|
||||
Cpu.NonMaskableInterrupt = controller.IsPressed("P1 Start");
|
||||
}
|
||||
|
||||
if (IsGame3D && Settings.Fix3D)
|
||||
{
|
||||
|
|
|
@ -587,14 +587,14 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem
|
|||
|
||||
byte ReadPort0()
|
||||
{
|
||||
if (IsGameGear == false)
|
||||
if (IsGameGear_C == false)
|
||||
{
|
||||
return 0xFF;
|
||||
}
|
||||
|
||||
byte value = 0xFF;
|
||||
if ((_controller.IsPressed("Pause") && !IsGameGear) ||
|
||||
(_controller.IsPressed("P1 Start") && IsGameGear))
|
||||
(_controller.IsPressed("P1 Start") && IsGameGear_C))
|
||||
{
|
||||
value ^= 0x80;
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem
|
|||
MemoryCallbacks = new MemoryCallbackSystem(new[] { "System Bus" });
|
||||
|
||||
IsGameGear = game.System == "GG";
|
||||
IsGameGear_C = game.System == "GG";
|
||||
IsSG1000 = game.System == "SG";
|
||||
RomData = rom;
|
||||
|
||||
|
@ -91,6 +92,17 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem
|
|||
OnExecFetch = OnExecMemory
|
||||
};
|
||||
|
||||
|
||||
if (game["GG_in_SMS"])
|
||||
{
|
||||
// skip setting the BIOS because this is a game gear game that puts the system
|
||||
// in SMS compatibility mode (it will fail the check sum if played on an actual SMS though.)
|
||||
IsGameGear = false;
|
||||
IsGameGear_C = true;
|
||||
game.System = "GG";
|
||||
Console.WriteLine("Using SMS Compatibility mode for Game Gear System");
|
||||
}
|
||||
|
||||
Vdp = new VDP(this, Cpu, IsGameGear ? VdpMode.GameGear : VdpMode.SMS, Region);
|
||||
(ServiceProvider as BasicServiceProvider).Register<IVideoProvider>(Vdp);
|
||||
PSG = new SN76489();
|
||||
|
@ -150,7 +162,7 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem
|
|||
Port3E = 0xF7; // Disable cartridge, enable BIOS rom
|
||||
InitBiosMapper();
|
||||
}
|
||||
else if (game.System == "SMS")
|
||||
else if ((game.System == "SMS") && !game["GG_in_SMS"])
|
||||
{
|
||||
BiosRom = comm.CoreFileProvider.GetFirmware("SMS", RegionStr, false);
|
||||
|
||||
|
@ -212,6 +224,7 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem
|
|||
private SN76489 PSG;
|
||||
private YM2413 YM2413;
|
||||
public bool IsGameGear { get; set; }
|
||||
public bool IsGameGear_C { get; set; }
|
||||
public bool IsSG1000 { get; set; }
|
||||
|
||||
private bool HasYM2413 = false;
|
||||
|
@ -309,6 +322,7 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem
|
|||
port &= 0xFF;
|
||||
if (port < 0x40) // General IO ports
|
||||
{
|
||||
|
||||
switch (port)
|
||||
{
|
||||
case 0x00: return ReadPort0();
|
||||
|
|
Loading…
Reference in New Issue