X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=cpu%2Fdrc%2Fcmn.c;h=721340a39189a5cd3737d2a5cf9a9658d0eacee9;hb=65678f6d7712ea60dc2dfeef64356f4f17699fbd;hp=cfb0219c3a947384e5eddb22fbeda3137f805f36;hpb=570dde615d960c9f9ba8e15d95634816ad544c77;p=picodrive.git diff --git a/cpu/drc/cmn.c b/cpu/drc/cmn.c index cfb0219..721340a 100644 --- a/cpu/drc/cmn.c +++ b/cpu/drc/cmn.c @@ -1,6 +1,8 @@ /* * PicoDrive * Copyright (C) 2009,2010 notaz + * Copyright (C) 2016 lentillog + * Copyright (C) 2016 Daniel De Matteis * * This work is licensed under the terms of MAME license. * See COPYING file in the top-level directory. @@ -10,16 +12,31 @@ #include #include "cmn.h" +#ifdef _MSC_VER +u8 tcache[DRC_TCACHE_SIZE]; +#elif defined(VITA) +#include +u8 *tcache; +static int sceBlock; +int getVMBlock(); +#else u8 __attribute__((aligned(4096))) tcache[DRC_TCACHE_SIZE]; +#endif void drc_cmn_init(void) { +#ifdef VITA + sceBlock = getVMBlock(); + sceKernelGetMemBlockBase(sceBlock, (void **)&tcache); +#endif + int ret = plat_mem_set_exec(tcache, sizeof(tcache)); elprintf(EL_STATUS, "drc_cmn_init: %p, %zd bytes: %d", tcache, sizeof(tcache), ret); #ifdef __arm__ + if (PicoOpt & POPT_EN_DRC) { static int test_done; if (!test_done)