added handling for bad sram headers

git-svn-id: file:///home/notaz/opt/svn/PicoDrive@309 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
notaz 2007-12-03 21:44:19 +00:00
parent 8f8fe01e04
commit 53668ca0f8

View file

@ -546,10 +546,12 @@ void PicoCartDetect(void)
Pico.m.sram_reg |= 4;
} else {
// normal SRAM
SRam.start = PicoRead32(0x1B4) & 0xFFFF00;
SRam.start = PicoRead32(0x1B4) & ~0xff;
SRam.end = PicoRead32(0x1B8) | 1;
sram_size = SRam.end - SRam.start + 1;
}
SRam.start &= ~0xff000000;
SRam.end &= ~0xff000000;
Pico.m.sram_reg |= 0x10; // SRAM was detected
}
if (sram_size <= 0)