add gambatte boot flags to menu and config. i don't like all that stuff in mainform, but it works anyway...
TODO: these flags must also be added to .chickenfucker file header
This commit is contained in:
parent
c17b0755a1
commit
cfe73b292d
|
@ -26,14 +26,24 @@ namespace BizHawk.Emulation.Consoles.GB
|
|||
/// </summary>
|
||||
LibGambatte.Buttons CurrentButtons = 0;
|
||||
|
||||
public Gameboy(byte[] romdata)
|
||||
public Gameboy(GameInfo game, byte[] romdata)
|
||||
{
|
||||
GambatteState = LibGambatte.gambatte_create();
|
||||
|
||||
if (GambatteState == IntPtr.Zero)
|
||||
throw new Exception("gambatte_create() returned null???");
|
||||
|
||||
if (LibGambatte.gambatte_load(GambatteState, romdata, (uint)romdata.Length, 0) != 0)
|
||||
LibGambatte.LoadFlags flags = 0;
|
||||
|
||||
if (game["ForceDMG"])
|
||||
flags |= LibGambatte.LoadFlags.FORCE_DMG;
|
||||
if (game["GBACGB"])
|
||||
flags |= LibGambatte.LoadFlags.GBA_CGB;
|
||||
if (game["MulitcartCompat"])
|
||||
flags |= LibGambatte.LoadFlags.MULTICART_COMPAT;
|
||||
|
||||
|
||||
if (LibGambatte.gambatte_load(GambatteState, romdata, (uint)romdata.Length, flags) != 0)
|
||||
throw new Exception("gambatte_load() returned non-zero (is this not a gb or gbc rom?)");
|
||||
|
||||
InitSound();
|
||||
|
|
|
@ -601,6 +601,9 @@ namespace BizHawk.MultiClient
|
|||
//GB settings
|
||||
public GBControllerTemplate[] GBController = new GBControllerTemplate[1];
|
||||
public GBControllerTemplate[] GBAutoController = new GBControllerTemplate[1];
|
||||
public bool GB_ForceDMG = false;
|
||||
public bool GB_GBACGB = false;
|
||||
public bool GB_MulticartCompat = false;
|
||||
|
||||
//GIF Animator Settings
|
||||
public int GifAnimatorNumFrames;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1658,6 +1658,9 @@ namespace BizHawk.MultiClient
|
|||
private void gBToolStripMenuItem_DropDownOpened(object sender, EventArgs e)
|
||||
{
|
||||
//skipBIOSIntroToolStripMenuItem.Checked = Global.Config.GameBoySkipBIOS;
|
||||
forceDMGModeToolStripMenuItem.Checked = Global.Config.GB_ForceDMG;
|
||||
gBAInCGBModeToolStripMenuItem.Checked = Global.Config.GB_GBACGB;
|
||||
multicartCompatibilityToolStripMenuItem.Checked = Global.Config.GB_MulticartCompat;
|
||||
}
|
||||
|
||||
private void graphicsDebuggerToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
|
|
|
@ -1399,7 +1399,10 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
break;
|
||||
case "GB":
|
||||
Emulation.Consoles.GB.Gameboy gb = new Emulation.Consoles.GB.Gameboy(rom.FileData);
|
||||
if (Global.Config.GB_ForceDMG) game.AddOption("ForceDMG");
|
||||
if (Global.Config.GB_GBACGB) game.AddOption("GBACGB");
|
||||
if (Global.Config.GB_MulticartCompat) game.AddOption("MulitcartCompat");
|
||||
Emulation.Consoles.GB.Gameboy gb = new Emulation.Consoles.GB.Gameboy(game, rom.FileData);
|
||||
nextEmulator = gb;
|
||||
break;
|
||||
case "COLV":
|
||||
|
@ -3491,5 +3494,20 @@ namespace BizHawk.MultiClient
|
|||
((Gameboy)Global.Emulator).EditDMGColors(this);
|
||||
}
|
||||
}
|
||||
|
||||
private void forceDMGModeToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.Config.GB_ForceDMG ^= true;
|
||||
}
|
||||
|
||||
private void gBAInCGBModeToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.Config.GB_GBACGB ^= true;
|
||||
}
|
||||
|
||||
private void multicartCompatibilityToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.Config.GB_MulticartCompat ^= true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue