diff --git a/BizHawk.Emulation/Consoles/Atari/7800/Atari7800.cs b/BizHawk.Emulation/Consoles/Atari/7800/Atari7800.cs index 1d7055c76b..fb3277e90b 100644 --- a/BizHawk.Emulation/Consoles/Atari/7800/Atari7800.cs +++ b/BizHawk.Emulation/Consoles/Atari/7800/Atari7800.cs @@ -202,7 +202,13 @@ namespace BizHawk.Emulation { cart = Cart.Create(rom, GameInfo.CartType); ILogger logger = new ConsoleLogger(); - HSC7800 hsc7800 = new HSC7800(hsbios, hsram); + + HSC7800 hsc7800 = null; + if (hsbios != null) + { + hsc7800 = new HSC7800(hsbios, hsram); + } + Bios7800 bios7800 = new Bios7800(bios); theMachine = MachineBase.Create (GameInfo.MachineType, @@ -260,25 +266,28 @@ namespace BizHawk.Emulation delegate(int addr, byte val) { })); - _MemoryDomains.Add(new MemoryDomain( - "HSC ROM", hsbios.Length, Endian.Unknown, - delegate(int addr) - { - return hsbios[addr]; - }, - delegate(int addr, byte val) - { - })); - _MemoryDomains.Add(new MemoryDomain( - "HSC RAM", hsram.Length, Endian.Unknown, - delegate(int addr) - { - return hsram[addr]; - }, - delegate(int addr, byte val) - { - hsram[addr] = val; - })); + if (hsc7800 != null) + { + _MemoryDomains.Add(new MemoryDomain( + "HSC ROM", hsbios.Length, Endian.Unknown, + delegate(int addr) + { + return hsbios[addr]; + }, + delegate(int addr, byte val) + { + })); + _MemoryDomains.Add(new MemoryDomain( + "HSC RAM", hsram.Length, Endian.Unknown, + delegate(int addr) + { + return hsram[addr]; + }, + delegate(int addr, byte val) + { + hsram[addr] = val; + })); + } _MemoryDomains.Add(new MemoryDomain( "System Bus", 65536, Endian.Unknown, delegate(int addr) diff --git a/BizHawk.MultiClient/MainForm.cs b/BizHawk.MultiClient/MainForm.cs index 28afd1d1f1..b3ad2974e6 100644 --- a/BizHawk.MultiClient/MainForm.cs +++ b/BizHawk.MultiClient/MainForm.cs @@ -2051,30 +2051,40 @@ namespace BizHawk.MultiClient FileInfo palfile = new FileInfo(pal_biospath); FileInfo hsfile = new FileInfo(hsbiospath); + byte[] NTSC_BIOS7800 = null; + byte[] PAL_BIOS7800 = null; + byte[] HighScoreBIOS = null; if (!ntscfile.Exists) { - MessageBox.Show("Unable to find the required Atari 7800 BIOS file - \n" + ntsc_biospath, "Unable to load BIOS", MessageBoxButtons.OK, MessageBoxIcon.Error); - throw new Exception(); + 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(); + } + else + { + NTSC_BIOS7800 = File.ReadAllBytes(ntsc_biospath); } if (!palfile.Exists) { - MessageBox.Show("Unable to find the required Atari 7800 BIOS file - \n" + pal_biospath, "Unable to load BIOS", MessageBoxButtons.OK, MessageBoxIcon.Error); - throw new Exception(); + 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(); + } + else + { + PAL_BIOS7800 = File.ReadAllBytes(pal_biospath); } if (!hsfile.Exists) { - MessageBox.Show("Unable to find the required Atari 7800 BIOS file - \n" + hsbiospath, "Unable to load BIOS", MessageBoxButtons.OK, MessageBoxIcon.Error); - throw new Exception(); + 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(); + } + else + { + HighScoreBIOS = File.ReadAllBytes(hsbiospath); } - byte[] NTSC_BIOS7800 = File.ReadAllBytes(ntsc_biospath); - byte[] PAL_BIOS7800 = File.ReadAllBytes(pal_biospath); - byte[] HighScoreBIOS = File.ReadAllBytes(hsbiospath); - string gamedbpath = Path.Combine(PathManager.GetExeDirectoryAbsolute(), "gamedb", "EMU7800.csv"); - var a78 = new BizHawk.Emulation.Atari7800(nextComm, game, rom.RomData, NTSC_BIOS7800, PAL_BIOS7800, HighScoreBIOS, gamedbpath); nextEmulator = a78; break;