diff --git a/.github/workflows/Orbis.yml b/.github/workflows/Orbis.yml index 393b49342f..a1e4fbba9e 100644 --- a/.github/workflows/Orbis.yml +++ b/.github/workflows/Orbis.yml @@ -22,7 +22,7 @@ jobs: - name: Compile RA run: | export PATH=~/cli:$PATH # .net cli - make -f Makefile.orbis -j$(getconf _NPROCESSORS_ONLN) && make -f Makefile.orbis oelf eboot + make -f Makefile.orbis -j$(getconf _NPROCESSORS_ONLN) HAVE_STATIC_DUMMY=1 && make -f Makefile.orbis oelf eboot - name: Get short SHA id: slug diff --git a/Makefile.orbis b/Makefile.orbis index 1f6d456471..64165dd9ea 100644 --- a/Makefile.orbis +++ b/Makefile.orbis @@ -3,7 +3,7 @@ DEBUG ?= 0 GRIFFIN_BUILD = 0 WHOLE_ARCHIVE_LINK = 0 -HAVE_STATIC_DUMMY ?= 1 +HAVE_STATIC_DUMMY ?= 0 HAVE_GLES3 ?= 0 HAVE_MOUSE ?= 0 HAVE_KEYBOARD ?= 0 @@ -16,7 +16,7 @@ PC_DEVELOPMENT_UDP_PORT = 18194 DEBUG=1 AUTH_INFO = 000000000000000000000000001C004000FF000000000080000000000000000000000000000000000000008000400040000000000000008000000000000000080040FFFF000000F000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -# OBJ += memory/ps4/user_mem.o \ +OBJ += memory/ps4/user_mem.o \ # memory/ps4/user_new.o \ # input/drivers/ps4_input.o \ # input/drivers_joypad/ps4_joypad.o \ diff --git a/frontend/drivers/platform_orbis.c b/frontend/drivers/platform_orbis.c index 23c36db31c..1700364ecb 100644 --- a/frontend/drivers/platform_orbis.c +++ b/frontend/drivers/platform_orbis.c @@ -47,8 +47,6 @@ #include #include -// #include "user_mem.h" - #include #include @@ -100,21 +98,6 @@ static OrbisMspace s_mspace = 0; static void *address = 0; static size_t s_mem_size = MEM_SIZE; -static int max_malloc(size_t initial_value, int increment, const char *desc) -{ - char *p_block; - size_t chunk = initial_value; - - printf("Check maximum contigous block we can allocate (%s accurate)\n", desc); - while ((p_block = sceLibcMspaceMalloc(s_mspace, ++chunk * increment)) != NULL) { - sceLibcMspaceFree(s_mspace,p_block); - } - chunk--; - printf("Maximum possible %s we can allocate is %zu\n", desc, chunk); - - return chunk; -} - #if defined(HAVE_TAUON_SDK) void catchReturnFromMain(int exit_code) { @@ -138,8 +121,6 @@ static void frontend_orbis_get_env(int *argc, char *argv[], int ret; - sceSystemServiceHideSplashScreen(); - strlcpy(eboot_path, EBOOT_PATH, sizeof(eboot_path)); strlcpy(g_defaults.dirs[DEFAULT_DIR_PORT], eboot_path, sizeof(g_defaults.dirs[DEFAULT_DIR_PORT])); strlcpy(user_path, USER_PATH, sizeof(user_path)); @@ -241,25 +222,13 @@ static void frontend_orbis_shutdown(bool unused) return; } -static void prepareMemoryAllocation() -{ - int res = sceKernelReserveVirtualRange(&address, MEM_SIZE, 0, MEM_ALIGN); - printf("sceKernelReserveVirtualRange %x %x\n", res, address); - res = sceKernelMapNamedSystemFlexibleMemory(&address, MEM_SIZE, 0x2, 0x0010, "TEST"); - printf("sceKernelMapNamedSystemFlexibleMemory %x %x\n", res, address); - s_mspace = sceLibcMspaceCreate("User Mspace", address, MEM_SIZE, 0); - printf("sceLibcMspaceCreate %p \n", s_mspace); - - printf("TOTAL MEMORY %d %s\n", max_malloc(0, 1024 * 1024, "MB"), "MB"); -} - static bool initApp() { int ret=initOrbisLinkAppVanillaGl(); if(ret==0) { debugNetInit(PC_DEVELOPMENT_IP_ADDRESS,PC_DEVELOPMENT_UDP_PORT,3); - debugNetPrintf(DEBUGNET_INFO,"[TEMPLATE3] Ready to have a lot of fun\n"); + debugNetPrintf(DEBUGNET_INFO,"Ready to have a lot of fun\n"); sceSystemServiceHideSplashScreen(); return true; @@ -272,8 +241,6 @@ static void frontend_orbis_init(void *data) printf("[%s][%s][%d]\n",__FILE__,__PRETTY_FUNCTION__,__LINE__); int ret=initApp(); printf("[%s][%s][%d]\n",__FILE__,__PRETTY_FUNCTION__,__LINE__); - prepareMemoryAllocation(); - printf("[%s][%s][%d]\n",__FILE__,__PRETTY_FUNCTION__,__LINE__); logger_init(); RARCH_LOG("[%s][%s][%d] Hello from retroarch level info\n",__FILE__,__PRETTY_FUNCTION__,__LINE__); @@ -288,7 +255,6 @@ static void frontend_orbis_init(void *data) } - verbosity_enable(); printf("[%s][%s][%d]\n",__FILE__,__PRETTY_FUNCTION__,__LINE__); diff --git a/libretro-common/include/defines/ps4_defines.h b/libretro-common/include/defines/ps4_defines.h index d40acb71c0..5951b834bb 100644 --- a/libretro-common/include/defines/ps4_defines.h +++ b/libretro-common/include/defines/ps4_defines.h @@ -22,7 +22,6 @@ #define ORBISPAD_TOUCH_PAD 0x00100000 #define ORBISPAD_INTERCEPTED 0x80000000 -#if defined(HAVE_OOSDK) || defined(HAVE_LIBORBIS) || defined(ORBIS) #define SceUID uint32_t #define SceKernelStat OrbisKernelStat #define SCE_KERNEL_PRIO_FIFO_DEFAULT 700 @@ -43,6 +42,5 @@ #define SCE_PAD_PORT_TYPE_REMOTE_CONTROL 16 #define SCE_KERNEL_PROT_CPU_RW 0x02 #define SCE_KERNEL_MAP_FIXED 0x10 -#endif #endif diff --git a/memory/ps4/user_mem.c b/memory/ps4/user_mem.c index 3624967a21..9e7927bbce 100644 --- a/memory/ps4/user_mem.c +++ b/memory/ps4/user_mem.c @@ -1,9 +1,13 @@ -#include -#include -#include +#include +#include +#include +#include #include #include "user_mem.h" +#include +#include + static OrbisMspace s_mspace = 0; static OrbisMallocManagedSize s_mmsize; static void *s_mem_start = 0;