initial Android support
authorToad King <toadking@toadking.com>
Fri, 26 Oct 2012 19:46:29 +0000 (15:46 -0400)
committernotaz <notasas@gmail.com>
Sat, 24 Nov 2012 02:25:25 +0000 (04:25 +0200)
jni/Android.mk [new file with mode: 0644]
jni/Application.mk [new file with mode: 0644]
libpcsxcore/gte_nf.c [new file with mode: 0644]
libpcsxcore/plugins.c
plugins/cdrcimg/cdrcimg.c

diff --git a/jni/Android.mk b/jni/Android.mk
new file mode 100644 (file)
index 0000000..6be42b1
--- /dev/null
@@ -0,0 +1,104 @@
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+APP_DIR := ../../src
+
+ifneq ($(TARGET_ARCH_ABI),armeabi-v7a)
+   NO_NEON_BUILD := 1
+else
+   NO_NEON_BUILD := $(NO_NEON)
+endif
+
+ifeq ($(NO_NEON_BUILD)$(TARGET_ARCH_ABI),1armeabi-v7a)
+   LOCAL_MODULE    := retro-noneon
+else
+   LOCAL_MODULE    := retro
+endif
+
+ifeq ($(TARGET_ARCH),arm)
+   LOCAL_ARM_MODE := arm
+
+   ifeq ($(TARGET_ARCH_EABI),armeabi-v7a)
+      LOCAL_CFLAGS += -DHAVE_ARMV7=1
+   else
+      LOCAL_CFLAGS += -DHAVE_ARMV7=0
+   endif
+
+   LOCAL_CFLAGS += -DANDROID_ARM
+
+   LOCAL_SRC_FILES += ../libpcsxcore/gte_arm.S
+
+   # dynarec
+   LOCAL_SRC_FILES += ../libpcsxcore/new_dynarec/new_dynarec.c ../libpcsxcore/new_dynarec/linkage_arm.S ../libpcsxcore/new_dynarec/emu_if.c ../libpcsxcore/new_dynarec/pcsxmem.c
+
+   # spu
+   LOCAL_SRC_FILES += ../plugins/dfsound/arm_utils.S
+
+   ifeq ($(NO_NEON_BUILD),1)
+      # gpu
+      LOCAL_CFLAGS += -DREARMED
+      LOCAL_SRC_FILES += ../plugins/gpulib/cspace.c ../plugins/gpu_unai/gpulib_if.cpp ../plugins/gpu_unai/gpu_arm.s
+   else
+      LOCAL_ARM_NEON := true
+      LOCAL_CFLAGS += -DNEON_BUILD -DTEXTURE_CACHE_4BPP -DTEXTURE_CACHE_8BPP
+      LOCAL_SRC_FILES += ../libpcsxcore/gte_neon.S ../plugins/gpulib/cspace_neon.s
+
+      # gpu
+      LOCAL_SRC_FILES += ../plugins/gpu_neon/psx_gpu_if.c ../plugins/gpu_neon/psx_gpu/psx_gpu_arm_neon.S
+   endif
+endif
+
+ifeq ($(TARGET_ARCH),x86)
+   LOCAL_CFLAGS += -DANDROID_X86
+endif
+
+ifeq ($(TARGET_ARCH),mips)
+   LOCAL_CFLAGS += -DANDROID_MIPS -D__mips__ -D__MIPSEL__
+endif
+
+ifneq ($(TARGET_ARCH),arm)
+   # gpu
+   LOCAL_CFLAGS += -DREARMED
+   LOCAL_SRC_FILES += ../plugins/gpulib/cspace.c ../plugins/gpu_unai/gpulib_if.cpp
+endif
+
+$(shell cd "$(LOCAL_PATH)" && ((git describe || echo) | sed -e 's/.*/#define REV "\0"/' > ../frontend/revision.h_))
+$(shell cd "$(LOCAL_PATH)" && (diff -q ../frontend/revision.h_ ../frontend/revision.h > /dev/null 2>&1 || cp ../frontend/revision.h_ ../frontend/revision.h))
+$(shell cd "$(LOCAL_PATH)" && (rm ../frontend/revision.h_))
+
+LOCAL_SRC_FILES += ../libpcsxcore/cdriso.c ../libpcsxcore/cdrom.c ../libpcsxcore/cheat.c ../libpcsxcore/debug.c \
+   ../libpcsxcore/decode_xa.c ../libpcsxcore/disr3000a.c ../libpcsxcore/mdec.c \
+   ../libpcsxcore/misc.c ../libpcsxcore/plugins.c ../libpcsxcore/ppf.c ../libpcsxcore/psxbios.c \
+   ../libpcsxcore/psxcommon.c ../libpcsxcore/psxcounters.c ../libpcsxcore/psxdma.c ../libpcsxcore/psxhle.c \
+   ../libpcsxcore/psxhw.c ../libpcsxcore/psxinterpreter.c ../libpcsxcore/psxmem.c ../libpcsxcore/r3000a.c \
+   ../libpcsxcore/sio.c ../libpcsxcore/socket.c ../libpcsxcore/spu.c
+LOCAL_SRC_FILES += ../libpcsxcore/gte.c ../libpcsxcore/gte_nf.c ../libpcsxcore/gte_divider.c
+
+# spu
+LOCAL_SRC_FILES += ../plugins/dfsound/dma.c ../plugins/dfsound/freeze.c \
+   ../plugins/dfsound/registers.c ../plugins/dfsound/spu.c \
+   ../plugins/dfsound/out.c ../plugins/dfsound/nullsnd.c
+
+# builtin gpu
+LOCAL_SRC_FILES += ../plugins/gpulib/gpu.c ../plugins/gpulib/vout_pl.c
+
+# cdrcimg
+LOCAL_SRC_FILES += ../plugins/cdrcimg/cdrcimg.c
+
+# dfinput
+LOCAL_SRC_FILES += ../plugins/dfinput/main.c ../plugins/dfinput/pad.c ../plugins/dfinput/guncon.c
+
+# gui
+LOCAL_SRC_FILES += ../frontend/main.c ../frontend/plugin.c
+LOCAL_SRC_FILES += ../frontend/common/fonts.c
+LOCAL_SRC_FILES += ../frontend/linux/plat.c
+
+# libretro
+LOCAL_SRC_FILES += ../frontend/libretro.c
+
+LOCAL_CFLAGS += -O3 -ffast-math -funroll-loops -DNDEBUG -D_FILE_OFFSET_BITS=64 -DHAVE_LIBRETRO -DNO_FRONTEND
+LOCAL_C_INCLUDES += $(LOCAL_PATH)/../frontend
+LOCAL_LDLIBS := -lz -llog
+
+include $(BUILD_SHARED_LIBRARY)
diff --git a/jni/Application.mk b/jni/Application.mk
new file mode 100644 (file)
index 0000000..f05229c
--- /dev/null
@@ -0,0 +1 @@
+APP_ABI := armeabi armeabi-v7a
diff --git a/libpcsxcore/gte_nf.c b/libpcsxcore/gte_nf.c
new file mode 100644 (file)
index 0000000..177cd48
--- /dev/null
@@ -0,0 +1,2 @@
+#define FLAGLESS
+#include "gte.c"
index 57e7ef2..57078ba 100644 (file)
@@ -702,6 +702,7 @@ int LoadPlugins() {
        char Plugin[MAXPATHLEN];\r
 \r
        ReleasePlugins();\r
+       SysLibError();\r
 \r
        if (UsingIso()) {\r
                LoadCDRplugin(NULL);\r
index e04ec93..0ec14db 100644 (file)
@@ -12,7 +12,6 @@
 #include <string.h>
 #include <stdlib.h>
 #include <zlib.h>
-#include <bzlib.h>
 #include <dlfcn.h>
 
 #include "cdrcimg.h"