notaz.gp2x.de
/
picodrive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'libretro' into libretro-reset
[picodrive.git]
/
cpu
/
drc
/
cmn.c
diff --git
a/cpu/drc/cmn.c
b/cpu/drc/cmn.c
index
f788eca
..
27ff981
100644
(file)
--- a/
cpu/drc/cmn.c
+++ b/
cpu/drc/cmn.c
@@
-10,28
+10,20
@@
#include <pico/pico_int.h>
#include "cmn.h"
#include <pico/pico_int.h>
#include "cmn.h"
-#ifdef _MSC_VER
-u8 tcache[DRC_TCACHE_SIZE];
-#elif defined(VITA)
-#include <psp2/kernel/sysmem.h>
+u8 ALIGNED(4096) tcache_default[DRC_TCACHE_SIZE];
u8 *tcache;
u8 *tcache;
-static int sceBlock;
-int getVMBlock();
-#else
-u8 __attribute__((aligned(4096))) tcache[DRC_TCACHE_SIZE];
-#endif
-
void drc_cmn_init(void)
{
void drc_cmn_init(void)
{
-#ifdef VITA
- sceBlock = getVMBlock();
- sceKernelGetMemBlockBase(sceBlock, (void **)&tcache);
-#endif
+ int ret;
+
+ tcache = plat_mem_get_for_drc(DRC_TCACHE_SIZE);
+ if (tcache == NULL)
+ tcache = tcache_default;
-
int ret = plat_mem_set_exec(tcache, sizeof(tcache)
);
+
ret = plat_mem_set_exec(tcache, DRC_TCACHE_SIZE
);
elprintf(EL_STATUS, "drc_cmn_init: %p, %zd bytes: %d",
elprintf(EL_STATUS, "drc_cmn_init: %p, %zd bytes: %d",
- tcache,
sizeof(tcache)
, ret);
+ tcache,
DRC_TCACHE_SIZE
, ret);
#ifdef __arm__
if (PicoOpt & POPT_EN_DRC)
#ifdef __arm__
if (PicoOpt & POPT_EN_DRC)