Skip to content
This repository has been archived by the owner on Oct 11, 2020. It is now read-only.

Commit

Permalink
Allow older toolchain to be used.
Browse files Browse the repository at this point in the history
Also fix mapping for RS-97 specific version.
  • Loading branch information
gameblabla committed Oct 20, 2019
1 parent cf11784 commit 227c449
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
25 changes: 16 additions & 9 deletions Makefile.gcw0
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ PORT = sdl
# USE_GPULIB=0 as param to 'make' when building to disable it.
USE_GPULIB ?= 1

#GPU = gpu_dfxvideo
#GPU = gpu_drhell
#GPU = gpu_null
# gpu_dfxvideo, gpu_drhell, gpu_null
GPU = gpu_unai

SPU = spu_pcsxrearmed

RECOMPILER = mips

# Allows the older toolchain to be used
GCC_NEW = 0

RM = rm -f
MD = mkdir
CC = /opt/gcw0-toolchain-static/bin/mipsel-linux-gcc
CXX = /opt/gcw0-toolchain-static/bin/mipsel-linux-g++
LD = /opt/gcw0-toolchain-static/bin/mipsel-linux-g++
CC = /opt/gcw0-toolchain/bin/mipsel-linux-gcc
CXX = /opt/gcw0-toolchain/bin/mipsel-linux-g++
LD = /opt/gcw0-toolchain/bin/mipsel-linux-g++

SYSROOT := $(shell $(CC) --print-sysroot)
SDL_CONFIG := $(SYSROOT)/usr/bin/sdl-config
Expand All @@ -34,7 +34,7 @@ else
C_ARCH = -mips32r2 -DSHMEM_MIRRORING
endif

CFLAGS = $(C_ARCH) -mno-abicalls -mframe-header-opt -fno-PIC -mno-check-zero-division -O2 -flto -DGCW_ZERO \
CFLAGS = $(C_ARCH) -O2 -DGCW_ZERO \
-Wall -Wunused -Wpointer-arith \
-Wno-sign-compare -Wno-cast-align \
-Isrc -Isrc/spu/$(SPU) -D$(SPU) -Isrc/gpu/$(GPU) \
Expand All @@ -43,6 +43,10 @@ CFLAGS = $(C_ARCH) -mno-abicalls -mframe-header-opt -fno-PIC -mno-check-zero-div
-DXA_HACK \
-DINLINE="static __inline__" -Dasm="__asm__ __volatile__" \
$(SDL_CFLAGS)

ifdef GCC_NEW
CFLAGS += -mno-abicalls -mframe-header-opt -fno-PIC -mno-check-zero-division -flto
endif

CFLAGS += -DHW_SCALE
CFLAGS += -DBGR_PCSX
Expand All @@ -55,7 +59,10 @@ ifdef RECOMPILER
CFLAGS += -DPSXREC -D$(RECOMPILER)
endif

LDFLAGS = -nodefaultlibs -lc -lgcc -lSDL -lasound -lz -Wl,--as-needed -Wl,--gc-sections -flto -s
LDFLAGS = -nodefaultlibs -lc -lgcc -lSDL -lasound -lz -Wl,--as-needed -Wl,--gc-sections -s
ifdef GCC_NEW
LDFLAGS += -flto
endif

OBJDIRS = obj obj/gpu obj/gpu/$(GPU) obj/spu obj/spu/$(SPU) \
obj/recompiler obj/recompiler/$(RECOMPILER) \
Expand Down
4 changes: 2 additions & 2 deletions src/port/rs97/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ void pad_update(void)
{
if (keys[SDLK_TAB])
{
if (keys[SDLK_LSHIFT])
if (keys[SDLK_SPACE])
{
player_controller[0].joy_right_ax1 = 0;
pad1_buttons |= (1 << DKEY_L1);
Expand All @@ -748,7 +748,7 @@ void pad_update(void)
player_controller[0].joy_right_ax1 = 127;
}

if (keys[SDLK_SPACE])
if (keys[SDLK_LSHIFT])
{
player_controller[0].joy_right_ax0 = 0;
pad1_buttons |= (1 << DKEY_L1);
Expand Down

0 comments on commit 227c449

Please sign in to comment.