7800: ignore 128 byte header, if present

This commit is contained in:
goyuken 2012-12-15 16:06:35 +00:00
parent 0e0359613d
commit 3cfc57f8a1
1 changed files with 8 additions and 0 deletions

View File

@ -160,6 +160,14 @@ namespace BizHawk.Emulation
{
EMU7800.Win.GameProgramLibrary.EMU7800DB = new EMU7800.Win.GameProgramLibrary(new StreamReader(GameDBfn));
}
if (rom.Length % 1024 == 128)
{
Console.WriteLine("Trimming 128 byte .a78 header...");
byte[] newrom = new byte[rom.Length - 128];
Buffer.BlockCopy(rom, 128, newrom, 0, newrom.Length);
rom = newrom;
}
GameInfo = EMU7800.Win.GameProgramLibrary.EMU7800DB.TryRecognizeRom(rom);
CoreComm.RomStatusDetails = GameInfo.ToString();
Console.WriteLine("Rom Determiniation from 7800DB:");