Atari 7800 - cleanup the BIOS paths and usage of those variables

This commit is contained in:
adelikat 2012-10-23 20:21:55 +00:00
parent 39a54959d0
commit 11db3f1912
5 changed files with 26 additions and 10 deletions

View File

@ -10,7 +10,8 @@ namespace BizHawk
partial class Atari7800
{
public byte[] rom;
Bios7800 BIOS;
Bios7800 NTSC_BIOS;
Bios7800 PAL_BIOS;
public byte[] hsbios;
Cart cart;
Machine7800NTSC theMachine; //TODO: PAL support

View File

@ -85,8 +85,9 @@ namespace BizHawk
}
};
public Atari7800(GameInfo game, byte[] rom, byte[] bios, byte[] highscoreBIOS)
public Atari7800(GameInfo game, byte[] rom, byte[] ntsc_bios, byte[] pal_bios, byte[] highscoreBIOS)
{
//TODO: store both the ntsc bios and the pal bios
var domains = new List<MemoryDomain>(1);
domains.Add(new MemoryDomain("Main RAM", 1, Endian.Little, addr => 0xFF, null)); //TODO
memoryDomains = domains.AsReadOnly();
@ -95,9 +96,10 @@ namespace BizHawk
this.rom = rom;
this.game = game;
this.hsbios = highscoreBIOS;
BIOS = new Bios7800(bios);
NTSC_BIOS = new Bios7800(ntsc_bios);
PAL_BIOS = new Bios7800(pal_bios);
videoProvider = new MyVideoProvider(this);
soundProvider = new MySoundProvider(); //TODO
soundProvider = new MySoundProvider(this); //TODO
HardReset();
}
@ -121,7 +123,7 @@ namespace BizHawk
DeserializationContext george = new DeserializationContext(blah);
NullLogger logger = new NullLogger();
HSC7800 hsc7800 = new HSC7800(hsbios, new byte[4096]); //TODO: why should I have to feed it ram? how much?
theMachine = new Machine7800NTSC(cart, BIOS, hsc7800, logger);
theMachine = new Machine7800NTSC(cart, NTSC_BIOS, hsc7800, logger);
//TODO: clean up, the hs and bios are passed in, the bios has an object AND byte array in the core, and naming is inconsistent
}
@ -183,6 +185,11 @@ namespace BizHawk
class MySoundProvider : ISoundProvider
{
Atari7800 emu;
public MySoundProvider(Atari7800 emu)
{
this.emu = emu;
}
public int MaxVolume { get { return 0; } set { } }
public void DiscardSamples()
{

View File

@ -155,7 +155,9 @@ namespace BizHawk.MultiClient
public string PathINTVGROM = Path.Combine(".", "grom.bin");
public string PathINTVEROM = Path.Combine(".", "erom.bin");
public string PathFDSBios = Path.Combine(".", "disksys.rom");
public string PathAtari7800NTSCBIOS = Path.Combine("C:\\Repos", "7800NTSCBIOS.bin");
public string PathAtari7800NTSCBIOS = Path.Combine(".", "7800NTSCBIOS.bin");
public string PathAtari7800PALBIOS = Path.Combine(".", "7800PALBIOS.bin");
public string PathAtari7800HighScoreBIOS = Path.Combine(".", "7800highscore.bin");
public string FFMpegPath = "%exe%/dll/ffmpeg.exe";

View File

@ -1573,10 +1573,15 @@ namespace BizHawk.MultiClient
}
break;
case "A78":
string biospath = Global.Config.PathAtari7800NTSCBIOS; //TODO
byte[] BIOS7800 = File.ReadAllBytes(biospath);
byte[] HighScoreBIOS = File.ReadAllBytes("C:\\Repos\\7800highscore.bin");
Atari7800 a78 = new Atari7800(game, rom.RomData, BIOS7800, HighScoreBIOS);
string ntsc_biospath = PathManager.MakeAbsolutePath(Global.Config.PathAtari7800NTSCBIOS, "A78");
string pal_biospath = PathManager.MakeAbsolutePath(Global.Config.PathAtari7800PALBIOS, "A78");
string hsbiospath = PathManager.MakeAbsolutePath(Global.Config.PathAtari7800HighScoreBIOS, "A78");
//7800TODO: pass in PAL BIOS path as well now and let the core decide which to use
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;
}

View File

@ -71,6 +71,7 @@ namespace BizHawk.MultiClient
case "INTV":
return Global.Config.BaseINTV;
case "A26":
case "A78": //7800TODO: make its own path settings
return Global.Config.BaseAtari;
case "NES":
return Global.Config.BaseNES;