From 259fab6a6d9b702d823aef5d4f79c5e715a46e46 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Sun, 27 Nov 2022 19:53:42 +1000 Subject: [PATCH] jpn-final: Introduce support for gcc --- Makefile | 1 + README.md | 2 +- src/game/lang.c | 1 + src/game/title.c | 1 + src/include/game/lang.h | 1 + src/lib/ultra/io/conteepread.c | 3 ++- src/lib/ultra/io/motor.c | 3 ++- src/lib/ultra/io/pfsisplug.c | 3 ++- 8 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 4804a8620..3bb5b1a89 100644 --- a/Makefile +++ b/Makefile @@ -461,6 +461,7 @@ else ifeq ($(COMPILER), gcc) -fno-merge-constants \ -fno-strict-aliasing \ -fno-zero-initialized-in-bss \ + -funsigned-char \ -fwrapv \ -Wall \ -Werror \ diff --git a/README.md b/README.md index a6165579b..24c1efe51 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ To build the project, you must already have a Perfect Dark ROM. The project can See the [Perfect Dark Decompilation Status Page](https://ryandwyer.gitlab.io/pdstatus/). -With the exception of jpn-final, all other versions are fully decompiled but a small handful of functions are not yet byte-matching even though they are functionally the same. The status page doesn't show these as 100% because it counts matching functions only. +All versions of the game are fully decompiled but a small handful of functions are not yet byte-matching even though they are functionally the same. The status page doesn't show these as 100% because it counts matching functions only. ## Installation Requirements diff --git a/src/game/lang.c b/src/game/lang.c index 49f0cf115..06a5a2f71 100644 --- a/src/game/lang.c +++ b/src/game/lang.c @@ -6,6 +6,7 @@ #include "game/utils.h" #include "bss.h" #include "lib/dma.h" +#include "lib/main.h" #include "data.h" #include "types.h" diff --git a/src/game/title.c b/src/game/title.c index 714b6d4eb..4f582a59d 100644 --- a/src/game/title.c +++ b/src/game/title.c @@ -6,6 +6,7 @@ #include "game/tex.h" #include "game/inv.h" #include "game/playermgr.h" +#include "game/game_006900.h" #include "game/gfxmemory.h" #include "game/credits.h" #include "game/bondview.h" diff --git a/src/include/game/lang.h b/src/include/game/lang.h index 8f1e3e904..6f1553e41 100644 --- a/src/include/game/lang.h +++ b/src/include/game/lang.h @@ -20,5 +20,6 @@ void langClearBank(s32 bank); char *langGet(s32 textid); void langReload(void); void langSetEuropean(u32 arg0); +void langSetJpnEnabled(bool enable); #endif diff --git a/src/lib/ultra/io/conteepread.c b/src/lib/ultra/io/conteepread.c index e386473a7..c3332e99d 100644 --- a/src/lib/ultra/io/conteepread.c +++ b/src/lib/ultra/io/conteepread.c @@ -2,8 +2,9 @@ #include #include "controller.h" #include "siint.h" +#include "constants.h" -OSPifRam __osEepPifRam; +ALIGNED16 OSPifRam __osEepPifRam; #if VERSION >= VERSION_JPN_FINAL u32 var8009d010pf[4]; diff --git a/src/lib/ultra/io/motor.c b/src/lib/ultra/io/motor.c index 45eaa421a..16139e5dd 100644 --- a/src/lib/ultra/io/motor.c +++ b/src/lib/ultra/io/motor.c @@ -1,8 +1,9 @@ #include #include "controller.h" #include "siint.h" +#include "constants.h" -OSPifRam osPifBuffers[MAXCONTROLLERS]; +ALIGNED16 OSPifRam osPifBuffers[MAXCONTROLLERS]; s32 __osMotorAccess(OSPfs *pfs, s32 vibrate) { diff --git a/src/lib/ultra/io/pfsisplug.c b/src/lib/ultra/io/pfsisplug.c index 995b66e4b..70de3dcac 100644 --- a/src/lib/ultra/io/pfsisplug.c +++ b/src/lib/ultra/io/pfsisplug.c @@ -2,8 +2,9 @@ #include #include "controller.h" #include "siint.h" +#include "constants.h" -OSPifRam __osPfsPifRam; +ALIGNED16 OSPifRam __osPfsPifRam; void __osPfsRequestData(u8 cmd); void __osPfsGetInitData(u8 *pattern, OSContStatus *data);