From b8f00808cbf0f613127a529003f7945e87f9bf5a Mon Sep 17 00:00:00 2001 From: CrashOveride95 Date: Tue, 22 Jun 2021 23:03:18 -0400 Subject: [PATCH 1/4] Fix gzip on debug --- src/libz/zutil.c | 4 ++-- src/libz/zutil.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libz/zutil.c b/src/libz/zutil.c index 8bab6e60..a5f0034d 100644 --- a/src/libz/zutil.c +++ b/src/libz/zutil.c @@ -49,7 +49,7 @@ uLong ZEXPORT zlibCompileFlags() case 8: flags += 2 << 6; break; default: flags += 3 << 6; } -#ifdef DEBUG +#ifdef PCDEBUG flags += 1 << 8; #endif #if defined(ASMV) || defined(ASMINF) @@ -103,7 +103,7 @@ uLong ZEXPORT zlibCompileFlags() return flags; } -#ifdef DEBUG +#ifdef PCDEBUG # ifndef verbose # define verbose 0 diff --git a/src/libz/zutil.h b/src/libz/zutil.h index 43ee4406..872ef977 100644 --- a/src/libz/zutil.h +++ b/src/libz/zutil.h @@ -227,7 +227,7 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ #endif /* Diagnostic functions */ -#ifdef DEBUG +#ifdef PCDEBUG # include extern int z_verbose; extern void z_error OF((char *m)); From cb371fff525bce5a677c673748f14a51113a70e4 Mon Sep 17 00:00:00 2001 From: CrashOveride95 Date: Tue, 22 Jun 2021 23:04:01 -0400 Subject: [PATCH 2/4] Remove version-specific OPT_FLAGS --- Makefile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Makefile b/Makefile index db51d193..ab5941bf 100644 --- a/Makefile +++ b/Makefile @@ -87,19 +87,15 @@ $(eval $(call validate-option,VERSION,jp us eu sh)) ifeq ($(VERSION),jp) DEFINES += VERSION_JP=1 - OPT_FLAGS := -g GRUCODE ?= f3dzex else ifeq ($(VERSION),us) DEFINES += VERSION_US=1 - OPT_FLAGS := -g GRUCODE ?= f3dzex else ifeq ($(VERSION),eu) DEFINES += VERSION_EU=1 - OPT_FLAGS := -O2 GRUCODE ?= f3dzex else ifeq ($(VERSION),sh) DEFINES += VERSION_SH=1 - OPT_FLAGS := -O2 GRUCODE ?= f3dzex endif From 3e73a6c09440d0ac332f3cf19d3bc437f576ec83 Mon Sep 17 00:00:00 2001 From: CrashOveride95 Date: Tue, 22 Jun 2021 23:39:24 -0400 Subject: [PATCH 3/4] fix overalignment --- sm64.ld | 2 +- src/goddard/gd_main.h | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/sm64.ld b/sm64.ld index 12580b97..f2e0fded 100755 --- a/sm64.ld +++ b/sm64.ld @@ -219,7 +219,7 @@ SECTIONS BEGIN_NOLOAD(engine) { BUILD_DIR/src/engine*.o(.bss*); - . = ALIGN(0x100); + . = ALIGN(0x40); } END_NOLOAD(engine) diff --git a/src/goddard/gd_main.h b/src/goddard/gd_main.h index 2fa0c3ec..dbbb19e5 100644 --- a/src/goddard/gd_main.h +++ b/src/goddard/gd_main.h @@ -10,14 +10,15 @@ // "#define printf(...) /* nothing */" wasn't an option.) // This macro is separate from the gd_printf function; one probably // forwarded to the other, but it is hard to tell in which direction. -#ifdef __GNUC__ + +#if defined(ISVPRINT) || defined(UNF) +#define printf osSyncPrintf +#else #define printf(...) \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wunused-value\"") \ (__VA_ARGS__); \ _Pragma ("GCC diagnostic pop") -#else -#define printf #endif // structs From 2e534b1ab24ece0607f1ac0801ae79abe781ac15 Mon Sep 17 00:00:00 2001 From: CrashOveride95 Date: Tue, 22 Jun 2021 23:43:26 -0400 Subject: [PATCH 4/4] sorry goddard's printing too much for me --- src/goddard/gd_main.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/goddard/gd_main.h b/src/goddard/gd_main.h index dbbb19e5..d4c8bc0b 100644 --- a/src/goddard/gd_main.h +++ b/src/goddard/gd_main.h @@ -11,15 +11,11 @@ // This macro is separate from the gd_printf function; one probably // forwarded to the other, but it is hard to tell in which direction. -#if defined(ISVPRINT) || defined(UNF) -#define printf osSyncPrintf -#else #define printf(...) \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wunused-value\"") \ (__VA_ARGS__); \ _Pragma ("GCC diagnostic pop") -#endif // structs struct GdControl { // gGdCtrl