Different controller definition for Game Gear than SMS, since game gear is 1 player and has a start button and no pause button
This commit is contained in:
parent
f3cac5deff
commit
179a5c3bb4
|
@ -15,7 +15,29 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
public ControllerDefinition ControllerDefinition { get { return SmsController; } }
|
public static readonly ControllerDefinition GGController = new ControllerDefinition
|
||||||
|
{
|
||||||
|
Name = "GG Controller",
|
||||||
|
BoolButtons =
|
||||||
|
{
|
||||||
|
"Reset",
|
||||||
|
"P1 Up", "P1 Down", "P1 Left", "P1 Right", "P1 B1", "P1 B2", "P1 Start"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
public ControllerDefinition ControllerDefinition
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (IsGameGear)
|
||||||
|
{
|
||||||
|
return GGController;
|
||||||
|
}
|
||||||
|
|
||||||
|
return SmsController;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public IController Controller { get; set; }
|
public IController Controller { get; set; }
|
||||||
|
|
||||||
byte ReadControls1()
|
byte ReadControls1()
|
||||||
|
@ -71,12 +93,22 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem
|
||||||
byte ReadPort0()
|
byte ReadPort0()
|
||||||
{
|
{
|
||||||
if (IsGameGear == false)
|
if (IsGameGear == false)
|
||||||
|
{
|
||||||
return 0xFF;
|
return 0xFF;
|
||||||
|
}
|
||||||
|
|
||||||
byte value = 0xFF;
|
byte value = 0xFF;
|
||||||
if (Controller["Pause"])
|
if ((Controller["Pause"] && !IsGameGear) ||
|
||||||
|
(Controller["Start"] && IsGameGear))
|
||||||
|
{
|
||||||
value ^= 0x80;
|
value ^= 0x80;
|
||||||
|
}
|
||||||
|
|
||||||
if (Region == "Japan")
|
if (Region == "Japan")
|
||||||
|
{
|
||||||
value ^= 0x40;
|
value ^= 0x40;
|
||||||
|
}
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue