notaz.gp2x.de
/
picodrive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gp2x: hack to avoid 940 reinit
[picodrive.git]
/
pico
/
patch.c
diff --git
a/pico/patch.c
b/pico/patch.c
index
dc5c91f
..
b961e80
100644
(file)
--- a/
pico/patch.c
+++ b/
pico/patch.c
@@
-213,12
+213,6
@@
unsigned int PicoRead16(unsigned int a);
void PicoWrite16(unsigned int a, unsigned short d);
void PicoWrite16(unsigned int a, unsigned short d);
-/* avoid dependency on newer glibc */
-static int isspace_(int c)
-{
- return (0x09 <= c && c <= 0x0d) || c == ' ';
-}
-
void PicoPatchUnload(void)
{
if (PicoPatches != NULL)
void PicoPatchUnload(void)
{
if (PicoPatches != NULL)
@@
-303,7
+297,8
@@
void PicoPatchPrepare(void)
for (i = 0; i < PicoPatchCount; i++)
{
PicoPatches[i].addr &= ~1;
for (i = 0; i < PicoPatchCount; i++)
{
PicoPatches[i].addr &= ~1;
- PicoPatches[i].data_old = PicoRead16(PicoPatches[i].addr);
+ if (PicoPatches[i].addr < Pico.romsize)
+ PicoPatches[i].data_old = *(unsigned short *)(Pico.rom + PicoPatches[i].addr);
if (strstr(PicoPatches[i].name, "AUTO"))
PicoPatches[i].active = 1;
}
if (strstr(PicoPatches[i].name, "AUTO"))
PicoPatches[i].active = 1;
}
@@
-333,9
+328,7
@@
void PicoPatchApply(void)
}
else
{
}
else
{
- /* RAM or some other weird patch */
- if (PicoPatches[i].active)
- PicoWrite16(addr, PicoPatches[i].data);
+ /* TODO? */
}
}
}
}
}
}