From: CatalystG Date: Sun, 24 Mar 2013 22:09:00 +0000 (-0400) Subject: Add support for PlayBook/BB10 with libretro X-Git-Tag: r24l~961^2~1 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=51014e8756a50a3550a65d0bc96152363e406950;p=pcsx_rearmed.git Add support for PlayBook/BB10 with libretro --- diff --git a/Makefile.libretro b/Makefile.libretro index 435a7f78..656b1d21 100644 --- a/Makefile.libretro +++ b/Makefile.libretro @@ -24,9 +24,9 @@ else ifneq ($(findstring win,$(shell uname -a)),) endif endif -CC = gcc -CXX = g++ -AS = as +CC ?= gcc +CXX ?= g++ +AS ?= as ifeq ($(platform), unix) TARGET := snes9x_next_libretro.so @@ -84,6 +84,15 @@ else ifeq ($(platform), wii) CC = $(DEVKITPPC)/bin/powerpc-eabi-gcc$(EXE_EXT) AR = $(DEVKITPPC)/bin/powerpc-eabi-ar$(EXE_EXT) CFLAGS += -DGEKKO -DHW_RVL -mrvl -mcpu=750 -meabi -mhard-float -DBLARGG_BIG_ENDIAN=1 -D__ppc__ +else ifeq ($(platform), qnx) + TARGET := libretro_pcsx_rearmed_qnx.so + HAVE_NEON = 1 + USE_DYNAREC = 1 + DRC_CACHE_BASE = 0 + BUILTIN_GPU = neon + ARCH = arm + CFLAGS += -DBASE_ADDR_FIXED=0 -D__BLACKBERRY_QNX__ -marm -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp + ASFLAGS += -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp else TARGET := snes9x_next_retro.dll CC = gcc @@ -96,16 +105,20 @@ endif CFLAGS += -fPIC ASFLAGS += LDFLAGS += -LDLIBS += -lpthread + +ifneq ($(platform),qnx) + LDLIBS += -lpthread + MAIN_LDLIBS += -ldl +endif MAIN_LDFLAGS += -shared -MAIN_LDLIBS += -ldl -lm -lz +MAIN_LDLIBS += -lm -lz PLUGIN_CFLAGS += -fPIC -TARGET = libretro.so +TARGET ?= libretro.so PLATFORM = libretro -BUILTIN_GPU = peops +BUILTIN_GPU ?= peops SOUND_DRIVERS = libretro -PLUGINS = plugins/dfxvideo/gpu_peops.so plugins/gpu_unai/gpu_unai.so +#PLUGINS = plugins/dfxvideo/gpu_peops.so plugins/gpu_unai/gpu_unai.so CC_LINK = $(CC) LDFLAGS += $(MAIN_LDFLAGS) @@ -217,6 +230,9 @@ frontend/revision.h: FORCE %.o: %.S $(CC) $(CFLAGS) -c $^ -o $@ + +%.o: %.s + $(CC) $(ASFLAGS) -c $^ -o $@ target_: $(TARGET) diff --git a/blackberry_qnx/.cproject b/blackberry_qnx/.cproject new file mode 100644 index 00000000..565f4a93 --- /dev/null +++ b/blackberry_qnx/.cproject @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/blackberry_qnx/.project b/blackberry_qnx/.project new file mode 100644 index 00000000..c8e1e20b --- /dev/null +++ b/blackberry_qnx/.project @@ -0,0 +1,84 @@ + + + pcsx_rearmed + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + ?name? + + + + org.eclipse.cdt.make.core.append_environment + true + + + org.eclipse.cdt.make.core.autoBuildTarget + all + + + org.eclipse.cdt.make.core.buildArguments + -C .. -f Makefile.libretro platform=qnx + + + org.eclipse.cdt.make.core.buildCommand + make + + + org.eclipse.cdt.make.core.cleanBuildTarget + clean + + + org.eclipse.cdt.make.core.contents + org.eclipse.cdt.make.core.activeConfigSettings + + + org.eclipse.cdt.make.core.enableAutoBuild + false + + + org.eclipse.cdt.make.core.enableCleanBuild + true + + + org.eclipse.cdt.make.core.enableFullBuild + true + + + org.eclipse.cdt.make.core.fullBuildTarget + all + + + org.eclipse.cdt.make.core.stopOnError + true + + + org.eclipse.cdt.make.core.useDefaultBuildCmd + false + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + com.qnx.tools.bbt.xml.core.bbtXMLValidationBuilder + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + com.qnx.tools.ide.bbt.core.bbtnature + + diff --git a/libpcsxcore/new_dynarec/new_dynarec.c b/libpcsxcore/new_dynarec/new_dynarec.c index 21c96699..5cdeb96d 100644 --- a/libpcsxcore/new_dynarec/new_dynarec.c +++ b/libpcsxcore/new_dynarec/new_dynarec.c @@ -41,6 +41,10 @@ #include "assem_arm.h" #endif +#undef __clear_cache +#define __clear_cache(start,end) msync(start, (size_t)((void*)end - (void*)start), MS_SYNC | MS_CACHE_ONLY | MS_INVALIDATE_ICACHE); + + #define MAXBLOCK 4096 #define MAX_OUTPUT_BLOCK_SIZE 262144 diff --git a/libpcsxcore/psxmem.c b/libpcsxcore/psxmem.c index f12a981a..422b485c 100644 --- a/libpcsxcore/psxmem.c +++ b/libpcsxcore/psxmem.c @@ -129,8 +129,13 @@ int psxMemInit() { psxM = psxMap(0x80000000, 0x00210000, 1, MAP_TAG_RAM); #ifndef RAM_FIXED +#ifdef __BLACKBERRY_QNX__ + if (psxM == NULL) + psxM = psxMap(0x70000000, 0x00210000, 0, MAP_TAG_RAM); +#else if (psxM == NULL) psxM = psxMap(0x78000000, 0x00210000, 0, MAP_TAG_RAM); +#endif #endif if (psxM == NULL) { SysMessage(_("mapping main RAM failed"));