add some GBA related path config stuff. gbabios.rom will now attempt to load from GBA firmwares directory.
This commit is contained in:
parent
28b1766ac8
commit
db8590e55b
|
@ -21,11 +21,13 @@ namespace BizHawk.Emulation.Consoles.Nintendo.GBA
|
||||||
public ControllerDefinition ControllerDefinition { get { return GBAController; } }
|
public ControllerDefinition ControllerDefinition { get { return GBAController; } }
|
||||||
public IController Controller { get; set; }
|
public IController Controller { get; set; }
|
||||||
|
|
||||||
public void Load(byte[] rom)
|
public void Load(byte[] rom, byte[] bios)
|
||||||
{
|
{
|
||||||
|
if (bios.Length != 16384)
|
||||||
|
throw new Exception("GBA bios must be exactly 16384 bytes!");
|
||||||
Init();
|
Init();
|
||||||
LibMeteor.libmeteor_reset();
|
LibMeteor.libmeteor_reset();
|
||||||
LibMeteor.libmeteor_loadbios(File.ReadAllBytes("gbabios.rom"), 16384);
|
LibMeteor.libmeteor_loadbios(bios, (uint)bios.Length);
|
||||||
LibMeteor.libmeteor_loadrom(rom, (uint)rom.Length);
|
LibMeteor.libmeteor_loadrom(rom, (uint)rom.Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -99,6 +99,14 @@ namespace BizHawk.MultiClient
|
||||||
public string PathSNESCheats = Path.Combine(".", "Cheats");
|
public string PathSNESCheats = Path.Combine(".", "Cheats");
|
||||||
public string PathSNESFirmwares = Path.Combine(".", "Firmwares");
|
public string PathSNESFirmwares = Path.Combine(".", "Firmwares");
|
||||||
|
|
||||||
|
public string BaseGBA = Path.Combine(".", "GBA");
|
||||||
|
public string PathGBAROMs = ".";
|
||||||
|
public string PathGBASavestates = Path.Combine(".", "State");
|
||||||
|
public string PathGBASaveRAM = Path.Combine(".", "SaveRAM");
|
||||||
|
public string PathGBAScreenshots = Path.Combine(".", "Screenshots");
|
||||||
|
public string PathGBACheats = Path.Combine(".", "Cheats");
|
||||||
|
public string PathGBAFirmwares = Path.Combine(".", "Firmwares");
|
||||||
|
|
||||||
public string BaseSMS = Path.Combine(".", "SMS");
|
public string BaseSMS = Path.Combine(".", "SMS");
|
||||||
public string PathSMSROMs = ".";
|
public string PathSMSROMs = ".";
|
||||||
public string PathSMSSavestates = Path.Combine(".", "State");
|
public string PathSMSSavestates = Path.Combine(".", "State");
|
||||||
|
|
|
@ -1825,8 +1825,20 @@ namespace BizHawk.MultiClient
|
||||||
nextEmulator = c64;
|
nextEmulator = c64;
|
||||||
break;
|
break;
|
||||||
case "GBA":
|
case "GBA":
|
||||||
|
string gbabiospath = Path.Combine(PathManager.MakeAbsolutePath(Global.Config.PathGBAFirmwares, "GBA"), "gbabios.rom");
|
||||||
|
byte[] gbabios = null;
|
||||||
|
|
||||||
|
if (File.Exists(gbabiospath))
|
||||||
|
{
|
||||||
|
gbabios = File.ReadAllBytes(gbabiospath);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MessageBox.Show(string.Format("Couldn't open GBA BIOS: {0}\nCheck your firmware config", gbabiospath));
|
||||||
|
throw new Exception();
|
||||||
|
}
|
||||||
GBA gba = new GBA();
|
GBA gba = new GBA();
|
||||||
gba.Load(rom.RomData);
|
gba.Load(rom.RomData, gbabios);
|
||||||
nextEmulator = gba;
|
nextEmulator = gba;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,6 +99,8 @@ namespace BizHawk.MultiClient
|
||||||
return Global.Config.BaseSNES;
|
return Global.Config.BaseSNES;
|
||||||
case "Coleco":
|
case "Coleco":
|
||||||
return Global.Config.BaseCOL;
|
return Global.Config.BaseCOL;
|
||||||
|
case "GBA":
|
||||||
|
return Global.Config.BaseGBA;
|
||||||
case "NULL":
|
case "NULL":
|
||||||
default:
|
default:
|
||||||
return "";
|
return "";
|
||||||
|
|
Loading…
Reference in New Issue