Vectrex: Add minestorm and bug fixes

This commit is contained in:
alyosha-tas 2019-06-17 09:06:37 -04:00
parent 0c8646cfd4
commit e8d64cdbbb
6 changed files with 38 additions and 6 deletions

View File

@ -173,7 +173,7 @@ namespace BizHawk.Client.Common
private bool HandleArchiveBinding(HawkFile file) private bool HandleArchiveBinding(HawkFile file)
{ {
var romExtensions = new[] { "SMS", "SMC", "SFC", "PCE", "SGX", "GG", "SG", "BIN", "GEN", "MD", "SMD", "GB", "NES", "FDS", "ROM", "INT", "GBC", "UNF", "A78", "CRT", "COL", "XML", "Z64", "V64", "N64", "WS", "WSC", "GBA", "32X" }; var romExtensions = new[] { "SMS", "SMC", "SFC", "PCE", "SGX", "GG", "SG", "BIN", "GEN", "MD", "SMD", "GB", "NES", "FDS", "ROM", "INT", "GBC", "UNF", "A78", "CRT", "COL", "XML", "Z64", "V64", "N64", "WS", "WSC", "GBA", "32X", "VEC" };
// try binding normal rom extensions first // try binding normal rom extensions first
if (!file.IsBound) if (!file.IsBound)
@ -884,6 +884,8 @@ namespace BizHawk.Client.Common
rom.GameInfo.System = "NES"; rom.GameInfo.System = "NES";
} }
Console.WriteLine(rom.GameInfo.System);
if (string.IsNullOrEmpty(rom.GameInfo.System)) if (string.IsNullOrEmpty(rom.GameInfo.System))
{ {
// Has the user picked a preference for this extension? // Has the user picked a preference for this extension?
@ -1116,6 +1118,9 @@ namespace BizHawk.Client.Common
case "32X": case "32X":
core = CoreInventory.Instance["GEN", "PicoDrive"]; core = CoreInventory.Instance["GEN", "PicoDrive"];
break; break;
case "VEC":
core = CoreInventory.Instance["VEC", "VectrexHawk"];
break;
} }
if (core != null) if (core != null)

View File

@ -375,6 +375,11 @@ namespace BizHawk.Emulation.Common
game.System = "32X"; game.System = "32X";
game.AddOption("32X", "true"); game.AddOption("32X", "true");
break; break;
case ".VEC":
game.System = "VEC";
game.AddOption("VEC", "true");
break;
} }
game.Name = Path.GetFileNameWithoutExtension(fileName)?.Replace('_', ' '); game.Name = Path.GetFileNameWithoutExtension(fileName)?.Replace('_', ' ');

View File

@ -26,11 +26,16 @@ namespace BizHawk.Emulation.Common
FirmwareAndOption("FECBAE2CEC76C710422486BAA186FFA7CA1CF925", 53248, "SNES", "ST011", "st011.rom", "ST011 Rom"); FirmwareAndOption("FECBAE2CEC76C710422486BAA186FFA7CA1CF925", 53248, "SNES", "ST011", "st011.rom", "ST011 Rom");
FirmwareAndOption("91383B92745CC7CC4F15409AC5BC2C2F699A43F1", 163840, "SNES", "ST018", "st018.rom", "ST018 Rom"); FirmwareAndOption("91383B92745CC7CC4F15409AC5BC2C2F699A43F1", 163840, "SNES", "ST018", "st018.rom", "ST018 Rom");
FirmwareAndOption("79F5FF55DD10187C7FD7B8DAAB0B3FFBD1F56A2C", 262144, "PCECD", "Bios", "pcecd-3.0-(J).pce", "Super CD Bios (J)"); FirmwareAndOption("79F5FF55DD10187C7FD7B8DAAB0B3FFBD1F56A2C", 262144, "PCECD", "Bios", "pcecd-3.0-(J).pce", "Super CD Bios (J)");
FirmwareAndOption("D9D134BB6B36907C615A594CC7688F7BFCEF5B43", 4096, "A78", "Bios_NTSC", "7800NTSCBIOS.bin", "NTSC Bios"); //FirmwareAndOption("D9D134BB6B36907C615A594CC7688F7BFCEF5B43", 4096, "A78", "Bios_NTSC", "7800NTSCBIOS.bin", "NTSC Bios");
FirmwareAndOption("CE236581AB7921B59DB95BA12837C22F160896CB", 4096, "A78", "Bios_NTSC", "7800NTSCBIOS.bin", "NTSC Bios");
FirmwareAndOption("5A140136A16D1D83E4FF32A19409CA376A8DF874", 16384, "A78", "Bios_PAL", "7800PALBIOS.bin", "PAL Bios"); FirmwareAndOption("5A140136A16D1D83E4FF32A19409CA376A8DF874", 16384, "A78", "Bios_PAL", "7800PALBIOS.bin", "PAL Bios");
FirmwareAndOption("A3AF676991391A6DD716C79022D4947206B78164", 4096, "A78", "Bios_HSC", "7800highscore.bin", "Highscore Bios"); FirmwareAndOption("A3AF676991391A6DD716C79022D4947206B78164", 4096, "A78", "Bios_HSC", "7800highscore.bin", "Highscore Bios");
FirmwareAndOption("45BEDC4CBDEAC66C7DF59E9E599195C778D86A92", 8192, "Coleco", "Bios", "ColecoBios.bin", "Bios"); FirmwareAndOption("45BEDC4CBDEAC66C7DF59E9E599195C778D86A92", 8192, "Coleco", "Bios", "ColecoBios.bin", "Bios");
FirmwareAndOption("B9BBF5BB0EAC52D039A4A993A2D8064B862C9E28", 4096, "Vectrex", "Bios", "VectrexBios.bin", "Bios"); FirmwareAndOption("B9BBF5BB0EAC52D039A4A993A2D8064B862C9E28", 4096, "Vectrex", "Bios", "VectrexBios.bin", "Bios");
FirmwareAndOption("65D07426B520DDD3115D40F255511E0FD2E20AE7", 8192, "Vectrex", "Minestorm", "Minestorm.vec", "Game");
FirmwareAndOption("1FDCC6E54AE5177BC9CDC79CE616AE3401E5C229", 8192, "Vectrex", "Minestorm", "MinestormII.vec", "Game");
var gbaNormal = File("300C20DF6731A33952DED8C436F7F186D25D3492", 16384, "gbabios.rom", "Bios (World)"); var gbaNormal = File("300C20DF6731A33952DED8C436F7F186D25D3492", 16384, "gbabios.rom", "Bios (World)");
var gbaJDebug = File("AA98A2AD32B86106340665D1222D7D973A1361C7", 16384, "gbabios.rom", "Bios (J Debug)"); var gbaJDebug = File("AA98A2AD32B86106340665D1222D7D973A1361C7", 16384, "gbabios.rom", "Bios (J Debug)");

View File

@ -360,7 +360,7 @@ namespace BizHawk.Emulation.Common.Components.MC6809
{ {
PopulateCURINSTR(RD_INC, ALU, PC, PopulateCURINSTR(RD_INC, ALU, PC,
RD_INC, ALU2, PC, RD_INC, ALU2, PC,
SET_ADDR, PC, ALU, ALU2); SET_ADDR, ADDR, ALU, ALU2);
IRQS = 3; IRQS = 3;
} }

View File

@ -45,7 +45,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Vectrex
} }
else if (addr < 0xF000) else if (addr < 0xF000)
{ {
return 0xFF; return minestorm[addr-0xE000];
} }
else else
{ {
@ -112,7 +112,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Vectrex
} }
else if (addr < 0xF000) else if (addr < 0xF000)
{ {
return 0xFF; return minestorm[addr - 0xE000];
} }
else else
{ {

View File

@ -20,7 +20,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Vectrex
public byte[] RAM = new byte[0x400]; public byte[] RAM = new byte[0x400];
public byte[] _bios; public byte[] _bios, minestorm;
public readonly byte[] _rom; public readonly byte[] _rom;
public byte[] cart_RAM; public byte[] cart_RAM;
@ -62,13 +62,30 @@ namespace BizHawk.Emulation.Cores.Consoles.Vectrex
_controllerDeck = new VectrexHawkControllerDeck(_syncSettings.Port1, _syncSettings.Port2); _controllerDeck = new VectrexHawkControllerDeck(_syncSettings.Port1, _syncSettings.Port2);
byte[] Bios = null; byte[] Bios = null;
byte[] Mine = null;
Bios = comm.CoreFileProvider.GetFirmware("Vectrex", "Bios", true, "BIOS Not Found, Cannot Load"); Bios = comm.CoreFileProvider.GetFirmware("Vectrex", "Bios", true, "BIOS Not Found, Cannot Load");
_bios = Bios; _bios = Bios;
Mine = comm.CoreFileProvider.GetFirmware("Vectrex", "Minestorm", true, "Minestorm Not Found, Cannot Load");
minestorm = Mine;
Console.WriteLine("SHA1:" + rom.HashSHA1(0, rom.Length)); Console.WriteLine("SHA1:" + rom.HashSHA1(0, rom.Length));
_rom = rom; _rom = rom;
// If the game is minstorm, then no cartridge is inserted, retun 0xFF
if ((rom.HashSHA1(0, rom.Length) == "65D07426B520DDD3115D40F255511E0FD2E20AE7") ||
(rom.HashSHA1(0, rom.Length) == "1FDCC6E54AE5177BC9CDC79CE616AE3401E5C229"))
{
_rom = new byte[0x8000];
for (int i = 0; i < 0x8000; i++)
{
_rom[i] = 0xFF;
}
}
// mirror games that are too small // mirror games that are too small
if (_rom.Length < 0x8000) if (_rom.Length < 0x8000)
{ {