notaz.gp2x.de
/
picodrive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bugfixes related to mmap usage for ROM
[picodrive.git]
/
pico
/
carthw
/
svp
/
svp.c
diff --git
a/pico/carthw/svp/svp.c
b/pico/carthw/svp/svp.c
index
d1e7f8f
..
a3ed89e
100644
(file)
--- a/
pico/carthw/svp/svp.c
+++ b/
pico/carthw/svp/svp.c
@@
-7,6
+7,7
@@
#include "../../pico_int.h"
#include "../../pico_int.h"
+#include "../../cpu/drc/cmn.h"
#include "compiler.h"
svp_t *svp = NULL;
#include "compiler.h"
svp_t *svp = NULL;
@@
-97,6
+98,11
@@
static int PicoSVPDma(unsigned int source, int len, unsigned short **srcp, unsig
void PicoSVPInit(void)
{
void PicoSVPInit(void)
{
+#ifndef PSP
+ // this is to unmap tcache and make
+ // mem available for large ROMs, MCD, etc.
+ drc_cmn_cleanup();
+#endif
}
static void PicoSVPExit(void)
}
static void PicoSVPExit(void)
@@
-109,20
+115,17
@@
static void PicoSVPExit(void)
void PicoSVPStartup(void)
{
void PicoSVPStartup(void)
{
-
void *tmp
;
+
int ret
;
elprintf(EL_STATUS, "SVP startup");
elprintf(EL_STATUS, "SVP startup");
- tmp = realloc(Pico.rom, 0x200000 + sizeof(*svp));
- if (tmp == NULL)
- {
+ ret = PicoCartResize(Pico.romsize + sizeof(*svp));
+ if (ret != 0) {
elprintf(EL_STATUS|EL_SVP, "OOM for SVP data");
return;
}
elprintf(EL_STATUS|EL_SVP, "OOM for SVP data");
return;
}
- //PicoOpt &= ~0x20000;
- Pico.rom = tmp;
- svp = (void *) ((char *)tmp + 0x200000);
+ svp = (void *) ((char *)Pico.rom + Pico.romsize);
memset(svp, 0, sizeof(*svp));
// init SVP compiler
memset(svp, 0, sizeof(*svp));
// init SVP compiler
@@
-150,4
+153,3
@@
void PicoSVPStartup(void)
PicoAHW |= PAHW_SVP;
}
PicoAHW |= PAHW_SVP;
}
-