Gambatte: Settings: Use an enum for ConsoleMode instead of stringly typed. Developers who have been using recent dev builds will need to change "Default" to 0 in config.inneys...
This commit is contained in:
parent
924515c69d
commit
468c52f5de
|
@ -85,16 +85,17 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
|
|||
[DefaultValue(false)]
|
||||
public bool EnableBIOS { 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
|
||||
public enum ConsoleModeType
|
||||
{
|
||||
get { return _ConsoleMode; }
|
||||
set { _ConsoleMode = value;}
|
||||
Auto,
|
||||
GB,
|
||||
GBC
|
||||
}
|
||||
[JsonIgnore]
|
||||
private string _ConsoleMode;
|
||||
|
||||
[DisplayName("Console Mode")]
|
||||
[Description("Pick which console to run, 'Auto' chooses from ROM header, 'GB' and 'GBC' chooses the respective system")]
|
||||
[DefaultValue(ConsoleModeType.Auto)]
|
||||
public ConsoleModeType ConsoleMode { get; set; }
|
||||
|
||||
[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.")]
|
||||
|
|
|
@ -58,12 +58,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
|
|||
|
||||
if (game.System == "GB")
|
||||
{
|
||||
BiosRom = new byte[256];
|
||||
BiosRom = comm.CoreFileProvider.GetFirmware("GB", "World", false);
|
||||
}
|
||||
else
|
||||
{
|
||||
BiosRom = new byte[2304];
|
||||
BiosRom = comm.CoreFileProvider.GetFirmware("GBC", "World", false);
|
||||
}
|
||||
|
||||
|
@ -80,32 +78,25 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
|
|||
|
||||
LibGambatte.LoadFlags flags = 0;
|
||||
|
||||
if (_syncSettings.ConsoleMode=="GB")
|
||||
switch (_syncSettings.ConsoleMode)
|
||||
{
|
||||
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")
|
||||
case GambatteSyncSettings.ConsoleModeType.GB:
|
||||
flags |= LibGambatte.LoadFlags.FORCE_DMG;
|
||||
// we need to change the BIOS to GB bios
|
||||
if (game.System == "GBC")
|
||||
{
|
||||
BiosRom = comm.CoreFileProvider.GetFirmware("GB", "World", false);
|
||||
bios_length = BiosRom.Length;
|
||||
}
|
||||
break;
|
||||
case GambatteSyncSettings.ConsoleModeType.GBC:
|
||||
BiosRom = comm.CoreFileProvider.GetFirmware("GBC", "World", false);
|
||||
bios_length = BiosRom.Length;
|
||||
break;
|
||||
default:
|
||||
if (game.System == "GB")
|
||||
flags |= LibGambatte.LoadFlags.FORCE_DMG;
|
||||
break;
|
||||
}
|
||||
|
||||
if (_syncSettings.EnableBIOS && BiosRom == null)
|
||||
|
@ -351,7 +342,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
|
|||
|
||||
LibGambatte.gambatte_settracecallback(GambatteState, _tracecb);
|
||||
|
||||
LibGambatte.gambatte_setlayers(GambatteState, (_settings.DisplayBG ? 1 : 0) | (_settings.DisplayOBJ ? 2 : 0) | (_settings.DisplayWindow ? 4 : 0 ) );
|
||||
LibGambatte.gambatte_setlayers(GambatteState, (_settings.DisplayBG ? 1 : 0) | (_settings.DisplayOBJ ? 2 : 0) | (_settings.DisplayWindow ? 4 : 0));
|
||||
}
|
||||
|
||||
internal void FrameAdvancePost()
|
||||
|
|
Loading…
Reference in New Issue