- Fixed Atari 7800 so it works again. The game will not launch without the required BIOS, but you're not forced to have a BIOS for regions other than the game you're running.

- Fixed BIOS detection for Coleco and Atari 7800. When no BIOS is defined, the application now properly informs the user again instead of throwing an exception.
This commit is contained in:
sappharad 2013-08-24 02:49:46 +00:00
parent 1de6eb30a3
commit 96405ad7de
4 changed files with 25 additions and 12 deletions

View File

@ -198,6 +198,10 @@ namespace BizHawk.Emulation
this.game = game;
this.hsbios = highscoreBIOS;
this.bios = GameInfo.MachineType == MachineType.A7800PAL ? pal_bios : ntsc_bios;
if (bios == null)
{
throw new InvalidDataException("The BIOS corresponding to the region of the game you loaded is required to run Atari 7800 games.");
}
HardReset();
}

View File

@ -1361,8 +1361,8 @@ namespace BizHawk.MultiClient
break;
case "Coleco":
string colbiosPath = this.FirmwareManager.Request("Coleco", "Bios");
FileInfo colfile = new FileInfo(colbiosPath);
if (!colfile.Exists)
FileInfo colfile = colbiosPath != null ? new FileInfo(colbiosPath) : null;
if (colfile == null || !colfile.Exists)
{
MessageBox.Show("Unable to find the required ColecoVision BIOS file - \n" + colbiosPath, "Unable to load BIOS", MessageBoxButtons.OK, MessageBoxIcon.Error);
throw new Exception();
@ -1392,14 +1392,14 @@ namespace BizHawk.MultiClient
string pal_biospath = this.FirmwareManager.Request("A78", "Bios_PAL");
string hsbiospath = this.FirmwareManager.Request("A78", "Bios_HSC");
FileInfo ntscfile = new FileInfo(ntsc_biospath);
FileInfo palfile = new FileInfo(pal_biospath);
FileInfo hsfile = new FileInfo(hsbiospath);
FileInfo ntscfile = ntsc_biospath != null ? new FileInfo(ntsc_biospath) : null;
FileInfo palfile = pal_biospath != null ? new FileInfo(pal_biospath) : null;
FileInfo hsfile = hsbiospath != null ? new FileInfo(hsbiospath) : null;
byte[] NTSC_BIOS7800 = null;
byte[] PAL_BIOS7800 = null;
byte[] HighScoreBIOS = null;
if (!ntscfile.Exists)
if (ntscfile == null || !ntscfile.Exists)
{
MessageBox.Show("Unable to find the required Atari 7800 BIOS file - \n" + ntsc_biospath + "\nIf the selected game requires it, it may crash", "Unable to load BIOS", MessageBoxButtons.OK, MessageBoxIcon.Error);
//throw new Exception();
@ -1409,7 +1409,7 @@ namespace BizHawk.MultiClient
NTSC_BIOS7800 = File.ReadAllBytes(ntsc_biospath);
}
if (!palfile.Exists)
if (palfile == null || !palfile.Exists)
{
MessageBox.Show("Unable to find the required Atari 7800 BIOS file - \n" + pal_biospath + "\nIf the selected game requires it, it may crash", "Unable to load BIOS", MessageBoxButtons.OK, MessageBoxIcon.Error);
//throw new Exception();
@ -1419,7 +1419,7 @@ namespace BizHawk.MultiClient
PAL_BIOS7800 = File.ReadAllBytes(pal_biospath);
}
if (!hsfile.Exists)
if (hsfile == null || !hsfile.Exists)
{
MessageBox.Show("Unable to find the required Atari 7800 BIOS file - \n" + hsbiospath + "\nIf the selected game requires it, it may crash", "Unable to load BIOS", MessageBoxButtons.OK, MessageBoxIcon.Error);
//throw new Exception();
@ -1430,8 +1430,16 @@ namespace BizHawk.MultiClient
}
string gamedbpath = Path.Combine(PathManager.GetExeDirectoryAbsolute(), "gamedb", "EMU7800.csv");
var a78 = new Atari7800(nextComm, game, rom.RomData, NTSC_BIOS7800, PAL_BIOS7800, HighScoreBIOS, gamedbpath);
nextEmulator = a78;
try
{
var a78 = new Atari7800(nextComm, game, rom.RomData, NTSC_BIOS7800, PAL_BIOS7800, HighScoreBIOS, gamedbpath);
nextEmulator = a78;
}
catch (InvalidDataException ex)
{
MessageBox.Show(ex.Message, "Region specific bios missing", MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
break;
case "C64":
C64 c64 = new C64(nextComm, game, rom.RomData, rom.Extension);

View File

@ -319,8 +319,9 @@ namespace EMU7800.Win
if (_columnPositions[Column.HelpUri] < row.Length)
{
var helpUri = row[_columnPositions[Column.HelpUri]].Trim();
if (!helpUri.Length.Equals(0))
string helpUri = row[_columnPositions[Column.HelpUri]];
if (helpUri != null) helpUri = helpUri.Trim();
if (helpUri != null && !helpUri.Length.Equals(0))
gp.HelpUri = helpUri;
}