You've already forked Microtransactions64
mirror of
https://github.com/Print-and-Panic/Microtransactions64.git
synced 2026-01-21 10:17:19 -08:00
Refresh 8
This commit is contained in:
42
CHANGES
42
CHANGES
@@ -1,3 +1,45 @@
|
||||
Refresh #8
|
||||
1.) Use INT_STATUS_ macros for oInteractStatus (#911)
|
||||
2.) Update bullet_bill.inc.c (#912)
|
||||
3.) Make geo.c in levels nonconst to reduce diffs with gcc enhancement patch in future (#913)
|
||||
4.) Improve process_level_music_dynamics (#915)
|
||||
5.) add AVOID_UB define for fixing libultra aliasing. (#916)
|
||||
6.) const hack to TARGET_N64 and tweak ld script (#918)
|
||||
7.) Replace raw level/course numbers with defines (#919)
|
||||
8.) Label all graph node flags. (#920)
|
||||
9.) readme.md capitalization
|
||||
10.) The Big Function PR (Part 5) (#910)
|
||||
11.) Label hardware registers (#922)
|
||||
12.) Match EU synthesis_process_note (#923)
|
||||
13.) Some quick value changes (#909)
|
||||
14.) Added sequence player defines (#926)
|
||||
15.) Shindou diffs 2 [merge game.c and display.c, required for SH] (#927)
|
||||
16.) Match synthesis_process_notes and use -sopt for synthesis.c (#928)
|
||||
17.) Fix mips64-binutils for Fedora 31 and similar Linux distros (#931)
|
||||
18.) Update first-diff.py to work with Shindou (#933)
|
||||
19.) Labelled behavior_script.c (#929)
|
||||
20.) shindou diffs up to level_update (#932)
|
||||
21.) Update diff.py and diff_settings.py to work with SH (#936)
|
||||
22.) Add some Shindou resources to extract_assets.py (#939)
|
||||
23.) Label and document gd_math.c (#930)
|
||||
24.) Label all of Mario's actions. (#941)
|
||||
25.) Label all particles. (#940)
|
||||
26.) Renamed death related warpBhvs (#942)
|
||||
27.) Small Shindou differences (#945)
|
||||
28.) match player_performed_grab_escape_action in all versions (#943)
|
||||
29.) add main alignment (aglab2, #947)
|
||||
30.) Match a bunch of fake EU matchings (#944)
|
||||
31.) Shindou diffs round 4 (#937)
|
||||
32.) Easy PAL fake matchings (#946)
|
||||
33.) Merge object_helpers and object_helpers2 headers (#948)
|
||||
34.) match cap_check_quicksand (#950)
|
||||
35.) Shindou crash screen diffs (#938)
|
||||
36.) Thread6 (#951)
|
||||
37.) Correct IPL3 function and label addresses (#952)
|
||||
38.) Add COMPILER flag for Makefile and add official mips gcc support. (#953)
|
||||
39.) add align to sequence_00 (fixes gcc build) (#957)
|
||||
40.) Fixed itty bitty typo (#959)
|
||||
|
||||
Refresh #7
|
||||
1.) update README.md (#861)
|
||||
2.) [eu] fix decompilation bugs in synthesis_process_note (#862)
|
||||
|
||||
48
Makefile
48
Makefile
@@ -19,6 +19,12 @@ COMPARE ?= 1
|
||||
NON_MATCHING ?= 0
|
||||
# Build for the N64 (turn this off for ports)
|
||||
TARGET_N64 ?= 1
|
||||
# Compiler to use (ido or gcc)
|
||||
COMPILER ?= ido
|
||||
|
||||
ifeq ($(COMPILER),gcc)
|
||||
NON_MATCHING := 1
|
||||
endif
|
||||
|
||||
# Release
|
||||
|
||||
@@ -51,7 +57,7 @@ ifeq ($(VERSION),sh)
|
||||
GRUCODE_ASFLAGS := --defsym F3D_NEW=1
|
||||
TARGET := sm64.sh
|
||||
# TODO: GET RID OF THIS!!! We should mandate assets for Shindou like EU but we dont have the addresses extracted yet so we'll just pretend you have everything extracted for now.
|
||||
NOEXTRACT := 1
|
||||
NOEXTRACT := 1
|
||||
else
|
||||
$(error unknown version "$(VERSION)")
|
||||
endif
|
||||
@@ -96,6 +102,7 @@ endif
|
||||
|
||||
ifeq ($(NON_MATCHING),1)
|
||||
VERSION_CFLAGS := $(VERSION_CFLAGS) -DNON_MATCHING -DAVOID_UB
|
||||
VERSION_ASFLAGS := --defsym AVOID_UB=1
|
||||
COMPARE := 0
|
||||
endif
|
||||
|
||||
@@ -153,8 +160,12 @@ ULTRA_BIN_DIRS := lib/bin
|
||||
|
||||
GODDARD_SRC_DIRS := src/goddard src/goddard/dynlists
|
||||
|
||||
MIPSISET := -mips2
|
||||
MIPSBIT := -32
|
||||
|
||||
MIPSISET := -mips2 -32
|
||||
ifeq ($(COMPILER),gcc)
|
||||
MIPSISET := -mips3
|
||||
endif
|
||||
|
||||
ifeq ($(VERSION),eu)
|
||||
OPT_FLAGS := -O2
|
||||
@@ -166,6 +177,11 @@ else
|
||||
endif
|
||||
endif
|
||||
|
||||
# Use a default opt flag for gcc
|
||||
ifeq ($(COMPILER),gcc)
|
||||
OPT_FLAGS := -O2
|
||||
endif
|
||||
|
||||
# File dependencies and variables for specific files
|
||||
include Makefile.split
|
||||
|
||||
@@ -228,6 +244,8 @@ IRIX_ROOT := tools/ido5.3_compiler
|
||||
|
||||
ifeq ($(shell type mips-linux-gnu-ld >/dev/null 2>/dev/null; echo $$?), 0)
|
||||
CROSS := mips-linux-gnu-
|
||||
else ifeq ($(shell type mips64-linux-gnu-ld >/dev/null 2>/dev/null; echo $$?), 0)
|
||||
CROSS := mips64-linux-gnu-
|
||||
else
|
||||
CROSS := mips64-elf-
|
||||
endif
|
||||
@@ -249,6 +267,11 @@ OBJDUMP := $(CROSS)objdump
|
||||
OBJCOPY := $(CROSS)objcopy
|
||||
PYTHON := python3
|
||||
|
||||
# change the compiler to gcc, to use the default, install the gcc-mips-linux-gnu package
|
||||
ifeq ($(COMPILER),gcc)
|
||||
CC := $(CROSS)gcc
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET_N64),1)
|
||||
TARGET_CFLAGS := -nostdinc -I include/libc -DTARGET_N64
|
||||
CC_CFLAGS := -fno-builtin
|
||||
@@ -259,13 +282,19 @@ INCLUDE_CFLAGS := -I include -I $(BUILD_DIR) -I $(BUILD_DIR)/include -I src -I .
|
||||
# Check code syntax with host compiler
|
||||
CC_CHECK := gcc -fsyntax-only -fsigned-char $(CC_CFLAGS) $(TARGET_CFLAGS) $(INCLUDE_CFLAGS) -std=gnu90 -Wall -Wextra -Wno-format-security -Wno-main -DNON_MATCHING -DAVOID_UB $(VERSION_CFLAGS) $(GRUCODE_CFLAGS)
|
||||
|
||||
COMMON_CFLAGS = $(OPT_FLAGS) $(TARGET_CFLAGS) $(INCLUDE_CFLAGS) $(VERSION_CFLAGS) $(MIPSISET) $(GRUCODE_CFLAGS)
|
||||
|
||||
ASFLAGS := -march=vr4300 -mabi=32 -I include -I $(BUILD_DIR) $(VERSION_ASFLAGS) $(GRUCODE_ASFLAGS)
|
||||
CFLAGS = -Wab,-r4300_mul -non_shared -G 0 -Xcpluscomm -Xfullwarn -signed $(OPT_FLAGS) $(TARGET_CFLAGS) $(INCLUDE_CFLAGS) $(VERSION_CFLAGS) $(MIPSISET) $(GRUCODE_CFLAGS)
|
||||
CFLAGS = -Wab,-r4300_mul -non_shared -G 0 -Xcpluscomm -Xfullwarn -signed $(COMMON_CFLAGS) $(MIPSBIT)
|
||||
OBJCOPYFLAGS := --pad-to=0x800000 --gap-fill=0xFF
|
||||
SYMBOL_LINKING_FLAGS := $(addprefix -R ,$(SEG_FILES))
|
||||
LDFLAGS := -T undefined_syms.txt -T $(BUILD_DIR)/$(LD_SCRIPT) -Map $(BUILD_DIR)/sm64.$(VERSION).map --no-check-sections $(SYMBOL_LINKING_FLAGS)
|
||||
ENDIAN_BITWIDTH := $(BUILD_DIR)/endian-and-bitwidth
|
||||
|
||||
ifeq ($(COMPILER),gcc)
|
||||
CFLAGS := -march=vr4300 -mfix4300 -mno-shared -G 0 -mhard-float -fno-stack-protector -fno-common -I include -I src/ -I $(BUILD_DIR)/include -fno-PIC -mno-abicalls -fno-strict-aliasing -fno-inline-functions -ffreestanding -fwrapv -Wall -Wextra $(COMMON_CFLAGS)
|
||||
endif
|
||||
|
||||
ifeq ($(shell getconf LONG_BIT), 32)
|
||||
# Work around memory allocation bug in QEMU
|
||||
export QEMU_GUEST_BASE := 1
|
||||
@@ -297,6 +326,11 @@ LOADER = loader64
|
||||
LOADER_FLAGS = -vwf
|
||||
SHA1SUM = sha1sum
|
||||
|
||||
# Use Objcopy instead of extract_data_for_mio
|
||||
ifeq ($(COMPILER),gcc)
|
||||
EXTRACT_DATA_FOR_MIO := $(OBJCOPY) -O binary --only-section=.data
|
||||
endif
|
||||
|
||||
###################### Dependency Check #####################
|
||||
|
||||
BINUTILS_VER_MAJOR := $(shell $(LD) --version | grep ^GNU | sed 's/^.* //; s/\..*//g')
|
||||
@@ -339,6 +373,10 @@ $(BUILD_DIR)/include/text_strings.h: include/text_strings.h.in
|
||||
$(BUILD_DIR)/include/text_menu_strings.h: include/text_menu_strings.h.in
|
||||
$(TEXTCONV) charmap_menu.txt $< $@
|
||||
|
||||
ifeq ($(COMPILER),gcc)
|
||||
$(BUILD_DIR)/lib/src/math/%.o: CFLAGS += -fno-builtin
|
||||
endif
|
||||
|
||||
ifeq ($(VERSION),eu)
|
||||
TEXT_DIRS := text/de text/us text/fr
|
||||
|
||||
@@ -486,7 +524,7 @@ $(BUILD_DIR)/assets/mario_anim_data.c: $(wildcard assets/anims/*.inc.c)
|
||||
$(BUILD_DIR)/assets/demo_data.c: assets/demo_data.json $(wildcard assets/demos/*.bin)
|
||||
$(PYTHON) tools/demo_data_converter.py assets/demo_data.json $(VERSION_CFLAGS) > $@
|
||||
|
||||
|
||||
ifeq ($(COMPILER),ido)
|
||||
# Source code
|
||||
$(BUILD_DIR)/levels/%/leveldata.o: OPT_FLAGS := -g
|
||||
$(BUILD_DIR)/actors/%.o: OPT_FLAGS := -g
|
||||
@@ -520,6 +558,7 @@ else
|
||||
# The source-to-source optimizer copt is enabled for audio. This makes it use
|
||||
# acpp, which needs -Wp,-+ to handle C++-style comments.
|
||||
$(BUILD_DIR)/src/audio/effects.o: OPT_FLAGS := -O2 -Wo,-loopunroll,0 -sopt,-inline=sequence_channel_process_sound,-scalaroptimize=1 -Wp,-+
|
||||
$(BUILD_DIR)/src/audio/synthesis.o: OPT_FLAGS := -O2 -sopt,-scalaroptimize=1 -Wp,-+
|
||||
|
||||
# Add a target for build/eu/src/audio/*.copt to make it easier to see debug
|
||||
$(BUILD_DIR)/src/audio/%.acpp: src/audio/%.c
|
||||
@@ -527,6 +566,7 @@ $(BUILD_DIR)/src/audio/%.acpp: src/audio/%.c
|
||||
$(BUILD_DIR)/src/audio/%.copt: $(BUILD_DIR)/src/audio/%.acpp
|
||||
$(QEMU_IRIX) -silent -L $(IRIX_ROOT) $(IRIX_ROOT)/usr/lib/copt -signed -I=$< -CMP=$@ -cp=i -scalaroptimize=1
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(NON_MATCHING),0)
|
||||
$(GLOBAL_ASM_O_FILES): CC := $(PYTHON) tools/asm_processor/build.py $(CC) -- $(AS) $(ASFLAGS) --
|
||||
|
||||
@@ -113,4 +113,4 @@ discuss what you would like to change.
|
||||
|
||||
Run clang-format on your code to ensure it meets the project's coding standards.
|
||||
|
||||
Official discord: https://discord.gg/27JtCWs
|
||||
Official Discord: https://discord.gg/27JtCWs
|
||||
|
||||
450
asm/boot.s
450
asm/boot.s
File diff suppressed because it is too large
Load Diff
@@ -11,7 +11,51 @@
|
||||
# This file is handwritten.
|
||||
|
||||
glabel decompress
|
||||
.ifdef VERSION_EU
|
||||
.if VERSION_SH == 1
|
||||
lw $a3, 8($a0)
|
||||
lw $t9, 0xc($a0)
|
||||
lw $t8, 4($a0)
|
||||
add $a3, $a3, $a0
|
||||
add $t9, $t9, $a0
|
||||
move $a2, $zero
|
||||
addi $a0, $a0, 0x10
|
||||
add $t8, $t8, $a1
|
||||
.L802772C0:
|
||||
bnel $a2, $zero, .L802772D8
|
||||
slt $t1, $t0, $zero
|
||||
lw $t0, ($a0)
|
||||
li $a2, 32
|
||||
addi $a0, $a0, 4
|
||||
slt $t1, $t0, $zero
|
||||
.L802772D8:
|
||||
beql $t1, $zero, .L802772F8
|
||||
lhu $t2, ($a3)
|
||||
lb $t2, ($t9)
|
||||
addi $t9, $t9, 1
|
||||
addi $a1, $a1, 1
|
||||
b .L80277324
|
||||
sb $t2, -1($a1)
|
||||
lhu $t2, ($a3)
|
||||
.L802772F8:
|
||||
addi $a3, $a3, 2
|
||||
srl $t3, $t2, 0xc
|
||||
andi $t2, $t2, 0xfff
|
||||
sub $t1, $a1, $t2
|
||||
addi $t3, $t3, 3
|
||||
.L8027730C:
|
||||
lb $t2, -1($t1)
|
||||
addi $t3, $t3, -1
|
||||
addi $t1, $t1, 1
|
||||
addi $a1, $a1, 1
|
||||
bnez $t3, .L8027730C
|
||||
sb $t2, -1($a1)
|
||||
.L80277324:
|
||||
sll $t0, $t0, 1
|
||||
bne $a1, $t8, .L802772C0
|
||||
addi $a2, $a2, -1
|
||||
jr $ra
|
||||
nop
|
||||
.elseif VERSION_EU == 1
|
||||
lw $a3, 8($a0)
|
||||
lw $t9, 0xc($a0)
|
||||
lw $t8, 4($a0)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -38,4 +38,9 @@
|
||||
.ascii "P" /* PAL (Europe) */
|
||||
.endif
|
||||
|
||||
.byte 0x00 /* Version */
|
||||
.if VERSION_SH == 1
|
||||
.byte 0x03 /* Version (Shindou) */
|
||||
.else
|
||||
.byte 0x00 /* Version */
|
||||
.endif
|
||||
|
||||
|
||||
3068
assets.json
3068
assets.json
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
2
diff.py
2
diff.py
@@ -50,7 +50,7 @@ parser.add_argument('-m', '--make', dest='make', action='store_true',
|
||||
help="Automatically run 'make' on the .o file or binary before diffing.")
|
||||
parser.add_argument('-l', '--skip-lines', dest='skip_lines', type=int, default=0,
|
||||
help="Skip the first N lines of output.")
|
||||
parser.add_argument('-s', '--stop-jr-ra', dest='stop_jrra', action='store_true',
|
||||
parser.add_argument('-f', '--stop-jr-ra', dest='stop_jrra', action='store_true',
|
||||
help="Stop disassembling at the first 'jr ra'. Some functions have multiple return points, so use with care!")
|
||||
parser.add_argument('-i', '--ignore-large-imms', dest='ignore_large_imms', action='store_true',
|
||||
help="Pretend all large enough immediates are the same.")
|
||||
|
||||
@@ -8,6 +8,8 @@ def add_custom_arguments(parser):
|
||||
help="Set version to US.")
|
||||
group.add_argument('-e', dest='lang', action='store_const', const='eu',
|
||||
help="Set version to EU.")
|
||||
group.add_argument('-s', dest='lang', action='store_const', const='sh',
|
||||
help="Set version to SH.")
|
||||
|
||||
def apply(config, args):
|
||||
lang = args.lang or 'us'
|
||||
|
||||
@@ -2,15 +2,16 @@ diff --git a/src/game/area.c b/src/game/area.c
|
||||
index 240605d8..88c1a314 100644
|
||||
--- a/src/game/area.c
|
||||
+++ b/src/game/area.c
|
||||
@@ -19,6 +19,7 @@
|
||||
@@ -19,7 +19,8 @@
|
||||
#include "level_update.h"
|
||||
#include "engine/geo_layout.h"
|
||||
#include "save_file.h"
|
||||
#include "level_table.h"
|
||||
+#include "debug_box.h"
|
||||
|
||||
struct SpawnInfo gPlayerSpawnInfos[1];
|
||||
struct GraphNode *D_8033A160[0x100];
|
||||
@@ -352,6 +353,8 @@ void render_game(void) {
|
||||
@@ -353,6 +354,8 @@ void render_game(void) {
|
||||
if (gCurrentArea != NULL && !gWarpTransition.pauseRendering) {
|
||||
geo_process_root(gCurrentArea->unk04, D_8032CE74, D_8032CE78, gFBSetColor);
|
||||
|
||||
@@ -28,7 +29,7 @@ index 00000000..0ee87ec7
|
||||
+#include <ultra64.h>
|
||||
+
|
||||
+#include "sm64.h"
|
||||
+#include "game/game.h"
|
||||
+#include "game/game_init.h"
|
||||
+#include "game/geo_misc.h"
|
||||
+#include "engine/math_util.h"
|
||||
+
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/src/game/game.c b/src/game/game.c
|
||||
index ad800839..4a37549b 100644
|
||||
--- a/src/game/game.c
|
||||
+++ b/src/game/game.c
|
||||
@@ -52,6 +52,47 @@ struct DemoInput *gCurrDemoInput = NULL; // demo input sequence
|
||||
diff --git a/src/game/game_init.c b/src/game/game_init.c
|
||||
index 0852a141..18c5e8fe 100644
|
||||
--- a/src/game/game_init.c
|
||||
+++ b/src/game/game_init.c
|
||||
@@ -56,6 +56,47 @@ struct DemoInput *gCurrDemoInput = NULL; // demo input sequence
|
||||
u16 gDemoInputListID = 0;
|
||||
struct DemoInput gRecordedDemoInput = { 0 }; // possibly removed in EU. TODO: Check
|
||||
|
||||
@@ -47,10 +47,10 @@ index ad800839..4a37549b 100644
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
// this function records distinct inputs over a 255-frame interval to RAM locations and was likely
|
||||
// used to record the demo sequences seen in the final game. This function is unused.
|
||||
static void record_demo(void) {
|
||||
@@ -334,5 +375,7 @@ void thread5_game_loop(UNUSED void *arg) {
|
||||
/**
|
||||
* Initializes the Reality Display Processor (RDP).
|
||||
* This function initializes settings such as texture filtering mode,
|
||||
@@ -614,5 +655,7 @@ void thread5_game_loop(UNUSED void *arg) {
|
||||
// amount of free space remaining.
|
||||
print_text_fmt_int(180, 20, "BUF %d", gGfxPoolEnd - (u8 *) gDisplayListHead);
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 26c76d3d..bfc8bb18 100644
|
||||
index 88c8dbbe..f60df04f 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -341,6 +341,7 @@ $(BUILD_DIR)/include/text_strings.h: $(BUILD_DIR)/include/text_menu_strings.h
|
||||
@@ -382,6 +382,7 @@ $(BUILD_DIR)/include/text_strings.h: $(BUILD_DIR)/include/text_menu_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/game/ingame_menu.o: $(BUILD_DIR)/include/text_strings.h
|
||||
@@ -11,7 +11,7 @@ index 26c76d3d..bfc8bb18 100644
|
||||
################################################################
|
||||
# TEXTURE GENERATION #
|
||||
diff --git a/include/segments.h b/include/segments.h
|
||||
index ccc989aa..e54c3eab 100644
|
||||
index c98040a8..eeecb4f6 100644
|
||||
--- a/include/segments.h
|
||||
+++ b/include/segments.h
|
||||
@@ -1,6 +1,9 @@
|
||||
@@ -25,7 +25,7 @@ index ccc989aa..e54c3eab 100644
|
||||
* Memory addresses for segments. Ideally, this header file would not be
|
||||
* needed, and the addresses would be defined in sm64.ld and linker-inserted
|
||||
diff --git a/include/text_strings.h.in b/include/text_strings.h.in
|
||||
index 2fda11d7..8ba0a1c9 100644
|
||||
index 4e36eb96..7aadf0cb 100644
|
||||
--- a/include/text_strings.h.in
|
||||
+++ b/include/text_strings.h.in
|
||||
@@ -25,6 +25,11 @@
|
||||
@@ -58,10 +58,10 @@ index 015eeb6b..cc010ca1 100644
|
||||
+ JUMP(/*target*/ level_script_entry_error_screen),
|
||||
+};
|
||||
diff --git a/levels/intro/geo.c b/levels/intro/geo.c
|
||||
index 7fbee0c5..e7effd85 100644
|
||||
index 8ac70024..72766f3f 100644
|
||||
--- a/levels/intro/geo.c
|
||||
+++ b/levels/intro/geo.c
|
||||
@@ -13,6 +13,24 @@
|
||||
@@ -15,6 +15,24 @@
|
||||
|
||||
#include "levels/intro/header.h"
|
||||
|
||||
@@ -100,7 +100,7 @@ index e0f6292d..8f77fb26 100644
|
||||
+
|
||||
#endif
|
||||
diff --git a/levels/intro/script.c b/levels/intro/script.c
|
||||
index 3ffd7859..b8c3ae41 100644
|
||||
index 4975dbb2..5ee6c688 100644
|
||||
--- a/levels/intro/script.c
|
||||
+++ b/levels/intro/script.c
|
||||
@@ -18,6 +18,21 @@
|
||||
@@ -137,18 +137,18 @@ index 89bfb4ed..0ea607c5 100644
|
||||
|
||||
#endif /* _LEVEL_SCRIPT_H */
|
||||
diff --git a/src/game/main.c b/src/game/main.c
|
||||
index f677f6f9..a164beb1 100644
|
||||
index a3afffee..8b05fcf1 100644
|
||||
--- a/src/game/main.c
|
||||
+++ b/src/game/main.c
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "buffers/buffers.h"
|
||||
#include "segments.h"
|
||||
#include "main.h"
|
||||
#include "thread6.h"
|
||||
+#include "mem_error_screen.h"
|
||||
|
||||
// Message IDs
|
||||
#define MESG_SP_COMPLETE 100
|
||||
@@ -125,6 +126,10 @@ void AllocPool(void) {
|
||||
@@ -125,6 +126,10 @@ void alloc_pool(void) {
|
||||
void *start = (void *) SEG_POOL_START;
|
||||
void *end = (void *) SEG_POOL_END;
|
||||
|
||||
@@ -159,7 +159,7 @@ index f677f6f9..a164beb1 100644
|
||||
main_pool_init(start, end);
|
||||
gEffectsMemoryPool = mem_pool_init(0x4000, MEMORY_POOL_LEFT);
|
||||
}
|
||||
@@ -314,7 +319,10 @@ void thread3_main(UNUSED void *arg) {
|
||||
@@ -330,7 +335,10 @@ void thread3_main(UNUSED void *arg) {
|
||||
create_thread(&gSoundThread, 4, thread4_sound, NULL, gThread4Stack + 0x2000, 20);
|
||||
osStartThread(&gSoundThread);
|
||||
|
||||
@@ -173,10 +173,10 @@ index f677f6f9..a164beb1 100644
|
||||
while (1) {
|
||||
diff --git a/src/game/mem_error_screen.c b/src/game/mem_error_screen.c
|
||||
new file mode 100644
|
||||
index 00000000..20eeef8f
|
||||
index 00000000..81efaf91
|
||||
--- /dev/null
|
||||
+++ b/src/game/mem_error_screen.c
|
||||
@@ -0,0 +1,105 @@
|
||||
@@ -0,0 +1,104 @@
|
||||
+/* clang-format off */
|
||||
+/*
|
||||
+ * mem_error_screen.inc.c
|
||||
@@ -189,9 +189,8 @@ index 00000000..20eeef8f
|
||||
+#include <types.h>
|
||||
+#include "segments.h"
|
||||
+#include "text_strings.h"
|
||||
+#include "game.h"
|
||||
+#include "game_init.h"
|
||||
+#include "main.h"
|
||||
+#include "display.h"
|
||||
+#include "print.h"
|
||||
+#include "ingame_menu.h"
|
||||
+#include "segment2.h"
|
||||
@@ -282,6 +281,7 @@ index 00000000..20eeef8f
|
||||
+ display_and_vsync();
|
||||
+ }
|
||||
+}
|
||||
\ No newline at end of file
|
||||
diff --git a/src/game/mem_error_screen.h b/src/game/mem_error_screen.h
|
||||
new file mode 100644
|
||||
index 00000000..9fbff34c
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
diff --git a/src/game/game.c b/src/game/game.c
|
||||
index ad800839..810e2ba3 100644
|
||||
--- a/src/game/game.c
|
||||
+++ b/src/game/game.c
|
||||
@@ -52,6 +52,45 @@ struct DemoInput *gCurrDemoInput = NULL; // demo input sequence
|
||||
u16 gDemoInputListID = 0;
|
||||
struct DemoInput gRecordedDemoInput = { 0 }; // possibly removed in EU. TODO: Check
|
||||
diff --git a/src/game/game_init.c b/src/game/game_init.c
|
||||
index 0852a141..004941d8 100644
|
||||
--- a/src/game/game_init.c
|
||||
+++ b/src/game/game_init.c
|
||||
@@ -332,6 +332,45 @@ void display_and_vsync(void) {
|
||||
gGlobalTimer++;
|
||||
}
|
||||
|
||||
+/*
|
||||
+ * This enhancement allows you to record gameplay demos for the mario head screen.
|
||||
@@ -48,7 +48,7 @@ index ad800839..810e2ba3 100644
|
||||
// this function records distinct inputs over a 255-frame interval to RAM locations and was likely
|
||||
// used to record the demo sequences seen in the final game. This function is unused.
|
||||
static void record_demo(void) {
|
||||
@@ -85,6 +124,118 @@ static void record_demo(void) {
|
||||
@@ -365,6 +404,118 @@ static void record_demo(void) {
|
||||
gRecordedDemoInput.timer++;
|
||||
}
|
||||
|
||||
@@ -167,9 +167,9 @@ index ad800839..810e2ba3 100644
|
||||
// take the updated controller struct and calculate
|
||||
// the new x, y, and distance floats.
|
||||
void adjust_analog_stick(struct Controller *controller) {
|
||||
@@ -325,6 +476,7 @@ void thread5_game_loop(UNUSED void *arg) {
|
||||
@@ -605,6 +756,7 @@ void thread5_game_loop(UNUSED void *arg) {
|
||||
audio_game_loop_tick();
|
||||
func_80247FAC();
|
||||
config_gfx_pool();
|
||||
read_controller_inputs();
|
||||
+ recordingDemo();
|
||||
addr = level_script_execute(addr);
|
||||
|
||||
@@ -74,7 +74,7 @@ def main():
|
||||
clean_assets(local_asset_file)
|
||||
sys.exit(0)
|
||||
|
||||
all_langs = ["jp", "us", "eu"]
|
||||
all_langs = ["jp", "us", "eu", "sh"]
|
||||
if not langs or not all(a in all_langs for a in langs):
|
||||
langs_str = " ".join("[" + lang + "]" for lang in all_langs)
|
||||
print("Usage: " + sys.argv[0] + " " + langs_str)
|
||||
|
||||
@@ -13,13 +13,15 @@ for arg in sys.argv[1:]:
|
||||
lang = 'us'
|
||||
elif arg == '-e':
|
||||
lang = 'eu'
|
||||
elif arg == '-s':
|
||||
lang = 'sh'
|
||||
else:
|
||||
args.append(arg)
|
||||
|
||||
if lang is None:
|
||||
lang = 'us'
|
||||
best = 0
|
||||
for path in ['build/us/sm64.us.z64', 'build/jp/sm64.jp.z64', 'build/eu/sm64.eu.z64']:
|
||||
for path in ['build/us/sm64.us.z64', 'build/jp/sm64.jp.z64', 'build/eu/sm64.eu.z64', 'build/sh/sm64.sh.z64']:
|
||||
try:
|
||||
mtime = os.path.getmtime(path)
|
||||
if mtime > best:
|
||||
@@ -187,7 +189,7 @@ if diffs > 100:
|
||||
i = found_instr_diff
|
||||
print("First instruction difference at ROM addr " + hex(i) + ", " + search_map(i))
|
||||
print("Bytes:", hexbytes(mybin[i:i+4]), 'vs', hexbytes(basebin[i:i+4]))
|
||||
if lang == 'eu':
|
||||
if lang == 'sh':
|
||||
print("Shifted ROM, as expected.")
|
||||
else:
|
||||
if not os.path.isfile(basemap):
|
||||
|
||||
@@ -18,13 +18,13 @@ extern const BehaviorScript bhvKingBobomb[];
|
||||
extern const BehaviorScript bhvBobombAnchorMario[];
|
||||
extern const BehaviorScript bhvBetaChestBottom[];
|
||||
extern const BehaviorScript bhvBetaChestLid[];
|
||||
extern const BehaviorScript bhvBubbleMario[];
|
||||
extern const BehaviorScript bhvBubbleParticleSpawner[];
|
||||
extern const BehaviorScript bhvBubbleMaybe[];
|
||||
extern const BehaviorScript bhvSmallWaterWave[];
|
||||
extern const BehaviorScript bhvSmallWaterWave398[];
|
||||
extern const BehaviorScript bhvWaterAirBubble[];
|
||||
extern const BehaviorScript bhvSmallParticle[];
|
||||
extern const BehaviorScript bhvWaterWaves[];
|
||||
extern const BehaviorScript bhvPlungeBubble[];
|
||||
extern const BehaviorScript bhvSmallParticleSnow[];
|
||||
extern const BehaviorScript bhvSmallParticleBubbles[];
|
||||
extern const BehaviorScript bhvFishGroup[];
|
||||
@@ -64,11 +64,11 @@ extern const BehaviorScript bhvSingleCoinGetsSpawned[];
|
||||
extern const BehaviorScript bhvCoinSparkles[];
|
||||
extern const BehaviorScript bhvGoldenCoinSparkles[];
|
||||
extern const BehaviorScript bhvWallTinyStarParticle[];
|
||||
extern const BehaviorScript bhvWallTinyStarParticleSpawn[];
|
||||
extern const BehaviorScript bhvVertStarParticleSpawner[];
|
||||
extern const BehaviorScript bhvPoundTinyStarParticle[];
|
||||
extern const BehaviorScript bhvPoundTinyStarParticleSpawn[];
|
||||
extern const BehaviorScript bhvHorStarParticleSpawner[];
|
||||
extern const BehaviorScript bhvPunchTinyTriangle[];
|
||||
extern const BehaviorScript bhvPunchTinyTriangleSpawn[];
|
||||
extern const BehaviorScript bhvTriangleParticleSpawner[];
|
||||
extern const BehaviorScript bhvDoorWarp[];
|
||||
extern const BehaviorScript bhvDoor[];
|
||||
extern const BehaviorScript bhvGrindel[];
|
||||
@@ -83,14 +83,14 @@ extern const BehaviorScript bhvAnotherElavator[];
|
||||
extern const BehaviorScript bhvRrElevatorPlatform[];
|
||||
extern const BehaviorScript bhvHmcElevatorPlatform[];
|
||||
extern const BehaviorScript bhvWaterMist[];
|
||||
extern const BehaviorScript bhvWaterMistSpawn[];
|
||||
extern const BehaviorScript bhvBreathParticleSpawner[];
|
||||
extern const BehaviorScript bhvBreakBoxTriangle[];
|
||||
extern const BehaviorScript bhvWaterMist2[];
|
||||
extern const BehaviorScript bhvUnused0DFC[];
|
||||
extern const BehaviorScript bhvPoundWhitePuffs[];
|
||||
extern const BehaviorScript bhvGroundSand[];
|
||||
extern const BehaviorScript bhvMistCircParticleSpawner[];
|
||||
extern const BehaviorScript bhvDirtParticleSpawner[];
|
||||
extern const BehaviorScript bhvUnused0E40[];
|
||||
extern const BehaviorScript bhvGroundSnow[];
|
||||
extern const BehaviorScript bhvSnowParticleSpawner[];
|
||||
extern const BehaviorScript bhvWind[];
|
||||
extern const BehaviorScript bhvEndToad[];
|
||||
extern const BehaviorScript bhvEndPeach[];
|
||||
@@ -113,7 +113,7 @@ extern const BehaviorScript bhvFlamethrowerFlame[];
|
||||
extern const BehaviorScript bhvBouncingFireball[];
|
||||
extern const BehaviorScript bhvBouncingFireballFlame[];
|
||||
extern const BehaviorScript bhvBowserShockWave[];
|
||||
extern const BehaviorScript bhvFlameMario[];
|
||||
extern const BehaviorScript bhvFireParticleSpawner[];
|
||||
extern const BehaviorScript bhvBlackSmokeMario[];
|
||||
extern const BehaviorScript bhvBlackSmokeBowser[];
|
||||
extern const BehaviorScript bhvBlackSmokeUpward[];
|
||||
@@ -123,7 +123,7 @@ extern const BehaviorScript bhvTowerPlatformGroup[];
|
||||
extern const BehaviorScript bhvWfSlidingTowerPlatform[];
|
||||
extern const BehaviorScript bhvWfElevatorTowerPlatform[];
|
||||
extern const BehaviorScript bhvWfSolidTowerPlatform[];
|
||||
extern const BehaviorScript bhvSnowLeafParticleSpawn[];
|
||||
extern const BehaviorScript bhvLeafParticleSpawner[];
|
||||
extern const BehaviorScript bhvTreeSnow[];
|
||||
extern const BehaviorScript bhvTreeLeaf[];
|
||||
extern const BehaviorScript bhvAnotherTiltingPlatform[];
|
||||
@@ -235,7 +235,7 @@ extern const BehaviorScript bhvUnused243C[];
|
||||
extern const BehaviorScript bhvSunkenShipPart2[];
|
||||
extern const BehaviorScript bhvInSunkenShip[];
|
||||
extern const BehaviorScript bhvInSunkenShip2[];
|
||||
extern const BehaviorScript bhvMarioDustGenerator[];
|
||||
extern const BehaviorScript bhvMistParticleSpawner[];
|
||||
extern const BehaviorScript bhvWhitePuff1[];
|
||||
extern const BehaviorScript bhvWhitePuff2[];
|
||||
extern const BehaviorScript bhvWhitePuffSmoke2[];
|
||||
@@ -278,7 +278,7 @@ extern const BehaviorScript bhvFloorTrapInCastle[];
|
||||
extern const BehaviorScript bhvTree[];
|
||||
extern const BehaviorScript bhvSparkle[];
|
||||
extern const BehaviorScript bhvSparkleSpawn[];
|
||||
extern const BehaviorScript bhvSpecialTripleJumpSparkles[];
|
||||
extern const BehaviorScript bhvSparkleParticleSpawner[];
|
||||
extern const BehaviorScript bhvSomeGfx[];
|
||||
extern const BehaviorScript bhvScuttlebug[];
|
||||
extern const BehaviorScript bhvScuttlebugSpawn[];
|
||||
@@ -306,11 +306,11 @@ extern const BehaviorScript bhvWarps60[];
|
||||
extern const BehaviorScript bhvWarps64[];
|
||||
extern const BehaviorScript bhvWarps68[];
|
||||
extern const BehaviorScript bhvWarps6C[];
|
||||
extern const BehaviorScript bhvWarps70[];
|
||||
extern const BehaviorScript bhvDeathWarp[];
|
||||
extern const BehaviorScript bhvWarps74[];
|
||||
extern const BehaviorScript bhvWarps78[];
|
||||
extern const BehaviorScript bhvWarps7C[];
|
||||
extern const BehaviorScript bhvWarps80[];
|
||||
extern const BehaviorScript bhvPaintingDeathWarp[];
|
||||
extern const BehaviorScript bhvWarps84[];
|
||||
extern const BehaviorScript bhvWarps88[];
|
||||
extern const BehaviorScript bhvWarps8C[];
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user