Skip to content

Commit

Permalink
Bittboy port, plus some changes related to SDL.
Browse files Browse the repository at this point in the history
  • Loading branch information
gameblabla committed Feb 2, 2019
1 parent 862e940 commit 1c288bc
Show file tree
Hide file tree
Showing 36 changed files with 997 additions and 10,230 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
*.o
*.u
*.z
*.gcda
gpsp.gpe
tags
cscope.out
pandora/linux
bittboy/gpsp
41 changes: 41 additions & 0 deletions bittboy/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# gpSP makefile
# Gilead Kutnick - Exophase
# pandora port - notaz
# respberry pi - DPR

# Global definitions

CC = /opt/bittboy-toolchain/usr/bin/arm-miyoo-linux-musleabi-gcc

OBJS = main.o cpu.o memory.o video.o input.o sound.o gui.o \
cheats.o zip.o arm_stub.o warm.o cpu_threaded.o video_blend.o

BIN = gpsp

# Platform specific definitions

VPATH += .. ../arm
CFLAGS += -DARM_ARCH -DPC_BUILD -Wall
CFLAGS += -Ofast -fdata-sections -ffunction-sections -fno-PIC -fprofile-generate=/mnt/profile
CFLAGS += `/opt/bittboy-toolchain/arm-miyoo-linux-musleabi/sysroot/usr/bin/sdl-config --cflags`

# expecting to have PATH set up to get correct sdl-config first

LIBS += `sdl-config --libs`
LIBS += -ldl -lpthread -lz -lgcov -lasound -Wl,--as-needed -Wl,--gc-sections -flto -s

# Compilation:

all: $(BIN)

%.o: %.S
$(CC) $(CFLAGS) -c -o $@ $<


cpu.o cpu_threaded.o: CFLAGS += -Wno-unused-variable -Wno-unused-label

$(BIN): $(OBJS)
$(CC) $(OBJS) $(LIBS) -o $(BIN)

clean:
rm -f *.o $(BIN)
4 changes: 4 additions & 0 deletions common.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
#define PATH_SEPARATOR_CHAR '/'
#endif

#define prefetch(a,b) __builtin_prefetch(a,b)
#define likely(x) __builtin_expect((x),1)
#define unlikely(x) __builtin_expect((x),0)

// These includes must be used before SDL is included.
#ifdef ARM_ARCH

Expand Down
Loading

0 comments on commit 1c288bc

Please sign in to comment.