SMS: fix loading of roms smaller than 1 bank; fixes BIOS ROMs, Qbert and Guzzler SG

This commit is contained in:
beirich 2011-01-27 07:13:28 +00:00
parent 4a25c801a9
commit 00b78183dd
3 changed files with 5 additions and 4 deletions

View File

@ -27,6 +27,4 @@ Following games are untested (don't have the rom)
Following games have issues:
The Castle dies
Guzzler (JP) crashes the core :O
Monaco GP graphics are whacked up - wonder if it uses an undoc mode?
Q-Bert crash core ? :o
Monaco GP graphics are whacked up - wonder if it uses an undoc mode?

View File

@ -51,6 +51,7 @@ namespace BizHawk.Emulation.Consoles.Sega
public int Frame { get; set; }
private byte Port01 = 0xFF;
private byte Port02 = 0xFF;
private byte Port3E = 0xAF;
private byte Port3F = 0xFF;
private int scanlinesPerFrame;
@ -97,6 +98,8 @@ namespace BizHawk.Emulation.Consoles.Sega
public void LoadGame(IGame game)
{
RomData = game.GetRomData();
if (RomData.Length % BankSize != 0)
Array.Resize(ref RomData, ((RomData.Length/BankSize) + 1)*BankSize);
RomBanks = (byte)(RomData.Length/BankSize);
Options = game.GetOptions();
DisplayType = DisplayType.NTSC;

View File

@ -155,7 +155,7 @@ F9DBB533 BMX Trial - Alex Kidd (JP) SMS
1D43A351 D Bock's Birthday 2002 SMS Maxim
C07CB738 D Bock's Birthday 2003 SMS Maxim
31A5CA6A D Bock's Birthday 2004 SMS Maxim
F0F53C64 D Bock's Birthday 2006 SMS Charles MacDonald
F0F53C64 D Bock's Birthday 2006 SMS Charles MacDonald FM
B80A74A1 D Bock's Birthday 2007 SMS Maxim
3084CF11 Bomber Raid SMS
09D39A66 F Bomber Raid (f) SMS F