libretro, enable drc usage on WiiU

This commit is contained in:
kub 2021-10-25 18:33:43 +02:00
parent 1603058a88
commit cbc2ca037a
2 changed files with 6 additions and 5 deletions

View file

@ -281,12 +281,9 @@ else ifeq ($(platform), wiiu)
CC = $(DEVKITPPC)/bin/powerpc-eabi-gcc$(EXE_EXT) CC = $(DEVKITPPC)/bin/powerpc-eabi-gcc$(EXE_EXT)
CXX = $(DEVKITPPC)/bin/powerpc-eabi-g++$(EXE_EXT) CXX = $(DEVKITPPC)/bin/powerpc-eabi-g++$(EXE_EXT)
AR = $(DEVKITPPC)/bin/powerpc-eabi-ar$(EXE_EXT) AR = $(DEVKITPPC)/bin/powerpc-eabi-ar$(EXE_EXT)
CFLAGS += -DGEKKO -DWIIU -DHW_RVL -mwup -mcpu=750 -meabi -mhard-float -D__ppc__ -DMSB_FIRST CFLAGS += -DGEKKO -DWIIU -DHW_RVL -DHW_WUP -mwup -mcpu=750 -meabi -mhard-float -D__ppc__ -DMSB_FIRST
STATIC_LINKING = 1 STATIC_LINKING = 1
NO_MMAP = 1 NO_MMAP = 1
# Wii U has memory mapped in a way not suitable for DRC
use_sh2drc = 0
use_svpdrc = 0
# Nintendo Switch (libtransistor) # Nintendo Switch (libtransistor)
else ifeq ($(platform), switch) else ifeq ($(platform), switch)

View file

@ -572,8 +572,12 @@ void plat_munmap(void *ptr, size_t size)
void *plat_mem_get_for_drc(size_t size) void *plat_mem_get_for_drc(size_t size)
{ {
void *mem = NULL; void *mem = NULL;
#ifdef VITA #if defined VITA
sceKernelGetMemBlockBase(sceBlock, &mem); sceKernelGetMemBlockBase(sceBlock, &mem);
#elif defined HW_WUP
// For WiiU, a slice of RWX memory left from the exploit is used, see:
// https://github.com/embercold/pcsx_rearmed/commit/af0453223
mem = (void *)(0x01000000 - size);
#endif #endif
return mem; return mem;
} }