# builtin gpu
OBJS += plugins/gpulib/gpu.o plugins/gpulib/vout_pl.o
ifeq "$(BUILTIN_GPU)" "neon"
-OBJS += plugins/gpu_neon/psx_gpu_if.o plugins/gpu_neon/psx_gpu/psx_gpu_arm_neon.o
+ifeq "$(HAVE_NEON)" "1"
plugins/gpu_neon/psx_gpu_if.o: CFLAGS += -DNEON_BUILD -DTEXTURE_CACHE_4BPP -DTEXTURE_CACHE_8BPP
plugins/gpu_neon/psx_gpu_if.o: plugins/gpu_neon/psx_gpu/*.c
+OBJS += plugins/gpu_neon/psx_gpu_if.o plugins/gpu_neon/psx_gpu/psx_gpu_arm_neon.o
+else
+plugins/gpu_neon/psx_gpu_if.o: CFLAGS += -DTEXTURE_CACHE_4BPP -DTEXTURE_CACHE_8BPP
+plugins/gpu_neon/psx_gpu_if.o: plugins/gpu_neon/psx_gpu/*.c
+OBJS += plugins/gpu_neon/psx_gpu_if.o
+endif
endif
ifeq "$(BUILTIN_GPU)" "peops"
# note: code is not safe for strict-aliasing? (Castlevania problems)
TARGET := $(TARGET_NAME)_libretro.so
fpic := -fPIC
SHARED := -shared -Wl,--version-script=libretro/link.T
+ BUILTIN_GPU = neon
+ CFLAGS += -DNEON_PC
else ifeq ($(platform), osx)
TARGET := $(TARGET_NAME)_libretro.dylib
fpic := -fPIC
SHARED := -dynamiclib
+ BUILTIN_GPU = neon
+ CFLAGS += -DNEON_PC
else ifeq ($(platform), ios)
ARCH := arm
TARGET := $(TARGET_NAME)_libretro_ios.dylib
LD_FLAGS := -fPIC
SHARED := -shared -static-libgcc -static-libstdc++ -s -Wl,--version-script=libretro/link.T
CFLAGS += -D__WIN32__ -D__WIN32_LIBRETRO__
+ BUILTIN_GPU = neon
+ CFLAGS += -DNEON_PC
endif
CFLAGS += -fPIC
#ifndef DRC_DISABLE
{ "rearmed_drc", "Dynamic recompiler; enabled|disabled" },
#endif
-#ifdef __ARM_NEON__
+#if defined(__ARM_NEON__) || defined(NEON_PC)
{ "neon_interlace_enable", "Enable interlacing mode(s); disabled|enabled" },
{ "neon_enhancement_enable", "Enhanced resolution (slow); disabled|enabled" },
{ "neon_enhancement_no_main", "Enhanced resolution speed hack; disabled|enabled" },
in_type1 = PSE_PAD_TYPE_ANALOGPAD;
}
-#ifdef __ARM_NEON__
+#if defined(__ARM_NEON__) || defined(NEON_PC)
var.value = "NULL";
var.key = "neon_interlace_enable";
pl_rearmed_cbs.gpu_neon.enhancement_no_main = 1;
}
#endif
+
#ifndef DRC_DISABLE
var.value = NULL;
var.key = "rearmed_drc";
#ifndef COMMON_H
#define COMMON_H
+#include <stdint.h>
+
+#ifdef NEON_PC
+typedef int8_t s8;
+typedef uint8_t u8;
+typedef int16_t s16;
+typedef uint16_t u16;
+typedef int32_t s32;
+typedef uint32_t u32;
+typedef int64_t s64;
+typedef uint64_t u64;
+#else
typedef signed char s8;
typedef unsigned char u8;
typedef signed short s16;
typedef unsigned int u32;
typedef signed long long int s64;
typedef unsigned long long int u64;
+#endif
-#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/time.h>
num_width = width;
vram_ptr = (void *)vram_ptr16;
+#ifdef NEON_PC
+ if((int32_t)vram_ptr16 & 2)
+#else
if((long)vram_ptr16 & 2)
+#endif
{
*vram_ptr16 = color_32bpp;
vram_ptr = (void *)(vram_ptr16 + 1);
* See the COPYING file in the top-level directory.
*/
-#include <stdio.h>
+#include <stdint.h>
#include <sys/mman.h>
extern const unsigned char cmd_lengths[256];