summaryrefslogtreecommitdiff
path: root/libretro.c
diff options
context:
space:
mode:
authorFrancisco José García García2016-08-14 18:28:25 +0200
committerFrancisco José García García2016-08-14 18:28:25 +0200
commit44b63e7d280c9b6a2f1ca4aa908c31e27adeea01 (patch)
tree0914eeabcf96df2cbe8f1d33fe76819b2af26616 /libretro.c
parent177abe6a22c1ad95305587256b6c39baf9a25168 (diff)
downloadpicogpsp-44b63e7d280c9b6a2f1ca4aa908c31e27adeea01.tar.gz
picogpsp-44b63e7d280c9b6a2f1ca4aa908c31e27adeea01.tar.bz2
picogpsp-44b63e7d280c9b6a2f1ca4aa908c31e27adeea01.zip
(VITA) Dynarec WIP
Diffstat (limited to 'libretro.c')
-rw-r--r--libretro.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/libretro.c b/libretro.c
index b0fac00..00dfe55 100644
--- a/libretro.c
+++ b/libretro.c
@@ -9,7 +9,7 @@
#include "memmap.h"
-#if defined(VITA)
+#if defined(VITA) && defined(HAVE_DYNAREC)
#include <psp2/kernel/sysmem.h>
static int translation_caches_inited = 0;
static inline int align(int x, int n) {
@@ -159,15 +159,13 @@ void retro_init(void)
}
#endif
-#if defined(VITA)
+#if defined(VITA) && defined(HAVE_DYNAREC)
if(!translation_caches_inited){
void* currentHandle;
sceBlock = sceKernelAllocMemBlockForVM("code", MB_ALIGN(FOUR_KB_ALIGN(ROM_TRANSLATION_CACHE_SIZE +
RAM_TRANSLATION_CACHE_SIZE +
BIOS_TRANSLATION_CACHE_SIZE)));
- FILE * fd = fopen("ux0:/temp/test.txt","w+");
- fprintf(fd,"%x\n",sceBlock);
if (sceBlock < 0)
{
return;
@@ -179,9 +177,6 @@ void retro_init(void)
{
return;
}
- fprintf(fd,"%x %x\n",currentHandle,ret);
-
- fclose(fd);
rom_translation_cache = (u8*)currentHandle;
ram_translation_cache = rom_translation_cache + ROM_TRANSLATION_CACHE_SIZE;
@@ -240,7 +235,7 @@ void retro_deinit(void)
}
#endif
-#if defined(VITA)
+#if defined(VITA) && defined(HAVE_DYNAREC)
if(translation_caches_inited){
sceKernelFreeMemBlock(sceBlock);
@@ -487,7 +482,6 @@ bool retro_load_game(const struct retro_game_info* info)
}
gamepak_filename[0] = 0;
-
if (load_gamepak(info, info->path) != 0)
{
error_msg("Could not load the game file.");