From b9cbe7f1c32da3884af275a8ebc02db053c433e4 Mon Sep 17 00:00:00 2001 From: rofl0r Date: Tue, 12 Mar 2024 12:15:06 +0000 Subject: [PATCH 1/3] build.mak: default to firmware 6.0 as discussed in #89, few structs have different layout depending on the _PSP_FW_VERSION macro. this makes a noticable (i.e. resulting in potential memory corruption) difference only in few structs that are supposed to be used only by kernel experts, but it makes it clear to non-experts that the struct layouts they program for are the latest ones. an expert trying to target an older firmware version, can still override the macro on the commandline. closes #89 --- src/base/build.mak | 2 +- src/base/build_prx.mak | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/base/build.mak b/src/base/build.mak index 132cdecb..24351741 100644 --- a/src/base/build.mak +++ b/src/base/build.mak @@ -35,7 +35,7 @@ CXXFLAGS := $(CFLAGS) $(CXXFLAGS) ASFLAGS := $(CFLAGS) $(ASFLAGS) ifeq ($(PSP_FW_VERSION),) -PSP_FW_VERSION=150 +PSP_FW_VERSION=600 endif EXPAND_MEMORY = 0 diff --git a/src/base/build_prx.mak b/src/base/build_prx.mak index c8f15a90..671c95f2 100644 --- a/src/base/build_prx.mak +++ b/src/base/build_prx.mak @@ -37,7 +37,7 @@ LIBS := $(LIBS) -lpspdebug -lpspdisplay -lpspge -lpspctrl endif ifeq ($(PSP_FW_VERSION),) -PSP_FW_VERSION=150 +PSP_FW_VERSION=600 endif CFLAGS += -D_PSP_FW_VERSION=$(PSP_FW_VERSION) From 2b4e9493abf17866521979a609b8b8435998a667 Mon Sep 17 00:00:00 2001 From: rofl0r Date: Tue, 12 Mar 2024 19:37:28 +0000 Subject: [PATCH 2/3] use -D_PSP_FW_VERSION=600 also for compiling the SDK --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index be489a9e..c198e56e 100644 --- a/configure.ac +++ b/configure.ac @@ -72,7 +72,7 @@ AC_SUBST(PSPSDK_INCLUDEDIR) AC_SUBST(PSPSDK_LIBDIR) # CFLAGS and CXXFLAGS used to build pspsdk libraries. -PSPSDK_CFLAGS="$CFLAGS -mno-gpopt -Wall" +PSPSDK_CFLAGS="$CFLAGS -mno-gpopt -Wall -D_PSP_FW_VERSION=600" PSPSDK_CXXFLAGS="$PSPSDK_CFLAGS -fno-exceptions -fno-rtti" if test "$with_pthread" = no ; then PSPSDK_CFLAGS="$PSPSDK_CFLAGS -DPSP_WITHOUT_PTHREAD" From fd52aecd826a7a3a79e3e64569674019779c04e6 Mon Sep 17 00:00:00 2001 From: rofl0r Date: Wed, 13 Mar 2024 06:39:00 +0000 Subject: [PATCH 3/3] pspdev.cmake: also default to FW 6.0 --- src/base/pspdev.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/src/base/pspdev.cmake b/src/base/pspdev.cmake index a99cd99a..af3452f8 100644 --- a/src/base/pspdev.cmake +++ b/src/base/pspdev.cmake @@ -30,6 +30,7 @@ link_directories( ${PSPDEV}/lib ${PSPDEV}/psp/lib ${PSPDEV}/psp/sdk/lib) add_definitions("-D__PSP__") add_definitions("-DPSP") +add_definitions("-D_PSP_FW_VERSION=600") SET(PLATFORM_PSP TRUE) SET(PSP TRUE)