notaz.gp2x.de
/
picodrive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
revive pandora and win32 builds, rm gp2x dep for linux, lots of refactoring
[picodrive.git]
/
pico
/
carthw
/
svp
/
svp.c
diff --git
a/pico/carthw/svp/svp.c
b/pico/carthw/svp/svp.c
index
be9414e
..
76904ae
100644
(file)
--- a/
pico/carthw/svp/svp.c
+++ b/
pico/carthw/svp/svp.c
@@
-7,10
+7,8
@@
#include "../../pico_int.h"
#include "../../pico_int.h"
+#include "../../cpu/drc/cmn.h"
#include "compiler.h"
#include "compiler.h"
-#ifdef __GP2X__
-#include <sys/mman.h>
-#endif
svp_t *svp = NULL;
int PicoSVPCycles = 850; // cycles/line, just a guess
svp_t *svp = NULL;
int PicoSVPCycles = 850; // cycles/line, just a guess
@@
-100,19
+98,17
@@
static int PicoSVPDma(unsigned int source, int len, unsigned short **srcp, unsig
void PicoSVPInit(void)
{
void PicoSVPInit(void)
{
-#if
def __GP2X__
- int ret;
- ret = munmap(tcache, SSP_DRC_SIZE);
-
printf("munmap tcache: %i\n", ret
);
+#if
ndef PSP
+ // this is to unmap tcache and make
+ // mem available for large ROMs, MCD, etc.
+
drc_cmn_cleanup(
);
#endif
}
#endif
}
-
-static void PicoSVPShutdown(void)
+static void PicoSVPExit(void)
{
{
-#ifdef __GP2X__
- // also unmap tcache
- PicoSVPInit();
+#ifndef PSP
+ ssp1601_dyn_exit();
#endif
}
#endif
}
@@
-121,7
+117,7
@@
void PicoSVPStartup(void)
{
void *tmp;
{
void *tmp;
- elprintf(EL_S
VP, "SVP init
");
+ elprintf(EL_S
TATUS, "SVP startup
");
tmp = realloc(Pico.rom, 0x200000 + sizeof(*svp));
if (tmp == NULL)
tmp = realloc(Pico.rom, 0x200000 + sizeof(*svp));
if (tmp == NULL)
@@
-135,28
+131,22
@@
void PicoSVPStartup(void)
svp = (void *) ((char *)tmp + 0x200000);
memset(svp, 0, sizeof(*svp));
svp = (void *) ((char *)tmp + 0x200000);
memset(svp, 0, sizeof(*svp));
-#ifdef __GP2X__
- tmp = mmap(tcache, SSP_DRC_SIZE, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_SHARED|MAP_ANONYMOUS, -1, 0);
- printf("mmap tcache: %p, asked %p\n", tmp, tcache);
-#endif
-
// init SVP compiler
svp_dyn_ready = 0;
#ifndef PSP
// init SVP compiler
svp_dyn_ready = 0;
#ifndef PSP
- if (PicoOpt&POPT_EN_SVP_DRC) {
- if (ssp1601_dyn_startup()) return;
+ if (PicoOpt & POPT_EN_SVP_DRC) {
+ if (ssp1601_dyn_startup())
+ return;
svp_dyn_ready = 1;
}
#endif
// init ok, setup hooks..
svp_dyn_ready = 1;
}
#endif
// init ok, setup hooks..
- PicoRead16Hook = PicoSVPRead16;
- PicoWrite8Hook = PicoSVPWrite8;
- PicoWrite16Hook = PicoSVPWrite16;
+ PicoCartMemSetup = PicoSVPMemSetup;
PicoDmaHook = PicoSVPDma;
PicoResetHook = PicoSVPReset;
PicoLineHook = PicoSVPLine;
PicoDmaHook = PicoSVPDma;
PicoResetHook = PicoSVPReset;
PicoLineHook = PicoSVPLine;
- PicoCartUnloadHook = PicoSVP
Shutdown
;
+ PicoCartUnloadHook = PicoSVP
Exit
;
// save state stuff
svp_states[0].ptr = svp->iram_rom;
// save state stuff
svp_states[0].ptr = svp->iram_rom;