From: Toad King Date: Fri, 26 Oct 2012 19:46:29 +0000 (-0400) Subject: initial Android support X-Git-Tag: r17~2 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=commitdiff_plain;h=b2058a5bead44a5b5ecaa903e9bbf3231477fde9 initial Android support --- diff --git a/jni/Android.mk b/jni/Android.mk new file mode 100644 index 00000000..6be42b1c --- /dev/null +++ b/jni/Android.mk @@ -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 index 00000000..f05229c8 --- /dev/null +++ b/jni/Application.mk @@ -0,0 +1 @@ +APP_ABI := armeabi armeabi-v7a diff --git a/libpcsxcore/gte_nf.c b/libpcsxcore/gte_nf.c new file mode 100644 index 00000000..177cd482 --- /dev/null +++ b/libpcsxcore/gte_nf.c @@ -0,0 +1,2 @@ +#define FLAGLESS +#include "gte.c" diff --git a/libpcsxcore/plugins.c b/libpcsxcore/plugins.c index 57e7ef2d..57078bad 100644 --- a/libpcsxcore/plugins.c +++ b/libpcsxcore/plugins.c @@ -702,6 +702,7 @@ int LoadPlugins() { char Plugin[MAXPATHLEN]; ReleasePlugins(); + SysLibError(); if (UsingIso()) { LoadCDRplugin(NULL); diff --git a/plugins/cdrcimg/cdrcimg.c b/plugins/cdrcimg/cdrcimg.c index e04ec93d..0ec14dbb 100644 --- a/plugins/cdrcimg/cdrcimg.c +++ b/plugins/cdrcimg/cdrcimg.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include "cdrcimg.h"