This commit is contained in:
Reonu
2021-08-25 23:54:28 +01:00
10 changed files with 27 additions and 27 deletions

View File

@@ -337,7 +337,7 @@ ACTOR_DIR := actors
LEVEL_DIRS := $(patsubst levels/%,%,$(dir $(wildcard levels/*/header.h))) LEVEL_DIRS := $(patsubst levels/%,%,$(dir $(wildcard levels/*/header.h)))
# Directories containing source files # Directories containing source files
SRC_DIRS += src src/game src/engine src/audio src/menu src/buffers actors levels bin data assets asm lib sound SRC_DIRS += src src/boot src/game src/engine src/audio src/menu src/buffers actors levels bin data assets asm lib sound
LIBZ_SRC_DIRS := src/libz LIBZ_SRC_DIRS := src/libz
GODDARD_SRC_DIRS := src/goddard src/goddard/dynlists GODDARD_SRC_DIRS := src/goddard src/goddard/dynlists
BIN_DIRS := bin bin/$(VERSION) BIN_DIRS := bin bin/$(VERSION)

View File

@@ -6,7 +6,7 @@ index f50b7622..124c7ec6 100644
$(BUILD_DIR)/src/menu/file_select.o: $(BUILD_DIR)/include/text_strings.h $(BUILD_DIR)/src/menu/file_select.o: $(BUILD_DIR)/include/text_strings.h
$(BUILD_DIR)/src/menu/star_select.o: $(BUILD_DIR)/include/text_strings.h $(BUILD_DIR)/src/menu/star_select.o: $(BUILD_DIR)/include/text_strings.h
$(BUILD_DIR)/src/game/ingame_menu.o: $(BUILD_DIR)/include/text_strings.h $(BUILD_DIR)/src/game/ingame_menu.o: $(BUILD_DIR)/include/text_strings.h
+$(BUILD_DIR)/src/game/mem_error_screen.o: $(BUILD_DIR)/include/text_strings.h +$(BUILD_DIR)/src/boot/mem_error_screen.o: $(BUILD_DIR)/include/text_strings.h
#==============================================================================# #==============================================================================#
@@ -137,14 +137,14 @@ index d41a91c8..7d047236 100644
struct LevelCommand *level_script_execute(struct LevelCommand *cmd); struct LevelCommand *level_script_execute(struct LevelCommand *cmd);
diff --git a/src/game/main.c b/src/game/main.c diff --git a/src/boot/main.c b/src/boot/main.c
index 1a9d9e7e..f4f7a9e5 100644 index 1a9d9e7e..f4f7a9e5 100644
--- a/src/game/main.c --- a/src/boot/main.c
+++ b/src/game/main.c +++ b/src/boot/main.c
@@ -11,6 +11,7 @@ @@ -11,6 +11,7 @@
#include "segments.h" #include "segments.h"
#include "main.h" #include "game/main.h"
#include "rumble_init.h" #include "game/rumble_init.h"
+#include "mem_error_screen.h" +#include "mem_error_screen.h"
// Message IDs // Message IDs
@@ -172,11 +172,11 @@ index 1a9d9e7e..f4f7a9e5 100644
osStartThread(&gGameLoopThread); osStartThread(&gGameLoopThread);
while (TRUE) { while (TRUE) {
diff --git a/src/game/mem_error_screen.c b/src/game/mem_error_screen.c diff --git a/src/boot/mem_error_screen.c b/src/boot/mem_error_screen.c
new file mode 100644 new file mode 100644
index 00000000..f432927c index 00000000..f432927c
--- /dev/null --- /dev/null
+++ b/src/game/mem_error_screen.c +++ b/src/boot/mem_error_screen.c
@@ -0,0 +1,104 @@ @@ -0,0 +1,104 @@
+/* clang-format off */ +/* clang-format off */
+/* +/*

16
sm64.ld
View File

@@ -148,9 +148,8 @@ SECTIONS
{ {
KEEP(BUILD_DIR/asm/entry.o(.text)); KEEP(BUILD_DIR/asm/entry.o(.text));
BUILD_DIR/src/game*.o(.text); BUILD_DIR/src/boot*.o(.text);
BUILD_DIR/src/hvqm*.o(.text); BUILD_DIR/src/hvqm*.o(.text);
BUILD_DIR/src/gdb*.o(.text);
BUILD_DIR/src/usb*.o(.text); BUILD_DIR/src/usb*.o(.text);
BUILD_DIR/src/audio*.o(.text); BUILD_DIR/src/audio*.o(.text);
#ifdef S2DEX_TEXT_ENGINE #ifdef S2DEX_TEXT_ENGINE
@@ -169,8 +168,7 @@ SECTIONS
lib/PR/hvqm/hvqm2sp1.o(.text); lib/PR/hvqm/hvqm2sp1.o(.text);
/* data */ /* data */
BUILD_DIR/src/game*.o(.*data*); BUILD_DIR/src/boot*.o(.*data*);
BUILD_DIR/src/gdb*.o(.*data*);
BUILD_DIR/src/usb*.o(.*data*); BUILD_DIR/src/usb*.o(.*data*);
BUILD_DIR/src/audio*.o(.*data*); BUILD_DIR/src/audio*.o(.*data*);
#ifdef S2DEX_TEXT_ENGINE #ifdef S2DEX_TEXT_ENGINE
@@ -188,8 +186,7 @@ SECTIONS
lib/PR/hvqm/hvqm2sp1.o(.data*); lib/PR/hvqm/hvqm2sp1.o(.data*);
/* rodata */ /* rodata */
BUILD_DIR/src/game*.o(.rodata*); BUILD_DIR/src/boot*.o(.rodata*);
BUILD_DIR/src/gdb*.o(.*rodata*);
BUILD_DIR/src/usb*.o(.rodata*); BUILD_DIR/src/usb*.o(.rodata*);
BUILD_DIR/src/audio*.o(.rodata*); BUILD_DIR/src/audio*.o(.rodata*);
#ifdef S2DEX_TEXT_ENGINE #ifdef S2DEX_TEXT_ENGINE
@@ -212,9 +209,8 @@ SECTIONS
#endif #endif
BEGIN_NOLOAD(main) BEGIN_NOLOAD(main)
{ {
BUILD_DIR/src/game*.o(.*bss*); BUILD_DIR/src/boot*.o(.*bss*);
BUILD_DIR/src/hvqm*.o(.*bss*); BUILD_DIR/src/hvqm*.o(.*bss*);
BUILD_DIR/src/gdb*.o(.*bss*);
BUILD_DIR/src/usb*.o(.*bss*); BUILD_DIR/src/usb*.o(.*bss*);
BUILD_DIR/src/audio*.o(.*bss*); BUILD_DIR/src/audio*.o(.*bss*);
#ifdef S2DEX_TEXT_ENGINE #ifdef S2DEX_TEXT_ENGINE
@@ -239,16 +235,20 @@ SECTIONS
BEGIN_SEG(engine, .) BEGIN_SEG(engine, .)
{ {
BUILD_DIR/src/game*.o(.text);
BUILD_DIR/src/engine*.o(.text); BUILD_DIR/src/engine*.o(.text);
/* data */ /* data */
BUILD_DIR/src/game*.o(.*data*);
BUILD_DIR/src/engine*.o(.data*); BUILD_DIR/src/engine*.o(.data*);
BUILD_DIR/src/engine*.o(.sdata*); BUILD_DIR/src/engine*.o(.sdata*);
/* rodata */ /* rodata */
BUILD_DIR/src/game*.o(.rodata*);
BUILD_DIR/src/engine*.o(.rodata*); BUILD_DIR/src/engine*.o(.rodata*);
} }
END_SEG(engine) END_SEG(engine)
BEGIN_NOLOAD(engine) BEGIN_NOLOAD(engine)
{ {
BUILD_DIR/src/game*.o(.*bss*);
BUILD_DIR/src/engine*.o(.bss*); BUILD_DIR/src/engine*.o(.bss*);
. = ALIGN(0x40); . = ALIGN(0x40);
} }

View File

@@ -5,15 +5,15 @@
#include "sm64.h" #include "sm64.h"
#include "audio/external.h" #include "audio/external.h"
#include "game_init.h" #include "game/game_init.h"
#include "memory.h" #include "game/memory.h"
#include "sound_init.h" #include "game/sound_init.h"
#include "profiler.h" #include "game/profiler.h"
#include "buffers/buffers.h" #include "buffers/buffers.h"
#include "segments.h" #include "segments.h"
#include "main.h" #include "game/main.h"
#include "rumble_init.h" #include "game/rumble_init.h"
#include "version.h" #include "game/version.h"
#ifdef UNF #ifdef UNF
#include "usb/usb.h" #include "usb/usb.h"
#include "usb/debug.h" #include "usb/debug.h"

View File

@@ -6,9 +6,9 @@
#include "buffers/buffers.h" #include "buffers/buffers.h"
#include "slidec.h" #include "slidec.h"
#include "game_init.h" #include "game/game_init.h"
#include "main.h" #include "game/main.h"
#include "memory.h" #include "game/memory.h"
#include "segment_symbols.h" #include "segment_symbols.h"
#include "segments.h" #include "segments.h"
#ifdef GZIP #ifdef GZIP