notaz.gp2x.de
/
picodrive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8f8fe01
)
added handling for bad sram headers
author
notaz
<notasas@gmail.com>
Mon, 3 Dec 2007 21:44:19 +0000
(21:44 +0000)
committer
notaz
<notasas@gmail.com>
Mon, 3 Dec 2007 21:44:19 +0000
(21:44 +0000)
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@309
be3aeb3a
-fb24-0410-a615-
afba39da0efa
Pico/Cart.c
patch
|
blob
|
blame
|
history
diff --git
a/Pico/Cart.c
b/Pico/Cart.c
index
a19dcc8
..
749d461
100644
(file)
--- a/
Pico/Cart.c
+++ b/
Pico/Cart.c
@@
-546,10
+546,12
@@
void PicoCartDetect(void)
Pico.m.sram_reg |= 4;
\r
} else {
\r
// normal SRAM
\r
- SRam.start = PicoRead32(0x1B4) &
0xFFFF00
;
\r
+ SRam.start = PicoRead32(0x1B4) &
~0xff
;
\r
SRam.end = PicoRead32(0x1B8) | 1;
\r
sram_size = SRam.end - SRam.start + 1;
\r
}
\r
+ SRam.start &= ~0xff000000;
\r
+ SRam.end &= ~0xff000000;
\r
Pico.m.sram_reg |= 0x10; // SRAM was detected
\r
}
\r
if (sram_size <= 0)
\r