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 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();
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -99,6 +99,14 @@ namespace BizHawk.MultiClient
|
|||
public string PathSNESCheats = Path.Combine(".", "Cheats");
|
||||
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 PathSMSROMs = ".";
|
||||
public string PathSMSSavestates = Path.Combine(".", "State");
|
||||
|
|
|
@ -1809,12 +1809,12 @@ namespace BizHawk.MultiClient
|
|||
break;
|
||||
case "A78":
|
||||
string ntsc_biospath = PathManager.MakeAbsolutePath(Global.Config.PathAtari7800NTSCBIOS, "A78");
|
||||
string pal_biospath = PathManager.MakeAbsolutePath(Global.Config.PathAtari7800PALBIOS, "A78");
|
||||
string pal_biospath = PathManager.MakeAbsolutePath(Global.Config.PathAtari7800PALBIOS, "A78");
|
||||
string hsbiospath = PathManager.MakeAbsolutePath(Global.Config.PathAtari7800HighScoreBIOS, "A78");
|
||||
byte[] NTSC_BIOS7800 = File.ReadAllBytes(ntsc_biospath);
|
||||
byte[] PAL_BIOS7800 = File.ReadAllBytes(pal_biospath);
|
||||
byte[] HighScoreBIOS = File.ReadAllBytes(hsbiospath);
|
||||
|
||||
|
||||
Atari7800 a78 = new Atari7800(game, rom.RomData, NTSC_BIOS7800, PAL_BIOS7800, HighScoreBIOS);
|
||||
nextEmulator = a78;
|
||||
break;
|
||||
|
@ -1825,8 +1825,20 @@ namespace BizHawk.MultiClient
|
|||
nextEmulator = c64;
|
||||
break;
|
||||
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.Load(rom.RomData);
|
||||
gba.Load(rom.RomData, gbabios);
|
||||
nextEmulator = gba;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -99,6 +99,8 @@ namespace BizHawk.MultiClient
|
|||
return Global.Config.BaseSNES;
|
||||
case "Coleco":
|
||||
return Global.Config.BaseCOL;
|
||||
case "GBA":
|
||||
return Global.Config.BaseGBA;
|
||||
case "NULL":
|
||||
default:
|
||||
return "";
|
||||
|
|
Loading…
Reference in New Issue