diff --git a/.github/workflows/build_psp.yml b/.github/workflows/build_psp.yml index ff5674e34..fc325a001 100644 --- a/.github/workflows/build_psp.yml +++ b/.github/workflows/build_psp.yml @@ -26,5 +26,5 @@ jobs: - uses: ./.github/actions/upload_build if: ${{ always() && steps.compile.outcome == 'success' }} with: - SOURCE_FILE: 'ClassiCube-psp.elf' - DEST_NAME: 'ClassiCube-psp.elf' \ No newline at end of file + SOURCE_FILE: 'EBOOT.PBP' + DEST_NAME: 'EBOOT.PBP' \ No newline at end of file diff --git a/Makefile b/Makefile index 5c2d8ae80..0a6c97208 100644 --- a/Makefile +++ b/Makefile @@ -26,7 +26,7 @@ ifeq ($(PLAT),web) CC=emcc OEXT=.html CFLAGS=-g -LDFLAGS=-s WASM=1 -s NO_EXIT_RUNTIME=1 --preload-file texpacks/default.zip@texpacks/default.zip +LDFLAGS=-s WASM=1 -s NO_EXIT_RUNTIME=1 -s ALLOW_MEMORY_GROWTH=1 endif ifeq ($(PLAT),mingw) @@ -106,13 +106,6 @@ CC=gcc LIBS=-lGL -lX11 -lXi -lm -lpthread -ldl endif -ifeq ($(PLAT),psp) -CC=psp-gcc -CFLAGS=-g -pipe -fno-math-errno -I ${PSPDEV}/psp/sdk/include -LIBS=-lm -lpspgum -lpspgu -lpspge -lpspdisplay -lpspctrl -LDFLAGS=-g -L ${PSPDEV}/psp/sdk/lib -endif - ifeq ($(OS),Windows_NT) DEL=del endif @@ -147,8 +140,11 @@ serenityos: $(MAKE) $(ENAME) PLAT=serenityos irix: $(MAKE) $(ENAME) PLAT=irix + +# consoles builds require special handling, so are moved to +# separate makefiles to avoid having one giant messy makefile psp: - $(MAKE) ClassiCube-psp.elf PLAT=psp + $(MAKE) -f src/Makefile_PSP PLAT=psp 3ds: $(MAKE) -f src/Makefile_3DS PLAT=3ds wii: @@ -176,8 +172,3 @@ src/interop_cocoa.o: src/interop_cocoa.m src/interop_BeOS.o: src/interop_BeOS.cpp $(CC) $(CFLAGS) -c $< -o $@ - -# PSP requires fixups -ClassiCube-psp.elf : $(ENAME) - cp $(ENAME) ClassiCube-psp.elf - psp-fixup-imports ClassiCube-psp.elf diff --git a/src/Makefile_PSP b/src/Makefile_PSP new file mode 100644 index 000000000..2e11930e0 --- /dev/null +++ b/src/Makefile_PSP @@ -0,0 +1,19 @@ +TARGET = ClassiCube-psp +SOURCES = $(wildcard src/*.c) +OBJS = $(patsubst %.c, %.o, $(SOURCES)) + +INCDIR = +CFLAGS = -g -O1 -fno-math-errno +ASFLAGS = $(CFLAGS) + +LIBDIR = +LDFLAGS = +LIBS = -lm -lpspgum -lpspgu -lpspge -lpspdisplay -lpspctrl + +BUILD_PRX = 1 + +EXTRA_TARGETS = EBOOT.PBP +PSP_EBOOT_TITLE = ClassiCube + +PSPSDK=$(shell psp-config --pspsdk-path) +include $(PSPSDK)/lib/build.mak diff --git a/src/Window_PSP.c b/src/Window_PSP.c index ecd03b917..997ac8aea 100644 --- a/src/Window_PSP.c +++ b/src/Window_PSP.c @@ -98,6 +98,7 @@ static void HandleButtons_Game(int mods) { void Window_ProcessEvents(double delta) { SceCtrlData pad; /* TODO implement */ + /* TODO: Change to Peek instead? */ sceCtrlReadBufferPositive(&pad, 1); int mods = pad.Buttons;