Gambatte: Add core picker option
Replaces ForceDMG so that you can play gameboy roms in color game boy as well
This commit is contained in:
parent
d9cc1558aa
commit
08b6dadd49
|
@ -95,11 +95,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
|
|||
{
|
||||
if (GambatteState != IntPtr.Zero)
|
||||
{
|
||||
Console.WriteLine("disposing");
|
||||
LibGambatte.gambatte_destroy(GambatteState);
|
||||
Console.WriteLine("step2");
|
||||
GambatteState = IntPtr.Zero;
|
||||
Console.WriteLine("disposed");
|
||||
}
|
||||
|
||||
DisposeSound();
|
||||
|
|
|
@ -85,10 +85,16 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
|
|||
[DefaultValue(false)]
|
||||
public bool EnableBIOS { get; set; }
|
||||
|
||||
[DisplayName("Force DMG Mode")]
|
||||
[Description("Force the game to run on DMG hardware, even if it's detected as a CGB game. Relevant for games that are \"CGB Enhanced\" but do not require CGB.")]
|
||||
[DefaultValue(false)]
|
||||
public bool ForceDMG { get; set; }
|
||||
[DisplayName("Console Mode")]
|
||||
[Description("Pick which console to run, 'Default' chooses from ROM extension, 'GB' and 'GBC' chooses the respective system")]
|
||||
[DefaultValue("Default")]
|
||||
public string ConsoleMode
|
||||
{
|
||||
get { return _ConsoleMode; }
|
||||
set { _ConsoleMode = value;}
|
||||
}
|
||||
[JsonIgnore]
|
||||
private string _ConsoleMode;
|
||||
|
||||
[DisplayName("CGB in GBA")]
|
||||
[Description("Emulate GBA hardware running a CGB game, instead of CGB hardware. Relevant only for titles that detect the presense of a GBA, such as Shantae.")]
|
||||
|
|
|
@ -80,17 +80,32 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
|
|||
|
||||
LibGambatte.LoadFlags flags = 0;
|
||||
|
||||
if (_syncSettings.ForceDMG)
|
||||
if (_syncSettings.ConsoleMode=="GB")
|
||||
{
|
||||
flags |= LibGambatte.LoadFlags.FORCE_DMG;
|
||||
|
||||
|
||||
// we need to change the BIOS to GB bios
|
||||
if (game.System == "GBC")
|
||||
{
|
||||
BiosRom = null;
|
||||
BiosRom = new byte[256];
|
||||
BiosRom = comm.CoreFileProvider.GetFirmware("GB", "World", false);
|
||||
bios_length = BiosRom.Length;
|
||||
}
|
||||
|
||||
}
|
||||
else if (_syncSettings.ConsoleMode == "GBC")
|
||||
{
|
||||
BiosRom = null;
|
||||
BiosRom = new byte[2304];
|
||||
BiosRom = comm.CoreFileProvider.GetFirmware("GBC", "World", false);
|
||||
bios_length = BiosRom.Length;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if(game.System == "GB")
|
||||
flags |= LibGambatte.LoadFlags.FORCE_DMG;
|
||||
}
|
||||
|
||||
if (_syncSettings.EnableBIOS && BiosRom == null)
|
||||
|
|
Loading…
Reference in New Issue