mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 07:17:45 -04:00
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:
parent
8f8fe01e04
commit
53668ca0f8
1 changed files with 3 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue