CFLAGS += -DVITA
CFLAGS += -mcpu=cortex-a9 -mtune=cortex-a9 -mfpu=neon -marm
CFLAGS += -fsingle-precision-constant -mword-relocations -fno-unwind-tables
- CFLAGS += -fno-asynchronous-unwind-tables -ftree-vectorize -funroll-loops
- CFLAGS += -fno-optimize-sibling-calls
+ CFLAGS += -fno-asynchronous-unwind-tables -ftree-vectorize
+ #CFLAGS += -funroll-loops # ~280K bloat
+ #CFLAGS += -fno-optimize-sibling-calls # debug?
CFLAGS += -I$(VITASDK)/include -Ifrontend/vita
CFLAGS += -DNO_DYLIB
CFLAGS_LAST += -O3
DYNAREC = ari64
ARCH = arm
PARTIAL_LINKING = 1
- NO_PTHREAD=1
+ NO_MMAP := 1
NO_POSIX_MEMALIGN := 1
HAVE_PHYSICAL_CDROM = 0
static int init_vita_mmap()
{
- int n;
void *tmpaddr;
addr = malloc(64 * 1024 * 1024);
if (addr == NULL)
custom_psx_maps[5].buffer = tmpaddr + 0x2000000;
memset(tmpaddr, 0, 0x2210000);
#if 0
+ int n;
for(n = 0; n < 5; n++){
sceClibPrintf("addr reserved %x\n",custom_psx_maps[n].buffer);
}
update_audio_latency = false;
}
-#ifdef VITA
-#include <psp2/kernel/threadmgr.h>
-int usleep(unsigned long us)
-{
- sceKernelDelayThread(us);
-}
-#endif
-
void SysPrintf(const char *fmt, ...)
{
va_list list;
#define MMAN_H
#include <stdlib.h>
-#include <stdio.h>
-#include <psp2/kernel/sysmem.h>
+//#include <psp2/kernel/sysmem.h>
#ifdef __cplusplus
extern "C" {
#define MAP_FAILED ((void *)-1)
+#if 0 // not used
static inline void* mmap(void *addr, size_t len, int prot, int flags, int fd, off_t offset)
{
(void)prot;
return sceKernelFreeMemBlock(uid);
}
+#endif
#ifdef __cplusplus
};
#ifdef VITA
sceBlock = getVMBlock(); //sceKernelAllocMemBlockForVM("code", sizeof(*ndrc));
if (sceBlock <= 0)
- SysPrintf("sceKernelAllocMemBlockForVM failed: %x\n", sceBlock);
+ SysPrintf("getVMBlock failed: %x\n", sceBlock);
int ret = sceKernelGetMemBlockBase(sceBlock, (void **)&ndrc);
if (ret < 0)
SysPrintf("sceKernelGetMemBlockBase failed: %x\n", ret);
sceKernelOpenVMDomain();
- sceClibPrintf("translation_cache = 0x%08lx\n ", (long)ndrc->translation_cache);
#elif defined(_MSC_VER)
ndrc = VirtualAlloc(NULL, sizeof(*ndrc), MEM_COMMIT | MEM_RESERVE,
PAGE_EXECUTE_READWRITE);