notaz.gp2x.de
/
pcsx_rearmed.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
aaac9c7
)
support armv5 build
author
notaz
<notasas@gmail.com>
Fri, 23 Sep 2011 16:29:03 +0000
(19:29 +0300)
committer
notaz
<notasas@gmail.com>
Fri, 23 Sep 2011 16:29:03 +0000
(19:29 +0300)
16 files changed:
Makefile
patch
|
blob
|
blame
|
history
frontend/cspace.c
[new file with mode: 0644]
patch
|
blob
frontend/cspace.h
[moved from
frontend/arm_utils.h
with 100% similarity]
patch
|
blob
|
blame
|
history
frontend/cspace_neon.s
[moved from
frontend/arm_utils.s
with 100% similarity]
patch
|
blob
|
blame
|
history
frontend/menu.c
patch
|
blob
|
blame
|
history
frontend/plat_dummy.c
patch
|
blob
|
blame
|
history
libpcsxcore/new_dynarec/emu_if.c
patch
|
blob
|
blame
|
history
libpcsxcore/new_dynarec/emu_if.h
patch
|
blob
|
blame
|
history
libpcsxcore/new_dynarec/linkage_arm.s
patch
|
blob
|
blame
|
history
plugins/dfsound/spu.c
patch
|
blob
|
blame
|
history
plugins/dfxvideo/draw_fb.c
patch
|
blob
|
blame
|
history
plugins/dfxvideo/soft.c
patch
|
blob
|
blame
|
history
plugins/gpu_neon/Makefile
patch
|
blob
|
blame
|
history
plugins/gpu_neon/vout_fb.c
patch
|
blob
|
blame
|
history
plugins/gpu_unai/Makefile
patch
|
blob
|
blame
|
history
plugins/gpu_unai/gpu.cpp
patch
|
blob
|
blame
|
history
diff --git
a/Makefile
b/Makefile
index
2b57053
..
5a7b278
100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-3,26
+3,39
@@
AS = $(CROSS_COMPILE)as
CC = $(CROSS_COMPILE)gcc
LD = $(CROSS_COMPILE)ld
CC = $(CROSS_COMPILE)gcc
LD = $(CROSS_COMPILE)ld
+ARM926 ?= 0
+ARM_CORTEXA8 ?= 1
+USE_OSS ?= 1
+#USE_ALSA = 1
+#DRC_DBG = 1
+#PCNT = 1
+TARGET = pcsx
+
+-include Makefile.local
+
ARCH = $(shell $(CC) -v 2>&1 | grep -i 'target:' | awk '{print $$2}' | awk -F '-' '{print $$1}')
ARCH = $(shell $(CC) -v 2>&1 | grep -i 'target:' | awk '{print $$2}' | awk -F '-' '{print $$1}')
-CFLAGS += -Wall -ggdb -Ifrontend
+CFLAGS += -Wall -ggdb -Ifrontend
-ffast-math
LDFLAGS += -lz -lpthread -ldl -lpng -lbz2
LDFLAGS += -lz -lpthread -ldl -lpng -lbz2
-ifeq "$(ARCH)" "arm"
-CFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfloat-abi=softfp -ffast-math
-ASFLAGS += -mcpu=cortex-a8 -mfpu=neon
-endif
ifndef DEBUG
CFLAGS += -O2 -DNDEBUG
endif
CFLAGS += $(EXTRA_CFLAGS)
ifndef DEBUG
CFLAGS += -O2 -DNDEBUG
endif
CFLAGS += $(EXTRA_CFLAGS)
-USE_OSS ?= 1
-#USE_ALSA = 1
-#DRC_DBG = 1
-#PCNT = 1
-TARGET = pcsx
+ifeq "$(ARCH)" "arm"
+ifeq "$(ARM_CORTEXA8)" "1"
+CFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
+ASFLAGS += -mcpu=cortex-a8 -mfpu=neon
+endif
+ifeq "$(ARM926)" "1"
+CFLAGS += -mcpu=arm926ej-s -mtune=arm926ej-s
+ASFLAGS += -mcpu=arm926ej-s
+endif
+endif
--include Makefile.local
+# detect armv7 and NEON from the specified CPU
+HAVE_NEON = $(shell $(CC) -E -dD $(CFLAGS) frontend/config.h | grep -q '__ARM_NEON__ 1' && echo 1)
+HAVE_ARMV7 = $(shell $(CC) -E -dD $(CFLAGS) frontend/config.h | grep -q '__ARM_ARCH_7A__ 1' && echo 1)
all: $(TARGET)
all: $(TARGET)
@@
-33,7
+46,7
@@
OBJS += libpcsxcore/cdriso.o libpcsxcore/cdrom.o libpcsxcore/cheat.o libpcsxcore
libpcsxcore/psxcommon.o libpcsxcore/psxcounters.o libpcsxcore/psxdma.o libpcsxcore/psxhle.o \
libpcsxcore/psxhw.o libpcsxcore/psxinterpreter.o libpcsxcore/psxmem.o libpcsxcore/r3000a.o \
libpcsxcore/sio.o libpcsxcore/socket.o libpcsxcore/spu.o
libpcsxcore/psxcommon.o libpcsxcore/psxcounters.o libpcsxcore/psxdma.o libpcsxcore/psxhle.o \
libpcsxcore/psxhw.o libpcsxcore/psxinterpreter.o libpcsxcore/psxmem.o libpcsxcore/r3000a.o \
libpcsxcore/sio.o libpcsxcore/socket.o libpcsxcore/spu.o
-ifeq "$(
ARCH)" "arm
"
+ifeq "$(
HAVE_NEON)" "1
"
OBJS += libpcsxcore/gte_neon.o
endif
libpcsxcore/cdrom.o libpcsxcore/misc.o: CFLAGS += -Wno-pointer-sign
OBJS += libpcsxcore/gte_neon.o
endif
libpcsxcore/cdrom.o libpcsxcore/misc.o: CFLAGS += -Wno-pointer-sign
@@
-41,6
+54,7
@@
libpcsxcore/misc.o libpcsxcore/psxbios.o: CFLAGS += -Wno-nonnull
# dynarec
ifndef NO_NEW_DRC
# dynarec
ifndef NO_NEW_DRC
+libpcsxcore/new_dynarec/linkage_arm.o: ASFLAGS += --defsym HAVE_ARMV7=$(HAVE_ARMV7)
OBJS += libpcsxcore/new_dynarec/new_dynarec.o libpcsxcore/new_dynarec/linkage_arm.o
OBJS += libpcsxcore/new_dynarec/pcsxmem.o
endif
OBJS += libpcsxcore/new_dynarec/new_dynarec.o libpcsxcore/new_dynarec/linkage_arm.o
OBJS += libpcsxcore/new_dynarec/pcsxmem.o
endif
@@
-58,7
+72,7
@@
OBJS += plugins/dfsound/dma.o plugins/dfsound/freeze.o \
plugins/dfsound/registers.o plugins/dfsound/spu.o
plugins/dfsound/spu.o: plugins/dfsound/adsr.c plugins/dfsound/reverb.c \
plugins/dfsound/xa.c
plugins/dfsound/registers.o plugins/dfsound/spu.o
plugins/dfsound/spu.o: plugins/dfsound/adsr.c plugins/dfsound/reverb.c \
plugins/dfsound/xa.c
-ifeq "$(
ARCH)" "arm
"
+ifeq "$(
HAVE_NEON)" "1
"
OBJS += plugins/dfsound/arm_utils.o
endif
ifeq "$(USE_OSS)" "1"
OBJS += plugins/dfsound/arm_utils.o
endif
ifeq "$(USE_OSS)" "1"
@@
-109,8
+123,11
@@
else
OBJS += frontend/plat_dummy.o
endif
endif # !USE_GTK
OBJS += frontend/plat_dummy.o
endif
endif # !USE_GTK
-ifeq "$(ARCH)" "arm"
-OBJS += frontend/arm_utils.o
+
+ifeq "$(HAVE_NEON)" "1"
+OBJS += frontend/cspace_neon.o
+else
+OBJS += frontend/cspace.o
endif
ifdef X11
frontend/%.o: CFLAGS += -DX11
endif
ifdef X11
frontend/%.o: CFLAGS += -DX11
@@
-136,7
+153,7
@@
frontend/revision.h: FORCE
$(TARGET): $(OBJS)
$(CC) -o $@ $^ $(LDFLAGS) -Wl,-Map=$@.map
$(TARGET): $(OBJS)
$(CC) -o $@ $^ $(LDFLAGS) -Wl,-Map=$@.map
-PLUGINS = plugins/spunull/spunull.so plugins/gpu_unai/gpuPCSX4ALL.so \
+PLUGINS
?
= plugins/spunull/spunull.so plugins/gpu_unai/gpuPCSX4ALL.so \
plugins/gpu-gles/gpuGLES.so plugins/gpu_neon/gpu_neon.so
$(PLUGINS):
plugins/gpu-gles/gpuGLES.so plugins/gpu_neon/gpu_neon.so
$(PLUGINS):
diff --git a/frontend/cspace.c
b/frontend/cspace.c
new file mode 100644
(file)
index 0000000..
f5f8d35
--- /dev/null
+++ b/
frontend/cspace.c
@@ -0,0
+1,7
@@
+#include "cspace.h"
+
+// TODO?
+void bgr555_to_rgb565(void *dst, const void *src, int bytes) {}
+void bgr888_to_rgb888(void *dst, const void *src, int bytes) {}
+void bgr888_to_rgb565(void *dst, const void *src, int bytes) {}
+
diff --git
a/frontend/arm_utils.h
b/frontend/cspace.h
similarity index 100%
rename from
frontend/arm_utils.h
rename to
frontend/cspace.h
diff --git
a/frontend/arm_utils.s
b/frontend/cspace_neon.s
similarity index 100%
rename from
frontend/arm_utils.s
rename to
frontend/cspace_neon.s
diff --git
a/frontend/menu.c
b/frontend/menu.c
index
cdba3ad
..
01b568e
100644
(file)
--- a/
frontend/menu.c
+++ b/
frontend/menu.c
@@
-22,7
+22,7
@@
#include "omap.h"
#include "pandora.h"
#include "pcnt.h"
#include "omap.h"
#include "pandora.h"
#include "pcnt.h"
-#include "
arm_utils
.h"
+#include "
cspace
.h"
#include "common/plat.h"
#include "common/input.h"
#include "linux/in_evdev.h"
#include "common/plat.h"
#include "common/input.h"
#include "linux/in_evdev.h"
diff --git
a/frontend/plat_dummy.c
b/frontend/plat_dummy.c
index
44ba4a8
..
bafb184
100644
(file)
--- a/
frontend/plat_dummy.c
+++ b/
frontend/plat_dummy.c
@@
-43,18
+43,6
@@
void plat_finish(void)
{
}
{
}
-void bgr555_to_rgb565(void *d, void *s, int len)
-{
-}
-
-void bgr888_to_rgb888(void *d, void *s, int len)
-{
-}
-
-void bgr888_to_rgb565(void *d, void *s, int len)
-{
-}
-
void in_update_analogs(void)
{
}
void in_update_analogs(void)
{
}
diff --git
a/libpcsxcore/new_dynarec/emu_if.c
b/libpcsxcore/new_dynarec/emu_if.c
index
5821650
..
8a068ea
100644
(file)
--- a/
libpcsxcore/new_dynarec/emu_if.c
+++ b/
libpcsxcore/new_dynarec/emu_if.c
@@
-161,11
+161,13
@@
static int ari64_init()
for (i = 0; i < ARRAY_SIZE(gte_handlers); i++)
if (psxCP2[i] != psxNULL)
gte_handlers[i] = psxCP2[i];
for (i = 0; i < ARRAY_SIZE(gte_handlers); i++)
if (psxCP2[i] != psxNULL)
gte_handlers[i] = psxCP2[i];
-#if defined(__arm__) && !defined(DRC_DBG)
+#ifndef DRC_DBG
+#ifdef __ARM_NEON__
gte_handlers[0x01] = gteRTPS_neon;
gte_handlers[0x30] = gteRTPT_neon;
gte_handlers[0x12] = gteMVMVA_neon;
gte_handlers[0x06] = gteNCLIP_neon;
gte_handlers[0x01] = gteRTPS_neon;
gte_handlers[0x30] = gteRTPT_neon;
gte_handlers[0x12] = gteMVMVA_neon;
gte_handlers[0x06] = gteNCLIP_neon;
+#endif
#endif
psxH_ptr = psxH;
#endif
psxH_ptr = psxH;
diff --git
a/libpcsxcore/new_dynarec/emu_if.h
b/libpcsxcore/new_dynarec/emu_if.h
index
128d431
..
8acd1f5
100644
(file)
--- a/
libpcsxcore/new_dynarec/emu_if.h
+++ b/
libpcsxcore/new_dynarec/emu_if.h
@@
-1,6
+1,10
@@
#include "new_dynarec.h"
#include "../r3000a.h"
#include "new_dynarec.h"
#include "../r3000a.h"
+#ifndef __ARM_ARCH_7A__
+#define ARMv5_ONLY
+#endif
+
extern char invalid_code[0x100000];
/* weird stuff */
extern char invalid_code[0x100000];
/* weird stuff */
diff --git
a/libpcsxcore/new_dynarec/linkage_arm.s
b/libpcsxcore/new_dynarec/linkage_arm.s
index
c545ed3
..
f5af0f5
100644
(file)
--- a/
libpcsxcore/new_dynarec/linkage_arm.s
+++ b/
libpcsxcore/new_dynarec/linkage_arm.s
@@
-19,15
+19,8
@@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-.equiv HAVE_ARMV7, 1
+/* .equiv HAVE_ARMV7, 1 */
-.if HAVE_ARMV7
- .cpu cortex-a8
- .fpu vfp
-.else
- .cpu arm9tdmi
- .fpu softvfp
-.endif
.global rdram
rdram = 0x80000000
.global dynarec_local
.global rdram
rdram = 0x80000000
.global dynarec_local
diff --git
a/plugins/dfsound/spu.c
b/plugins/dfsound/spu.c
index
06cc476
..
f84ef77
100644
(file)
--- a/
plugins/dfsound/spu.c
+++ b/
plugins/dfsound/spu.c
@@
-37,7
+37,7
@@
#define N_(x) (x)
#endif
#define N_(x) (x)
#endif
-#ifdef __
arm
__
+#ifdef __
ARM_ARCH_7A
__
#define ssat32_to_16(v) \
asm("ssat %0,#16,%1" : "=r" (v) : "r" (v))
#else
#define ssat32_to_16(v) \
asm("ssat %0,#16,%1" : "=r" (v) : "r" (v))
#else
@@
-620,7
+620,7
@@
static int do_samples_noise(int ch, int ns, int ns_to)
return -1;
}
return -1;
}
-#ifdef __
arm
__
+#ifdef __
ARM_ARCH_7A
__
// asm code
extern void mix_chan(int start, int count, int lv, int rv);
extern void mix_chan_rvb(int start, int count, int lv, int rv);
// asm code
extern void mix_chan(int start, int count, int lv, int rv);
extern void mix_chan_rvb(int start, int count, int lv, int rv);
diff --git
a/plugins/dfxvideo/draw_fb.c
b/plugins/dfxvideo/draw_fb.c
index
f40063e
..
7f80724
100644
(file)
--- a/
plugins/dfxvideo/draw_fb.c
+++ b/
plugins/dfxvideo/draw_fb.c
@@
-10,7
+10,7
@@
#include "gpu.h"
#include "../../frontend/plugin_lib.h"
#include "gpu.h"
#include "../../frontend/plugin_lib.h"
-#include "../../frontend/
arm_utils
.h"
+#include "../../frontend/
cspace
.h"
#include "../../frontend/pcnt.h"
// misc globals
#include "../../frontend/pcnt.h"
// misc globals
diff --git
a/plugins/dfxvideo/soft.c
b/plugins/dfxvideo/soft.c
index
1b24624
..
160b0c4
100644
(file)
--- a/
plugins/dfxvideo/soft.c
+++ b/
plugins/dfxvideo/soft.c
@@
-1077,7
+1077,7
@@
static int left_B, delta_left_B, right_B, delta_right_B;
// USE_NASM
static inline int shl10idiv(int x, int y)
{
// USE_NASM
static inline int shl10idiv(int x, int y)
{
-#ifdef __
arm
__
+#ifdef __
ARM_ARCH_7A
__
// rearmed: let's use VFP divider instead
float r = 1024.0f * (float)x / (float)y;
return (int)r;
// rearmed: let's use VFP divider instead
float r = 1024.0f * (float)x / (float)y;
return (int)r;
diff --git
a/plugins/gpu_neon/Makefile
b/plugins/gpu_neon/Makefile
index
09c47d3
..
adb5097
100644
(file)
--- a/
plugins/gpu_neon/Makefile
+++ b/
plugins/gpu_neon/Makefile
@@
-10,7
+10,7
@@
SRC += gpu.c
ifeq "$(ARCH)" "arm"
TARGET = gpu_neon.so
CFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
ifeq "$(ARCH)" "arm"
TARGET = gpu_neon.so
CFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
-SRC += vout_fb.c ../../frontend/
arm_utils
.s
+SRC += vout_fb.c ../../frontend/
cspace_neon
.s
else
TARGET = gpu_neon.so.x86
CFLAGS += `sdl-config --cflags` -m32
else
TARGET = gpu_neon.so.x86
CFLAGS += `sdl-config --cflags` -m32
diff --git
a/plugins/gpu_neon/vout_fb.c
b/plugins/gpu_neon/vout_fb.c
index
6b687b3
..
bda8d4a
100644
(file)
--- a/
plugins/gpu_neon/vout_fb.c
+++ b/
plugins/gpu_neon/vout_fb.c
@@
-10,7
+10,7
@@
#include "gpu.h"
#include "../../frontend/plugin_lib.h"
#include "gpu.h"
#include "../../frontend/plugin_lib.h"
-#include "../../frontend/
arm_utils
.h"
+#include "../../frontend/
cspace
.h"
static const struct rearmed_cbs *cbs;
static void *screen_buf;
static const struct rearmed_cbs *cbs;
static void *screen_buf;
diff --git
a/plugins/gpu_unai/Makefile
b/plugins/gpu_unai/Makefile
index
026d950
..
80f82ae
100644
(file)
--- a/
plugins/gpu_unai/Makefile
+++ b/
plugins/gpu_unai/Makefile
@@
-16,7
+16,7
@@
LDFLAGS += -shared -Wl,-soname,$(TARGET)
all: $(TARGET)
all: $(TARGET)
-$(TARGET): gpu.cpp ../../frontend/
arm_utils
.s
+$(TARGET): gpu.cpp ../../frontend/
cspace_neon
.s
$(CC) -o $@ $^ $(CFLAGS) $(LDFLAGS)
# $(TARGET): *.h
$(CC) -o $@ $^ $(CFLAGS) $(LDFLAGS)
# $(TARGET): *.h
diff --git
a/plugins/gpu_unai/gpu.cpp
b/plugins/gpu_unai/gpu.cpp
index
3342d1e
..
fa176d5
100644
(file)
--- a/
plugins/gpu_unai/gpu.cpp
+++ b/
plugins/gpu_unai/gpu.cpp
@@
-820,7
+820,7
@@
void GPU_updateLace(void)
#else
#include "../../frontend/plugin_lib.h"
#else
#include "../../frontend/plugin_lib.h"
-#include "../../frontend/
arm_utils
.h"
+#include "../../frontend/
cspace
.h"
extern "C" {
extern "C" {