2600: try 2K or 4K mappers for unknown roms where applicable

This commit is contained in:
goyuken 2014-02-08 04:59:45 +00:00
parent 5a451d4906
commit eed290cb8d
1 changed files with 16 additions and 0 deletions

View File

@ -41,10 +41,26 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
CoreComm.CpuTraceAvailable = true;
this.rom = rom;
this.game = game;
if (!game.GetOptionsDict().ContainsKey("m"))
DetectMapper();
Console.WriteLine("Game uses mapper " + game.GetOptionsDict()["m"]);
HardReset();
}
void DetectMapper()
{
string m = "UNKNOWN";
switch (rom.Length)
{
case 2048: m = "2K"; break;
case 4096: m = "4K"; break;
}
game.AddOption("m", m);
}
public List<KeyValuePair<string, int>> GetCpuFlagsAndRegisters()
{
return new List<KeyValuePair<string, int>>