Refresh 14

This commit is contained in:
n64 2021-07-12 23:17:54 -04:00
parent ecd3d152fb
commit f9982e0ef5
251 changed files with 7496 additions and 5757 deletions

46
CHANGES
View File

@ -1,3 +1,49 @@
Refresh 14
1.) Label whomp and some object fields (#1174)
2.) Generate MIO0 object files using binutils `ld` instead of `as` (#1173)
3.) Bowser documentation (#1166)
4.) Fix comment syntax in 00_sound_player.0 (#1172)
5.) Rename in-game menu variables (#1163)
6.) Document double red coin sound and JP sound glitch (#1170)
7.) Document different bug in external.c (#1168)
8.) updated names/types of octagonal platform data (#1164)
9.) Label a number of unnamed variables. (#1169)
10.) Document JP PU sound glitch (#1167)
11.) Set model ids to spawn_triangle_break_particles (#1165)
12.) Fix borders in clear_frame_buffer (#1162)
13.) Fix seq header files for 64-bit (#1161)
14.) Game_init.c remaining doc (#1158)
15.) Label a couple static variables in sound_init.c (#1159)
16.) Properly define dialog values (status, flags, cutscenes) (#1153)
17.) Label all of amp's assets. (#1018)
18.) Split audio/synthesis.c into Shindou/non-Shindou files (#1144)
19.) Avoid CC_CHECK warnings when using gcc (#1157)
20.) level_select_menu.c => title_screen.c (#1152)
21.) Use C preprocessor on assembly files (#1126)
22.) Replace output_level_headers.py with sed equivalent (#1109)
23.) Fix CC_CHECK warnings related to unused symbols and UB (#1155)
24.) Define remaining floor lower limit values (#1147)
25.) use r+b mode for libultra.a patch tool (#1148)
26.) Use proper values for gPrevFrameObjectCount ifs (#1146)
27.) Some minor bowser.inc.c labelling. (#1150)
28.) fix king bob-omb texture pointers (#1145)
29.) Split audio/load.c into Shindou/non-Shindou files (#1143)
30.) Small Shindou audio cleanups (#1142)
31.) Fix endians in ALSeqData (#1141)
32.) Document S8 decoder rsp operation and some more (#1139)
33.) Fix Shindou synthesis_process_note fake match (#1140)
34.) More audio documentation, for the new rsp code and other fixes (#1138)
35.) Build fixes for macOS: cpp, clang, recomp, aiff_extract_codebook (#1135)
36.) Add ENABLE_RUMBLE to config.h (#1122)
37.) Reduce recomp memory consumption by using smaller disassembly blocks (#1128)
38.) Makefile fixes (#1123)
39.) Update README.md
40.) Update README.md
41.) Reflect current decompilation status
42.) Allow both archives and ELF objects to be patched (#1127)
43.) Remove WIP mention in README for sh version.
Refresh 13 2 Refresh 13 2
- No more nonmatchings remain for all builds including Shindou. - No more nonmatchings remain for all builds including Shindou.

View File

@ -304,12 +304,6 @@ else
COPT := $(IDO_ROOT)/copt COPT := $(IDO_ROOT)/copt
endif endif
endif endif
# Prefer gcc's cpp if installed on the system
ifneq (,$(call find-command,cpp-10))
CPP := cpp-10
else
CPP := cpp
endif
LD := $(CROSS)ld LD := $(CROSS)ld
AR := $(CROSS)ar AR := $(CROSS)ar
OBJDUMP := $(CROSS)objdump OBJDUMP := $(CROSS)objdump
@ -328,6 +322,15 @@ endif
C_DEFINES := $(foreach d,$(DEFINES),-D$(d)) C_DEFINES := $(foreach d,$(DEFINES),-D$(d))
DEF_INC_CFLAGS := $(foreach i,$(INCLUDE_DIRS),-I$(i)) $(C_DEFINES) DEF_INC_CFLAGS := $(foreach i,$(INCLUDE_DIRS),-I$(i)) $(C_DEFINES)
# Prefer clang as C preprocessor if installed on the system
ifneq (,$(call find-command,clang))
CPP := clang
CPPFLAGS := -E -P -x c -Wno-trigraphs $(DEF_INC_CFLAGS)
else
CPP := cpp
CPPFLAGS := -P -Wno-trigraphs $(DEF_INC_CFLAGS)
endif
# Check code syntax with host compiler # Check code syntax with host compiler
CC_CHECK := gcc CC_CHECK := gcc
CC_CHECK_CFLAGS := -fsyntax-only -fsigned-char $(CC_CFLAGS) $(TARGET_CFLAGS) -std=gnu90 -Wall -Wextra -Wno-format-security -Wno-main -DNON_MATCHING -DAVOID_UB $(DEF_INC_CFLAGS) CC_CHECK_CFLAGS := -fsyntax-only -fsigned-char $(CC_CFLAGS) $(TARGET_CFLAGS) -std=gnu90 -Wall -Wextra -Wno-format-security -Wno-main -DNON_MATCHING -DAVOID_UB $(DEF_INC_CFLAGS)
@ -343,9 +346,6 @@ endif
ASFLAGS := -march=vr4300 -mabi=32 $(foreach i,$(INCLUDE_DIRS),-I$(i)) $(foreach d,$(DEFINES),--defsym $(d)) ASFLAGS := -march=vr4300 -mabi=32 $(foreach i,$(INCLUDE_DIRS),-I$(i)) $(foreach d,$(DEFINES),--defsym $(d))
RSPASMFLAGS := $(foreach d,$(DEFINES),-definelabel $(subst =, ,$(d))) RSPASMFLAGS := $(foreach d,$(DEFINES),-definelabel $(subst =, ,$(d)))
# C preprocessor flags
CPPFLAGS := -P -Wno-trigraphs $(DEF_INC_CFLAGS)
ifeq ($(shell getconf LONG_BIT), 32) ifeq ($(shell getconf LONG_BIT), 32)
# Work around memory allocation bug in QEMU # Work around memory allocation bug in QEMU
export QEMU_GUEST_BASE := 1 export QEMU_GUEST_BASE := 1
@ -437,7 +437,7 @@ $(SOUND_BIN_DIR)/sound_data.o: $(SOUND_BIN_DIR)/sound_data.ctl.inc.c $(SO
$(BUILD_DIR)/levels/scripts.o: $(BUILD_DIR)/include/level_headers.h $(BUILD_DIR)/levels/scripts.o: $(BUILD_DIR)/include/level_headers.h
ifeq ($(VERSION),sh) ifeq ($(VERSION),sh)
$(BUILD_DIR)/src/audio/load.o: $(SOUND_BIN_DIR)/bank_sets.inc.c $(SOUND_BIN_DIR)/sequences_header.inc.c $(SOUND_BIN_DIR)/ctl_header.inc.c $(SOUND_BIN_DIR)/tbl_header.inc.c $(BUILD_DIR)/src/audio/load_sh.o: $(SOUND_BIN_DIR)/bank_sets.inc.c $(SOUND_BIN_DIR)/sequences_header.inc.c $(SOUND_BIN_DIR)/ctl_header.inc.c $(SOUND_BIN_DIR)/tbl_header.inc.c
endif endif
$(CRASH_TEXTURE_C_FILES): TEXTURE_ENCODING := u32 $(CRASH_TEXTURE_C_FILES): TEXTURE_ENCODING := u32
@ -521,11 +521,11 @@ $(BUILD_DIR)/levels/%/leveldata.elf: $(BUILD_DIR)/levels/%/leveldata.o $(BUILD_D
$(V)$(LD) -e 0 -Ttext=$(SEGMENT_ADDRESS) -Map $@.map --just-symbols=$(BUILD_DIR)/bin/$(TEXTURE_BIN).elf -o $@ $< $(V)$(LD) -e 0 -Ttext=$(SEGMENT_ADDRESS) -Map $@.map --just-symbols=$(BUILD_DIR)/bin/$(TEXTURE_BIN).elf -o $@ $<
$(BUILD_DIR)/%.bin: $(BUILD_DIR)/%.elf $(BUILD_DIR)/%.bin: $(BUILD_DIR)/%.elf
$(call print,Extracting compressionable data from:,$<,$@) $(call print,Extracting compressible data from:,$<,$@)
$(V)$(EXTRACT_DATA_FOR_MIO) $< $@ $(V)$(EXTRACT_DATA_FOR_MIO) $< $@
$(BUILD_DIR)/levels/%/leveldata.bin: $(BUILD_DIR)/levels/%/leveldata.elf $(BUILD_DIR)/levels/%/leveldata.bin: $(BUILD_DIR)/levels/%/leveldata.elf
$(call print,Extracting compressionable data from:,$<,$@) $(call print,Extracting compressible data from:,$<,$@)
$(V)$(EXTRACT_DATA_FOR_MIO) $< $@ $(V)$(EXTRACT_DATA_FOR_MIO) $< $@
# Compress binary file # Compress binary file
@ -536,7 +536,7 @@ $(BUILD_DIR)/%.mio0: $(BUILD_DIR)/%.bin
# convert binary mio0 to object file # convert binary mio0 to object file
$(BUILD_DIR)/%.mio0.o: $(BUILD_DIR)/%.mio0 $(BUILD_DIR)/%.mio0.o: $(BUILD_DIR)/%.mio0
$(call print,Converting MIO0 to ELF:,$<,$@) $(call print,Converting MIO0 to ELF:,$<,$@)
$(V)printf ".section .data\n\n.incbin \"$<\"\n" | $(AS) $(ASFLAGS) -o $@ $(V)$(LD) -r -b binary $< -o $@
#==============================================================================# #==============================================================================#
@ -548,7 +548,7 @@ $(BUILD_DIR)/%.table: %.aiff
$(V)$(AIFF_EXTRACT_CODEBOOK) $< >$@ $(V)$(AIFF_EXTRACT_CODEBOOK) $< >$@
$(BUILD_DIR)/%.aifc: $(BUILD_DIR)/%.table %.aiff $(BUILD_DIR)/%.aifc: $(BUILD_DIR)/%.table %.aiff
$(call print,Encoding VADPCM:,$<,$@) $(call print,Encoding ADPCM:,$(word 2,$^),$@)
$(V)$(VADPCM_ENC) -c $^ $@ $(V)$(VADPCM_ENC) -c $^ $@
$(ENDIAN_BITWIDTH): $(TOOLS_DIR)/determine-endian-bitwidth.c $(ENDIAN_BITWIDTH): $(TOOLS_DIR)/determine-endian-bitwidth.c
@ -556,8 +556,8 @@ $(ENDIAN_BITWIDTH): $(TOOLS_DIR)/determine-endian-bitwidth.c
$(V)$(CC) -c $(CFLAGS) -o $@.dummy2 $< 2>$@.dummy1; true $(V)$(CC) -c $(CFLAGS) -o $@.dummy2 $< 2>$@.dummy1; true
$(V)grep -o 'msgbegin --endian .* --bitwidth .* msgend' $@.dummy1 > $@.dummy2 $(V)grep -o 'msgbegin --endian .* --bitwidth .* msgend' $@.dummy1 > $@.dummy2
$(V)head -n1 <$@.dummy2 | cut -d' ' -f2-5 > $@ $(V)head -n1 <$@.dummy2 | cut -d' ' -f2-5 > $@
@$(RM) $@.dummy1 $(V)$(RM) $@.dummy1
@$(RM) $@.dummy2 $(V)$(RM) $@.dummy2
$(SOUND_BIN_DIR)/sound_data.ctl: sound/sound_banks/ $(SOUND_BANK_FILES) $(SOUND_SAMPLE_AIFCS) $(ENDIAN_BITWIDTH) $(SOUND_BIN_DIR)/sound_data.ctl: sound/sound_banks/ $(SOUND_BANK_FILES) $(SOUND_SAMPLE_AIFCS) $(ENDIAN_BITWIDTH)
@$(PRINT) "$(GREEN)Generating: $(BLUE)$@ $(NO_COL)\n" @$(PRINT) "$(GREEN)Generating: $(BLUE)$@ $(NO_COL)\n"
@ -593,7 +593,7 @@ $(SOUND_BIN_DIR)/%.m64: $(SOUND_BIN_DIR)/%.o
# Convert binary file to a comma-separated list of byte values for inclusion in C code # Convert binary file to a comma-separated list of byte values for inclusion in C code
$(BUILD_DIR)/%.inc.c: $(BUILD_DIR)/% $(BUILD_DIR)/%.inc.c: $(BUILD_DIR)/%
$(call print,Piping:,$<,$@) $(call print,Converting to C:,$<,$@)
$(V)hexdump -v -e '1/1 "0x%X,"' $< > $@ $(V)hexdump -v -e '1/1 "0x%X,"' $< > $@
$(V)echo >> $@ $(V)echo >> $@
@ -624,7 +624,7 @@ $(BUILD_DIR)/text/%/define_text.inc.c: text/define_text.inc.c text/%/courses.h t
# Level headers # Level headers
$(BUILD_DIR)/include/level_headers.h: levels/level_headers.h.in $(BUILD_DIR)/include/level_headers.h: levels/level_headers.h.in
$(call print,Preprocessing level headers:,$<,$@) $(call print,Preprocessing level headers:,$<,$@)
$(V)$(CPP) $(CPPFLAGS) -I . levels/level_headers.h.in | $(PYTHON) $(TOOLS_DIR)/output_level_headers.py > $(BUILD_DIR)/include/level_headers.h $(V)$(CPP) $(CPPFLAGS) -I . $< | sed -E 's|(.+)|#include "\1"|' > $@
# Run asm_processor on files that have NON_MATCHING code # Run asm_processor on files that have NON_MATCHING code
ifeq ($(NON_MATCHING),0) ifeq ($(NON_MATCHING),0)
@ -667,46 +667,36 @@ ifeq ($(COMPILER),ido)
$(BUILD_DIR)/lib/src/string.o: OPT_FLAGS := -O2 $(BUILD_DIR)/lib/src/string.o: OPT_FLAGS := -O2
$(BUILD_DIR)/lib/src/gu%.o: OPT_FLAGS := -O3 $(BUILD_DIR)/lib/src/gu%.o: OPT_FLAGS := -O3
$(BUILD_DIR)/lib/src/al%.o: OPT_FLAGS := -O3 $(BUILD_DIR)/lib/src/al%.o: OPT_FLAGS := -O3
# For the asm-processor, since it doesn't support -O3. Probably not actually compiled with these flags.
ifeq ($(VERSION),sh) ifeq ($(VERSION),sh)
$(BUILD_DIR)/lib/src/unk_shindou_file.o: OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/_Ldtob.o: OPT_FLAGS := -O3
$(BUILD_DIR)/lib/src/func_sh_80304D20.o: OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/_Litob.o: OPT_FLAGS := -O3
$(BUILD_DIR)/lib/src/_Printf.o: OPT_FLAGS := -O3 $(BUILD_DIR)/lib/src/_Printf.o: OPT_FLAGS := -O3
$(BUILD_DIR)/lib/src/contramread.o: OPT_FLAGS := -O1 $(BUILD_DIR)/lib/src/sprintf.o: OPT_FLAGS := -O3
$(BUILD_DIR)/lib/src/osPfsIsPlug.o: OPT_FLAGS := -O1
$(BUILD_DIR)/lib/src/osAiSetFrequency.o: OPT_FLAGS := -O1
$(BUILD_DIR)/lib/src/contramwrite.o: OPT_FLAGS := -O1
$(BUILD_DIR)/lib/src/sprintf.o: OPT_FLAGS := -O3
$(BUILD_DIR)/lib/src/_Litob.o: OPT_FLAGS := -O3
$(BUILD_DIR)/lib/src/_Ldtob.o: OPT_FLAGS := -O3
$(BUILD_DIR)/lib/src/osDriveRomInit.o: OPT_FLAGS := -g $(BUILD_DIR)/lib/src/osDriveRomInit.o: OPT_FLAGS := -g
endif endif
ifeq ($(VERSION),eu) ifeq ($(VERSION),eu)
$(BUILD_DIR)/lib/src/_Litob.o: OPT_FLAGS := -O3
$(BUILD_DIR)/lib/src/_Ldtob.o: OPT_FLAGS := -O3 $(BUILD_DIR)/lib/src/_Ldtob.o: OPT_FLAGS := -O3
$(BUILD_DIR)/lib/src/_Litob.o: OPT_FLAGS := -O3
$(BUILD_DIR)/lib/src/_Printf.o: OPT_FLAGS := -O3 $(BUILD_DIR)/lib/src/_Printf.o: OPT_FLAGS := -O3
$(BUILD_DIR)/lib/src/sprintf.o: OPT_FLAGS := -O3 $(BUILD_DIR)/lib/src/sprintf.o: OPT_FLAGS := -O3
# Enable loop unrolling except for external.c (external.c might also have used
# unrolling, but it makes one loop harder to match).
# For all audio files other than external.c and port_eu.c, put string literals # For all audio files other than external.c and port_eu.c, put string literals
# in .data. (In Shindou, the port_eu.c string literals also moved to .data.) # in .data. (In Shindou, the port_eu.c string literals also moved to .data.)
$(BUILD_DIR)/src/audio/%.o: OPT_FLAGS := -O2 -use_readwrite_const $(BUILD_DIR)/src/audio/%.o: OPT_FLAGS := -O2 -use_readwrite_const
$(BUILD_DIR)/src/audio/port_eu.o: OPT_FLAGS := -O2 $(BUILD_DIR)/src/audio/port_eu.o: OPT_FLAGS := -O2
$(BUILD_DIR)/src/audio/external.o: OPT_FLAGS := -O2 -Wo,-loopunroll,0
endif endif
ifeq ($(VERSION_JP_US),true) ifeq ($(VERSION_JP_US),true)
$(BUILD_DIR)/src/audio/%.o: OPT_FLAGS := -O2 -Wo,-loopunroll,0 $(BUILD_DIR)/src/audio/%.o: OPT_FLAGS := -O2 -Wo,-loopunroll,0
$(BUILD_DIR)/src/audio/load.o: OPT_FLAGS := -O2 -framepointer -Wo,-loopunroll,0 $(BUILD_DIR)/src/audio/load.o: OPT_FLAGS := -O2 -Wo,-loopunroll,0 -framepointer
endif
ifeq ($(VERSION_JP_US),true)
# The source-to-source optimizer copt is enabled for audio. This makes it use # The source-to-source optimizer copt is enabled for audio. This makes it use
# acpp, which needs -Wp,-+ to handle C++-style comments. # acpp, which needs -Wp,-+ to handle C++-style comments.
# All other files than external.c should really use copt, but only a few have # All other files than external.c should really use copt, but only a few have
# been matched so far. # been matched so far.
$(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/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,-+ $(BUILD_DIR)/src/audio/synthesis.o: OPT_FLAGS := -O2 -Wo,-loopunroll,0 -sopt,-scalaroptimize=1 -Wp,-+
endif endif
$(BUILD_DIR)/src/audio/external.o: OPT_FLAGS := -O2 -Wo,-loopunroll,0
# Add a target for build/eu/src/audio/*.copt to make it easier to see debug # Add a target for build/eu/src/audio/*.copt to make it easier to see debug
$(BUILD_DIR)/src/audio/%.acpp: src/audio/%.c $(BUILD_DIR)/src/audio/%.acpp: src/audio/%.c
@ -720,7 +710,7 @@ endif
# Assemble assembly code # Assemble assembly code
$(BUILD_DIR)/%.o: %.s $(BUILD_DIR)/%.o: %.s
$(call print,Assembling:,$<,$@) $(call print,Assembling:,$<,$@)
$(V)$(AS) $(ASFLAGS) -MD $(BUILD_DIR)/$*.d -o $@ $< $(V)$(CPP) $(CPPFLAGS) $< | $(AS) $(ASFLAGS) -MD $(BUILD_DIR)/$*.d -o $@
# Assemble RSP assembly code # Assemble RSP assembly code
$(BUILD_DIR)/rsp/%.bin $(BUILD_DIR)/rsp/%_data.bin: rsp/%.s $(BUILD_DIR)/rsp/%.bin $(BUILD_DIR)/rsp/%_data.bin: rsp/%.s
@ -736,7 +726,7 @@ $(BUILD_DIR)/$(LD_SCRIPT): $(LD_SCRIPT)
$(BUILD_DIR)/libultra.a: $(ULTRA_O_FILES) $(BUILD_DIR)/libultra.a: $(ULTRA_O_FILES)
@$(PRINT) "$(GREEN)Linking libultra: $(BLUE)$@ $(NO_COL)\n" @$(PRINT) "$(GREEN)Linking libultra: $(BLUE)$@ $(NO_COL)\n"
$(V)$(AR) rcs -o $@ $(ULTRA_O_FILES) $(V)$(AR) rcs -o $@ $(ULTRA_O_FILES)
$(V)$(TOOLS_DIR)/patch_libultra_math $@ $(V)$(TOOLS_DIR)/patch_elf_32bit $@
# Link libgoddard # Link libgoddard
$(BUILD_DIR)/libgoddard.a: $(GODDARD_O_FILES) $(BUILD_DIR)/libgoddard.a: $(GODDARD_O_FILES)

View File

@ -161,8 +161,8 @@ endef
ifneq ($(MAKECMDGOALS),clean) ifneq ($(MAKECMDGOALS),clean)
ifneq ($(MAKECMDGOALS),distclean) ifneq ($(MAKECMDGOALS),distclean)
$(BUILD_DIR)/level_rules.mk: levels/level_rules.mk levels/level_defines.h $(BUILD_DIR)/level_rules.mk: levels/level_rules.mk levels/level_defines.h
@$(PRINT) "$(GREEN)Preprocessing level make rules: $(BLUE)$@ $(NO_COL)\n" $(call print,Preprocessing level make rules:,$<,$@)
@$(CPP) $(VERSION_CFLAGS) -I . -o $@ $< $(V)$(CPP) $(CPPFLAGS) $(VERSION_CFLAGS) -I . -o $@ $<
include $(BUILD_DIR)/level_rules.mk include $(BUILD_DIR)/level_rules.mk
endif endif
endif endif
@ -179,11 +179,11 @@ $(eval $(call level_rules,menu,generic)) # Menu (File Select)
# Ending cake textures are generated in a special way # Ending cake textures are generated in a special way
$(BUILD_DIR)/levels/ending/cake_eu.inc.c: levels/ending/cake_eu.png $(BUILD_DIR)/levels/ending/cake_eu.inc.c: levels/ending/cake_eu.png
@$(PRINT) "$(GREEN)Splitting $(YELLOW)$< $(GREEN)to: $(BLUE)$@ $(NO_COL)\n" $(call print,Splitting:,$<,$@)
@$(SKYCONV) --type cake-eu --split $^ $(BUILD_DIR)/levels/ending $(V)$(SKYCONV) --type cake-eu --split $^ $(BUILD_DIR)/levels/ending
$(BUILD_DIR)/levels/ending/cake.inc.c: levels/ending/cake.png $(BUILD_DIR)/levels/ending/cake.inc.c: levels/ending/cake.png
@$(PRINT) "$(GREEN)Splitting $(YELLOW)$< $(GREEN)to: $(BLUE)$@ $(NO_COL)\n" $(call print,Splitting:,$<,$@)
@$(SKYCONV) --type cake --split $^ $(BUILD_DIR)/levels/ending $(V)$(SKYCONV) --type cake --split $^ $(BUILD_DIR)/levels/ending
# -------------------------------------- # --------------------------------------
# Texture Bin Rules # Texture Bin Rules
@ -250,8 +250,8 @@ $(BUILD_DIR)/bin/eu/translation_fr.elf: SEGMENT_ADDRESS := 0x19000000
# -------------------------------------- # --------------------------------------
$(BUILD_DIR)/bin/%_skybox.c: textures/skyboxes/%.png $(BUILD_DIR)/bin/%_skybox.c: textures/skyboxes/%.png
@$(PRINT) "$(GREEN)Splitting $(YELLOW)$< $(GREEN)to: $(BLUE)$@ $(NO_COL)\n" $(call print,Splitting:,$<,$@)
@$(SKYCONV) --type sky --split $^ $(BUILD_DIR)/bin $(V)$(SKYCONV) --type sky --split $^ $(BUILD_DIR)/bin
$(BUILD_DIR)/bin/%_skybox.elf: SEGMENT_ADDRESS := 0x0A000000 $(BUILD_DIR)/bin/%_skybox.elf: SEGMENT_ADDRESS := 0x0A000000

View File

@ -95,10 +95,10 @@ Resulting artifacts can be found in the `build` directory.
The full list of configurable variables are listed below, with the default being the first listed: The full list of configurable variables are listed below, with the default being the first listed:
* ``VERSION``: ``us``, ``jp``, ``eu``, ``sh`` (WIP) * ``VERSION``: ``us``, ``jp``, ``eu``, ``sh``
* ``GRUCODE``: ``f3d_old``, ``f3d_new``, ``f3dex``, ``f3dex2``, ``f3dzex`` * ``GRUCODE``: ``f3d_old``, ``f3d_new``, ``f3dex``, ``f3dex2``, ``f3dzex``
* ``COMPARE``: ``1`` (compare ROM hash), ``0`` (do not compare ROM hash) * ``COMPARE``: ``1`` (compare ROM hash), ``0`` (do not compare ROM hash)
* ``NON_MATCHING``: Use functionally equivalent C implementations for non-matchings (Currently there aren't any non-matchings, but this will apply to Shindou and iQue). Also will avoid instances of undefined behavior. * ``NON_MATCHING``: Use functionally equivalent C implementations for non-matchings (Currently there aren't any non-matchings, but this will apply to iQue). Also will avoid instances of undefined behavior.
* ``CROSS``: Cross-compiler tool prefix (Example: ``mips64-elf-``). * ``CROSS``: Cross-compiler tool prefix (Example: ``mips64-elf-``).
### macOS ### macOS
@ -111,7 +111,7 @@ With macOS, you may either use Homebrew or [Docker](#docker-installation).
Install [Homebrew](https://brew.sh) and the following dependencies: Install [Homebrew](https://brew.sh) and the following dependencies:
``` ```
brew update brew update
brew install capstone coreutils gcc make pkg-config tehzz/n64-dev/mips64-elf-binutils brew install capstone coreutils make pkg-config tehzz/n64-dev/mips64-elf-binutils
``` ```
#### Step 2: Copy baserom(s) for asset extraction #### Step 2: Copy baserom(s) for asset extraction

View File

@ -1,5 +1,4 @@
// 0x08003E30 static const s16 dAmpAnimValue[] = {
static const s16 amp_seg8_animvalue_08003E30[] = {
0x0000, 0x0000, 0x0D79, 0x1AF2, 0x286B, 0x35E4, 0x435D, 0x50D6, 0x0000, 0x0000, 0x0D79, 0x1AF2, 0x286B, 0x35E4, 0x435D, 0x50D6,
0x5E50, 0x6BC9, 0x7942, 0x86BE, 0x9437, 0xA1B0, 0xAF2A, 0xBCA3, 0x5E50, 0x6BC9, 0x7942, 0x86BE, 0x9437, 0xA1B0, 0xAF2A, 0xBCA3,
0xCA1C, 0xD795, 0xE50E, 0xF287, 0x1872, 0x0000, 0x1AF2, 0x35E4, 0xCA1C, 0xD795, 0xE50E, 0xF287, 0x1872, 0x0000, 0x1AF2, 0x35E4,
@ -23,8 +22,7 @@ static const s16 amp_seg8_animvalue_08003E30[] = {
0xC001, 0x3FFF, 0xC001, 0x3FFF,
}; };
// 0x08003F74 static const u16 dAmpAnimIndex[] = {
static const u16 amp_seg8_animindex_08003F74[] = {
0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000,
0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x00A1, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x00A1,
0x0001, 0x0000, 0x0013, 0x008D, 0x0001, 0x00A0, 0x0001, 0x0000, 0x0013, 0x008D, 0x0001, 0x00A0,
@ -40,15 +38,14 @@ static const u16 amp_seg8_animindex_08003F74[] = {
0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x004E, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x004E,
}; };
// 0x0800401C static const struct Animation dAmpAnimation = {
static const struct Animation amp_seg8_anim_0800401C = {
0, 0,
0, 0,
0, 0,
0, 0,
0x13, 0x13,
ANIMINDEX_NUMPARTS(amp_seg8_animindex_08003F74), ANIMINDEX_NUMPARTS(dAmpAnimIndex),
amp_seg8_animvalue_08003E30, dAmpAnimValue,
amp_seg8_animindex_08003F74, dAmpAnimIndex,
0, 0,
}; };

View File

@ -1 +1 @@
#include "anim_0800401C.inc.c" #include "animation.inc.c"

View File

@ -1,4 +1,3 @@
// 0x08004034 const struct Animation *const dAmpAnimsList[] = {
const struct Animation *const amp_seg8_anims_08004034[] = { &dAmpAnimation,
&amp_seg8_anim_0800401C,
}; };

View File

@ -1,19 +1,18 @@
// 0x0F000028 const GeoLayout dAmpGeo[] = {
const GeoLayout amp_geo[] = {
GEO_SHADOW(SHADOW_CIRCLE_4_VERTS, 0xC8, 100), GEO_SHADOW(SHADOW_CIRCLE_4_VERTS, 0xC8, 100),
GEO_OPEN_NODE(), GEO_OPEN_NODE(),
GEO_SCALE(0x00, 16384), GEO_SCALE(0x00, 16384),
GEO_OPEN_NODE(), GEO_OPEN_NODE(),
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL), GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL),
GEO_OPEN_NODE(), GEO_OPEN_NODE(),
GEO_ANIMATED_PART(LAYER_ALPHA, 0, 0, 0, amp_seg8_dl_08002C88), GEO_ANIMATED_PART(LAYER_ALPHA, 0, 0, 0, dAmpEyeDl),
GEO_OPEN_NODE(), GEO_OPEN_NODE(),
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL), GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL),
GEO_OPEN_NODE(), GEO_OPEN_NODE(),
GEO_SWITCH_CASE(2, geo_switch_anim_state), GEO_SWITCH_CASE(2, geo_switch_anim_state),
GEO_OPEN_NODE(), GEO_OPEN_NODE(),
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL), GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL),
GEO_ANIMATED_PART(LAYER_ALPHA, 0, 0, 0, amp_seg8_dl_08002BA0), GEO_ANIMATED_PART(LAYER_ALPHA, 0, 0, 0, dAmpElectricityDl),
GEO_CLOSE_NODE(), GEO_CLOSE_NODE(),
GEO_CLOSE_NODE(), GEO_CLOSE_NODE(),
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL), GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL),
@ -21,7 +20,7 @@ const GeoLayout amp_geo[] = {
GEO_SWITCH_CASE(2, geo_switch_anim_state), GEO_SWITCH_CASE(2, geo_switch_anim_state),
GEO_OPEN_NODE(), GEO_OPEN_NODE(),
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL), GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL),
GEO_ANIMATED_PART(LAYER_ALPHA, 0, 0, 0, amp_seg8_dl_08002BA0), GEO_ANIMATED_PART(LAYER_ALPHA, 0, 0, 0, dAmpElectricityDl),
GEO_CLOSE_NODE(), GEO_CLOSE_NODE(),
GEO_CLOSE_NODE(), GEO_CLOSE_NODE(),
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL), GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL),
@ -29,7 +28,7 @@ const GeoLayout amp_geo[] = {
GEO_SWITCH_CASE(2, geo_switch_anim_state), GEO_SWITCH_CASE(2, geo_switch_anim_state),
GEO_OPEN_NODE(), GEO_OPEN_NODE(),
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL), GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL),
GEO_ANIMATED_PART(LAYER_ALPHA, 0, 0, 0, amp_seg8_dl_08002BA0), GEO_ANIMATED_PART(LAYER_ALPHA, 0, 0, 0, dAmpElectricityDl),
GEO_CLOSE_NODE(), GEO_CLOSE_NODE(),
GEO_CLOSE_NODE(), GEO_CLOSE_NODE(),
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL), GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL),
@ -37,16 +36,16 @@ const GeoLayout amp_geo[] = {
GEO_SWITCH_CASE(2, geo_switch_anim_state), GEO_SWITCH_CASE(2, geo_switch_anim_state),
GEO_OPEN_NODE(), GEO_OPEN_NODE(),
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL), GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL),
GEO_ANIMATED_PART(LAYER_ALPHA, 0, 0, 0, amp_seg8_dl_08002BA0), GEO_ANIMATED_PART(LAYER_ALPHA, 0, 0, 0, dAmpElectricityDl),
GEO_CLOSE_NODE(), GEO_CLOSE_NODE(),
GEO_CLOSE_NODE(), GEO_CLOSE_NODE(),
GEO_CLOSE_NODE(), GEO_CLOSE_NODE(),
GEO_ANIMATED_PART(LAYER_ALPHA, 0, 0, 0, amp_seg8_dl_08002D70), GEO_ANIMATED_PART(LAYER_ALPHA, 0, 0, 0, dAmpMouthDl),
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL), GEO_ANIMATED_PART(LAYER_OPAQUE, 0, 0, 0, NULL),
GEO_OPEN_NODE(), GEO_OPEN_NODE(),
GEO_BILLBOARD(), GEO_BILLBOARD(),
GEO_OPEN_NODE(), GEO_OPEN_NODE(),
GEO_DISPLAY_LIST(LAYER_ALPHA, amp_seg8_dl_08002E58), GEO_DISPLAY_LIST(LAYER_ALPHA, dAmpBodyDl),
GEO_CLOSE_NODE(), GEO_CLOSE_NODE(),
GEO_CLOSE_NODE(), GEO_CLOSE_NODE(),
GEO_CLOSE_NODE(), GEO_CLOSE_NODE(),

View File

@ -1,27 +1,22 @@
// Amp // Amp
// 0x08000F18 ALIGNED8 static const Texture dAmpElectricityTexture[] = {
ALIGNED8 static const Texture amp_seg8_texture_08000F18[] = {
#include "actors/amp/amp_electricity.rgba16.inc.c" #include "actors/amp/amp_electricity.rgba16.inc.c"
}; };
// 0x08001318 ALIGNED8 static const Texture dAmpEyesTexture[] = {
ALIGNED8 static const Texture amp_seg8_texture_08001318[] = {
#include "actors/amp/amp_eyes.rgba16.inc.c" #include "actors/amp/amp_eyes.rgba16.inc.c"
}; };
// 0x08001B18 ALIGNED8 static const Texture dAmpBodyTexture[] = {
ALIGNED8 static const Texture amp_seg8_texture_08001B18[] = {
#include "actors/amp/amp_body.rgba16.inc.c" #include "actors/amp/amp_body.rgba16.inc.c"
}; };
// 0x08002318 ALIGNED8 static const Texture dAmpMouthTexture[] = {
ALIGNED8 static const Texture amp_seg8_texture_08002318[] = {
#include "actors/amp/amp_mouth.rgba16.inc.c" #include "actors/amp/amp_mouth.rgba16.inc.c"
}; };
// 0x08002B18 static const Vtx dAmpElectricityVertices[] = {
static const Vtx amp_seg8_vertex_08002B18[] = {
{{{ 224, 0, -89}, 0, { 0, 480}, {0xff, 0xff, 0xff, 0xff}}}, {{{ 224, 0, -89}, 0, { 0, 480}, {0xff, 0xff, 0xff, 0xff}}},
{{{ 187, 149, 0}, 0, { 223, 1078}, {0xff, 0xff, 0xff, 0xff}}}, {{{ 187, 149, 0}, 0, { 223, 1078}, {0xff, 0xff, 0xff, 0xff}}},
{{{ 224, 0, 90}, 0, { 479, 478}, {0xff, 0xff, 0xff, 0xff}}}, {{{ 224, 0, 90}, 0, { 479, 478}, {0xff, 0xff, 0xff, 0xff}}},
@ -29,18 +24,16 @@ static const Vtx amp_seg8_vertex_08002B18[] = {
{{{ 224, 0, -89}, 0, { 0, 478}, {0xff, 0xff, 0xff, 0xff}}}, {{{ 224, 0, -89}, 0, { 0, 478}, {0xff, 0xff, 0xff, 0xff}}},
}; };
// 0x08002B68 - 0x08002BA0 const Gfx dAmpElectricitySubDl[] = {
const Gfx amp_seg8_dl_08002B68[] = { gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, dAmpElectricityTexture),
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, amp_seg8_texture_08000F18),
gsDPLoadSync(), gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 16 * 32 - 1, CALC_DXT(16, G_IM_SIZ_16b_BYTES)), gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 16 * 32 - 1, CALC_DXT(16, G_IM_SIZ_16b_BYTES)),
gsSPVertex(amp_seg8_vertex_08002B18, 5, 0), gsSPVertex(dAmpElectricityVertices, 5, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 2, 3, 4, 0x0), gsSP2Triangles( 0, 1, 2, 0x0, 2, 3, 4, 0x0),
gsSPEndDisplayList(), gsSPEndDisplayList(),
}; };
// 0x08002BA0 - 0x08002C10 const Gfx dAmpElectricityDl[] = {
const Gfx amp_seg8_dl_08002BA0[] = {
gsDPPipeSync(), gsDPPipeSync(),
gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA), gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA),
gsSPClearGeometryMode(G_LIGHTING | G_CULL_BACK), gsSPClearGeometryMode(G_LIGHTING | G_CULL_BACK),
@ -49,7 +42,7 @@ const Gfx amp_seg8_dl_08002BA0[] = {
gsDPTileSync(), gsDPTileSync(),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 4, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_CLAMP, 4, G_TX_NOLOD), gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 4, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_CLAMP, 4, G_TX_NOLOD),
gsDPSetTileSize(0, 0, 0, (16 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC), gsDPSetTileSize(0, 0, 0, (16 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC),
gsSPDisplayList(amp_seg8_dl_08002B68), gsSPDisplayList(dAmpElectricitySubDl),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
gsDPPipeSync(), gsDPPipeSync(),
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE), gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
@ -57,26 +50,23 @@ const Gfx amp_seg8_dl_08002BA0[] = {
gsSPEndDisplayList(), gsSPEndDisplayList(),
}; };
// 0x08002C10 static const Vtx dAmpEyeVertices[] = {
static const Vtx amp_seg8_vertex_08002C10[] = {
{{{ 68, 72, 158}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}}, {{{ 68, 72, 158}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
{{{ -27, -71, 164}, 0, { 990, 990}, {0xff, 0xff, 0xff, 0xff}}}, {{{ -27, -71, 164}, 0, { 990, 990}, {0xff, 0xff, 0xff, 0xff}}},
{{{ 68, -71, 158}, 0, { 990, 0}, {0xff, 0xff, 0xff, 0xff}}}, {{{ 68, -71, 158}, 0, { 990, 0}, {0xff, 0xff, 0xff, 0xff}}},
{{{ -27, 72, 164}, 0, { 0, 990}, {0xff, 0xff, 0xff, 0xff}}}, {{{ -27, 72, 164}, 0, { 0, 990}, {0xff, 0xff, 0xff, 0xff}}},
}; };
// 0x08002C50 - 0x08002C88 const Gfx dAmpEyeSubDl[] = {
const Gfx amp_seg8_dl_08002C50[] = { gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, dAmpEyesTexture),
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, amp_seg8_texture_08001318),
gsDPLoadSync(), gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)), gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPVertex(amp_seg8_vertex_08002C10, 4, 0), gsSPVertex(dAmpEyeVertices, 4, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 3, 1, 0x0), gsSP2Triangles( 0, 1, 2, 0x0, 0, 3, 1, 0x0),
gsSPEndDisplayList(), gsSPEndDisplayList(),
}; };
// 0x08002C88 - 0x08002CF8 const Gfx dAmpEyeDl[] = {
const Gfx amp_seg8_dl_08002C88[] = {
gsDPPipeSync(), gsDPPipeSync(),
gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA), gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA),
gsSPClearGeometryMode(G_LIGHTING), gsSPClearGeometryMode(G_LIGHTING),
@ -85,7 +75,7 @@ const Gfx amp_seg8_dl_08002C88[] = {
gsDPTileSync(), gsDPTileSync(),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD), gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD),
gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC), gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC),
gsSPDisplayList(amp_seg8_dl_08002C50), gsSPDisplayList(dAmpEyeSubDl),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
gsDPPipeSync(), gsDPPipeSync(),
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE), gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
@ -93,26 +83,23 @@ const Gfx amp_seg8_dl_08002C88[] = {
gsSPEndDisplayList(), gsSPEndDisplayList(),
}; };
// 0x08002CF8 static const Vtx dAmpMouthVertices[] = {
static const Vtx amp_seg8_vertex_08002CF8[] = {
{{{ -29, 72, 164}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}}, {{{ -29, 72, 164}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
{{{ -124, -71, 121}, 0, { 990, 990}, {0xff, 0xff, 0xff, 0xff}}}, {{{ -124, -71, 121}, 0, { 990, 990}, {0xff, 0xff, 0xff, 0xff}}},
{{{ -29, -71, 164}, 0, { 990, 0}, {0xff, 0xff, 0xff, 0xff}}}, {{{ -29, -71, 164}, 0, { 990, 0}, {0xff, 0xff, 0xff, 0xff}}},
{{{ -124, 72, 121}, 0, { 0, 990}, {0xff, 0xff, 0xff, 0xff}}}, {{{ -124, 72, 121}, 0, { 0, 990}, {0xff, 0xff, 0xff, 0xff}}},
}; };
// 0x08002D38 - 0x08002D70 const Gfx dAmpMouthSubDl[] = {
const Gfx amp_seg8_dl_08002D38[] = { gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, dAmpMouthTexture),
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, amp_seg8_texture_08002318),
gsDPLoadSync(), gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)), gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPVertex(amp_seg8_vertex_08002CF8, 4, 0), gsSPVertex(dAmpMouthVertices, 4, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 3, 1, 0x0), gsSP2Triangles( 0, 1, 2, 0x0, 0, 3, 1, 0x0),
gsSPEndDisplayList(), gsSPEndDisplayList(),
}; };
// 0x08002D70 - 0x08002DE0 const Gfx dAmpMouthDl[] = {
const Gfx amp_seg8_dl_08002D70[] = {
gsDPPipeSync(), gsDPPipeSync(),
gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA), gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA),
gsSPClearGeometryMode(G_LIGHTING), gsSPClearGeometryMode(G_LIGHTING),
@ -121,7 +108,7 @@ const Gfx amp_seg8_dl_08002D70[] = {
gsDPTileSync(), gsDPTileSync(),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD), gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD),
gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC), gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC),
gsSPDisplayList(amp_seg8_dl_08002D38), gsSPDisplayList(dAmpMouthSubDl),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
gsDPPipeSync(), gsDPPipeSync(),
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE), gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
@ -129,26 +116,23 @@ const Gfx amp_seg8_dl_08002D70[] = {
gsSPEndDisplayList(), gsSPEndDisplayList(),
}; };
// 0x08002DE0 static const Vtx dAmpBodyVertices[] = {
static const Vtx amp_seg8_vertex_08002DE0[] = {
{{{ -39, -39, 0}, 0, { 0, 990}, {0xff, 0xff, 0xff, 0xff}}}, {{{ -39, -39, 0}, 0, { 0, 990}, {0xff, 0xff, 0xff, 0xff}}},
{{{ 40, 40, 0}, 0, { 990, 0}, {0xff, 0xff, 0xff, 0xff}}}, {{{ 40, 40, 0}, 0, { 990, 0}, {0xff, 0xff, 0xff, 0xff}}},
{{{ -39, 40, 0}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}}, {{{ -39, 40, 0}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
{{{ 40, -39, 0}, 0, { 990, 990}, {0xff, 0xff, 0xff, 0xff}}}, {{{ 40, -39, 0}, 0, { 990, 990}, {0xff, 0xff, 0xff, 0xff}}},
}; };
// 0x08002E20 - 0x08002E58 const Gfx dAmpBodySubDl[] = {
const Gfx amp_seg8_dl_08002E20[] = { gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, dAmpBodyTexture),
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, amp_seg8_texture_08001B18),
gsDPLoadSync(), gsDPLoadSync(),
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)), gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPVertex(amp_seg8_vertex_08002DE0, 4, 0), gsSPVertex(dAmpBodyVertices, 4, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 3, 1, 0x0), gsSP2Triangles( 0, 1, 2, 0x0, 0, 3, 1, 0x0),
gsSPEndDisplayList(), gsSPEndDisplayList(),
}; };
// 0x08002E58 - 0x08002EC8 const Gfx dAmpBodyDl[] = {
const Gfx amp_seg8_dl_08002E58[] = {
gsDPPipeSync(), gsDPPipeSync(),
gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA), gsDPSetCombineMode(G_CC_DECALRGBA, G_CC_DECALRGBA),
gsSPClearGeometryMode(G_LIGHTING), gsSPClearGeometryMode(G_LIGHTING),
@ -157,7 +141,7 @@ const Gfx amp_seg8_dl_08002E58[] = {
gsDPTileSync(), gsDPTileSync(),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD), gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD),
gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC), gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC),
gsSPDisplayList(amp_seg8_dl_08002E20), gsSPDisplayList(dAmpBodySubDl),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
gsDPPipeSync(), gsDPPipeSync(),
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE), gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
@ -165,15 +149,18 @@ const Gfx amp_seg8_dl_08002E58[] = {
gsSPEndDisplayList(), gsSPEndDisplayList(),
}; };
// 0x08002EC8 /**
static const Lights1 amp_seg8_lights_08002EC8 = gdSPDefLights1( * Everything beyond this point is unused, and seems to be an attempt at a 3D modelled
* amp. The model and attempt are overall slightly buggy, with misread lights and a slightly
* broken model.
*/
UNUSED static const Lights1 dAmpUnused3DLights = gdSPDefLights1(
0x33, 0x3f, 0x00, 0x33, 0x3f, 0x00,
0xcf, 0xff, 0x00, 0x28, 0x28, 0x28 0xcf, 0xff, 0x00, 0x28, 0x28, 0x28
); );
// //! Another malformed entry: Vertex interpreted as light UNUSED static const Vtx dAmpUnused3DVtx01[] = {
// 0x08002EE0
static const Vtx amp_seg8_vertex_08002EE0[] = {
{{{ 280, 0, 35}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0x00}}}, {{{ 280, 0, 35}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0x00}}},
{{{ 240, -160, 0}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0x00}}}, {{{ 240, -160, 0}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0x00}}},
{{{ 280, 0, -35}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0x00}}}, {{{ 280, 0, -35}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0x00}}},
@ -182,8 +169,7 @@ static const Vtx amp_seg8_vertex_08002EE0[] = {
{{{ 280, 0, 35}, 0, { 0, 0}, {0x7b, 0x1e, 0x00, 0xff}}}, {{{ 280, 0, 35}, 0, { 0, 0}, {0x7b, 0x1e, 0x00, 0xff}}},
}; };
// 0x08002F40 UNUSED static const Vtx dAmpUnused3DVtx02[] = {
static const Vtx amp_seg8_vertex_08002F40[] = {
{{{ 280, 0, 35}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0x00}}}, {{{ 280, 0, 35}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0x00}}},
{{{ 240, -160, 0}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0x00}}}, {{{ 240, -160, 0}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0x00}}},
{{{ 280, 0, -35}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0x00}}}, {{{ 280, 0, -35}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0x00}}},
@ -192,8 +178,7 @@ static const Vtx amp_seg8_vertex_08002F40[] = {
{{{ 280, 0, 35}, 0, { 0, 0}, {0x7b, 0x1e, 0x00, 0xff}}}, {{{ 280, 0, 35}, 0, { 0, 0}, {0x7b, 0x1e, 0x00, 0xff}}},
}; };
// 0x08002FA0 UNUSED static const Vtx dAmpUnused3DVtx03[] = {
static const Vtx amp_seg8_vertex_08002FA0[] = {
{{{ 280, 0, 35}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0x00}}}, {{{ 280, 0, 35}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0x00}}},
{{{ 240, -160, 0}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0x00}}}, {{{ 240, -160, 0}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0x00}}},
{{{ 280, 0, -35}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0x00}}}, {{{ 280, 0, -35}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0x00}}},
@ -202,8 +187,7 @@ static const Vtx amp_seg8_vertex_08002FA0[] = {
{{{ 280, 0, 35}, 0, { 0, 0}, {0x7b, 0x1e, 0x00, 0xff}}}, {{{ 280, 0, 35}, 0, { 0, 0}, {0x7b, 0x1e, 0x00, 0xff}}},
}; };
// 0x08003000 UNUSED static const Vtx dAmpUnused3DVtx04[] = {
static const Vtx amp_seg8_vertex_08003000[] = {
{{{ 280, 0, -35}, 0, { 0, 0}, {0x7b, 0x1e, 0x00, 0x00}}}, {{{ 280, 0, -35}, 0, { 0, 0}, {0x7b, 0x1e, 0x00, 0x00}}},
{{{ 240, 160, 0}, 0, { 0, 0}, {0x7b, 0x1e, 0x00, 0x00}}}, {{{ 240, 160, 0}, 0, { 0, 0}, {0x7b, 0x1e, 0x00, 0x00}}},
{{{ 280, 0, 35}, 0, { 0, 0}, {0x7b, 0x1e, 0x00, 0x00}}}, {{{ 280, 0, 35}, 0, { 0, 0}, {0x7b, 0x1e, 0x00, 0x00}}},
@ -212,8 +196,7 @@ static const Vtx amp_seg8_vertex_08003000[] = {
{{{ 280, 0, -35}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0xff}}}, {{{ 280, 0, -35}, 0, { 0, 0}, {0x7b, 0xe2, 0x00, 0xff}}},
}; };
// 0x08003060 UNUSED static const Vtx dAmpUnused3DVtx05[] = {
static const Vtx amp_seg8_vertex_08003060[] = {
{{{ -184, -54, -54}, 0, { 0, 0}, {0x8b, 0xde, 0xde, 0x00}}}, {{{ -184, -54, -54}, 0, { 0, 0}, {0x8b, 0xde, 0xde, 0x00}}},
{{{ -184, -76, 0}, 0, { 0, 0}, {0x8b, 0xd0, 0x00, 0x00}}}, {{{ -184, -76, 0}, 0, { 0, 0}, {0x8b, 0xd0, 0x00, 0x00}}},
{{{ -200, 0, 0}, 0, { 0, 0}, {0x81, 0x00, 0x00, 0x00}}}, {{{ -200, 0, 0}, 0, { 0, 0}, {0x81, 0x00, 0x00, 0x00}}},
@ -232,8 +215,7 @@ static const Vtx amp_seg8_vertex_08003060[] = {
{{{ 200, 0, 0}, 0, { 0, 0}, {0x7f, 0x00, 0x00, 0xff}}}, {{{ 200, 0, 0}, 0, { 0, 0}, {0x7f, 0x00, 0x00, 0xff}}},
}; };
// 0x08003160 UNUSED static const Vtx dAmpUnused3DVtx06[] = {
static const Vtx amp_seg8_vertex_08003160[] = {
{{{ -184, 0, -76}, 0, { 0, 0}, {0x8b, 0x00, 0xd0, 0xff}}}, {{{ -184, 0, -76}, 0, { 0, 0}, {0x8b, 0x00, 0xd0, 0xff}}},
{{{ -184, -54, -54}, 0, { 0, 0}, {0x8b, 0xde, 0xde, 0x00}}}, {{{ -184, -54, -54}, 0, { 0, 0}, {0x8b, 0xde, 0xde, 0x00}}},
{{{ -200, 0, 0}, 0, { 0, 0}, {0x81, 0x00, 0x00, 0x00}}}, {{{ -200, 0, 0}, 0, { 0, 0}, {0x81, 0x00, 0x00, 0x00}}},
@ -252,8 +234,7 @@ static const Vtx amp_seg8_vertex_08003160[] = {
{{{ 200, 0, 0}, 0, { 0, 0}, {0x7f, 0x00, 0x00, 0xff}}}, {{{ 200, 0, 0}, 0, { 0, 0}, {0x7f, 0x00, 0x00, 0xff}}},
}; };
// 0x08003260 UNUSED static const Vtx dAmpUnused3DVtx07[] = {
static const Vtx amp_seg8_vertex_08003260[] = {
{{{ -184, 54, -54}, 0, { 0, 0}, {0x8b, 0x22, 0xde, 0xff}}}, {{{ -184, 54, -54}, 0, { 0, 0}, {0x8b, 0x22, 0xde, 0xff}}},
{{{ -184, 0, -76}, 0, { 0, 0}, {0x8b, 0x00, 0xd0, 0x00}}}, {{{ -184, 0, -76}, 0, { 0, 0}, {0x8b, 0x00, 0xd0, 0x00}}},
{{{ -200, 0, 0}, 0, { 0, 0}, {0x81, 0x00, 0x00, 0x00}}}, {{{ -200, 0, 0}, 0, { 0, 0}, {0x81, 0x00, 0x00, 0x00}}},
@ -272,8 +253,7 @@ static const Vtx amp_seg8_vertex_08003260[] = {
{{{ 200, 0, 0}, 0, { 0, 0}, {0x7f, 0x00, 0x00, 0xff}}}, {{{ 200, 0, 0}, 0, { 0, 0}, {0x7f, 0x00, 0x00, 0xff}}},
}; };
// 0x08003360 UNUSED static const Vtx dAmpUnused3DVtx08[] = {
static const Vtx amp_seg8_vertex_08003360[] = {
{{{ -184, 76, 0}, 0, { 0, 0}, {0x8b, 0x30, 0x00, 0xff}}}, {{{ -184, 76, 0}, 0, { 0, 0}, {0x8b, 0x30, 0x00, 0xff}}},
{{{ -184, 54, -54}, 0, { 0, 0}, {0x8b, 0x22, 0xde, 0x00}}}, {{{ -184, 54, -54}, 0, { 0, 0}, {0x8b, 0x22, 0xde, 0x00}}},
{{{ -200, 0, 0}, 0, { 0, 0}, {0x81, 0x00, 0x00, 0x00}}}, {{{ -200, 0, 0}, 0, { 0, 0}, {0x81, 0x00, 0x00, 0x00}}},
@ -292,8 +272,7 @@ static const Vtx amp_seg8_vertex_08003360[] = {
{{{ 200, 0, 0}, 0, { 0, 0}, {0x7f, 0x00, 0x00, 0xff}}}, {{{ 200, 0, 0}, 0, { 0, 0}, {0x7f, 0x00, 0x00, 0xff}}},
}; };
// 0x08003460 UNUSED static const Vtx dAmpUnused3DVtx09[] = {
static const Vtx amp_seg8_vertex_08003460[] = {
{{{ -184, 54, 54}, 0, { 0, 0}, {0x8b, 0x22, 0x22, 0xff}}}, {{{ -184, 54, 54}, 0, { 0, 0}, {0x8b, 0x22, 0x22, 0xff}}},
{{{ -184, 76, 0}, 0, { 0, 0}, {0x8b, 0x30, 0x00, 0x00}}}, {{{ -184, 76, 0}, 0, { 0, 0}, {0x8b, 0x30, 0x00, 0x00}}},
{{{ -200, 0, 0}, 0, { 0, 0}, {0x81, 0x00, 0x00, 0x00}}}, {{{ -200, 0, 0}, 0, { 0, 0}, {0x81, 0x00, 0x00, 0x00}}},
@ -312,8 +291,7 @@ static const Vtx amp_seg8_vertex_08003460[] = {
{{{ 200, 0, 0}, 0, { 0, 0}, {0x7f, 0x00, 0x00, 0xff}}}, {{{ 200, 0, 0}, 0, { 0, 0}, {0x7f, 0x00, 0x00, 0xff}}},
}; };
// 0x08003560 UNUSED static const Vtx dAmpUnused3DVtx10[] = {
static const Vtx amp_seg8_vertex_08003560[] = {
{{{ -184, 0, 76}, 0, { 0, 0}, {0x8b, 0x00, 0x30, 0xff}}}, {{{ -184, 0, 76}, 0, { 0, 0}, {0x8b, 0x00, 0x30, 0xff}}},
{{{ -184, 54, 54}, 0, { 0, 0}, {0x8b, 0x22, 0x22, 0x00}}}, {{{ -184, 54, 54}, 0, { 0, 0}, {0x8b, 0x22, 0x22, 0x00}}},
{{{ -200, 0, 0}, 0, { 0, 0}, {0x81, 0x00, 0x00, 0x00}}}, {{{ -200, 0, 0}, 0, { 0, 0}, {0x81, 0x00, 0x00, 0x00}}},
@ -332,8 +310,7 @@ static const Vtx amp_seg8_vertex_08003560[] = {
{{{ 200, 0, 0}, 0, { 0, 0}, {0x7f, 0x00, 0x00, 0xff}}}, {{{ 200, 0, 0}, 0, { 0, 0}, {0x7f, 0x00, 0x00, 0xff}}},
}; };
// 0x08003660 UNUSED static const Vtx dAmpUnused3DVtx11[] = {
static const Vtx amp_seg8_vertex_08003660[] = {
{{{ -184, -54, 54}, 0, { 0, 0}, {0x8b, 0xde, 0x22, 0xff}}}, {{{ -184, -54, 54}, 0, { 0, 0}, {0x8b, 0xde, 0x22, 0xff}}},
{{{ -184, 0, 76}, 0, { 0, 0}, {0x8b, 0x00, 0x30, 0x00}}}, {{{ -184, 0, 76}, 0, { 0, 0}, {0x8b, 0x00, 0x30, 0x00}}},
{{{ -200, 0, 0}, 0, { 0, 0}, {0x81, 0x00, 0x00, 0x00}}}, {{{ -200, 0, 0}, 0, { 0, 0}, {0x81, 0x00, 0x00, 0x00}}},
@ -352,8 +329,7 @@ static const Vtx amp_seg8_vertex_08003660[] = {
{{{ 200, 0, 0}, 0, { 0, 0}, {0x7f, 0x00, 0x00, 0xff}}}, {{{ 200, 0, 0}, 0, { 0, 0}, {0x7f, 0x00, 0x00, 0xff}}},
}; };
// 0x08003760 UNUSED static const Vtx dAmpUnused3DVtx12[] = {
static const Vtx amp_seg8_vertex_08003760[] = {
{{{ -184, -76, 0}, 0, { 0, 0}, {0x8b, 0xd0, 0x00, 0xff}}}, {{{ -184, -76, 0}, 0, { 0, 0}, {0x8b, 0xd0, 0x00, 0xff}}},
{{{ -184, -54, 54}, 0, { 0, 0}, {0x8b, 0xde, 0x22, 0x00}}}, {{{ -184, -54, 54}, 0, { 0, 0}, {0x8b, 0xde, 0x22, 0x00}}},
{{{ -200, 0, 0}, 0, { 0, 0}, {0x81, 0x00, 0x00, 0x00}}}, {{{ -200, 0, 0}, 0, { 0, 0}, {0x81, 0x00, 0x00, 0x00}}},
@ -372,70 +348,63 @@ static const Vtx amp_seg8_vertex_08003760[] = {
{{{ 200, 0, 0}, 0, { 0, 0}, {0x7f, 0x00, 0x00, 0xff}}}, {{{ 200, 0, 0}, 0, { 0, 0}, {0x7f, 0x00, 0x00, 0xff}}},
}; };
// 0x08003860 UNUSED static const Vtx dAmpUnused3DVtx13[] = {
static const Vtx amp_seg8_vertex_08003860[] = {
{{{ -37, 90, 205}, 0, { 0, 0}, {0xcc, 0x00, 0x73, 0x00}}}, {{{ -37, 90, 205}, 0, { 0, 0}, {0xcc, 0x00, 0x73, 0x00}}},
{{{ -129, 90, 163}, 0, { 0, 0}, {0xcc, 0x00, 0x73, 0x00}}}, {{{ -129, 90, 163}, 0, { 0, 0}, {0xcc, 0x00, 0x73, 0x00}}},
{{{ -129, -90, 163}, 0, { 0, 0}, {0xcc, 0x00, 0x73, 0x00}}}, {{{ -129, -90, 163}, 0, { 0, 0}, {0xcc, 0x00, 0x73, 0x00}}},
{{{ -37, -90, 205}, 0, { 0, 0}, {0xcc, 0x00, 0x73, 0xff}}}, {{{ -37, -90, 205}, 0, { 0, 0}, {0xcc, 0x00, 0x73, 0xff}}},
}; };
// 0x080038A0 UNUSED static const Vtx dAmpUnused3DVtx14[] = {
static const Vtx amp_seg8_vertex_080038A0[] = {
{{{ 112, -7, 182}, 0, { 0, 0}, {0x4c, 0xd8, 0x5c, 0x00}}}, {{{ 112, -7, 182}, 0, { 0, 0}, {0x4c, 0xd8, 0x5c, 0x00}}},
{{{ 66, -139, 162}, 0, { 0, 0}, {0x4c, 0xd8, 0x5c, 0x00}}}, {{{ 66, -139, 162}, 0, { 0, 0}, {0x4c, 0xd8, 0x5c, 0x00}}},
{{{ 175, -77, 98}, 0, { 0, 0}, {0x4c, 0xd8, 0x5c, 0x00}}}, {{{ 175, -77, 98}, 0, { 0, 0}, {0x4c, 0xd8, 0x5c, 0x00}}},
}; };
// 0x080038D0 UNUSED static const Vtx dAmpUnused3DVtx15[] = {
static const Vtx amp_seg8_vertex_080038D0[] = {
{{{ 63, 90, 198}, 0, { 0, 0}, {0x08, 0x00, 0x7e, 0x00}}}, {{{ 63, 90, 198}, 0, { 0, 0}, {0x08, 0x00, 0x7e, 0x00}}},
{{{ -35, 90, 205}, 0, { 0, 0}, {0x08, 0x00, 0x7e, 0x00}}}, {{{ -35, 90, 205}, 0, { 0, 0}, {0x08, 0x00, 0x7e, 0x00}}},
{{{ -35, -90, 205}, 0, { 0, 0}, {0x08, 0x00, 0x7e, 0x00}}}, {{{ -35, -90, 205}, 0, { 0, 0}, {0x08, 0x00, 0x7e, 0x00}}},
{{{ 63, -90, 198}, 0, { 0, 0}, {0x08, 0x00, 0x7e, 0xff}}}, {{{ 63, -90, 198}, 0, { 0, 0}, {0x08, 0x00, 0x7e, 0xff}}},
}; };
// 0x08003910 - 0x08003940 UNUSED const Gfx dAmpUnused3DElectricDl1[] = {
const Gfx amp_seg8_dl_08003910[] = { gsSPLight(&dAmpUnused3DLights.l, 1),
gsSPLight(&amp_seg8_lights_08002EC8.l, 1), gsSPLight(&dAmpUnused3DLights.a, 2),
gsSPLight(&amp_seg8_lights_08002EC8.a, 2), gsSPVertex(dAmpUnused3DVtx01, 6, 0),
gsSPVertex(amp_seg8_vertex_08002EE0, 6, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0), gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSPEndDisplayList(), gsSPEndDisplayList(),
}; };
// 0x08003940 - 0x08003970 UNUSED const Gfx dAmpUnused3DElectricDl2[] = {
const Gfx amp_seg8_dl_08003940[] = { gsSPLight(&dAmpUnused3DLights.l, 1),
gsSPLight(&amp_seg8_lights_08002EC8.l, 1), gsSPLight(&dAmpUnused3DLights.a, 2),
gsSPLight(&amp_seg8_lights_08002EC8.a, 2), gsSPVertex(dAmpUnused3DVtx02, 6, 0),
gsSPVertex(amp_seg8_vertex_08002F40, 6, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0), gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSPEndDisplayList(), gsSPEndDisplayList(),
}; };
// 0x08003970 - 0x080039A0 UNUSED const Gfx dAmpUnused3DElectricDl3[] = {
const Gfx amp_seg8_dl_08003970[] = { gsSPLight(&dAmpUnused3DLights.l, 1),
gsSPLight(&amp_seg8_lights_08002EC8.l, 1), gsSPLight(&dAmpUnused3DLights.a, 2),
gsSPLight(&amp_seg8_lights_08002EC8.a, 2), gsSPVertex(dAmpUnused3DVtx03, 6, 0),
gsSPVertex(amp_seg8_vertex_08002FA0, 6, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0), gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSPEndDisplayList(), gsSPEndDisplayList(),
}; };
// 0x080039A0 - 0x080039D0 UNUSED const Gfx dAmpUnused3DElectricDl4[] = {
const Gfx amp_seg8_dl_080039A0[] = { gsSPLight(&dAmpUnused3DLights.l, 1),
gsSPLight(&amp_seg8_lights_08002EC8.l, 1), gsSPLight(&dAmpUnused3DLights.a, 2),
gsSPLight(&amp_seg8_lights_08002EC8.a, 2), gsSPVertex(dAmpUnused3DVtx04, 6, 0),
gsSPVertex(amp_seg8_vertex_08003000, 6, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0), gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSPEndDisplayList(), gsSPEndDisplayList(),
}; };
// 0x080039D0 - 0x08003DA8 UNUSED const Gfx dAmpUnused3DModelDl[] = {
const Gfx amp_seg8_dl_080039D0[] = { //! Vertex interpreted as light
gsSPLight((const u8*)amp_seg8_vertex_08002EE0 + 0x8, 1), gsSPLight((const u8*)dAmpUnused3DVtx01 + 0x8, 1),
gsSPLight((const u8*)amp_seg8_vertex_08002EE0, 2), gsSPLight((const u8*)dAmpUnused3DVtx01, 2),
gsSPVertex(amp_seg8_vertex_08003060, 16, 0), gsSPVertex(dAmpUnused3DVtx05, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 1, 0, 3, 0x0), gsSP2Triangles( 0, 1, 2, 0x0, 1, 0, 3, 0x0),
gsSP2Triangles( 1, 3, 4, 0x0, 4, 3, 5, 0x0), gsSP2Triangles( 1, 3, 4, 0x0, 4, 3, 5, 0x0),
gsSP2Triangles( 4, 5, 6, 0x0, 6, 5, 7, 0x0), gsSP2Triangles( 4, 5, 6, 0x0, 6, 5, 7, 0x0),
@ -443,7 +412,7 @@ const Gfx amp_seg8_dl_080039D0[] = {
gsSP2Triangles( 8, 9, 10, 0x0, 10, 9, 11, 0x0), gsSP2Triangles( 8, 9, 10, 0x0, 10, 9, 11, 0x0),
gsSP2Triangles(10, 11, 12, 0x0, 12, 11, 13, 0x0), gsSP2Triangles(10, 11, 12, 0x0, 12, 11, 13, 0x0),
gsSP2Triangles(12, 13, 14, 0x0, 14, 13, 15, 0x0), gsSP2Triangles(12, 13, 14, 0x0, 14, 13, 15, 0x0),
gsSPVertex(amp_seg8_vertex_08003160, 16, 0), gsSPVertex(dAmpUnused3DVtx06, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 1, 0, 3, 0x0), gsSP2Triangles( 0, 1, 2, 0x0, 1, 0, 3, 0x0),
gsSP2Triangles( 1, 3, 4, 0x0, 4, 3, 5, 0x0), gsSP2Triangles( 1, 3, 4, 0x0, 4, 3, 5, 0x0),
gsSP2Triangles( 4, 5, 6, 0x0, 6, 5, 7, 0x0), gsSP2Triangles( 4, 5, 6, 0x0, 6, 5, 7, 0x0),
@ -451,7 +420,7 @@ const Gfx amp_seg8_dl_080039D0[] = {
gsSP2Triangles( 8, 9, 10, 0x0, 10, 9, 11, 0x0), gsSP2Triangles( 8, 9, 10, 0x0, 10, 9, 11, 0x0),
gsSP2Triangles(10, 11, 12, 0x0, 12, 11, 13, 0x0), gsSP2Triangles(10, 11, 12, 0x0, 12, 11, 13, 0x0),
gsSP2Triangles(12, 13, 14, 0x0, 14, 13, 15, 0x0), gsSP2Triangles(12, 13, 14, 0x0, 14, 13, 15, 0x0),
gsSPVertex(amp_seg8_vertex_08003260, 16, 0), gsSPVertex(dAmpUnused3DVtx07, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 1, 0, 3, 0x0), gsSP2Triangles( 0, 1, 2, 0x0, 1, 0, 3, 0x0),
gsSP2Triangles( 1, 3, 4, 0x0, 4, 3, 5, 0x0), gsSP2Triangles( 1, 3, 4, 0x0, 4, 3, 5, 0x0),
gsSP2Triangles( 4, 5, 6, 0x0, 6, 5, 7, 0x0), gsSP2Triangles( 4, 5, 6, 0x0, 6, 5, 7, 0x0),
@ -459,7 +428,7 @@ const Gfx amp_seg8_dl_080039D0[] = {
gsSP2Triangles( 8, 9, 10, 0x0, 10, 9, 11, 0x0), gsSP2Triangles( 8, 9, 10, 0x0, 10, 9, 11, 0x0),
gsSP2Triangles(10, 11, 12, 0x0, 12, 11, 13, 0x0), gsSP2Triangles(10, 11, 12, 0x0, 12, 11, 13, 0x0),
gsSP2Triangles(12, 13, 14, 0x0, 14, 13, 15, 0x0), gsSP2Triangles(12, 13, 14, 0x0, 14, 13, 15, 0x0),
gsSPVertex(amp_seg8_vertex_08003360, 16, 0), gsSPVertex(dAmpUnused3DVtx08, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 1, 0, 3, 0x0), gsSP2Triangles( 0, 1, 2, 0x0, 1, 0, 3, 0x0),
gsSP2Triangles( 1, 3, 4, 0x0, 4, 3, 5, 0x0), gsSP2Triangles( 1, 3, 4, 0x0, 4, 3, 5, 0x0),
gsSP2Triangles( 4, 5, 6, 0x0, 6, 5, 7, 0x0), gsSP2Triangles( 4, 5, 6, 0x0, 6, 5, 7, 0x0),
@ -467,7 +436,7 @@ const Gfx amp_seg8_dl_080039D0[] = {
gsSP2Triangles( 8, 9, 10, 0x0, 10, 9, 11, 0x0), gsSP2Triangles( 8, 9, 10, 0x0, 10, 9, 11, 0x0),
gsSP2Triangles(10, 11, 12, 0x0, 12, 11, 13, 0x0), gsSP2Triangles(10, 11, 12, 0x0, 12, 11, 13, 0x0),
gsSP2Triangles(12, 13, 14, 0x0, 14, 13, 15, 0x0), gsSP2Triangles(12, 13, 14, 0x0, 14, 13, 15, 0x0),
gsSPVertex(amp_seg8_vertex_08003460, 16, 0), gsSPVertex(dAmpUnused3DVtx09, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 1, 0, 3, 0x0), gsSP2Triangles( 0, 1, 2, 0x0, 1, 0, 3, 0x0),
gsSP2Triangles( 1, 3, 4, 0x0, 4, 3, 5, 0x0), gsSP2Triangles( 1, 3, 4, 0x0, 4, 3, 5, 0x0),
gsSP2Triangles( 4, 5, 6, 0x0, 6, 5, 7, 0x0), gsSP2Triangles( 4, 5, 6, 0x0, 6, 5, 7, 0x0),
@ -475,7 +444,7 @@ const Gfx amp_seg8_dl_080039D0[] = {
gsSP2Triangles( 8, 9, 10, 0x0, 10, 9, 11, 0x0), gsSP2Triangles( 8, 9, 10, 0x0, 10, 9, 11, 0x0),
gsSP2Triangles(10, 11, 12, 0x0, 12, 11, 13, 0x0), gsSP2Triangles(10, 11, 12, 0x0, 12, 11, 13, 0x0),
gsSP2Triangles(12, 13, 14, 0x0, 14, 13, 15, 0x0), gsSP2Triangles(12, 13, 14, 0x0, 14, 13, 15, 0x0),
gsSPVertex(amp_seg8_vertex_08003560, 16, 0), gsSPVertex(dAmpUnused3DVtx10, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 1, 0, 3, 0x0), gsSP2Triangles( 0, 1, 2, 0x0, 1, 0, 3, 0x0),
gsSP2Triangles( 1, 3, 4, 0x0, 4, 3, 5, 0x0), gsSP2Triangles( 1, 3, 4, 0x0, 4, 3, 5, 0x0),
gsSP2Triangles( 4, 5, 6, 0x0, 6, 5, 7, 0x0), gsSP2Triangles( 4, 5, 6, 0x0, 6, 5, 7, 0x0),
@ -483,7 +452,7 @@ const Gfx amp_seg8_dl_080039D0[] = {
gsSP2Triangles( 8, 9, 10, 0x0, 10, 9, 11, 0x0), gsSP2Triangles( 8, 9, 10, 0x0, 10, 9, 11, 0x0),
gsSP2Triangles(10, 11, 12, 0x0, 12, 11, 13, 0x0), gsSP2Triangles(10, 11, 12, 0x0, 12, 11, 13, 0x0),
gsSP2Triangles(12, 13, 14, 0x0, 14, 13, 15, 0x0), gsSP2Triangles(12, 13, 14, 0x0, 14, 13, 15, 0x0),
gsSPVertex(amp_seg8_vertex_08003660, 16, 0), gsSPVertex(dAmpUnused3DVtx11, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 1, 0, 3, 0x0), gsSP2Triangles( 0, 1, 2, 0x0, 1, 0, 3, 0x0),
gsSP2Triangles( 1, 3, 4, 0x0, 4, 3, 5, 0x0), gsSP2Triangles( 1, 3, 4, 0x0, 4, 3, 5, 0x0),
gsSP2Triangles( 4, 5, 6, 0x0, 6, 5, 7, 0x0), gsSP2Triangles( 4, 5, 6, 0x0, 6, 5, 7, 0x0),
@ -491,7 +460,7 @@ const Gfx amp_seg8_dl_080039D0[] = {
gsSP2Triangles( 8, 9, 10, 0x0, 10, 9, 11, 0x0), gsSP2Triangles( 8, 9, 10, 0x0, 10, 9, 11, 0x0),
gsSP2Triangles(10, 11, 12, 0x0, 12, 11, 13, 0x0), gsSP2Triangles(10, 11, 12, 0x0, 12, 11, 13, 0x0),
gsSP2Triangles(12, 13, 14, 0x0, 14, 13, 15, 0x0), gsSP2Triangles(12, 13, 14, 0x0, 14, 13, 15, 0x0),
gsSPVertex(amp_seg8_vertex_08003760, 16, 0), gsSPVertex(dAmpUnused3DVtx12, 16, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 1, 0, 3, 0x0), gsSP2Triangles( 0, 1, 2, 0x0, 1, 0, 3, 0x0),
gsSP2Triangles( 1, 3, 4, 0x0, 4, 3, 5, 0x0), gsSP2Triangles( 1, 3, 4, 0x0, 4, 3, 5, 0x0),
gsSP2Triangles( 4, 5, 6, 0x0, 6, 5, 7, 0x0), gsSP2Triangles( 4, 5, 6, 0x0, 6, 5, 7, 0x0),
@ -502,29 +471,29 @@ const Gfx amp_seg8_dl_080039D0[] = {
gsSPEndDisplayList(), gsSPEndDisplayList(),
}; };
// 0x08003DA8 - 0x08003DD8 UNUSED const Gfx dAmpUnused3DElectricDl5[] = {
const Gfx amp_seg8_dl_08003DA8[] = { //! Vertex interpreted as light
gsSPLight((const u8*)amp_seg8_vertex_08002EE0 + 0x8, 1), gsSPLight((const u8*)dAmpUnused3DVtx01 + 0x8, 1),
gsSPLight((const u8*)amp_seg8_vertex_08002EE0, 2), gsSPLight((const u8*)dAmpUnused3DVtx01, 2),
gsSPVertex(amp_seg8_vertex_08003860, 4, 0), gsSPVertex(dAmpUnused3DVtx13, 4, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0), gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
gsSPEndDisplayList(), gsSPEndDisplayList(),
}; };
// 0x08003DD8 - 0x08003E00 UNUSED const Gfx dAmpUnused3DElectricDl6[] = {
const Gfx amp_seg8_dl_08003DD8[] = { //! Vertex interpreted as light
gsSPLight((const u8*)amp_seg8_vertex_08002EE0 + 0x8, 1), gsSPLight((const u8*)dAmpUnused3DVtx01 + 0x8, 1),
gsSPLight((const u8*)amp_seg8_vertex_08002EE0, 2), gsSPLight((const u8*)dAmpUnused3DVtx01, 2),
gsSPVertex(amp_seg8_vertex_080038A0, 3, 0), gsSPVertex(dAmpUnused3DVtx14, 3, 0),
gsSP1Triangle( 0, 1, 2, 0x0), gsSP1Triangle( 0, 1, 2, 0x0),
gsSPEndDisplayList(), gsSPEndDisplayList(),
}; };
// 0x08003E00 - 0x08003E30 UNUSED const Gfx dAmpUnused3DElectricDl7[] = {
const Gfx amp_seg8_dl_08003E00[] = { //! Vertex interpreted as light
gsSPLight((const u8*)amp_seg8_vertex_08002EE0 + 0x8, 1), gsSPLight((const u8*)dAmpUnused3DVtx01 + 0x8, 1),
gsSPLight((const u8*)amp_seg8_vertex_08002EE0, 2), gsSPLight((const u8*)dAmpUnused3DVtx01, 2),
gsSPVertex(amp_seg8_vertex_080038D0, 4, 0), gsSPVertex(dAmpUnused3DVtx15, 4, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0), gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
gsSPEndDisplayList(), gsSPEndDisplayList(),
}; };

View File

@ -0,0 +1,98 @@
// 0x060576FC
const s16 dBowserFlamesOrientationValues[] = {
// posX, posY, posZ, rotY, rotX
0, 280, 80, 0x00E9, 0x1A96,
0, 278, 83, 0x00EC, 0x1C7F,
0, 273, 92, 0x00F9, 0x20BF,
0, 268, 102, 0x010F, 0x2519,
0, 263, 109, 0x011D, 0x2751,
0, 263, 110, 0x011C, 0x2714,
0, 265, 106, 0x0112, 0x2601,
0, 268, 102, 0x0109, 0x24C0,
0, 271, 96, 0x00FF, 0x2358,
0, 274, 90, 0x00F7, 0x21CB,
0, 277, 84, 0x00EE, 0x201C,
0, 280, 78, 0x00E7, 0x1E4E,
0, 284, 71, 0x00DF, 0x1C64,
0, 288, 63, 0x00D9, 0x1A61,
0, 291, 56, 0x00D3, 0x184B,
0, 295, 48, 0x00CF, 0x1622,
0, 298, 40, 0x00CA, 0x13E9,
0, 301, 32, 0x00C7, 0x11A5,
0, 304, 23, 0x00C4, 0x0F59,
0, 308, 15, 0x00C1, 0x0D08,
0, 311, 7, 0x00C0, 0x0AB5,
0, 313, 0, 0x00C0, 0x0863,
0, 315, -8, 0x00BF, 0x0615,
0, 317, -15, 0x00CE, 0x03A3,
0, 319, -22, 0x00F8, 0x00ED,
0, 320, -29, 0x0131, 0xFFFF,
0, 322, -36, 0x0172, 0xFFFF,
0, 322, -40, 0x01B5, 0xFFFF,
0, 323, -45, 0x01ED, 0xFFFF,
0, 323, -48, 0x0213, 0xFFFF,
0, 323, -51, 0x0219, 0xFFFF,
0, 323, -52, 0x01F2, 0xFFFF,
0, 323, -51, 0x018F, 0xFFFF,
0, 323, -49, 0x00E5, 0xFFFF,
0, 322, -45, 0xFFFF, 0xFFFF,
0, 320, -35, 0xFFFF, 0xFFFF,
0, 317, -23, 0xFFFF, 0xFFFF,
0, 312, -7, 0xFFFF, 0xFFFF,
0, 306, 11, 0xFFFF, 0xFFFF,
0, 299, 31, 0xFFFF, 0xFFFF,
0, 288, 51, 0xFFFF, 0xFFFF,
0, 278, 70, 0xFFFF, 0xFFFF,
0, 267, 89, 0xFFFF, 0xFFFF,
0, 256, 106, 0xFFFF, 0x023A,
0, 244, 120, 0xFFFF, 0x04AA,
0, 236, 132, 0xFFFF, 0x069F,
0, 229, 139, 0xFFFF, 0x0803,
0, 224, 144, 0xFFFF, 0x08C0,
0, 222, 147, 0xFFFF, 0x0928,
0, 221, 148, 0xFFFF, 0x099D,
0, 221, 149, 0xFFFF, 0x0A16,
0, 221, 150, 0xFFFF, 0x0A8D,
0, 221, 150, 0xFFFF, 0x0AF6,
0, 222, 150, 0xFFFF, 0x0B4A,
0, 222, 150, 0xFFFF, 0x0B84,
0, 222, 149, 0x020A, 0x0BA0,
0, 223, 149, 0x0524, 0x0B9E,
0, 225, 148, 0x07EC, 0x0B84,
0, 226, 147, 0x0A3F, 0x0B57,
0, 227, 145, 0x0BFB, 0x0B1F,
0, 228, 144, 0x0D00, 0x0AE5,
0, 230, 142, 0x0D6F, 0x0AA0,
0, 232, 140, 0x0D8B, 0x0A48,
0, 233, 138, 0x0D5D, 0x09DE,
0, 236, 136, 0x0CED, 0x096A,
0, 238, 134, 0x0C49, 0x08EA,
0, 239, 132, 0x0B76, 0x0863,
0, 241, 130, 0x0A80, 0x07D9,
0, 244, 128, 0x0970, 0x074E,
0, 246, 125, 0x084E, 0x06C7,
0, 248, 122, 0x0723, 0x0649,
0, 251, 120, 0x05F8, 0x05D7,
0, 253, 117, 0x04D6, 0x0579,
0, 254, 114, 0x03C3, 0x0532,
0, 256, 111, 0x02C9, 0x0509,
0, 259, 108, 0x01F0, 0x0504,
0, 261, 105, 0x0141, 0x0525,
0, 262, 103, 0x00C3, 0x0572,
0, 264, 100, 0x006E, 0x0619,
0, 267, 97, 0x0032, 0x0734,
0, 268, 95, 0x000C, 0x08AF,
0, 269, 93, 0xFFFF, 0x0A74,
0, 272, 90, 0xFFFF, 0x0C70,
0, 273, 88, 0xFFFF, 0x0E8E,
0, 274, 86, 0x0014, 0x10B6,
0, 275, 84, 0x0032, 0x12DA,
0, 277, 82, 0x0056, 0x14E1,
0, 277, 82, 0x007E, 0x16B9,
0, 278, 80, 0x00A4, 0x184B,
0, 278, 80, 0x00C6, 0x1983,
0, 279, 80, 0x00DF, 0x1A4D,
0, 280, 80, 0x00E9, 0x1A96,
0, 0, 0, 0x0000, 0x0000,
};

View File

@ -1,96 +0,0 @@
// 0x060576FC
const s16 bowser_seg6_unkmoveshorts_060576FC[] = {
0x0000, 0x0118, 0x0050, 0x00E9, 0x1A96,
0x0000, 0x0116, 0x0053, 0x00EC, 0x1C7F,
0x0000, 0x0111, 0x005C, 0x00F9, 0x20BF,
0x0000, 0x010C, 0x0066, 0x010F, 0x2519,
0x0000, 0x0107, 0x006D, 0x011D, 0x2751,
0x0000, 0x0107, 0x006E, 0x011C, 0x2714,
0x0000, 0x0109, 0x006A, 0x0112, 0x2601,
0x0000, 0x010C, 0x0066, 0x0109, 0x24C0,
0x0000, 0x010F, 0x0060, 0x00FF, 0x2358,
0x0000, 0x0112, 0x005A, 0x00F7, 0x21CB,
0x0000, 0x0115, 0x0054, 0x00EE, 0x201C,
0x0000, 0x0118, 0x004E, 0x00E7, 0x1E4E,
0x0000, 0x011C, 0x0047, 0x00DF, 0x1C64,
0x0000, 0x0120, 0x003F, 0x00D9, 0x1A61,
0x0000, 0x0123, 0x0038, 0x00D3, 0x184B,
0x0000, 0x0127, 0x0030, 0x00CF, 0x1622,
0x0000, 0x012A, 0x0028, 0x00CA, 0x13E9,
0x0000, 0x012D, 0x0020, 0x00C7, 0x11A5,
0x0000, 0x0130, 0x0017, 0x00C4, 0x0F59,
0x0000, 0x0134, 0x000F, 0x00C1, 0x0D08,
0x0000, 0x0137, 0x0007, 0x00C0, 0x0AB5,
0x0000, 0x0139, 0x0000, 0x00C0, 0x0863,
0x0000, 0x013B, 0xFFF8, 0x00BF, 0x0615,
0x0000, 0x013D, 0xFFF1, 0x00CE, 0x03A3,
0x0000, 0x013F, 0xFFEA, 0x00F8, 0x00ED,
0x0000, 0x0140, 0xFFE3, 0x0131, 0xFFFF,
0x0000, 0x0142, 0xFFDC, 0x0172, 0xFFFF,
0x0000, 0x0142, 0xFFD8, 0x01B5, 0xFFFF,
0x0000, 0x0143, 0xFFD3, 0x01ED, 0xFFFF,
0x0000, 0x0143, 0xFFD0, 0x0213, 0xFFFF,
0x0000, 0x0143, 0xFFCD, 0x0219, 0xFFFF,
0x0000, 0x0143, 0xFFCC, 0x01F2, 0xFFFF,
0x0000, 0x0143, 0xFFCD, 0x018F, 0xFFFF,
0x0000, 0x0143, 0xFFCF, 0x00E5, 0xFFFF,
0x0000, 0x0142, 0xFFD3, 0xFFFF, 0xFFFF,
0x0000, 0x0140, 0xFFDD, 0xFFFF, 0xFFFF,
0x0000, 0x013D, 0xFFE9, 0xFFFF, 0xFFFF,
0x0000, 0x0138, 0xFFF9, 0xFFFF, 0xFFFF,
0x0000, 0x0132, 0x000B, 0xFFFF, 0xFFFF,
0x0000, 0x012B, 0x001F, 0xFFFF, 0xFFFF,
0x0000, 0x0120, 0x0033, 0xFFFF, 0xFFFF,
0x0000, 0x0116, 0x0046, 0xFFFF, 0xFFFF,
0x0000, 0x010B, 0x0059, 0xFFFF, 0xFFFF,
0x0000, 0x0100, 0x006A, 0xFFFF, 0x023A,
0x0000, 0x00F4, 0x0078, 0xFFFF, 0x04AA,
0x0000, 0x00EC, 0x0084, 0xFFFF, 0x069F,
0x0000, 0x00E5, 0x008B, 0xFFFF, 0x0803,
0x0000, 0x00E0, 0x0090, 0xFFFF, 0x08C0,
0x0000, 0x00DE, 0x0093, 0xFFFF, 0x0928,
0x0000, 0x00DD, 0x0094, 0xFFFF, 0x099D,
0x0000, 0x00DD, 0x0095, 0xFFFF, 0x0A16,
0x0000, 0x00DD, 0x0096, 0xFFFF, 0x0A8D,
0x0000, 0x00DD, 0x0096, 0xFFFF, 0x0AF6,
0x0000, 0x00DE, 0x0096, 0xFFFF, 0x0B4A,
0x0000, 0x00DE, 0x0096, 0xFFFF, 0x0B84,
0x0000, 0x00DE, 0x0095, 0x020A, 0x0BA0,
0x0000, 0x00DF, 0x0095, 0x0524, 0x0B9E,
0x0000, 0x00E1, 0x0094, 0x07EC, 0x0B84,
0x0000, 0x00E2, 0x0093, 0x0A3F, 0x0B57,
0x0000, 0x00E3, 0x0091, 0x0BFB, 0x0B1F,
0x0000, 0x00E4, 0x0090, 0x0D00, 0x0AE5,
0x0000, 0x00E6, 0x008E, 0x0D6F, 0x0AA0,
0x0000, 0x00E8, 0x008C, 0x0D8B, 0x0A48,
0x0000, 0x00E9, 0x008A, 0x0D5D, 0x09DE,
0x0000, 0x00EC, 0x0088, 0x0CED, 0x096A,
0x0000, 0x00EE, 0x0086, 0x0C49, 0x08EA,
0x0000, 0x00EF, 0x0084, 0x0B76, 0x0863,
0x0000, 0x00F1, 0x0082, 0x0A80, 0x07D9,
0x0000, 0x00F4, 0x0080, 0x0970, 0x074E,
0x0000, 0x00F6, 0x007D, 0x084E, 0x06C7,
0x0000, 0x00F8, 0x007A, 0x0723, 0x0649,
0x0000, 0x00FB, 0x0078, 0x05F8, 0x05D7,
0x0000, 0x00FD, 0x0075, 0x04D6, 0x0579,
0x0000, 0x00FE, 0x0072, 0x03C3, 0x0532,
0x0000, 0x0100, 0x006F, 0x02C9, 0x0509,
0x0000, 0x0103, 0x006C, 0x01F0, 0x0504,
0x0000, 0x0105, 0x0069, 0x0141, 0x0525,
0x0000, 0x0106, 0x0067, 0x00C3, 0x0572,
0x0000, 0x0108, 0x0064, 0x006E, 0x0619,
0x0000, 0x010B, 0x0061, 0x0032, 0x0734,
0x0000, 0x010C, 0x005F, 0x000C, 0x08AF,
0x0000, 0x010D, 0x005D, 0xFFFF, 0x0A74,
0x0000, 0x0110, 0x005A, 0xFFFF, 0x0C70,
0x0000, 0x0111, 0x0058, 0xFFFF, 0x0E8E,
0x0000, 0x0112, 0x0056, 0x0014, 0x10B6,
0x0000, 0x0113, 0x0054, 0x0032, 0x12DA,
0x0000, 0x0115, 0x0052, 0x0056, 0x14E1,
0x0000, 0x0115, 0x0052, 0x007E, 0x16B9,
0x0000, 0x0116, 0x0050, 0x00A4, 0x184B,
0x0000, 0x0116, 0x0050, 0x00C6, 0x1983,
0x0000, 0x0117, 0x0050, 0x00DF, 0x1A4D,
0x0000, 0x0118, 0x0050, 0x00E9, 0x1A96,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
};

View File

@ -110,10 +110,10 @@ const GeoLayout bowser_geo_0000D8[] = {
const GeoLayout bowser_geo_000424[] = { const GeoLayout bowser_geo_000424[] = {
GEO_SHADOW(SHADOW_CIRCLE_9_VERTS, 0x9B, 400), GEO_SHADOW(SHADOW_CIRCLE_9_VERTS, 0x9B, 400),
GEO_OPEN_NODE(), GEO_OPEN_NODE(),
#ifdef VERSION_JP #if BUGFIX_BOWSER_FADING_OUT
GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_06040210),
#else
GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_06040358), GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_06040358),
#else
GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_06040210),
#endif #endif
GEO_OPEN_NODE(), GEO_OPEN_NODE(),
GEO_ANIMATED_PART(LAYER_TRANSPARENT, -89, -2, -18, NULL), GEO_ANIMATED_PART(LAYER_TRANSPARENT, -89, -2, -18, NULL),
@ -200,10 +200,10 @@ const GeoLayout bowser_geo_000424[] = {
GEO_OPEN_NODE(), GEO_OPEN_NODE(),
GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_0603A4E8), GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_0603A4E8),
GEO_CLOSE_NODE(), GEO_CLOSE_NODE(),
#ifdef VERSION_JP #if BUGFIX_BOWSER_FADING_OUT
GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_0603B8D0),
#else
GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_0603B948), GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_0603B948),
#else
GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_0603B8D0),
#endif #endif
GEO_CLOSE_NODE(), GEO_CLOSE_NODE(),
GEO_CLOSE_NODE(), GEO_CLOSE_NODE(),
@ -226,10 +226,10 @@ const GeoLayout bowser_geo_000424[] = {
const GeoLayout bowser_geo_000770[] = { const GeoLayout bowser_geo_000770[] = {
GEO_NODE_START(), GEO_NODE_START(),
GEO_OPEN_NODE(), GEO_OPEN_NODE(),
#ifdef VERSION_JP #if BUGFIX_BOWSER_FADING_OUT
GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_06040210),
#else
GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_06040358), GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_06040358),
#else
GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_06040210),
#endif #endif
GEO_OPEN_NODE(), GEO_OPEN_NODE(),
GEO_ANIMATED_PART(LAYER_TRANSPARENT, -89, -2, -18, NULL), GEO_ANIMATED_PART(LAYER_TRANSPARENT, -89, -2, -18, NULL),
@ -316,10 +316,10 @@ const GeoLayout bowser_geo_000770[] = {
GEO_OPEN_NODE(), GEO_OPEN_NODE(),
GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_0603A4E8), GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_0603A4E8),
GEO_CLOSE_NODE(), GEO_CLOSE_NODE(),
#ifdef VERSION_JP #if BUGFIX_BOWSER_FADING_OUT
GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_0603B8D0),
#else
GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_0603B948), GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_0603B948),
#else
GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, 0, 0, bowser_seg6_dl_0603B8D0),
#endif #endif
GEO_CLOSE_NODE(), GEO_CLOSE_NODE(),
GEO_CLOSE_NODE(), GEO_CLOSE_NODE(),
@ -341,7 +341,7 @@ const GeoLayout bowser_geo_000770[] = {
#ifndef VERSION_JP #ifndef VERSION_JP
// 0x0D000AB8 // 0x0D000AB8
const GeoLayout bowser_shadow_geo[] = { const GeoLayout bowser_shadow_geo[] = {
GEO_SHADOW(0x00, 0x9B, 400), GEO_SHADOW(SHADOW_CIRCLE_9_VERTS, 0x9B, 400),
GEO_RETURN(), GEO_RETURN(),
}; };
#endif #endif
@ -351,11 +351,10 @@ const GeoLayout bowser_geo[] = {
GEO_NODE_START(), GEO_NODE_START(),
GEO_OPEN_NODE(), GEO_OPEN_NODE(),
GEO_ASM(0, geo_update_layer_transparency), GEO_ASM(0, geo_update_layer_transparency),
#ifdef VERSION_JP
GEO_SWITCH_CASE(2, geo_switch_anim_state),
#endif
#ifndef VERSION_JP #ifndef VERSION_JP
GEO_SWITCH_CASE(3, geo_switch_anim_state), GEO_SWITCH_CASE(3, geo_switch_anim_state),
#else
GEO_SWITCH_CASE(2, geo_switch_anim_state),
#endif #endif
GEO_OPEN_NODE(), GEO_OPEN_NODE(),
GEO_NODE_START(), GEO_NODE_START(),
@ -384,19 +383,16 @@ const GeoLayout bowser_geo[] = {
}; };
// 0x0D000B18 / 0B40 // 0x0D000B18 / 0B40
const GeoLayout bowser2_geo[] = { const GeoLayout bowser_geo_no_shadow[] = {
GEO_NODE_START(), GEO_NODE_START(),
GEO_OPEN_NODE(), GEO_OPEN_NODE(),
GEO_ASM(0, geo_update_layer_transparency), GEO_ASM(0, geo_update_layer_transparency),
#ifdef VERSION_JP
GEO_SWITCH_CASE(2, geo_switch_anim_state),
#endif
#ifndef VERSION_JP #ifndef VERSION_JP
GEO_SWITCH_CASE(3, geo_switch_anim_state), GEO_SWITCH_CASE(3, geo_switch_anim_state),
#else
GEO_SWITCH_CASE(2, geo_switch_anim_state),
#endif #endif
GEO_OPEN_NODE(), GEO_OPEN_NODE(),
GEO_NODE_START(), GEO_NODE_START(),
GEO_OPEN_NODE(), GEO_OPEN_NODE(),
GEO_ASM(0, geo_bits_bowser_coloring), GEO_ASM(0, geo_bits_bowser_coloring),

View File

@ -1184,7 +1184,7 @@ const Gfx bowser_seg6_dl_0603B8D0[] = {
gsSPEndDisplayList(), gsSPEndDisplayList(),
}; };
#ifndef VERSION_JP #if BUGFIX_BOWSER_FADING_OUT
// 0x0603B948 - 0x0603B9C8 // 0x0603B948 - 0x0603B9C8
const Gfx bowser_seg6_dl_0603B948[] = { const Gfx bowser_seg6_dl_0603B948[] = {
gsDPPipeSync(), gsDPPipeSync(),
@ -2870,7 +2870,7 @@ const Gfx bowser_seg6_dl_06040210[] = {
gsSPEndDisplayList(), gsSPEndDisplayList(),
}; };
#ifndef VERSION_JP #if BUGFIX_BOWSER_FADING_OUT
// 0x06040358 - 0x06040428 // 0x06040358 - 0x06040428
const Gfx bowser_seg6_dl_06040358[] = { const Gfx bowser_seg6_dl_06040358[] = {
gsDPPipeSync(), gsDPPipeSync(),

View File

@ -4,24 +4,12 @@
#include "types.h" #include "types.h"
// amp // amp
extern const GeoLayout amp_geo[]; extern const GeoLayout dAmpGeo[];
extern const Gfx amp_seg8_dl_08002B68[]; extern const Gfx dAmpElectricityDl[];
extern const Gfx amp_seg8_dl_08002BA0[]; extern const Gfx dAmpEyeDl[];
extern const Gfx amp_seg8_dl_08002C50[]; extern const Gfx dAmpMouthDl[];
extern const Gfx amp_seg8_dl_08002C88[]; extern const Gfx dAmpBodyDl[];
extern const Gfx amp_seg8_dl_08002D38[]; extern const struct Animation *const dAmpAnimsList[];
extern const Gfx amp_seg8_dl_08002D70[];
extern const Gfx amp_seg8_dl_08002E20[];
extern const Gfx amp_seg8_dl_08002E58[];
extern const Gfx amp_seg8_dl_08003910[];
extern const Gfx amp_seg8_dl_08003940[];
extern const Gfx amp_seg8_dl_08003970[];
extern const Gfx amp_seg8_dl_080039A0[];
extern const Gfx amp_seg8_dl_080039D0[];
extern const Gfx amp_seg8_dl_08003DA8[];
extern const Gfx amp_seg8_dl_08003DD8[];
extern const Gfx amp_seg8_dl_08003E00[];
extern const struct Animation *const amp_seg8_anims_08004034[];
// blue_coin_switch // blue_coin_switch
extern const GeoLayout blue_coin_switch_geo[]; extern const GeoLayout blue_coin_switch_geo[];

View File

@ -18,7 +18,7 @@ UNUSED static const u64 binid_2 = 2;
#include "bowser/model.inc.c" #include "bowser/model.inc.c"
#include "bowser/anims/data.inc.c" #include "bowser/anims/data.inc.c"
#include "bowser/anims/table.inc.c" #include "bowser/anims/table.inc.c"
#include "bowser/flames_pos.inc.c" #include "bowser/flames_data.inc.c"
UNUSED static const u64 binid_3 = 3; UNUSED static const u64 binid_3 = 3;
#include "bomb/model.inc.c" #include "bomb/model.inc.c"

View File

@ -17,7 +17,7 @@ extern const GeoLayout bowser_geo_000424[];
extern const GeoLayout bowser_geo_000770[]; extern const GeoLayout bowser_geo_000770[];
extern const GeoLayout bowser_shadow_geo[]; extern const GeoLayout bowser_shadow_geo[];
extern const GeoLayout bowser_geo[]; extern const GeoLayout bowser_geo[];
extern const GeoLayout bowser2_geo[]; extern const GeoLayout bowser_geo_no_shadow[];
extern const Gfx bowser_seg6_dl_06039110[]; extern const Gfx bowser_seg6_dl_06039110[];
extern const Gfx bowser_seg6_dl_060391C8[]; extern const Gfx bowser_seg6_dl_060391C8[];
extern const Gfx bowser_seg6_dl_06039260[]; extern const Gfx bowser_seg6_dl_06039260[];
@ -90,7 +90,7 @@ extern const Gfx bowser_seg6_dl_06043548[];
extern const Gfx bowser_seg6_dl_06043648[]; extern const Gfx bowser_seg6_dl_06043648[];
extern const Gfx bowser_seg6_dl_06043698[]; extern const Gfx bowser_seg6_dl_06043698[];
extern const struct Animation *const bowser_seg6_anims_06057690[]; extern const struct Animation *const bowser_seg6_anims_06057690[];
extern const s16 bowser_seg6_unkmoveshorts_060576FC[]; extern const s16 dBowserFlamesOrientationValues[];
// bowser_flame // bowser_flame
extern const GeoLayout bowser_flames_geo[]; extern const GeoLayout bowser_flames_geo[];

View File

@ -55,6 +55,11 @@ ALIGNED8 static const Texture king_bobomb_seg5_texture_05004878[] = {
#include "actors/king_bobomb/king_bob-omb_eyes.rgba16.inc.c" #include "actors/king_bobomb/king_bob-omb_eyes.rgba16.inc.c"
}; };
// 0x05005078 - Unused
ALIGNED8 static const Texture king_bobomb_seg5_texture_05005078[] = {
#include "actors/king_bobomb/king_bob-omb_eyes_blink.rgba16.inc.c"
};
// 0x05005878 // 0x05005878
ALIGNED8 static const Texture king_bobomb_seg5_texture_05005878[] = { ALIGNED8 static const Texture king_bobomb_seg5_texture_05005878[] = {
#include "actors/king_bobomb/king_bob-omb_hand.rgba16.inc.c" #include "actors/king_bobomb/king_bob-omb_hand.rgba16.inc.c"

View File

@ -1,21 +1,21 @@
# assembler directives // assembler directives
.set noat # allow manual use of $at .set noat // allow manual use of $at
.set noreorder # don't insert nops after branches .set noreorder // don't insert nops after branches
.set gp=64 .set gp=64
.include "macros.inc" #include "macros.inc"
# 0xA0000000-0xBFFFFFFF: KSEG1 direct map non-cache mirror of 0x00000000 // 0xA0000000-0xBFFFFFFF: KSEG1 direct map non-cache mirror of 0x00000000
# 0xA4000000-0xA4000FFF: RSP DMEM // 0xA4000000-0xA4000FFF: RSP DMEM
# 0xA4000000-0xA400003F: ROM header // 0xA4000000-0xA400003F: ROM header
.section .text, "ax" .section .text, "ax"
# 0xA4000040-0xA4000B6F: IPL3 // 0xA4000040-0xA4000B6F: IPL3
# IPL3 entry point jumped to from IPL2 // IPL3 entry point jumped to from IPL2
glabel ipl3_entry # 0xA4000040 glabel ipl3_entry // 0xA4000040
mtc0 $zero, $13 mtc0 $zero, $13
mtc0 $zero, $9 mtc0 $zero, $9
mtc0 $zero, $11 mtc0 $zero, $11
@ -797,7 +797,7 @@ func_A4000AD0:
nop nop
nop nop
# 0xA4000B70-0xA4000FFF: IPL3 Font // 0xA4000B70-0xA4000FFF: IPL3 Font
glabel ipl3_font glabel ipl3_font
.incbin "textures/ipl3_raw/ipl3_font_00.ia1" .incbin "textures/ipl3_raw/ipl3_font_00.ia1"
.incbin "textures/ipl3_raw/ipl3_font_01.ia1" .incbin "textures/ipl3_raw/ipl3_font_01.ia1"

View File

@ -1,61 +1,17 @@
# assembler directives // assembler directives
.set noat # allow manual use of $at .set noat // allow manual use of $at
.set noreorder # don't insert nops after branches .set noreorder // don't insert nops after branches
.set gp=64 .set gp=64
.include "macros.inc" #include "macros.inc"
.section .text, "ax" .section .text, "ax"
# This file is handwritten. // This file is handwritten.
glabel decompress glabel decompress
.if VERSION_SH == 1 #if defined(VERSION_EU) || defined(VERSION_SH)
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 $a3, 8($a0)
lw $t9, 0xc($a0) lw $t9, 0xc($a0)
lw $t8, 4($a0) lw $t8, 4($a0)
@ -99,7 +55,7 @@ glabel decompress
addi $a2, $a2, -1 addi $a2, $a2, -1
jr $ra jr $ra
nop nop
.else #else
lw $t8, 4($a0) lw $t8, 4($a0)
lw $a3, 8($a0) lw $a3, 8($a0)
lw $t9, 0xc($a0) lw $t9, 0xc($a0)
@ -146,4 +102,4 @@ glabel decompress
nop nop
jr $ra jr $ra
nop nop
.endif #endif

View File

@ -1,29 +1,29 @@
# assembler directives // assembler directives
.set noat # allow manual use of $at .set noat // allow manual use of $at
.set noreorder # don't insert nops after branches .set noreorder // don't insert nops after branches
.set gp=64 .set gp=64
.include "macros.inc" #include "macros.inc"
.section .text, "ax" .section .text, "ax"
glabel entry_point glabel entry_point
lui $t0, %hi(_mainSegmentNoloadStart) # $t0, 0x8034 lui $t0, %hi(_mainSegmentNoloadStart) // $t0, 0x8034
lui $t1, %lo(_mainSegmentNoloadSizeHi) # lui $t1, 2 lui $t1, %lo(_mainSegmentNoloadSizeHi) // lui $t1, 2
addiu $t0, %lo(_mainSegmentNoloadStart) # addiu $t0, $t0, -0x6df0 addiu $t0, %lo(_mainSegmentNoloadStart) // addiu $t0, $t0, -0x6df0
ori $t1, %lo(_mainSegmentNoloadSizeLo) # ori $t1, $t1, 0xcee0 ori $t1, %lo(_mainSegmentNoloadSizeLo) // ori $t1, $t1, 0xcee0
.L80246010: .L80246010:
addi $t1, $t1, -8 addi $t1, $t1, -8
sw $zero, ($t0) sw $zero, ($t0)
sw $zero, 4($t0) sw $zero, 4($t0)
bnez $t1, .L80246010 bnez $t1, .L80246010
addi $t0, $t0, 8 addi $t0, $t0, 8
lui $t2, %hi(main_func) # $t2, 0x8024 lui $t2, %hi(main_func) // $t2, 0x8024
lui $sp, %hi(gIdleThreadStack) # $sp, 0x8020 lui $sp, %hi(gIdleThreadStack) // $sp, 0x8020
addiu $t2, %lo(main_func) # addiu $t2, $t2, 0x6dc4 addiu $t2, %lo(main_func) // addiu $t2, $t2, 0x6dc4
jr $t2 jr $t2
addiu $sp, %lo(gIdleThreadStack) # addiu $sp, $sp, 0xa00 addiu $sp, %lo(gIdleThreadStack) // addiu $sp, $sp, 0xa00
nop nop
nop nop
nop nop

View File

@ -8,38 +8,39 @@
.word entry_point /* Entrypoint */ .word entry_point /* Entrypoint */
/* Revision */ /* Revision */
.if VERSION_SH == 1 #ifdef VERSION_SH
.word 0x00001448 .word 0x00001448
.elseif VERSION_EU == 1 #elif defined(VERSION_EU)
.word 0x00001446 .word 0x00001446
.else /* NTSC-U and NTSC-J 1.0 */ #else /* NTSC-U and NTSC-J 1.0 */
.word 0x00001444 .word 0x00001444
.endif #endif
.word 0x4EAA3D0E /* Checksum 1 */ .word 0x4EAA3D0E /* Checksum 1 */
.word 0x74757C24 /* Checksum 2 */ .word 0x74757C24 /* Checksum 2 */
.word 0x00000000 /* Unknown */ .word 0x00000000 /* Unknown */
.word 0x00000000 /* Unknown */ .word 0x00000000 /* Unknown */
.if VERSION_SH == 1 #ifdef VERSION_SH
.ascii "SUPERMARIO64 " /* Internal ROM name */ .ascii "SUPERMARIO64 " /* Internal ROM name */
.else #else
.ascii "SUPER MARIO 64 " /* Internal ROM name */ .ascii "SUPER MARIO 64 " /* Internal ROM name */
.endif #endif
.word 0x00000000 /* Unknown */ .word 0x00000000 /* Unknown */
.word 0x0000004E /* Cartridge */ .word 0x0000004E /* Cartridge */
.ascii "SM" /* Cartridge ID */ .ascii "SM" /* Cartridge ID */
/* Region */ /* Region */
.if VERSION_US == 1 #ifdef VERSION_EU
.ascii "E" /* NTSC-U (North America) */
.elseif (VERSION_JP == 1 || VERSION_SH == 1)
.ascii "J" /* NTSC-J (Japan) */
.else
.ascii "P" /* PAL (Europe) */ .ascii "P" /* PAL (Europe) */
.endif #elif defined(VERSION_US)
.ascii "E" /* NTSC-U (North America) */
#else
.ascii "J" /* NTSC-J (Japan) */
#endif
.if VERSION_SH == 1
#ifdef VERSION_SH
.byte 0x03 /* Version (Shindou) */ .byte 0x03 /* Version (Shindou) */
.else #else
.byte 0x00 /* Version */ .byte 0x00 /* Version */
.endif #endif

View File

@ -266,8 +266,9 @@
"actors/king_bobomb/king_bob-omb_arm.rgba16.png": [32,32,2048,{"jp":[1257760,8312],"us":[1264928,8312],"eu":[1136896,8312],"sh":[1113408,8312]}], "actors/king_bobomb/king_bob-omb_arm.rgba16.png": [32,32,2048,{"jp":[1257760,8312],"us":[1264928,8312],"eu":[1136896,8312],"sh":[1113408,8312]}],
"actors/king_bobomb/king_bob-omb_body_unused.rgba16.png": [64,64,8192,{"jp":[1257760,10360],"us":[1264928,10360],"eu":[1136896,10360],"sh":[1113408,10360]}], "actors/king_bobomb/king_bob-omb_body_unused.rgba16.png": [64,64,8192,{"jp":[1257760,10360],"us":[1264928,10360],"eu":[1136896,10360],"sh":[1113408,10360]}],
"actors/king_bobomb/king_bob-omb_crown_rim.rgba16.png": [32,16,1024,{"jp":[1257760,24696],"us":[1264928,24696],"eu":[1136896,24696],"sh":[1113408,24696]}], "actors/king_bobomb/king_bob-omb_crown_rim.rgba16.png": [32,16,1024,{"jp":[1257760,24696],"us":[1264928,24696],"eu":[1136896,24696],"sh":[1113408,24696]}],
"actors/king_bobomb/king_bob-omb_eyes.rgba16.png": [32,64,4096,{"jp":[1257760,18552],"us":[1264928,18552],"eu":[1136896,18552],"sh":[1113408,18552]}], "actors/king_bobomb/king_bob-omb_eyes.rgba16.png": [32,32,2048,{"jp":[1257760,18552],"us":[1264928,18552],"eu":[1136896,18552],"sh":[1113408,18552]}],
"actors/king_bobomb/king_bob-omb_hand.rgba16.png": [32,32,2048,{"jp":[1215456,64],"us":[1222624,64],"eu":[1094592,64],"sh":[1071104,64]}], "actors/king_bobomb/king_bob-omb_eyes_blink.rgba16.png": [32,32,2048,{"jp":[1257760,20600],"us":[1264928,20600],"eu":[1136896,20600],"sh":[1113408,20600]}],
"actors/king_bobomb/king_bob-omb_hand.rgba16.png": [32,32,2048,{"jp":[1257760,22648],"us":[1264928,22648],"eu":[1136896,22648],"sh":[1113408,22648]}],
"actors/king_bobomb/king_bob-omb_left_side.rgba16.png": [32,64,4096,{"jp":[1257760,33912],"us":[1264928,33912],"eu":[1136896,33912],"sh":[1113408,33912]}], "actors/king_bobomb/king_bob-omb_left_side.rgba16.png": [32,64,4096,{"jp":[1257760,33912],"us":[1264928,33912],"eu":[1136896,33912],"sh":[1113408,33912]}],
"actors/king_bobomb/king_bob-omb_right_side.rgba16.png": [32,64,4096,{"jp":[1257760,38008],"us":[1264928,38008],"eu":[1136896,38008],"sh":[1113408,38008]}], "actors/king_bobomb/king_bob-omb_right_side.rgba16.png": [32,64,4096,{"jp":[1257760,38008],"us":[1264928,38008],"eu":[1136896,38008],"sh":[1113408,38008]}],
"actors/klepto/klepto_beak.rgba16.png": [32,64,4096,{"jp":[1327760,4104],"us":[1334928,4104],"eu":[1206896,4104],"sh":[1183408,4104]}], "actors/klepto/klepto_beak.rgba16.png": [32,64,4096,{"jp":[1327760,4104],"us":[1334928,4104],"eu":[1206896,4104],"sh":[1183408,4104]}],

View File

@ -2498,7 +2498,7 @@ const Texture texture_waterbox_lava[] = {
}; };
// Unreferenced light group // Unreferenced light group
static const Lights1 segment2_lights_unused = gdSPDefLights1( UNUSED static const Lights1 segment2_lights_unused = gdSPDefLights1(
0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0xff, 0xff, 0xff, 0x28, 0x28, 0x28 0xff, 0xff, 0xff, 0x28, 0x28, 0x28
); );

View File

@ -1965,6 +1965,7 @@ const BehaviorScript bhvBowser[] = {
SPAWN_CHILD(/*Model*/ MODEL_NONE, /*Behavior*/ bhvBowserBodyAnchor), SPAWN_CHILD(/*Model*/ MODEL_NONE, /*Behavior*/ bhvBowserBodyAnchor),
SPAWN_CHILD(/*Model*/ MODEL_BOWSER_BOMB_CHILD_OBJ, /*Behavior*/ bhvBowserFlameSpawn), SPAWN_CHILD(/*Model*/ MODEL_BOWSER_BOMB_CHILD_OBJ, /*Behavior*/ bhvBowserFlameSpawn),
SPAWN_OBJ(/*Model*/ MODEL_NONE, /*Behavior*/ bhvBowserTailAnchor), SPAWN_OBJ(/*Model*/ MODEL_NONE, /*Behavior*/ bhvBowserTailAnchor),
// Beta leftover that spawn 50 coins when Bowser is defeated
SET_INT(oNumLootCoins, 50), SET_INT(oNumLootCoins, 50),
SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 0, /*Gravity*/ -400, /*Bounciness*/ -70, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0), SET_OBJ_PHYSICS(/*Wall hitbox radius*/ 0, /*Gravity*/ -400, /*Bounciness*/ -70, /*Drag strength*/ 1000, /*Friction*/ 1000, /*Buoyancy*/ 200, /*Unused*/ 0, 0),
SET_HOME(), SET_HOME(),
@ -3023,7 +3024,7 @@ const BehaviorScript bhvHiddenStaircaseStep[] = {
END_LOOP(), END_LOOP(),
}; };
const BehaviorScript bhvBooBossSpawnedBridge[] = { const BehaviorScript bhvBooStaircase[] = {
BEGIN(OBJ_LIST_SURFACE), BEGIN(OBJ_LIST_SURFACE),
OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE), OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE),
LOAD_COLLISION_DATA(bbh_seg7_collision_staircase_step), LOAD_COLLISION_DATA(bbh_seg7_collision_staircase_step),
@ -3031,7 +3032,7 @@ const BehaviorScript bhvBooBossSpawnedBridge[] = {
SET_FLOAT(oCollisionDistance, 1000), SET_FLOAT(oCollisionDistance, 1000),
SET_HOME(), SET_HOME(),
BEGIN_LOOP(), BEGIN_LOOP(),
CALL_NATIVE(bhv_boo_boss_spawned_bridge_loop), CALL_NATIVE(bhv_boo_staircase),
CALL_NATIVE(load_object_collision_model), CALL_NATIVE(load_object_collision_model),
END_LOOP(), END_LOOP(),
}; };
@ -3141,7 +3142,7 @@ const BehaviorScript bhvUnusedFakeStar[] = {
}; };
// What is this? // What is this?
static const BehaviorScript unused_1[] = { UNUSED static const BehaviorScript unused_1[] = {
BREAK(), BREAK(),
BREAK(), BREAK(),
BREAK(), BREAK(),
@ -3851,7 +3852,7 @@ const BehaviorScript bhvSignOnWall[] = {
const BehaviorScript bhvHomingAmp[] = { const BehaviorScript bhvHomingAmp[] = {
BEGIN(OBJ_LIST_GENACTOR), BEGIN(OBJ_LIST_GENACTOR),
OR_INT(oFlags, (OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO | OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_MOVE_XZ_USING_FVEL | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), OR_INT(oFlags, (OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO | OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_MOVE_XZ_USING_FVEL | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)),
LOAD_ANIMATIONS(oAnimations, amp_seg8_anims_08004034), LOAD_ANIMATIONS(oAnimations, dAmpAnimsList),
ANIMATE(0), ANIMATE(0),
SET_FLOAT(oGraphYOffset, 40), SET_FLOAT(oGraphYOffset, 40),
SET_INT(oIntangibleTimer, 0), SET_INT(oIntangibleTimer, 0),
@ -3864,7 +3865,7 @@ const BehaviorScript bhvHomingAmp[] = {
const BehaviorScript bhvCirclingAmp[] = { const BehaviorScript bhvCirclingAmp[] = {
BEGIN(OBJ_LIST_GENACTOR), BEGIN(OBJ_LIST_GENACTOR),
OR_INT(oFlags, (OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO | OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_MOVE_XZ_USING_FVEL | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)), OR_INT(oFlags, (OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO | OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_MOVE_XZ_USING_FVEL | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)),
LOAD_ANIMATIONS(oAnimations, amp_seg8_anims_08004034), LOAD_ANIMATIONS(oAnimations, dAmpAnimsList),
ANIMATE(0), ANIMATE(0),
SET_FLOAT(oGraphYOffset, 40), SET_FLOAT(oGraphYOffset, 40),
SET_INT(oIntangibleTimer, 0), SET_INT(oIntangibleTimer, 0),

View File

@ -1,13 +1,13 @@
diff --git a/asm/crash.s b/asm/crash.s diff --git a/asm/crash.s b/asm/crash.s
new file mode 100644 new file mode 100644
index 00000000..0b2a5574 index 00000000..033bf952
--- /dev/null --- /dev/null
+++ b/asm/crash.s +++ b/asm/crash.s
@@ -0,0 +1,153 @@ @@ -0,0 +1,153 @@
+# SM64 Crash Handler +// SM64 Crash Handler
+# See Readme below. +// See Readme below.
+ +
+.include "macros.inc" +#include "macros.inc"
+ +
+/* --------------------------------------------------------------- +/* ---------------------------------------------------------------
+ * IMPORTANT README: + * IMPORTANT README:
@ -58,7 +58,7 @@ index 00000000..0b2a5574
+ sw $a3, %lo(nAssertStopProgram)($at) + sw $a3, %lo(nAssertStopProgram)($at)
+ beqz $a3, .end_2 + beqz $a3, .end_2
+ nop + nop
+ syscall # trigger crash screen + syscall // trigger crash screen
+.end_2: +.end_2:
+ jr $ra + jr $ra
+ nop + nop
@ -75,15 +75,15 @@ index 00000000..0b2a5574
+ jr $ra + jr $ra
+ mfc0 $v0, COP0_BADVADDR + mfc0 $v0, COP0_BADVADDR
+ +
+# If the error code field of cop0's cause register is non-zero, +// If the error code field of cop0's cause register is non-zero,
+# draw crash details to the screen and hang +// draw crash details to the screen and hang
+# +
+# If there wasn't an error, continue to the original handler +// If there wasn't an error, continue to the original handler
+ +
+glabel __crash_handler_entry +glabel __crash_handler_entry
+ mfc0 $k1, COP0_CAUSE + mfc0 $k1, COP0_CAUSE
+ andi $k1, $k1, (0x1F << 2) + andi $k1, $k1, (0x1F << 2)
+ beqzl $k1, .end2 # exit if ExCode is 0 + beqzl $k1, .end2 // exit if ExCode is 0
+ lui $k0, %hi(__osException) + lui $k0, %hi(__osException)
+ la $k0, exceptionRegContext + la $k0, exceptionRegContext
+ sd $zero, 0x018 ($k0) + sd $zero, 0x018 ($k0)
@ -116,7 +116,7 @@ index 00000000..0b2a5574
+ sd $sp, 0x0F0 ($k0) + sd $sp, 0x0F0 ($k0)
+ sd $fp, 0x0F8 ($k0) + sd $fp, 0x0F8 ($k0)
+ sd $ra, 0x100 ($k0) + sd $ra, 0x100 ($k0)
+ # cop unusable exception fired twice on startup so we'll ignore it for now + // cop unusable exception fired twice on startup so we'll ignore it for now
+ li $t0, (0x0B << 2) + li $t0, (0x0B << 2)
+ beq $k1, $t0, .end + beq $k1, $t0, .end
+ nop + nop
@ -155,14 +155,14 @@ index 00000000..0b2a5574
+ lui $k0, %hi(__osException) + lui $k0, %hi(__osException)
+ .end2: + .end2:
+ addiu $k0, $k0, %lo(__osException) + addiu $k0, $k0, %lo(__osException)
+ jr $k0 # run the original handler + jr $k0 // run the original handler
+ nop + nop
diff --git a/lib/asm/__osExceptionPreamble.s b/lib/asm/__osExceptionPreamble.s diff --git a/lib/asm/__osExceptionPreamble.s b/lib/asm/__osExceptionPreamble.s
index e14928ce..4d12129e 100644 index c3b97993..c552a485 100644
--- a/lib/asm/__osExceptionPreamble.s --- a/lib/asm/__osExceptionPreamble.s
+++ b/lib/asm/__osExceptionPreamble.s +++ b/lib/asm/__osExceptionPreamble.s
@@ -18,8 +18,8 @@ @@ -11,8 +11,8 @@
.endif #endif
glabel __osExceptionPreamble glabel __osExceptionPreamble
- lui $k0, %hi(__osException) - lui $k0, %hi(__osException)
@ -173,10 +173,10 @@ index e14928ce..4d12129e 100644
nop nop
diff --git a/sm64.ld b/sm64.ld diff --git a/sm64.ld b/sm64.ld
index f80f5b4d..569344bc 100755 index 7d9b5b4a..c7bb81b9 100755
--- a/sm64.ld --- a/sm64.ld
+++ b/sm64.ld +++ b/sm64.ld
@@ -116,6 +116,7 @@ SECTIONS @@ -117,6 +117,7 @@ SECTIONS
BUILD_DIR/src/game/rendering_graph_node.o(.text); BUILD_DIR/src/game/rendering_graph_node.o(.text);
BUILD_DIR/src/game/profiler.o(.text); BUILD_DIR/src/game/profiler.o(.text);
BUILD_DIR/asm/decompress.o(.text); BUILD_DIR/asm/decompress.o(.text);

View File

@ -2,10 +2,10 @@ diff --git a/src/game/area.c b/src/game/area.c
index af9d0156..c68a7f6e 100644 index af9d0156..c68a7f6e 100644
--- a/src/game/area.c --- a/src/game/area.c
+++ b/src/game/area.c +++ b/src/game/area.c
@@ -21,6 +21,7 @@ @@ -22,6 +22,7 @@
#include "engine/geo_layout.h"
#include "save_file.h" #include "save_file.h"
#include "level_table.h" #include "level_table.h"
#include "dialog_ids.h"
+#include "debug_box.h" +#include "debug_box.h"
struct SpawnInfo gPlayerSpawnInfos[1]; struct SpawnInfo gPlayerSpawnInfos[1];

View File

@ -1,10 +1,10 @@
diff --git a/src/game/game_init.c b/src/game/game_init.c diff --git a/src/game/game_init.c b/src/game/game_init.c
index b6334688..62ed106c 100644 index b961ca52..531231cf 100644
--- a/src/game/game_init.c --- a/src/game/game_init.c
+++ b/src/game/game_init.c +++ b/src/game/game_init.c
@@ -59,6 +59,47 @@ struct DemoInput *gCurrDemoInput = NULL; // demo input sequence @@ -82,6 +82,47 @@ struct DemoInput gRecordedDemoInput = { 0 };
u16 gDemoInputListID = 0; // Display
struct DemoInput gRecordedDemoInput = { 0 }; // possibly removed in EU. TODO: Check // ----------------------------------------------------------------------------------------------------
+// SDK states that 1 cycle takes about 21.33 nanoseconds +// SDK states that 1 cycle takes about 21.33 nanoseconds
+#define SECONDS_PER_CYCLE 0.00000002133f +#define SECONDS_PER_CYCLE 0.00000002133f
@ -48,9 +48,9 @@ index b6334688..62ed106c 100644
+} +}
+ +
/** /**
* Initializes the Reality Display Processor (RDP). * Sets the initial RDP (Reality Display Processor) rendering settings.
* This function initializes settings such as texture filtering mode, */
@@ -633,5 +674,7 @@ void thread5_game_loop(UNUSED void *arg) { @@ -694,5 +735,7 @@ void thread5_game_loop(UNUSED void *arg) {
// amount of free space remaining. // amount of free space remaining.
print_text_fmt_int(180, 20, "BUF %d", gGfxPoolEnd - (u8 *) gDisplayListHead); print_text_fmt_int(180, 20, "BUF %d", gGfxPoolEnd - (u8 *) gDisplayListHead);
} }

View File

@ -13,16 +13,16 @@ index 00000000..e60550ab
+extern enum ConsoleType get_console_type(void); +extern enum ConsoleType get_console_type(void);
diff --git a/lib/asm/skGetId.s b/lib/asm/skGetId.s diff --git a/lib/asm/skGetId.s b/lib/asm/skGetId.s
new file mode 100644 new file mode 100644
index 00000000..8fb4c449 index 00000000..58e7d4f9
--- /dev/null --- /dev/null
+++ b/lib/asm/skGetId.s +++ b/lib/asm/skGetId.s
@@ -0,0 +1,18 @@ @@ -0,0 +1,18 @@
+# Code by stuckpixel +// Code by stuckpixel
+ +
+.set noreorder +.set noreorder
+.set gp=64 +.set gp=64
+ +
+.include "macros.inc" +#include "macros.inc"
+ +
+glabel skGetId +glabel skGetId
+ li $v0, 0 + li $v0, 0
@ -36,10 +36,10 @@ index 00000000..8fb4c449
+ nop + nop
+ nop + nop
diff --git a/lib/src/__osViSwapContext.c b/lib/src/__osViSwapContext.c diff --git a/lib/src/__osViSwapContext.c b/lib/src/__osViSwapContext.c
index b9d364b1..fa149b5d 100644 index 990cb11f..22756e91 100644
--- a/lib/src/__osViSwapContext.c --- a/lib/src/__osViSwapContext.c
+++ b/lib/src/__osViSwapContext.c +++ b/lib/src/__osViSwapContext.c
@@ -52,7 +52,9 @@ void __osViSwapContext() { @@ -54,7 +54,9 @@ void __osViSwapContext() {
HW_REG(VI_INTR_REG, u32) = s0->fldRegs[field].vIntr; HW_REG(VI_INTR_REG, u32) = s0->fldRegs[field].vIntr;
HW_REG(VI_X_SCALE_REG, u32) = s1->unk20; HW_REG(VI_X_SCALE_REG, u32) = s1->unk20;
HW_REG(VI_Y_SCALE_REG, u32) = s1->unk2c; HW_REG(VI_Y_SCALE_REG, u32) = s1->unk2c;
@ -269,7 +269,7 @@ index 1a86477b..a94f8721 100644
return sp34; return sp34;
} }
diff --git a/lib/src/osInitialize.c b/lib/src/osInitialize.c diff --git a/lib/src/osInitialize.c b/lib/src/osInitialize.c
index ea247636..4adb45cb 100644 index ba73024b..6deaf407 100644
--- a/lib/src/osInitialize.c --- a/lib/src/osInitialize.c
+++ b/lib/src/osInitialize.c +++ b/lib/src/osInitialize.c
@@ -1,6 +1,7 @@ @@ -1,6 +1,7 @@
@ -280,7 +280,7 @@ index ea247636..4adb45cb 100644
#define PIF_ADDR_START (void *) 0x1FC007FC #define PIF_ADDR_START (void *) 0x1FC007FC
@@ -54,6 +55,7 @@ void osInitialize(void) { @@ -51,6 +52,7 @@ void osInitialize(void) {
UNUSED u32 eu_sp30; UNUSED u32 eu_sp30;
#endif #endif
UNUSED u32 sp2c; UNUSED u32 sp2c;
@ -289,24 +289,24 @@ index ea247636..4adb45cb 100644
__osSetSR(__osGetSR() | 0x20000000); __osSetSR(__osGetSR() | 0x20000000);
__osSetFpcCsr(0x01000800); __osSetFpcCsr(0x01000800);
diff --git a/sm64.ld b/sm64.ld diff --git a/sm64.ld b/sm64.ld
index f80f5b4d..e53d4e40 100755 index 7d9b5b4a..be853a3b 100755
--- a/sm64.ld --- a/sm64.ld
+++ b/sm64.ld +++ b/sm64.ld
@@ -300,6 +300,8 @@ SECTIONS @@ -306,6 +306,8 @@ SECTIONS
#ifdef VERSION_SH #if ENABLE_RUMBLE
BUILD_DIR/libultra.a:unk_shindou_file_3.o(.text) BUILD_DIR/libultra.a:unk_shindou_file_3.o(.text);
#endif #endif
+ BUILD_DIR/libultra.a:consoleType.o(.text) + BUILD_DIR/libultra.a:consoleType.o(.text)
+ BUILD_DIR/libultra.a:skGetId.o(.text) + BUILD_DIR/libultra.a:skGetId.o(.text)
BUILD_DIR/lib/rsp.o(.text); BUILD_DIR/lib/rsp.o(.text);
#else #else
BUILD_DIR/src/game*.o(.text); BUILD_DIR/src/game*.o(.text);
@@ -410,6 +412,8 @@ SECTIONS @@ -428,6 +430,8 @@ SECTIONS
BUILD_DIR/libultra.a:__osGetCause.o(.text); #if ENABLE_RUMBLE
BUILD_DIR/libultra.a:__osAtomicDec.o(.text); BUILD_DIR/libultra.a:unk_shindou_file_3.o(.text);
BUILD_DIR/libultra.a:guLookAtRef.o(.text); /* Fast3DEX2 only */ #endif
+ BUILD_DIR/libultra.a:consoleType.o(.text); + BUILD_DIR/libultra.a:consoleType.o(.text)
+ BUILD_DIR/libultra.a:skGetId.o(.text); + BUILD_DIR/libultra.a:skGetId.o(.text)
BUILD_DIR/lib/rsp.o(.text); BUILD_DIR/lib/rsp.o(.text);
#endif #endif

View File

@ -1,8 +1,8 @@
diff --git a/Makefile b/Makefile diff --git a/Makefile b/Makefile
index f81fd27b..318140f2 100644 index f50b7622..124c7ec6 100644
--- a/Makefile --- a/Makefile
+++ b/Makefile +++ b/Makefile
@@ -419,6 +419,7 @@ $(BUILD_DIR)/include/text_strings.h: $(BUILD_DIR)/include/text_menu_strings.h @@ -478,6 +478,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/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
@ -11,12 +11,12 @@ index f81fd27b..318140f2 100644
#==============================================================================# #==============================================================================#
diff --git a/include/segments.h b/include/segments.h diff --git a/include/segments.h b/include/segments.h
index a8c1bf97..84c3d7a4 100644 index a97d6ee8..186c968e 100644
--- a/include/segments.h --- a/include/segments.h
+++ b/include/segments.h +++ b/include/segments.h
@@ -1,6 +1,9 @@ @@ -3,6 +3,9 @@
#ifndef SEGMENTS_H
#define SEGMENTS_H #include "config.h"
+/* Use expansion pack RAM */ +/* Use expansion pack RAM */
+#define USE_EXT_RAM 1 +#define USE_EXT_RAM 1
@ -58,7 +58,7 @@ index 17c773ed..677a5ae9 100644
+ JUMP(/*target*/ level_script_entry_error_screen), + JUMP(/*target*/ level_script_entry_error_screen),
+}; +};
diff --git a/levels/intro/geo.c b/levels/intro/geo.c diff --git a/levels/intro/geo.c b/levels/intro/geo.c
index 7a297fe7..71b16442 100644 index 30a87806..6bf7b79a 100644
--- a/levels/intro/geo.c --- a/levels/intro/geo.c
+++ b/levels/intro/geo.c +++ b/levels/intro/geo.c
@@ -15,6 +15,24 @@ @@ -15,6 +15,24 @@
@ -100,7 +100,7 @@ index 99277e86..04797cd7 100644
+ +
#endif #endif
diff --git a/levels/intro/script.c b/levels/intro/script.c diff --git a/levels/intro/script.c b/levels/intro/script.c
index a130cc04..926c0d09 100644 index 04b8fc4c..ca9058c4 100644
--- a/levels/intro/script.c --- a/levels/intro/script.c
+++ b/levels/intro/script.c +++ b/levels/intro/script.c
@@ -18,6 +18,21 @@ @@ -18,6 +18,21 @@
@ -138,7 +138,7 @@ 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/game/main.c b/src/game/main.c
index 9615f25a..e2d7b3d4 100644 index 1a9d9e7e..f4f7a9e5 100644
--- a/src/game/main.c --- a/src/game/main.c
+++ b/src/game/main.c +++ b/src/game/main.c
@@ -11,6 +11,7 @@ @@ -11,6 +11,7 @@
@ -149,7 +149,7 @@ index 9615f25a..e2d7b3d4 100644
// Message IDs // Message IDs
#define MESG_SP_COMPLETE 100 #define MESG_SP_COMPLETE 100
@@ -127,6 +128,10 @@ void alloc_pool(void) { @@ -131,6 +132,10 @@ void alloc_pool(void) {
void *start = (void *) SEG_POOL_START; void *start = (void *) SEG_POOL_START;
void *end = (void *) SEG_POOL_END; void *end = (void *) SEG_POOL_END;
@ -160,7 +160,7 @@ index 9615f25a..e2d7b3d4 100644
main_pool_init(start, end); main_pool_init(start, end);
gEffectsMemoryPool = mem_pool_init(0x4000, MEMORY_POOL_LEFT); gEffectsMemoryPool = mem_pool_init(0x4000, MEMORY_POOL_LEFT);
} }
@@ -332,7 +337,10 @@ void thread3_main(UNUSED void *arg) { @@ -336,7 +341,10 @@ void thread3_main(UNUSED void *arg) {
create_thread(&gSoundThread, 4, thread4_sound, NULL, gThread4Stack + 0x2000, 20); create_thread(&gSoundThread, 4, thread4_sound, NULL, gThread4Stack + 0x2000, 20);
osStartThread(&gSoundThread); osStartThread(&gSoundThread);
@ -174,7 +174,7 @@ index 9615f25a..e2d7b3d4 100644
while (TRUE) { while (TRUE) {
diff --git a/src/game/mem_error_screen.c b/src/game/mem_error_screen.c diff --git a/src/game/mem_error_screen.c b/src/game/mem_error_screen.c
new file mode 100644 new file mode 100644
index 00000000..81efaf91 index 00000000..f432927c
--- /dev/null --- /dev/null
+++ b/src/game/mem_error_screen.c +++ b/src/game/mem_error_screen.c
@@ -0,0 +1,104 @@ @@ -0,0 +1,104 @@
@ -274,15 +274,14 @@ index 00000000..81efaf91
+ +
+ addr = segmented_to_virtual(level_script_entry_error_screen); + addr = segmented_to_virtual(level_script_entry_error_screen);
+ +
+ rendering_init(); + render_init();
+ +
+ while (1) { + while (1) {
+ config_gfx_pool(); + select_gfx_pool();
+ addr = level_script_execute(addr); + addr = level_script_execute(addr);
+ display_and_vsync(); + 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 diff --git a/src/game/mem_error_screen.h b/src/game/mem_error_screen.h
new file mode 100644 new file mode 100644
index 00000000..9fbff34c index 00000000..9fbff34c

View File

@ -1,5 +1,5 @@
diff --git a/src/game/game_init.c b/src/game/game_init.c diff --git a/src/game/game_init.c b/src/game/game_init.c
index b6334688..9363074b 100644 index b961ca52..adfde049 100644
--- a/src/game/game_init.c --- a/src/game/game_init.c
+++ b/src/game/game_init.c +++ b/src/game/game_init.c
@@ -11,6 +11,7 @@ @@ -11,6 +11,7 @@
@ -10,9 +10,9 @@ index b6334688..9363074b 100644
#include "profiler.h" #include "profiler.h"
#include "save_file.h" #include "save_file.h"
#include "seq_ids.h" #include "seq_ids.h"
@@ -335,6 +336,45 @@ void display_and_vsync(void) { @@ -386,6 +387,45 @@ void display_and_vsync(void) {
gGlobalTimer++; // Controls
} // ----------------------------------------------------------------------------------------------------
+/* +/*
+ * This enhancement allows you to record gameplay demos for the mario head screen. + * This enhancement allows you to record gameplay demos for the mario head screen.
@ -24,7 +24,7 @@ index b6334688..9363074b 100644
+ * + *
+*/ +*/
+ +
+#include "../src/game/mario.h" +#include "mario.h"
+ +
+#define DEMOREC_STATUS_NOT_RECORDING 0 +#define DEMOREC_STATUS_NOT_RECORDING 0
+#define DEMOREC_STATUS_PREPARING 1 +#define DEMOREC_STATUS_PREPARING 1
@ -53,15 +53,15 @@ index b6334688..9363074b 100644
+struct DemoInput* gRecordedInputsPtr = (struct DemoInput*)gRecordedInputs; +struct DemoInput* gRecordedInputsPtr = (struct DemoInput*)gRecordedInputs;
+struct DemoInput gRecordedDemoInputCopy; +struct DemoInput gRecordedDemoInputCopy;
+ +
// 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. * This function records distinct inputs over a 255-frame interval to RAM locations and was likely
static void record_demo(void) { * used to record the demo sequences seen in the final game. This function is unused.
@@ -368,6 +408,118 @@ static void record_demo(void) { @@ -420,6 +460,118 @@ UNUSED static void record_demo(void) {
gRecordedDemoInput.timer++; gRecordedDemoInput.timer++;
} }
+void record_new_demo_input(void) { +void record_new_demo_input(void) {
+ if(gRecordedDemoInput.timer == 1 && gRecordedDemoInputCopy.timer > 0) { + if (gRecordedDemoInput.timer == 1 && gRecordedDemoInputCopy.timer > 0) {
+ gRecordedInputs[gNumOfRecordedInputs].timer = gRecordedDemoInputCopy.timer; + gRecordedInputs[gNumOfRecordedInputs].timer = gRecordedDemoInputCopy.timer;
+ gRecordedInputs[gNumOfRecordedInputs + 1].timer = 0; + gRecordedInputs[gNumOfRecordedInputs + 1].timer = 0;
+ gRecordedInputs[gNumOfRecordedInputs].rawStickX = gRecordedDemoInputCopy.rawStickX; + gRecordedInputs[gNumOfRecordedInputs].rawStickX = gRecordedDemoInputCopy.rawStickX;
@ -86,13 +86,13 @@ index b6334688..9363074b 100644
+void recording(void) { +void recording(void) {
+ +
+ // Force-stop when someone makes too many inputs. + // Force-stop when someone makes too many inputs.
+ if(gNumOfRecordedInputs + 1 > DEMOREC_MAX_INPUTS) { + if (gNumOfRecordedInputs + 1 > DEMOREC_MAX_INPUTS) {
+ gRecordingStatus = DEMOREC_STATUS_STOPPING; + gRecordingStatus = DEMOREC_STATUS_STOPPING;
+ return; + return;
+ } + }
+ +
+ copy_gRecordedDemoInput(); + copy_gRecordedDemoInput();
+ record_demo(); // Defined in game.c + record_demo();
+ record_new_demo_input(); + record_new_demo_input();
+} +}
+ +
@ -112,10 +112,10 @@ index b6334688..9363074b 100644
+ case DEMOREC_STATUS_NOT_RECORDING: + case DEMOREC_STATUS_NOT_RECORDING:
+ break; + break;
+ case DEMOREC_STATUS_PREPARING: + case DEMOREC_STATUS_PREPARING:
+ if(gMarioObject != NULL && gCurrLevelNum >= 5) { // If the game is in an active level + if (gMarioObject != NULL && gCurrLevelNum != LEVEL_NONE) { // If the game is in an active level
+ gRecordingStatus = DEMOREC_STATUS_RECORDING; + gRecordingStatus = DEMOREC_STATUS_RECORDING;
+ +
+ // A bit of a hack, but it works. + // First 4 values in demo inputs are used to define level ID
+ gNumOfRecordedInputs = 1; + gNumOfRecordedInputs = 1;
+ gRecordedInputs[0].timer = gCurrLevelNum; + gRecordedInputs[0].timer = gCurrLevelNum;
+ gRecordedInputs[0].rawStickX = 0; + gRecordedInputs[0].rawStickX = 0;
@ -127,7 +127,7 @@ index b6334688..9363074b 100644
+ recording(); + recording();
+ break; + break;
+ case DEMOREC_STATUS_DONE: + case DEMOREC_STATUS_DONE:
+ if(gDoneDelay > DEMOREC_DONE_DELAY) + if (gDoneDelay > DEMOREC_DONE_DELAY)
+ gRecordingStatus = DEMOREC_STATUS_NOT_RECORDING; + gRecordingStatus = DEMOREC_STATUS_NOT_RECORDING;
+ else + else
+ gDoneDelay++; + gDoneDelay++;
@ -159,8 +159,8 @@ index b6334688..9363074b 100644
+ // so the debug level select is used for that. + // so the debug level select is used for that.
+ gDebugLevelSelect = TRUE; + gDebugLevelSelect = TRUE;
+ +
+ if(gPlayer1Controller->buttonPressed & L_TRIG) { + if (gPlayer1Controller->buttonPressed & L_TRIG) {
+ if(gRecordingStatus == DEMOREC_STATUS_NOT_RECORDING) { + if (gRecordingStatus == DEMOREC_STATUS_NOT_RECORDING) {
+ gRecordingStatus = DEMOREC_STATUS_PREPARING; + gRecordingStatus = DEMOREC_STATUS_PREPARING;
+ } else if (gRecordingStatus == DEMOREC_STATUS_RECORDING) { + } else if (gRecordingStatus == DEMOREC_STATUS_RECORDING) {
+ gRecordingStatus = DEMOREC_STATUS_STOPPING; + gRecordingStatus = DEMOREC_STATUS_STOPPING;
@ -172,12 +172,12 @@ index b6334688..9363074b 100644
+ print_status(); + print_status();
+} +}
+ +
// take the updated controller struct and calculate /**
// the new x, y, and distance floats. * Take the updated controller struct and calculate the new x, y, and distance floats.
void adjust_analog_stick(struct Controller *controller) { */
@@ -623,6 +775,7 @@ void thread5_game_loop(UNUSED void *arg) { @@ -684,6 +836,7 @@ void thread5_game_loop(UNUSED void *arg) {
audio_game_loop_tick(); audio_game_loop_tick();
config_gfx_pool(); select_gfx_pool();
read_controller_inputs(); read_controller_inputs();
+ recordingDemo(); + recordingDemo();
addr = level_script_execute(addr); addr = level_script_execute(addr);

View File

@ -20,6 +20,8 @@ def read_local_asset_list(f):
def asset_needs_update(asset, version): def asset_needs_update(asset, version):
if version <= 6 and asset in ["actors/king_bobomb/king_bob-omb_eyes.rgba16.png", "actors/king_bobomb/king_bob-omb_hand.rgba16.png"]:
return True
if version <= 5 and asset == "textures/spooky/bbh_textures.00800.rgba16.png": if version <= 5 and asset == "textures/spooky/bbh_textures.00800.rgba16.png":
return True return True
if version <= 4 and asset in ["textures/mountain/ttm_textures.01800.rgba16.png", "textures/mountain/ttm_textures.05800.rgba16.png"]: if version <= 4 and asset in ["textures/mountain/ttm_textures.01800.rgba16.png", "textures/mountain/ttm_textures.05800.rgba16.png"]:
@ -59,7 +61,7 @@ def clean_assets(local_asset_file):
def main(): def main():
# In case we ever need to change formats of generated files, we keep a # In case we ever need to change formats of generated files, we keep a
# revision ID in the local asset file. # revision ID in the local asset file.
new_version = 6 new_version = 7
try: try:
local_asset_file = open(".assets-local.txt") local_asset_file = open(".assets-local.txt")

View File

@ -56,13 +56,14 @@
#define A_ADDMIXER 4 #define A_ADDMIXER 4
#define A_RESAMPLE_ZOH 6 #define A_RESAMPLE_ZOH 6
#define A_INTERL 17 #define A_DMEMMOVE2 16
#define A_DOWNSAMPLE_HALF 17
#define A_ENVSETUP1 18 #define A_ENVSETUP1 18
#define A_ENVMIXER 19 #define A_ENVMIXER 19
#define A_LOADBUFF 20 #define A_LOADBUFF 20
#define A_SAVEBUFF 21 #define A_SAVEBUFF 21
#define A_ENVSETUP2 22 #define A_ENVSETUP2 22
#define A_UNK_23 23 #define A_S8DEC 23
#define A_HILOGAIN 24 #define A_HILOGAIN 24
#define A_UNK_25 25 #define A_UNK_25 25
#define A_DUPLICATE 26 #define A_DUPLICATE 26
@ -306,6 +307,8 @@ typedef short ENVMIX_STATE[40];
* address is later used as parameter, the 8 high bits will be an index * address is later used as parameter, the 8 high bits will be an index
* to the segment table and the lower 24 bits are added to the base address * to the segment table and the lower 24 bits are added to the base address
* stored in the segment table for this entry. The result is the physical address. * stored in the segment table for this entry. The result is the physical address.
* With the newer rsp audio code, this segment table is not used. The address is
* used directly instead.
* *
* Transfers to/from DRAM are executed using DMA and hence follow these restrictions: * Transfers to/from DRAM are executed using DMA and hence follow these restrictions:
* All DRAM addresses should be aligned by 8 bytes, or they will be * All DRAM addresses should be aligned by 8 bytes, or they will be
@ -349,14 +352,6 @@ typedef short ENVMIX_STATE[40];
_a->words.w1 = (uintptr_t)(s); \ _a->words.w1 = (uintptr_t)(s); \
} }
#define aADPCM_23(pkt, f, s) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = _SHIFTL(A_UNK_23, 24, 8) | _SHIFTL(f, 16, 8); \
_a->words.w1 = (uintptr_t)(s); \
}
/* /*
* Not used in SM64. * Not used in SM64.
*/ */
@ -570,15 +565,6 @@ typedef short ENVMIX_STATE[40];
_a->words.w1 = _SHIFTL(o, 16, 16) | _SHIFTL(c, 0, 16); \ _a->words.w1 = _SHIFTL(o, 16, 16) | _SHIFTL(c, 0, 16); \
} }
#define aInterl(pkt, f, i, o, c) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = (_SHIFTL(A_INTERL, 24, 8) | _SHIFTL(f, 16, 8) | \
_SHIFTL(i, 0, 16)); \
_a->words.w1 = _SHIFTL(o, 16, 16) | _SHIFTL(c, 0, 16); \
}
/* /*
* Sets internal volume parameters. * Sets internal volume parameters.
* See aEnvMixer for more info. * See aEnvMixer for more info.
@ -663,12 +649,50 @@ typedef short ENVMIX_STATE[40];
#undef aEnvMixer #undef aEnvMixer
#undef aInterleave #undef aInterleave
// New or modified operations in the new audio microcode below
/**
* Decompresses S8 data.
* Possible flags: A_INIT and A_LOOP.
*
* First set up internal data in DMEM:
* aSetLoop(cmd++, physicalAddressOfLoopState) (if A_LOOP is set)
*
* Then before this command, call:
* aSetBuffer(cmd++, 0, in, out, count)
*
* Note: count will be rounded up to the nearest multiple of 32 bytes.
*
* S8 decompression works by expanding s8 bytes into s16 numbers,
* by performing a left shift of 8 steps.
*
* Before the algorithm starts, the previous 16 samples are loaded according to flag:
* A_INIT: all zeros
* A_LOOP: the address set by aSetLoop
* no flags: the DRAM address in the s parameter
* These 16 samples are immediately copied to the destination address.
*
* The result of "count" bytes will be written after these 16 initial samples.
* The last 16 samples written to the destination will also be written to
* the state address in DRAM.
*/
#define aS8Dec(pkt, f, s) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = _SHIFTL(A_S8DEC, 24, 8) | _SHIFTL(f, 16, 8); \
_a->words.w1 = (uintptr_t)(s); \
}
/* /*
* Mix two tracks by simple clamped addition. * Mix two tracks by simple clamped addition.
* *
* s: DMEM source track 1 * s: DMEM source track 1
* d: DMEM source track 2 and destination * d: DMEM source track 2 and destination
* c: number of bytes to write (rounded down to 16 byte alignment) * c: number of bytes to write
*
* Note: count is first rounded down to the nearest multiple of 16 bytes
* and then rounded up to the nearest multiple of 64 bytes.
*/ */
#define aAddMixer(pkt, s, d, c) \ #define aAddMixer(pkt, s, d, c) \
{ \ { \
@ -726,6 +750,28 @@ typedef short ENVMIX_STATE[40];
_a->words.w1 = (_SHIFTL(d, 16, 16) | _SHIFTL(0x80, 0, 16)); \ _a->words.w1 = (_SHIFTL(d, 16, 16) | _SHIFTL(0x80, 0, 16)); \
} }
/*
* Copies memory in DMEM, second version.
*
* Copies t * c bytes from address i to address o.
*
* Note: count is first rounded up to the nearest multiple of 32 bytes,
* before the multiplication by t.
*
* Note: This acts as memcpy where 32 bytes are moved at a time, therefore
* if input and output overlap, output address should be less than input address.
*
* Not used in SM64.
*/
#define aDMEMMove2(pkt, t, i, o, c) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = _SHIFTL(A_DMEMMOVE2, 24, 8) | \
_SHIFTL(t, 16, 8) | _SHIFTL(i, 0, 16); \
_a->words.w1 = _SHIFTL(o, 16, 16) | _SHIFTL(c, 0, 16); \
}
/* /*
* Fast resample. * Fast resample.
* *
@ -734,14 +780,37 @@ typedef short ENVMIX_STATE[40];
* *
* This works like the other resample command but just takes the "nearest" sample, * This works like the other resample command but just takes the "nearest" sample,
* instead of a function of the four nearest samples. * instead of a function of the four nearest samples.
*
* Initially the current position is calculated as (in << 16) + startFract.
* For every sample to create, the value is simply taken from the sample
* at address ((position >> 17) << 1). Then the current position is incremented
* by (pitch << 2).
*
* Note: count represents the number of output bytes to create, and is
* rounded up to the nearest multiple of 8 bytes.
*/ */
#define aResampleZoh(pkt, pitch, start_fract) \ #define aResampleZoh(pkt, pitch, startFract) \
{ \ { \
Acmd *_a = (Acmd *)pkt; \ Acmd *_a = (Acmd *)pkt; \
\ \
_a->words.w0 = (_SHIFTL(A_RESAMPLE_ZOH, 24, 8) | \ _a->words.w0 = (_SHIFTL(A_RESAMPLE_ZOH, 24, 8) | \
_SHIFTL(pitch, 0, 16)); \ _SHIFTL(pitch, 0, 16)); \
_a->words.w1 = _SHIFTL(start_fract, 0, 16); \ _a->words.w1 = _SHIFTL(startFract, 0, 16); \
}
/*
* Fast downsampling by taking every other sample, discarding others.
*
* Note: nSamples refers to the number of output samples to create, and
* is first rounded up to the nearest multiple of 8.
*/
#define aDownsampleHalf(pkt, nSamples, i, o) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = (_SHIFTL(A_DOWNSAMPLE_HALF, 24, 8) | \
_SHIFTL(nSamples, 0, 16)); \
_a->words.w1 = _SHIFTL(i, 16, 16) | _SHIFTL(o, 0, 16); \
} }
/* /*
@ -764,39 +833,87 @@ typedef short ENVMIX_STATE[40];
_a->words.w1 = _SHIFTL(i, 16, 16) | _SHIFTL(o, 0, 16); \ _a->words.w1 = _SHIFTL(i, 16, 16) | _SHIFTL(o, 0, 16); \
} }
#define aEnvSetup1(pkt, a, b, c, d) \ /*
* See aEnvMixer for more info.
*/
#define aEnvSetup1(pkt, initialVolReverb, rampReverb, rampLeft, rampRight) \
{ \ { \
Acmd *_a = (Acmd *)pkt; \ Acmd *_a = (Acmd *)pkt; \
\ \
_a->words.w0 = (_SHIFTL(A_ENVSETUP1, 24, 8) | \ _a->words.w0 = (_SHIFTL(A_ENVSETUP1, 24, 8) | \
_SHIFTL(a, 16, 8) | _SHIFTL(b, 0, 16)); \ _SHIFTL(initialVolReverb, 16, 8) | \
_a->words.w1 = _SHIFTL(c, 16, 16) | _SHIFTL(d, 0, 16); \ _SHIFTL(rampReverb, 0, 16)); \
_a->words.w1 = _SHIFTL(rampLeft, 16, 16) | \
_SHIFTL(rampRight, 0, 16); \
} }
#define aEnvSetup2(pkt, volLeft, volRight) \ /*
* See aEnvMixer for more info.
*/
#define aEnvSetup2(pkt, initialVolLeft, initialVolRight) \
{ \ { \
Acmd *_a = (Acmd *)pkt; \ Acmd *_a = (Acmd *)pkt; \
\ \
_a->words.w0 = _SHIFTL(A_ENVSETUP2, 24, 8); \ _a->words.w0 = _SHIFTL(A_ENVSETUP2, 24, 8); \
_a->words.w1 = _SHIFTL(volLeft, 16, 16) | \ _a->words.w1 = _SHIFTL(initialVolLeft, 16, 16) | \
_SHIFTL(volRight, 0, 16); \ _SHIFTL(initialVolRight, 0, 16); \
} }
#define aEnvMixer(pkt, inBuf, nSamples, bit1, bit2, bit3, dryLeft, dryRight, wetLeft, wetRight) \ /*
* Mixes an envelope with mono sound into 4 channels.
*
* To allow for many parameters, a sequence of aEnvSetup1, aEnvSetup2,
* aEnvMixer shall always be called.
*
* The function works in blocks of 8 samples.
* However, nSamples is rounded up to the nearest multiple of 16 samples.
*
* For each sample in a block:
* 1. sampleLeft = in * volLeft * (negLeft ? -1 : 1)
* 2. sampleRight = in * volRight * (negRight ? -1 : 1)
* 3. dryLeft += sampleLeft
* 4. dryRight += sampleRight
* 5. if swapReverb: swap sampleLeft and sampleRight
* 6. wetLeft += sampleLeft * volReverb
* 7. wetRight += sampleRight * volReverb
*
* After each block, all vol variables are added by their corresponding
* ramp value.
*
* Each volume variable is treated as a UQ0.16 number. Make sure
* the ramp additions don't overflow, or wrapping will occur.
* The initialVolReverb parameter is only 8 bits, but will be left
* shifted 8 bits by the rsp.
*/
#define aEnvMixer(pkt, inBuf, nSamples, swapReverb, negLeft, negRight, \
dryLeft, dryRight, wetLeft, wetRight) \
{ \ { \
Acmd *_a = (Acmd *)pkt; \ Acmd *_a = (Acmd *)pkt; \
\ \
_a->words.w0 = (_SHIFTL(A_ENVMIXER, 24, 8) | \ _a->words.w0 = (_SHIFTL(A_ENVMIXER, 24, 8) | \
_SHIFTL((inBuf) >> 4, 16, 8) | \ _SHIFTL((inBuf) >> 4, 16, 8) | \
_SHIFTL(nSamples, 8, 8)) | \ _SHIFTL(nSamples, 8, 8)) | \
_SHIFTL(bit1, 2, 1) | _SHIFTL(bit2, 1, 1) | \ _SHIFTL(swapReverb, 2, 1) | _SHIFTL(negLeft, 1, 1) |\
_SHIFTL(bit3, 0, 1); \ _SHIFTL(negRight, 0, 1); \
_a->words.w1 = _SHIFTL((dryLeft) >> 4, 24, 8) | \ _a->words.w1 = _SHIFTL((dryLeft) >> 4, 24, 8) | \
_SHIFTL((dryRight) >> 4, 16, 8) | \ _SHIFTL((dryRight) >> 4, 16, 8) | \
_SHIFTL((wetLeft) >> 4, 8, 8) | \ _SHIFTL((wetLeft) >> 4, 8, 8) | \
_SHIFTL((wetRight) >> 4, 0, 8); \ _SHIFTL((wetRight) >> 4, 0, 8); \
} }
/*
* Interleaves two mono channels into stereo.
*
* The count refers to the size of each input. Hence 2 * count bytes
* will be written out.
*
* A left sample will be placed before the right sample.
* All addresses (output, left, right) are DMEM addresses.
*
* Note: count will be rounded up to the nearest multiple of 8 bytes.
* The previous version of this function rounded up to the nearest
* multiple of 16 bytes.
*/
#define aInterleave(pkt, o, l, r, c) \ #define aInterleave(pkt, o, l, r, c) \
{ \ { \
Acmd *_a = (Acmd *)pkt; \ Acmd *_a = (Acmd *)pkt; \
@ -806,7 +923,26 @@ typedef short ENVMIX_STATE[40];
_a->words.w1 = _SHIFTL(l, 16, 16) | _SHIFTL(r, 0, 16); \ _a->words.w1 = _SHIFTL(l, 16, 16) | _SHIFTL(r, 0, 16); \
} }
// countOrBuf meaning depends on flag /*
* Linear filter function.
*
* Calculates out[i] = sum all elements in the vector in[i..i-7] * filter[0..7],
* where "*" represents dot multiplication. The input/output contains s16
* samples and filter contains Q1.15 signed fixed point numbers.
* Every result sample is rounded and clamped.
*
* First initiate by calling with the flag f set to 2, countOrBuf contains
* the length in bytes that shall be processed in the next call. The addr
* parameter shall contain the DRAM address to the filter table (16 bytes).
* The count will be rounded up to the nearest multiple of 16 bytes.
*
* The aFilter function shall then be called in direct succession, with flag
* set to either 0 or 1. The countOrBuf parameter shall contain the DMEM
* address for the input/output. The addr parameter shall contain the DRAM
* address for the state, containing the last previous 8 input samples.
* The state is always written to upon exit, but is only read at entry if
* the flag is 0 (otherwise all-zero samples are used instead).
*/
#define aFilter(pkt, f, countOrBuf, addr) \ #define aFilter(pkt, f, countOrBuf, addr) \
{ \ { \
Acmd *_a = (Acmd *)pkt; \ Acmd *_a = (Acmd *)pkt; \
@ -816,22 +952,41 @@ typedef short ENVMIX_STATE[40];
_a->words.w1 = (uintptr_t)(addr); \ _a->words.w1 = (uintptr_t)(addr); \
} }
#define aHilogain(pkt, id, buflen, i) \ /*
* Modifies the volume of samples using a simple UQ4.4 gain multiplier.
*
* Performs the following:
*
* 1. Count c is rounded up to 32 byte alignment
* 2. g is a u8 that contains a UQ4.4 number
* 3. Modify each sample s, so that s = clamp_s16(s * g >> 4)
*/
#define aHiLoGain(pkt, g, buflen, i) \
{ \ { \
Acmd *_a = (Acmd *)pkt; \ Acmd *_a = (Acmd *)pkt; \
\ \
_a->words.w0 = _SHIFTL(A_HILOGAIN, 24, 8) | \ _a->words.w0 = _SHIFTL(A_HILOGAIN, 24, 8) | \
_SHIFTL((id), 16, 8) | _SHIFTL((buflen), 0, 16); \ _SHIFTL((g), 16, 8) | _SHIFTL((buflen), 0, 16); \
_a->words.w1 = _SHIFTL((i), 16, 16); \ _a->words.w1 = _SHIFTL((i), 16, 16); \
} }
#define aUnknown25(pkt, f, g, i, o) \ /*
* Performs the following:
*
* 1. Count c is rounded up to 64 byte alignment
* 2. f is added to i
* 3. i and o are from now treated as s16 pointers
* 4. 32 s16 samples are loaded from i to tbl
* 5. for (u32 idx = 0; idx * sizeof(s16) < c; idx++)
* o[idx] = clamp_s16((s32)o[idx] * (s32)tbl[idx % 32]);
*/
#define aUnknown25(pkt, f, c, o, i) \
{ \ { \
Acmd *_a = (Acmd *)pkt; \ Acmd *_a = (Acmd *)pkt; \
\ \
_a->words.w0 = (_SHIFTL(A_UNK_25, 24, 8) | \ _a->words.w0 = (_SHIFTL(A_UNK_25, 24, 8) | \
_SHIFTL((f), 16, 8) | _SHIFTL((g), 0, 16)); \ _SHIFTL((f), 16, 8) | _SHIFTL((c), 0, 16)); \
_a->words.w1 = _SHIFTL((i), 16, 16) | _SHIFTL((o), 0, 16); \ _a->words.w1 = _SHIFTL((o), 16, 16) | _SHIFTL((i), 0, 16); \
} }
#endif #endif

View File

@ -8,7 +8,8 @@ typedef struct
u8 *offset; u8 *offset;
s32 len; s32 len;
#ifdef VERSION_SH #ifdef VERSION_SH
s8 magic[2]; // tbl: 0x0204, otherwise: 0x0203 s8 medium;
s8 magic; // tbl: 0x04, otherwise: 0x03
// for ctl (else zeros): // for ctl (else zeros):
union { union {
@ -38,7 +39,9 @@ typedef struct
#ifdef VERSION_SH #ifdef VERSION_SH
s16 unk2; s16 unk2;
u8 *data; u8 *data;
#if !IS_64_BIT
s32 pad[2]; s32 pad[2];
#endif
#endif #endif
ALSeqData seqArray[1]; ALSeqData seqArray[1];
} ALSeqFile; } ALSeqFile;

View File

@ -261,7 +261,7 @@ extern const BehaviorScript bhvBoo[];
extern const BehaviorScript bhvMerryGoRoundBoo[]; extern const BehaviorScript bhvMerryGoRoundBoo[];
extern const BehaviorScript bhvGhostHuntBoo[]; extern const BehaviorScript bhvGhostHuntBoo[];
extern const BehaviorScript bhvHiddenStaircaseStep[]; extern const BehaviorScript bhvHiddenStaircaseStep[];
extern const BehaviorScript bhvBooBossSpawnedBridge[]; extern const BehaviorScript bhvBooStaircase[];
extern const BehaviorScript bhvBbhTiltingTrapPlatform[]; extern const BehaviorScript bhvBbhTiltingTrapPlatform[];
extern const BehaviorScript bhvHauntedBookshelf[]; extern const BehaviorScript bhvHauntedBookshelf[];
extern const BehaviorScript bhvMeshElevator[]; extern const BehaviorScript bhvMeshElevator[];

View File

@ -8,7 +8,7 @@
*/ */
// Bug Fixes // Bug Fixes
// --| US Version Nintendo Bug Fixes // --| Post-JP Version Nintendo Bug Fixes
/// Fixes bug where obtaining over 999 coins sets the number of lives to 999 (or -25) /// Fixes bug where obtaining over 999 coins sets the number of lives to 999 (or -25)
#define BUGFIX_MAX_LIVES (0 || VERSION_US || VERSION_EU || VERSION_SH) #define BUGFIX_MAX_LIVES (0 || VERSION_US || VERSION_EU || VERSION_SH)
/// Fixes bug where the Boss music won't fade out after defeating King Bob-omb /// Fixes bug where the Boss music won't fade out after defeating King Bob-omb
@ -22,6 +22,17 @@
#define BUGFIX_PIRANHA_PLANT_SLEEP_DAMAGE (0 || VERSION_US || VERSION_SH) #define BUGFIX_PIRANHA_PLANT_SLEEP_DAMAGE (0 || VERSION_US || VERSION_SH)
/// Fixes bug where it shows a star when you grab a key in bowser battle stages /// Fixes bug where it shows a star when you grab a key in bowser battle stages
#define BUGFIX_STAR_BOWSER_KEY (0 || VERSION_US || VERSION_EU || VERSION_SH) #define BUGFIX_STAR_BOWSER_KEY (0 || VERSION_US || VERSION_EU || VERSION_SH)
/// Fixes bug that enables Mario in time stop even if is not ready to speak
#define BUGFIX_DIALOG_TIME_STOP (0 || VERSION_US || VERSION_EU || VERSION_SH)
/// Fixes bug that causes Mario to still collide with Bowser in BITS after his defeat
#define BUGFIX_BOWSER_COLLIDE_BITS_DEAD (0 || VERSION_US || VERSION_EU || VERSION_SH)
/// Fixes bug where Bowser wouldn't reset his speed when fallen off (and adds missing checks)
#define BUGFIX_BOWSER_FALLEN_OFF_STAGE (0 || VERSION_US || VERSION_EU || VERSION_SH)
/// Fixes bug where Bowser would look weird while fading out
#define BUGFIX_BOWSER_FADING_OUT (0 || VERSION_US || VERSION_EU || VERSION_SH)
// Support Rumble Pak
#define ENABLE_RUMBLE (0 || VERSION_SH)
// Screen Size Defines // Screen Size Defines
#define SCREEN_WIDTH 320 #define SCREEN_WIDTH 320

View File

@ -2,6 +2,7 @@
#define DIALOG_IDS_H #define DIALOG_IDS_H
enum DialogId { enum DialogId {
DIALOG_NONE = -1,
DIALOG_000, DIALOG_000,
DIALOG_001, DIALOG_001,
DIALOG_002, DIALOG_002,

View File

@ -1,4 +1,4 @@
# Assembly Macros // Assembly Macros
.set K0BASE, 0x80000000 .set K0BASE, 0x80000000
.set K1BASE, 0xA0000000 .set K1BASE, 0xA0000000

View File

@ -410,12 +410,12 @@
// second set of actor bins, (0x64-0x73) // second set of actor bins, (0x64-0x73)
// group 12 // group 12
#define MODEL_BOWSER 0x64 // bowser_geo - 2nd geo loaded is bowser_geo_000424, starts with shadow command #define MODEL_BOWSER 0x64 // bowser_geo
#define MODEL_BOWSER_BOMB_CHILD_OBJ 0x65 // bowser_bomb_geo - Spawns as a chill object in bowser's behavior command, causing an explosion if it touches a bomb #define MODEL_BOWSER_BOMB_CHILD_OBJ 0x65 // bowser_bomb_geo - Spawns as a chill object in bowser's behavior command, causing an explosion if it touches a bomb
#define MODEL_BOWSER_SMOKE 0x66 // bowser_impact_smoke_geo #define MODEL_BOWSER_SMOKE 0x66 // bowser_impact_smoke_geo
#define MODEL_BOWSER_FLAMES 0x67 // bowser_flames_geo #define MODEL_BOWSER_FLAMES 0x67 // bowser_flames_geo
#define MODEL_BOWSER_WAVE 0x68 // invisible_bowser_accessory_geo #define MODEL_BOWSER_WAVE 0x68 // invisible_bowser_accessory_geo
#define MODEL_BOWSER2 0x69 // bowser2_geo - 2nd geo loaded is bowser_geo_000770, starts with node command, only difference #define MODEL_BOWSER_NO_SHADOW 0x69 // bowser_geo_no_shadow
// group 13 // group 13
#define MODEL_BUB 0x64 // cheep_cheep_geo #define MODEL_BUB 0x64 // cheep_cheep_geo
@ -531,7 +531,7 @@
#define MODEL_KOOPA_WITHOUT_SHELL 0xBF // koopa_without_shell_geo #define MODEL_KOOPA_WITHOUT_SHELL 0xBF // koopa_without_shell_geo
#define MODEL_GOOMBA 0xC0 // goomba_geo #define MODEL_GOOMBA 0xC0 // goomba_geo
#define MODEL_SEAWEED 0xC1 // seaweed_geo #define MODEL_SEAWEED 0xC1 // seaweed_geo
#define MODEL_AMP 0xC2 // amp_geo #define MODEL_AMP 0xC2 // dAmpGeo
#define MODEL_BOBOMB_BUDDY 0xC3 // bobomb_buddy_geo #define MODEL_BOBOMB_BUDDY 0xC3 // bobomb_buddy_geo
// find me // find me
// find me // find me

View File

@ -53,23 +53,18 @@
#define HELD_DROPPED 3 #define HELD_DROPPED 3
/* oDialogState */ /* oDialogState */
#define DIALOG_UNK1_ENABLE_TIME_STOP 0 #define DIALOG_STATUS_ENABLE_TIME_STOP 0
#define DIALOG_UNK1_INTERRUPT_MARIO_ACTION 1 #define DIALOG_STATUS_INTERRUPT 1
#define DIALOG_UNK1_BEGIN_DIALOG 2 #define DIALOG_STATUS_START_DIALOG 2
#define DIALOG_UNK1_AWAIT_DIALOG 3 #define DIALOG_STATUS_STOP_DIALOG 3
#define DIALOG_UNK1_DISABLE_TIME_STOP 4 #define DIALOG_STATUS_DISABLE_TIME_STOP 4
#define DIALOG_UNK1_FLAG_DEFAULT (1 << 1) // 0x02 #define DIALOG_FLAG_NONE 0
#define DIALOG_UNK1_FLAG_RESPONSE (1 << 2) // 0x04 #define DIALOG_FLAG_TURN_TO_MARIO (1 << 0) // 0x01 // cutscene only
#define DIALOG_UNK1_FLAG_4 (1 << 4) // 0x10 #define DIALOG_FLAG_TEXT_DEFAULT (1 << 1) // 0x02
#define DIALOG_FLAG_TEXT_RESPONSE (1 << 2) // 0x04 // non-cutscene only
#define DIALOG_UNK2_ENABLE_TIME_STOP 0 #define DIALOG_FLAG_UNK_CAPSWITCH (1 << 3) // 0x08 // not defined
#define DIALOG_UNK2_TURN_AND_INTERRUPT_MARIO_ACTION 1 #define DIALOG_FLAG_TIME_STOP_ENABLED (1 << 4) // 0x10
#define DIALOG_UNK2_AWAIT_DIALOG 2
#define DIALOG_UNK2_END_DIALOG 3
#define DIALOG_UNK2_FLAG_0 (1 << 0) // 0x01
#define DIALOG_UNK2_LEAVE_TIME_STOP_ENABLED (1 << 4) // 0x10
/* oMoveFlags */ /* oMoveFlags */
#define OBJ_MOVE_LANDED (1 << 0) // 0x0001 #define OBJ_MOVE_LANDED (1 << 0) // 0x0001
@ -191,6 +186,112 @@
#define BOBOMB_BUDDY_HAS_NOT_TALKED 0 #define BOBOMB_BUDDY_HAS_NOT_TALKED 0
#define BOBOMB_BUDDY_HAS_TALKED 2 #define BOBOMB_BUDDY_HAS_TALKED 2
/* Bowser */
/* Tail oAction */
#define BOWSER_ACT_TAIL_DEFAULT 0
#define BOWSER_ACT_TAIL_THROWN 1
#define BOWSER_ACT_TAIL_TOUCHED_MARIO 2
/* oAction */
#define BOWSER_ACT_DEFAULT 0
#define BOWSER_ACT_THROWN 1
#define BOWSER_ACT_JUMP_ONTO_STAGE 2
#define BOWSER_ACT_DANCE 3
#define BOWSER_ACT_DEAD 4
#define BOWSER_ACT_WAIT 5
#define BOWSER_ACT_INTRO_WALK 6
#define BOWSER_ACT_CHARGE_MARIO 7
#define BOWSER_ACT_SPIT_FIRE_INTO_SKY 8
#define BOWSER_ACT_SPIT_FIRE_ONTO_FLOOR 9
#define BOWSER_ACT_HIT_EDGE 10
#define BOWSER_ACT_TURN_FROM_EDGE 11
#define BOWSER_ACT_HIT_MINE 12
#define BOWSER_ACT_BIG_JUMP 13
#define BOWSER_ACT_WALK_TO_MARIO 14
#define BOWSER_ACT_BREATH_FIRE 15
#define BOWSER_ACT_TELEPORT 16
#define BOWSER_ACT_QUICK_JUMP 17
#define BOWSER_ACT_UNUSED_SLOW_WALK 18
#define BOWSER_ACT_TILT_LAVA_PLATFORM 19
/* Animations */
#define BOWSER_ANIM_STAND_UP 0
#define BOWSER_ANIM_STAND_UP_UNUSED 1 // slightly different
#define BOWSER_ANIM_SHAKING 2
#define BOWSER_ANIM_GRABBED 3
#define BOWSER_ANIM_BROKEN 4 // broken animation
#define BOWSER_ANIM_FALL_DOWN 5 // unused
#define BOWSER_ANIM_BREATH 6
#define BOWSER_ANIM_JUMP 7 // unused, short jump, replaced by start/stop
#define BOWSER_ANIM_JUMP_STOP 8
#define BOWSER_ANIM_JUMP_START 9
#define BOWSER_ANIM_DANCE 10
#define BOWSER_ANIM_BREATH_UP 11
#define BOWSER_ANIM_IDLE 12
#define BOWSER_ANIM_SLOW_GAIT 13
#define BOWSER_ANIM_LOOK_DOWN_STOP_WALK 14
#define BOWSER_ANIM_LOOK_UP_START_WALK 15
#define BOWSER_ANIM_FLIP_DOWN 16
#define BOWSER_ANIM_LAY_DOWN 17
#define BOWSER_ANIM_RUN_START 18
#define BOWSER_ANIM_RUN 19
#define BOWSER_ANIM_RUN_STOP 20
#define BOWSER_ANIM_RUN_SLIP 21
#define BOWSER_ANIM_BREATH_QUICK 22
#define BOWSER_ANIM_EDGE_MOVE 23
#define BOWSER_ANIM_EDGE_STOP 24
#define BOWSER_ANIM_FLIP 25
#define BOWSER_ANIM_STAND_UP_FROM_FLIP 26
/* oBehParams2ndByte */
#define BOWSER_BP_BITDW 0
#define BOWSER_BP_BITFS 1
#define BOWSER_BP_BITS 2
/* oBowserCamAct */
#define BOWSER_CAM_ACT_IDLE 0
#define BOWSER_CAM_ACT_WALK 1
#define BOWSER_CAM_ACT_END 2
/* oBowserStatus */
#define BOWSER_STATUS_ANGLE_MARIO (1 << 1) // 0x00000002
#define BOWSER_STATUS_ANGLE_CENTRE (1 << 2) // 0x00000004
#define BOWSER_STATUS_DIST_MARIO (1 << 3) // 0x00000008
#define BOWSER_STATUS_DIST_CENTRE (1 << 4) // 0x00000010
#define BOWSER_STATUS_BIG_JUMP (1 << 16) // 0x00010000
#define BOWSER_STATUS_FIRE_SKY (1 << 17) // 0x00020000
/* oBowserGrabbedStatus */
#define BOWSER_GRAB_STATUS_NONE 0
#define BOWSER_GRAB_STATUS_GRABBED 1
#define BOWSER_GRAB_STATUS_HOLDING 2
/* oSubAction */
#define BOWSER_SUB_ACT_DEAD_FLY_BACK 0
#define BOWSER_SUB_ACT_DEAD_BOUNCE 1
#define BOWSER_SUB_ACT_DEAD_WAIT 2
#define BOWSER_SUB_ACT_DEAD_DEFAULT_END 3
#define BOWSER_SUB_ACT_DEAD_DEFAULT_END_OVER 4
#define BOWSER_SUB_ACT_DEAD_FINAL_END 10
#define BOWSER_SUB_ACT_DEAD_FINAL_END_OVER 11
#define BOWSER_SUB_ACT_CHARGE_START 0
#define BOWSER_SUB_ACT_CHARGE_RUN 1
#define BOWSER_SUB_ACT_CHARGE_END 2
#define BOWSER_SUB_ACT_CHARGE_SLIP 3
#define BOWSER_SUB_ACT_TELEPORT_START 0
#define BOWSER_SUB_ACT_TELEPORT_MOVE 1
#define BOWSER_SUB_ACT_TELEPORT_STOP 2
#define BOWSER_SUB_ACT_HIT_MINE_START 0
#define BOWSER_SUB_ACT_HIT_MINE_FALL 1
#define BOWSER_SUB_ACT_HIT_MINE_STOP 2
#define BOWSER_SUB_ACT_JUMP_ON_STAGE_IDLE 0
#define BOWSER_SUB_ACT_JUMP_ON_STAGE_START 1
#define BOWSER_SUB_ACT_JUMP_ON_STAGE_LAND 2
#define BOWSER_SUB_ACT_JUMP_ON_STAGE_STOP 3
/* Bowser Bits Platform*/
/* oAction */
#define BOWSER_BITS_PLAT_ACT_START 0
#define BOWSER_BITS_PLAT_ACT_CHECK 1
#define BOWSER_BITS_PLAT_ACT_FALL 2
/* Fish Spawer */ /* Fish Spawer */
/* oAction */ /* oAction */
#define FISH_SPAWNER_ACT_SPAWN 0 #define FISH_SPAWNER_ACT_SPAWN 0

View File

@ -65,8 +65,8 @@
#define /*0x0B4*/ oVelZ OBJECT_FIELD_F32(0x0B) #define /*0x0B4*/ oVelZ OBJECT_FIELD_F32(0x0B)
#define /*0x0B8*/ oForwardVel OBJECT_FIELD_F32(0x0C) #define /*0x0B8*/ oForwardVel OBJECT_FIELD_F32(0x0C)
#define /*0x0B8*/ oForwardVelS32 OBJECT_FIELD_S32(0x0C) #define /*0x0B8*/ oForwardVelS32 OBJECT_FIELD_S32(0x0C)
#define /*0x0BC*/ oUnkBC OBJECT_FIELD_F32(0x0D) #define /*0x0BC*/ oLeftVel OBJECT_FIELD_F32(0x0D)
#define /*0x0C0*/ oUnkC0 OBJECT_FIELD_F32(0x0E) #define /*0x0C0*/ oUpVel OBJECT_FIELD_F32(0x0E)
#define /*0x0C4*/ O_MOVE_ANGLE_INDEX 0x0F #define /*0x0C4*/ O_MOVE_ANGLE_INDEX 0x0F
#define /*0x0C4*/ O_MOVE_ANGLE_PITCH_INDEX (O_MOVE_ANGLE_INDEX + 0) #define /*0x0C4*/ O_MOVE_ANGLE_PITCH_INDEX (O_MOVE_ANGLE_INDEX + 0)
#define /*0x0C4*/ O_MOVE_ANGLE_YAW_INDEX (O_MOVE_ANGLE_INDEX + 1) #define /*0x0C4*/ O_MOVE_ANGLE_YAW_INDEX (O_MOVE_ANGLE_INDEX + 1)
@ -274,24 +274,24 @@
#define /*0x0FC*/ oBBallSpawnerPeriodMinus1 OBJECT_FIELD_S32(0x1D) #define /*0x0FC*/ oBBallSpawnerPeriodMinus1 OBJECT_FIELD_S32(0x1D)
/* Bowser */ /* Bowser */
#define /*0x088*/ oBowserUnk88 OBJECT_FIELD_S32(0x00) #define /*0x088*/ oBowserCamAct OBJECT_FIELD_S32(0x00)
#define /*0x0F4*/ oBowserUnkF4 OBJECT_FIELD_S32(0x1B) #define /*0x0F4*/ oBowserStatus OBJECT_FIELD_S32(0x1B)
#define /*0x0F8*/ oBowserUnkF8 OBJECT_FIELD_S32(0x1C) #define /*0x0F8*/ oBowserTimer OBJECT_FIELD_S32(0x1C)
#define /*0x0FC*/ oBowserDistToCentre OBJECT_FIELD_F32(0x1D) #define /*0x0FC*/ oBowserDistToCentre OBJECT_FIELD_F32(0x1D)
#define /*0x106*/ oBowserUnk106 OBJECT_FIELD_S16(0x1F, 1) #define /*0x106*/ oBowserBitsJustJump OBJECT_FIELD_S16(0x1F, 1)
#define /*0x108*/ oBowserUnk108 OBJECT_FIELD_S16(0x20, 0) #define /*0x108*/ oBowserRandSplitFloor OBJECT_FIELD_S16(0x20, 0)
#define /*0x10A*/ oBowserHeldAnglePitch OBJECT_FIELD_S16(0x20, 1) #define /*0x10A*/ oBowserHeldAnglePitch OBJECT_FIELD_S16(0x20, 1)
#define /*0x10D*/ oBowserHeldAngleVelYaw OBJECT_FIELD_S16(0x21, 0) #define /*0x10D*/ oBowserHeldAngleVelYaw OBJECT_FIELD_S16(0x21, 0)
#define /*0x10E*/ oBowserUnk10E OBJECT_FIELD_S16(0x21, 1) #define /*0x10E*/ oBowserGrabbedStatus OBJECT_FIELD_S16(0x21, 1)
#define /*0x110*/ oBowserUnk110 OBJECT_FIELD_S16(0x22, 0) #define /*0x110*/ oBowserIsReacting OBJECT_FIELD_S16(0x22, 0)
#define /*0x112*/ oBowserAngleToCentre OBJECT_FIELD_S16(0x22, 1) #define /*0x112*/ oBowserAngleToCentre OBJECT_FIELD_S16(0x22, 1)
#define /*0x1AC*/ oBowserUnk1AC OBJECT_FIELD_S16(0x49, 0) #define /*0x1AC*/ oBowserTargetOpacity OBJECT_FIELD_S16(0x49, 0)
#define /*0x1AE*/ oBowserUnk1AE OBJECT_FIELD_S16(0x49, 1) #define /*0x1AE*/ oBowserEyesTimer OBJECT_FIELD_S16(0x49, 1)
#define /*0x1B0*/ oBowserEyesShut OBJECT_FIELD_S16(0x4A, 0) #define /*0x1B0*/ oBowserEyesShut OBJECT_FIELD_S16(0x4A, 0)
#define /*0x1B2*/ oBowserUnk1B2 OBJECT_FIELD_S16(0x4A, 1) #define /*0x1B2*/ oBowserRainbowLight OBJECT_FIELD_S16(0x4A, 1)
/* Bowser Shockwave */ /* Bowser Shockwave */
#define /*0x0F4*/ oBowserShockWaveUnkF4 OBJECT_FIELD_F32(0x1B) #define /*0x0F4*/ oBowserShockWaveScale OBJECT_FIELD_F32(0x1B)
/* Black Smoke Bowser */ /* Black Smoke Bowser */
#define /*0x0F4*/ oBlackSmokeBowserUnkF4 OBJECT_FIELD_F32(0x1B) #define /*0x0F4*/ oBlackSmokeBowserUnkF4 OBJECT_FIELD_F32(0x1B)
@ -497,7 +497,7 @@
/* Flame */ /* Flame */
#define /*0x0F4*/ oFlameScale OBJECT_FIELD_F32(0x1B) #define /*0x0F4*/ oFlameScale OBJECT_FIELD_F32(0x1B)
#define /*0x0F8*/ oFlameSpeedTimerOffset OBJECT_FIELD_S32(0x1C) #define /*0x0F8*/ oFlameSpeedTimerOffset OBJECT_FIELD_S32(0x1C)
#define /*0x0FC*/ oFlameUnkFC OBJECT_FIELD_F32(0x1D) #define /*0x0FC*/ oFlameUnusedRand OBJECT_FIELD_F32(0x1D)
#define /*0x100*/ oFlameBowser OBJECT_FIELD_OBJ(0x1E) #define /*0x100*/ oFlameBowser OBJECT_FIELD_OBJ(0x1E)
/* Blue Flame */ /* Blue Flame */
@ -626,7 +626,7 @@
#define /*0x0F4*/ oKoopaRaceEndpointRaceBegun OBJECT_FIELD_S32(0x1B) #define /*0x0F4*/ oKoopaRaceEndpointRaceBegun OBJECT_FIELD_S32(0x1B)
#define /*0x0F8*/ oKoopaRaceEndpointKoopaFinished OBJECT_FIELD_S32(0x1C) #define /*0x0F8*/ oKoopaRaceEndpointKoopaFinished OBJECT_FIELD_S32(0x1C)
#define /*0x0FC*/ oKoopaRaceEndpointRaceStatus OBJECT_FIELD_S32(0x1D) #define /*0x0FC*/ oKoopaRaceEndpointRaceStatus OBJECT_FIELD_S32(0x1D)
#define /*0x100*/ oKoopaRaceEndpointUnk100 OBJECT_FIELD_S32(0x1E) #define /*0x100*/ oKoopaRaceEndpointDialog OBJECT_FIELD_S32(0x1E)
#define /*0x104*/ oKoopaRaceEndpointRaceEnded OBJECT_FIELD_S32(0x1F) #define /*0x104*/ oKoopaRaceEndpointRaceEnded OBJECT_FIELD_S32(0x1F)
/* Koopa Shell Flame */ /* Koopa Shell Flame */
@ -770,10 +770,14 @@
#define /*0x0F8*/ oPitouneUnkF8 OBJECT_FIELD_F32(0x1C) #define /*0x0F8*/ oPitouneUnkF8 OBJECT_FIELD_F32(0x1C)
#define /*0x0FC*/ oPitouneUnkFC OBJECT_FIELD_F32(0x1D) #define /*0x0FC*/ oPitouneUnkFC OBJECT_FIELD_F32(0x1D)
/* Platform */ /* Falling Rising Bitfs Platform */
#define /*0x0F4*/ oPlatformTimer OBJECT_FIELD_S32(0x1B) #define /*0x0F4*/ oBitfsPlatformTimer OBJECT_FIELD_S32(0x1B)
#define /*0x0F8*/ oPlatformUnkF8 OBJECT_FIELD_OBJ(0x1C)
#define /*0x0FC*/ oPlatformUnkFC OBJECT_FIELD_S32(0x1D) /* Falling Bowser Bits Platform */
#define /*0x0F8*/ oBitsPlatformBowser OBJECT_FIELD_OBJ(0x1C)
#define /*0x0FC*/ oBitsPlatformTimer OBJECT_FIELD_S32(0x1D)
/* WF Platform */
#define /*0x10C*/ oPlatformUnk10C OBJECT_FIELD_F32(0x21) #define /*0x10C*/ oPlatformUnk10C OBJECT_FIELD_F32(0x21)
#define /*0x110*/ oPlatformUnk110 OBJECT_FIELD_F32(0x22) #define /*0x110*/ oPlatformUnk110 OBJECT_FIELD_F32(0x22)
@ -877,7 +881,7 @@
// 0x1D-0x21 reserved for pathing // 0x1D-0x21 reserved for pathing
/* Snowman's Head */ /* Snowman's Head */
#define /*0x0F4*/ oSnowmansHeadUnkF4 OBJECT_FIELD_S32(0x1B) #define /*0x0F4*/ oSnowmansHeadDialogActive OBJECT_FIELD_S32(0x1B)
/* Snowman Wind Blowing */ /* Snowman Wind Blowing */
#define /*0x0F4*/ oSLSnowmanWindOriginalYaw OBJECT_FIELD_S32(0x1B) #define /*0x0F4*/ oSLSnowmanWindOriginalYaw OBJECT_FIELD_S32(0x1B)

View File

@ -1,6 +1,8 @@
#ifndef SEGMENTS_H #ifndef SEGMENTS_H
#define SEGMENTS_H #define SEGMENTS_H
#include "config.h"
/* /*
* Memory addresses for segments. Ideally, this header file would not be * Memory addresses for segments. Ideally, this header file would not be
* needed, and the addresses would be defined in sm64.ld and linker-inserted * needed, and the addresses would be defined in sm64.ld and linker-inserted
@ -20,10 +22,10 @@
#define SEG_BUFFERS 0x801C1000 #define SEG_BUFFERS 0x801C1000
#ifdef VERSION_EU #if defined(VERSION_SH) || ENABLE_RUMBLE
#define SEG_MAIN 0x80241800 // TODO: Investigate why it's different?
#elif defined(VERSION_SH)
#define SEG_MAIN 0x80249000 #define SEG_MAIN 0x80249000
#elif defined(VERSION_EU)
#define SEG_MAIN 0x80241800 // TODO: Investigate why it's different?
#else #else
#define SEG_MAIN 0x80246000 #define SEG_MAIN 0x80246000
#endif #endif

View File

@ -6,6 +6,8 @@
#define SEQ_BASE_ID 0x7f #define SEQ_BASE_ID 0x7f
#define SEQ_VARIATION 0x80 #define SEQ_VARIATION 0x80
#define SEQ_MENU_GAME_OVER (SEQ_MENU_TITLE_SCREEN | SEQ_VARIATION)
enum SeqId { enum SeqId {
SEQ_SOUND_PLAYER, // 0x00 SEQ_SOUND_PLAYER, // 0x00
SEQ_EVENT_CUTSCENE_COLLECT_STAR, // 0x01 SEQ_EVENT_CUTSCENE_COLLECT_STAR, // 0x01

View File

@ -1,7 +1,7 @@
# Macros for disassembled sequence files. This file was automatically generated by seq_decoder.py. // Macros for disassembled sequence files. This file was automatically generated by seq_decoder.py.
# To regenerate it, run: ./tools/seq_decoder.py --emit-asm-macros >seq_macros.inc // To regenerate it, run: ./tools/seq_decoder.py --emit-asm-macros > include/seq_macros.inc
# seq commands // seq commands
.macro seq_testchdisabled a .macro seq_testchdisabled a
.byte 0x0 + \a .byte 0x0 + \a
@ -155,7 +155,7 @@
.byte 0xff .byte 0xff
.endm .endm
.ifdef VERSION_SH #ifdef VERSION_SH
.macro seq_unreservenotes .macro seq_unreservenotes
.byte 0xf0 .byte 0xf0
@ -166,9 +166,9 @@
.byte \a .byte \a
.endm .endm
.else #else
.ifdef VERSION_EU #ifdef VERSION_EU
.macro seq_unreservenotes .macro seq_unreservenotes
.byte 0xf0 .byte 0xf0
@ -179,7 +179,7 @@
.byte \a .byte \a
.endm .endm
.else #else
.macro seq_unreservenotes .macro seq_unreservenotes
.byte 0xf1 .byte 0xf1
@ -190,11 +190,11 @@
.byte \a .byte \a
.endm .endm
.endif #endif
.endif #endif
# chan commands // chan commands
.macro chan_startchannel a, b .macro chan_startchannel a, b
.byte 0x10 + \a .byte 0x10 + \a
@ -462,7 +462,7 @@
var_long \a var_long \a
.endm .endm
.ifdef VERSION_SH #ifdef VERSION_SH
.macro chan_setnotepriority a .macro chan_setnotepriority a
.byte 0xe9 .byte 0xe9
@ -495,7 +495,7 @@
.byte 0x90 + \a .byte 0x90 + \a
.endm .endm
.else #else
.macro chan_testlayerfinished a .macro chan_testlayerfinished a
.byte 0x0 + \a .byte 0x0 + \a
@ -514,7 +514,7 @@
.byte 0xa0 + \a .byte 0xa0 + \a
.endm .endm
.ifdef VERSION_EU #ifdef VERSION_EU
.macro chan_setnotepriority a .macro chan_setnotepriority a
.byte 0xe9 .byte 0xe9
@ -530,7 +530,7 @@
.byte \a .byte \a
.endm .endm
.else #else
.macro chan_setnotepriority a .macro chan_setnotepriority a
.byte 0x60 + \a .byte 0x60 + \a
@ -545,11 +545,11 @@
.byte \a .byte \a
.endm .endm
.endif #endif
.endif #endif
# layer commands // layer commands
.macro layer_note0 a, b, c, d .macro layer_note0 a, b, c, d
.byte 0x0 + \a .byte 0x0 + \a
@ -659,7 +659,7 @@
.byte \c .byte \c
.endm .endm
# envelope commands // envelope commands
.macro envelope_disable a .macro envelope_disable a
.byte 0x0, 0x0 .byte 0x0, 0x0
@ -686,7 +686,7 @@
.byte \b >> 8, \b & 0xff .byte \b >> 8, \b & 0xff
.endm .endm
# other commands // other commands
.macro var_long x .macro var_long x
.byte (0x80 | (\x & 0x7f00) >> 8), (\x & 0xff) .byte (0x80 | (\x & 0x7f00) >> 8), (\x & 0xff)

View File

@ -59,7 +59,7 @@
#define INPUT_A_DOWN 0x0080 #define INPUT_A_DOWN 0x0080
#define INPUT_IN_POISON_GAS 0x0100 #define INPUT_IN_POISON_GAS 0x0100
#define INPUT_IN_WATER 0x0200 #define INPUT_IN_WATER 0x0200
#define INPUT_UNKNOWN_10 0x0400 #define INPUT_STOMPED 0x0400
#define INPUT_INTERACT_OBJ_GRABBABLE 0x0800 #define INPUT_INTERACT_OBJ_GRABBABLE 0x0800
#define INPUT_UNKNOWN_12 0x1000 #define INPUT_UNKNOWN_12 0x1000
#define INPUT_B_PRESSED 0x2000 #define INPUT_B_PRESSED 0x2000

View File

@ -386,7 +386,7 @@
#define SOUND_ENV_UNK12 /* 0x40120000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x12, 0x00, 0) // unverified, unused #define SOUND_ENV_UNK12 /* 0x40120000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x12, 0x00, 0) // unverified, unused
#define SOUND_ENV_SLIDING /* 0x40130000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x13, 0x00, 0) // unverified #define SOUND_ENV_SLIDING /* 0x40130000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x13, 0x00, 0) // unverified
#define SOUND_ENV_STAR /* 0x40140010 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x14, 0x00, SOUND_LOWER_BACKGROUND_MUSIC) // unverified #define SOUND_ENV_STAR /* 0x40140010 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x14, 0x00, SOUND_LOWER_BACKGROUND_MUSIC) // unverified
#define SOUND_ENV_UNKNOWN4 /* 0x41150000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x15, 0x00, SOUND_NO_VOLUME_LOSS) // unverified #define SOUND_ENV_MOVING_BIG_PLATFORM /* 0x41150000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x15, 0x00, SOUND_NO_VOLUME_LOSS) // unverified
#define SOUND_ENV_WATER_DRAIN /* 0x41160000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x16, 0x00, SOUND_NO_VOLUME_LOSS) // unverified #define SOUND_ENV_WATER_DRAIN /* 0x41160000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x16, 0x00, SOUND_NO_VOLUME_LOSS) // unverified
#define SOUND_ENV_METAL_BOX_PUSH /* 0x40178000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x17, 0x80, 0) // unverified #define SOUND_ENV_METAL_BOX_PUSH /* 0x40178000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x17, 0x80, 0) // unverified
#define SOUND_ENV_SINK_QUICKSAND /* 0x40188000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x18, 0x80, 0) // unverified #define SOUND_ENV_SINK_QUICKSAND /* 0x40188000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x18, 0x80, 0) // unverified

View File

@ -6,6 +6,7 @@
#include <ultra64.h> #include <ultra64.h>
#include "macros.h" #include "macros.h"
#include "config.h"
// Certain functions are marked as having return values, but do not // Certain functions are marked as having return values, but do not
@ -30,8 +31,8 @@ struct Controller
/*0x12*/ u16 buttonPressed; /*0x12*/ u16 buttonPressed;
/*0x14*/ OSContStatus *statusData; /*0x14*/ OSContStatus *statusData;
/*0x18*/ OSContPad *controllerData; /*0x18*/ OSContPad *controllerData;
#ifdef VERSION_SH #if ENABLE_RUMBLE
/*0x1C*/ int port; /*0x1C*/ s32 port;
#endif #endif
}; };
@ -261,27 +262,6 @@ struct MarioBodyState
u8 padding[4]; u8 padding[4];
}; };
struct OffsetSizePair
{
u32 offset;
u32 size;
};
struct MarioAnimDmaRelatedThing
{
u32 count;
u8 *srcAddr;
struct OffsetSizePair anim[1]; // dynamic size
};
struct MarioAnimation
{
struct MarioAnimDmaRelatedThing *animDmaTable;
u8 *currentAnimAddr;
struct Animation *targetAnim;
u8 padding[4];
};
struct MarioState struct MarioState
{ {
/*0x00*/ u16 unk00; /*0x00*/ u16 unk00;
@ -327,7 +307,7 @@ struct MarioState
/*0x94*/ struct PlayerCameraState *statusForCamera; /*0x94*/ struct PlayerCameraState *statusForCamera;
/*0x98*/ struct MarioBodyState *marioBodyState; /*0x98*/ struct MarioBodyState *marioBodyState;
/*0x9C*/ struct Controller *controller; /*0x9C*/ struct Controller *controller;
/*0xA0*/ struct MarioAnimation *animation; /*0xA0*/ struct DmaHandlerList *animList;
/*0xA4*/ u32 collidedObjInteractTypes; /*0xA4*/ u32 collidedObjInteractTypes;
/*0xA8*/ s16 numCoins; /*0xA8*/ s16 numCoins;
/*0xAA*/ s16 numStars; /*0xAA*/ s16 numStars;

View File

@ -8,7 +8,7 @@
#include "game/area.h" #include "game/area.h"
#include "game/level_update.h" #include "game/level_update.h"
#include "menu/level_select_menu.h" #include "menu/title_screen.h"
#include "levels/scripts.h" #include "levels/scripts.h"
#include "levels/menu/header.h" #include "levels/menu/header.h"
@ -33,7 +33,7 @@ const LevelScript level_intro_splash_screen[] = {
// Start animation // Start animation
LOAD_AREA(/*area*/ 1), LOAD_AREA(/*area*/ 1),
CALL(/*arg*/ 0, /*func*/ lvl_intro_update), CALL(/*arg*/ LVL_INTRO_PLAY_ITS_A_ME_MARIO, /*func*/ lvl_intro_update),
SLEEP(/*frames*/ 75), SLEEP(/*frames*/ 75),
TRANSITION(/*transType*/ WARP_TRANSITION_FADE_INTO_COLOR, /*time*/ 16, /*color*/ 0x00, 0x00, 0x00), TRANSITION(/*transType*/ WARP_TRANSITION_FADE_INTO_COLOR, /*time*/ 16, /*color*/ 0x00, 0x00, 0x00),
SLEEP(/*frames*/ 16), SLEEP(/*frames*/ 16),
@ -59,10 +59,10 @@ const LevelScript level_intro_mario_head_regular[] = {
SLEEP(/*frames*/ 2), SLEEP(/*frames*/ 2),
BLACKOUT(/*active*/ FALSE), BLACKOUT(/*active*/ FALSE),
LOAD_AREA(/*area*/ 1), LOAD_AREA(/*area*/ 1),
SET_MENU_MUSIC(/*seq*/ 0x0002), SET_MENU_MUSIC(/*seq*/ SEQ_MENU_TITLE_SCREEN),
TRANSITION(/*transType*/ WARP_TRANSITION_FADE_FROM_STAR, /*time*/ 20, /*color*/ 0x00, 0x00, 0x00), TRANSITION(/*transType*/ WARP_TRANSITION_FADE_FROM_STAR, /*time*/ 20, /*color*/ 0x00, 0x00, 0x00),
SLEEP(/*frames*/ 20), SLEEP(/*frames*/ 20),
CALL_LOOP(/*arg*/ 1, /*func*/ lvl_intro_update), CALL_LOOP(/*arg*/ LVL_INTRO_REGULAR, /*func*/ lvl_intro_update),
JUMP_IF(/*op*/ OP_EQ, /*arg*/ 100, script_intro_L1), JUMP_IF(/*op*/ OP_EQ, /*arg*/ 100, script_intro_L1),
JUMP_IF(/*op*/ OP_EQ, /*arg*/ 101, script_intro_L2), JUMP_IF(/*op*/ OP_EQ, /*arg*/ 101, script_intro_L2),
JUMP(script_intro_L4), JUMP(script_intro_L4),
@ -84,10 +84,10 @@ const LevelScript level_intro_mario_head_dizzy[] = {
SLEEP(/*frames*/ 2), SLEEP(/*frames*/ 2),
BLACKOUT(/*active*/ FALSE), BLACKOUT(/*active*/ FALSE),
LOAD_AREA(/*area*/ 1), LOAD_AREA(/*area*/ 1),
SET_MENU_MUSIC(/*seq*/ 0x0082), SET_MENU_MUSIC(/*seq*/ SEQ_MENU_GAME_OVER),
TRANSITION(/*transType*/ WARP_TRANSITION_FADE_FROM_STAR, /*time*/ 20, /*color*/ 0x00, 0x00, 0x00), TRANSITION(/*transType*/ WARP_TRANSITION_FADE_FROM_STAR, /*time*/ 20, /*color*/ 0x00, 0x00, 0x00),
SLEEP(/*frames*/ 20), SLEEP(/*frames*/ 20),
CALL_LOOP(/*arg*/ 2, /*func*/ lvl_intro_update), CALL_LOOP(/*arg*/ LVL_INTRO_GAME_OVER, /*func*/ lvl_intro_update),
JUMP_IF(/*op*/ OP_EQ, /*arg*/ 100, script_intro_L1), JUMP_IF(/*op*/ OP_EQ, /*arg*/ 100, script_intro_L1),
JUMP_IF(/*op*/ OP_EQ, /*arg*/ 101, script_intro_L2), JUMP_IF(/*op*/ OP_EQ, /*arg*/ 101, script_intro_L2),
JUMP(script_intro_L4), JUMP(script_intro_L4),
@ -106,10 +106,10 @@ const LevelScript level_intro_entry_4[] = {
FREE_LEVEL_POOL(), FREE_LEVEL_POOL(),
LOAD_AREA(/*area*/ 1), LOAD_AREA(/*area*/ 1),
SET_MENU_MUSIC(/*seq*/ 0x0002), SET_MENU_MUSIC(/*seq*/ SEQ_MENU_TITLE_SCREEN),
TRANSITION(/*transType*/ WARP_TRANSITION_FADE_FROM_COLOR, /*time*/ 16, /*color*/ 0xFF, 0xFF, 0xFF), TRANSITION(/*transType*/ WARP_TRANSITION_FADE_FROM_COLOR, /*time*/ 16, /*color*/ 0xFF, 0xFF, 0xFF),
SLEEP(/*frames*/ 16), SLEEP(/*frames*/ 16),
CALL_LOOP(/*arg*/ 3, /*func*/ lvl_intro_update), CALL_LOOP(/*arg*/ LVL_INTRO_LEVEL_SELECT, /*func*/ lvl_intro_update),
JUMP_IF(/*op*/ OP_EQ, /*arg*/ -1, script_intro_L5), JUMP_IF(/*op*/ OP_EQ, /*arg*/ -1, script_intro_L5),
JUMP(script_intro_L3), JUMP(script_intro_L3),
}; };

View File

@ -43,7 +43,7 @@ const LevelScript level_main_menu_entry_1[] = {
FREE_LEVEL_POOL(), FREE_LEVEL_POOL(),
LOAD_AREA(/*area*/ 1), LOAD_AREA(/*area*/ 1),
SET_MENU_MUSIC(/*seq*/ 0x0021), SET_MENU_MUSIC(/*seq*/ SEQ_MENU_FILE_SELECT),
TRANSITION(/*transType*/ WARP_TRANSITION_FADE_FROM_COLOR, /*time*/ 16, /*color*/ 0xFF, 0xFF, 0xFF), TRANSITION(/*transType*/ WARP_TRANSITION_FADE_FROM_COLOR, /*time*/ 16, /*color*/ 0xFF, 0xFF, 0xFF),
CALL(/*arg*/ 0, /*func*/ lvl_init_menu_values_and_cursor_pos), CALL(/*arg*/ 0, /*func*/ lvl_init_menu_values_and_cursor_pos),
CALL_LOOP(/*arg*/ 0, /*func*/ lvl_update_obj_and_load_file_selected), CALL_LOOP(/*arg*/ 0, /*func*/ lvl_update_obj_and_load_file_selected),

View File

@ -171,7 +171,7 @@ static const LevelScript script_exec_ ## folder [] = { \
const LevelScript script_func_global_1[] = { const LevelScript script_func_global_1[] = {
LOAD_MODEL_FROM_GEO(MODEL_BLUE_COIN_SWITCH, blue_coin_switch_geo), LOAD_MODEL_FROM_GEO(MODEL_BLUE_COIN_SWITCH, blue_coin_switch_geo),
LOAD_MODEL_FROM_GEO(MODEL_AMP, amp_geo), LOAD_MODEL_FROM_GEO(MODEL_AMP, dAmpGeo),
LOAD_MODEL_FROM_GEO(MODEL_PURPLE_SWITCH, purple_switch_geo), LOAD_MODEL_FROM_GEO(MODEL_PURPLE_SWITCH, purple_switch_geo),
LOAD_MODEL_FROM_GEO(MODEL_CHECKERBOARD_PLATFORM, checkerboard_platform_geo), LOAD_MODEL_FROM_GEO(MODEL_CHECKERBOARD_PLATFORM, checkerboard_platform_geo),
LOAD_MODEL_FROM_GEO(MODEL_BREAKABLE_BOX, breakable_box_geo), LOAD_MODEL_FROM_GEO(MODEL_BREAKABLE_BOX, breakable_box_geo),
@ -297,7 +297,7 @@ const LevelScript script_func_global_13[] = {
LOAD_MODEL_FROM_GEO(MODEL_BOWSER_SMOKE, bowser_impact_smoke_geo), LOAD_MODEL_FROM_GEO(MODEL_BOWSER_SMOKE, bowser_impact_smoke_geo),
LOAD_MODEL_FROM_GEO(MODEL_BOWSER_FLAMES, bowser_flames_geo), LOAD_MODEL_FROM_GEO(MODEL_BOWSER_FLAMES, bowser_flames_geo),
LOAD_MODEL_FROM_GEO(MODEL_BOWSER_WAVE, invisible_bowser_accessory_geo), LOAD_MODEL_FROM_GEO(MODEL_BOWSER_WAVE, invisible_bowser_accessory_geo),
LOAD_MODEL_FROM_GEO(MODEL_BOWSER2, bowser2_geo), LOAD_MODEL_FROM_GEO(MODEL_BOWSER_NO_SHADOW, bowser_geo_no_shadow),
RETURN(), RETURN(),
}; };

View File

@ -1,7 +1,7 @@
.set noreorder # don't insert nops after branches .set noreorder // don't insert nops after branches
.set gp=64 .set gp=64
.include "macros.inc" #include "macros.inc"
.section .text, "ax" .section .text, "ax"

View File

@ -1,21 +1,14 @@
.set noat # allow manual use of $at .set noat // allow manual use of $at
.set noreorder # don't insert nops after branches .set noreorder // don't insert nops after branches
.set gp=64 .set gp=64
.include "macros.inc" #include "macros.inc"
.ifdef VERSION_EU
.set VERSION_EU_SH, 1
.endif
.ifdef VERSION_SH
.set VERSION_EU_SH, 1
.endif
.section .text, "ax" .section .text, "ax"
.ifdef AVOID_UB #ifdef AVOID_UB
.set D_80334890, D_80334890_fix .set D_80334890, D_80334890_fix
.endif #endif
glabel __osExceptionPreamble glabel __osExceptionPreamble
lui $k0, %hi(__osException) lui $k0, %hi(__osException)
@ -37,7 +30,7 @@ glabel __osException
sd $t2, 0x68($k0) sd $t2, 0x68($k0)
sw $zero, 0x18($k0) sw $zero, 0x18($k0)
mfc0 $t0, $13 mfc0 $t0, $13
.ifndef VERSION_EU_SH #if !defined(VERSION_EU) && !defined(VERSION_SH)
andi $t1, $t0, 0x7c andi $t1, $t0, 0x7c
li $t2, 0 li $t2, 0
bne $t1, $t2, .L80326750 bne $t1, $t2, .L80326750
@ -62,11 +55,11 @@ glabel __osException
lui $at, %hi(D_80334934) lui $at, %hi(D_80334934)
sw $zero, %lo(D_80334934)($at) sw $zero, %lo(D_80334934)($at)
lui $at, %hi(D_80334938) lui $at, %hi(D_80334938)
.endif #endif
move $t0, $k0 move $t0, $k0
.ifndef VERSION_EU_SH #if !defined(VERSION_EU) && !defined(VERSION_SH)
sw $zero, %lo(D_80334938)($at) sw $zero, %lo(D_80334938)($at)
.endif #endif
lui $k0, %hi(D_80334890 + 0x10) lui $k0, %hi(D_80334890 + 0x10)
lw $k0, %lo(D_80334890 + 0x10)($k0) lw $k0, %lo(D_80334890 + 0x10)($k0)
ld $t1, 0x20($t0) ld $t1, 0x20($t0)
@ -79,17 +72,17 @@ glabel __osException
sd $t1, 0x60($k0) sd $t1, 0x60($k0)
ld $t1, 0x68($t0) ld $t1, 0x68($t0)
sd $t1, 0x68($k0) sd $t1, 0x68($k0)
.ifdef VERSION_EU_SH #if defined(VERSION_EU) || defined(VERSION_SH)
lw $k1, 0x118($k0) lw $k1, 0x118($k0)
.else #else
.L80326794: .L80326794:
.endif #endif
mflo $t0 mflo $t0
sd $t0, 0x108($k0) sd $t0, 0x108($k0)
mfhi $t0 mfhi $t0
.ifdef VERSION_EU_SH #if defined(VERSION_EU) || defined(VERSION_SH)
andi $t1, $k1, 0xff00 andi $t1, $k1, 0xff00
.endif #endif
sd $v0, 0x28($k0) sd $v0, 0x28($k0)
sd $v1, 0x30($k0) sd $v1, 0x30($k0)
sd $a0, 0x38($k0) sd $a0, 0x38($k0)
@ -115,31 +108,31 @@ glabel __osException
sd $sp, 0xf0($k0) sd $sp, 0xf0($k0)
sd $fp, 0xf8($k0) sd $fp, 0xf8($k0)
sd $ra, 0x100($k0) sd $ra, 0x100($k0)
.ifdef VERSION_EU_SH #if defined(VERSION_EU) || defined(VERSION_SH)
beqz $t1, .L802F3A18 beqz $t1, .L802F3A18
sd $t0, 0x110($k0) sd $t0, 0x110($k0)
lui $t0, %hi(__OSGlobalIntMask) lui $t0, %hi(__OSGlobalIntMask)
addiu $t0, %lo(__OSGlobalIntMask) addiu $t0, %lo(__OSGlobalIntMask)
lw $t0, ($t0) lw $t0, ($t0)
li $at, -1 li $at, -1
.ifdef VERSION_EU #ifdef VERSION_EU
xor $t0, $t0, $at xor $t0, $t0, $at
.else #else
xor $t2, $t0, $at xor $t2, $t0, $at
.endif #endif
lui $at, (0xFFFF00FF >> 16) lui $at, (0xFFFF00FF >> 16)
.ifdef VERSION_EU #ifdef VERSION_EU
andi $t0, $t0, 0xFF00 andi $t0, $t0, 0xFF00
.else #else
andi $t2, $t2, 0xFF00 andi $t2, $t2, 0xFF00
.endif #endif
ori $at, (0xFFFF00FF & 0xFFFF) ori $at, (0xFFFF00FF & 0xFFFF)
.ifdef VERSION_EU #ifdef VERSION_EU
or $t1, $t1, $t0 or $t1, $t1, $t0
and $k1, $k1, $at and $k1, $k1, $at
or $k1, $k1, $t1 or $k1, $k1, $t1
sw $k1, 0x118($k0) sw $k1, 0x118($k0)
.else #else
or $t4, $t1, $t2 or $t4, $t1, $t2
and $t3, $k1, $at and $t3, $k1, $at
andi $t0, $t0, 0xFF00 andi $t0, $t0, 0xFF00
@ -148,7 +141,7 @@ glabel __osException
and $k1, $k1, $at and $k1, $k1, $at
sw $t3, 0x118($k0) sw $t3, 0x118($k0)
or $k1, $k1, $t1 or $k1, $k1, $t1
.endif #endif
.L802F3A18: .L802F3A18:
lui $t1, %hi(MI_INTR_MASK_REG) lui $t1, %hi(MI_INTR_MASK_REG)
@ -167,9 +160,9 @@ glabel __osException
or $t1, $t1, $t0 or $t1, $t1, $t0
.L802F3A50: .L802F3A50:
sw $t1, 0x128($k0) sw $t1, 0x128($k0)
.else #else
sd $t0, 0x110($k0) sd $t0, 0x110($k0)
.endif #endif
mfc0 $t0, $14 mfc0 $t0, $14
sw $t0, 0x11c($k0) sw $t0, 0x11c($k0)
lw $t0, 0x18($k0) lw $t0, 0x18($k0)
@ -197,14 +190,14 @@ glabel __osException
.L80326868: .L80326868:
mfc0 $t0, $13 mfc0 $t0, $13
sw $t0, 0x120($k0) sw $t0, 0x120($k0)
.ifndef VERSION_EU_SH #if !defined(VERSION_EU) && !defined(VERSION_SH)
lui $t1, %hi(MI_INTR_MASK_REG) lui $t1, %hi(MI_INTR_MASK_REG)
lw $t1, %lo(MI_INTR_MASK_REG)($t1) lw $t1, %lo(MI_INTR_MASK_REG)($t1)
sw $t1, 0x128($k0) sw $t1, 0x128($k0)
.endif #endif
li $t1, 2 li $t1, 2
sh $t1, 0x10($k0) sh $t1, 0x10($k0)
.ifndef VERSION_EU_SH #if !defined(VERSION_EU) && !defined(VERSION_SH)
lui $t1, %hi(D_80334934) lui $t1, %hi(D_80334934)
lw $t1, %lo(D_80334934)($t1) lw $t1, %lo(D_80334934)($t1)
beqz $t1, .L803268B4 beqz $t1, .L803268B4
@ -239,7 +232,7 @@ glabel __osException
b .L80326E08 b .L80326E08
sw $t1, %lo(D_80334A44)($at) sw $t1, %lo(D_80334A44)($at)
.L80326900: .L80326900:
.endif #endif
andi $t1, $t0, 0x7c andi $t1, $t0, 0x7c
li $t2, 36 li $t2, 36
beq $t1, $t2, .L80326B84 beq $t1, $t2, .L80326B84
@ -267,7 +260,7 @@ glabel __osException
lw $t2, %lo(jtbl_80338630)($at) lw $t2, %lo(jtbl_80338630)($at)
jr $t2 jr $t2
nop nop
.ifdef VERSION_EU_SH #if defined(VERSION_EU) || defined(VERSION_SH)
glabel L802F3B28 glabel L802F3B28
li $at, -8193 li $at, -8193
b .L8032692C b .L8032692C
@ -276,7 +269,7 @@ glabel L802F3B34
li $at, -16385 li $at, -16385
b .L8032692C b .L8032692C
and $s0, $s0, $at and $s0, $s0, $at
.endif #endif
glabel L80326964 glabel L80326964
mfc0 $t1, $11 mfc0 $t1, $11
mtc0 $t1, $11 mtc0 $t1, $11
@ -287,62 +280,62 @@ glabel L80326964
b .L8032692C b .L8032692C
and $s0, $s0, $at and $s0, $s0, $at
glabel L80326984 glabel L80326984
.ifdef VERSION_EU_SH #if defined(VERSION_EU) || defined(VERSION_SH)
li $at, -2049 li $at, -2049
and $s0, $s0, $at and $s0, $s0, $at
.endif #endif
li $t2, 4 li $t2, 4
lui $at, %hi(D_80334920) lui $at, %hi(D_80334920)
addu $at, $at, $t2 addu $at, $at, $t2
lw $t2, %lo(D_80334920)($at) lw $t2, %lo(D_80334920)($at)
.ifdef VERSION_EU_SH #if defined(VERSION_EU) || defined(VERSION_SH)
lui $sp, %hi(leoDiskStack) lui $sp, %hi(leoDiskStack)
addiu $sp, %lo(leoDiskStack) addiu $sp, %lo(leoDiskStack)
li $a0, 16 li $a0, 16
beqz $t2, .L803269A4 beqz $t2, .L803269A4
addiu $sp, $sp, 0xff0 addiu $sp, $sp, 0xff0
.else #else
beqz $t2, .L803269A4 beqz $t2, .L803269A4
nop nop
.endif #endif
jalr $t2 jalr $t2
nop nop
.ifdef VERSION_EU_SH #if defined(VERSION_EU) || defined(VERSION_SH)
beqz $v0, .L803269A4 beqz $v0, .L803269A4
.ifdef VERSION_SH #ifdef VERSION_SH
li $a0, 0x10 li $a0, 0x10
.else #else
nop nop
.endif #endif
b .L80326B9C b .L80326B9C
nop nop
.endif #endif
.L803269A4: .L803269A4:
jal send_mesg jal send_mesg
.ifdef VERSION_EU_SH #if defined(VERSION_EU) || defined(VERSION_SH)
nop nop
b .L8032692C b .L8032692C
nop nop
.else #else
li $a0, 16 li $a0, 16
li $at, -2049 li $at, -2049
b .L8032692C b .L8032692C
and $s0, $s0, $at and $s0, $s0, $at
.endif #endif
glabel L803269B8 glabel L803269B8
.ifdef VERSION_EU_SH #if defined(VERSION_EU) || defined(VERSION_SH)
lui $t0, %hi(__OSGlobalIntMask) lui $t0, %hi(__OSGlobalIntMask)
addiu $t0, %lo(__OSGlobalIntMask) addiu $t0, %lo(__OSGlobalIntMask)
lw $t0, ($t0) lw $t0, ($t0)
.endif #endif
lui $s1, %hi(MI_INTR_REG) lui $s1, %hi(MI_INTR_REG)
lw $s1, %lo(MI_INTR_REG)($s1) lw $s1, %lo(MI_INTR_REG)($s1)
.ifdef VERSION_EU_SH #if defined(VERSION_EU) || defined(VERSION_SH)
srl $t0, $t0, 0x10 srl $t0, $t0, 0x10
and $s1, $s1, $t0 and $s1, $s1, $t0
.else #else
andi $s1, $s1, 0x3f andi $s1, $s1, 0x3f
.endif #endif
andi $t1, $s1, 1 andi $t1, $s1, 1
beqz $t1, .L80326A18 beqz $t1, .L80326A18
nop nop
@ -609,7 +602,7 @@ glabel __osEnqueueAndYield
sw $k1, 0x12c($a1) sw $k1, 0x12c($a1)
.L80326D70: .L80326D70:
.ifdef VERSION_EU_SH #if defined(VERSION_EU) || defined(VERSION_SH)
lw $k1, 0x118($a1) lw $k1, 0x118($a1)
andi $t1, $k1, 0xff00 andi $t1, $k1, 0xff00
beqz $t1, .L802F3FBC beqz $t1, .L802F3FBC
@ -627,10 +620,10 @@ glabel __osEnqueueAndYield
or $k1, $k1, $t1 or $k1, $k1, $t1
sw $k1, 0x118($a1) sw $k1, 0x118($a1)
.L802F3FBC: .L802F3FBC:
.endif #endif
lui $k1, %hi(MI_INTR_MASK_REG) lui $k1, %hi(MI_INTR_MASK_REG)
lw $k1, %lo(MI_INTR_MASK_REG)($k1) lw $k1, %lo(MI_INTR_MASK_REG)($k1)
.ifdef VERSION_EU_SH #if defined(VERSION_EU) || defined(VERSION_SH)
beqz $k1, .L802F3FF4 beqz $k1, .L802F3FF4
nop nop
lui $k0, %hi(__OSGlobalIntMask) lui $k0, %hi(__OSGlobalIntMask)
@ -644,7 +637,7 @@ glabel __osEnqueueAndYield
and $k0, $k0, $t0 and $k0, $k0, $t0
or $k1, $k1, $k0 or $k1, $k1, $k0
.L802F3FF4: .L802F3FF4:
.endif #endif
beqz $a0, .L80326D88 beqz $a0, .L80326D88
sw $k1, 0x128($a1) sw $k1, 0x128($a1)
jal __osEnqueueThread jal __osEnqueueThread
@ -653,7 +646,7 @@ glabel __osEnqueueAndYield
j __osDispatchThread j __osDispatchThread
nop nop
#enqueue and pop look like compiled functions? but there's no easy way to extract them // enqueue and pop look like compiled functions? but there's no easy way to extract them
glabel __osEnqueueThread glabel __osEnqueueThread
lw $t8, ($a0) lw $t8, ($a0)
lw $t7, 4($a1) lw $t7, 4($a1)
@ -691,7 +684,7 @@ glabel __osDispatchThread
li $t0, 4 li $t0, 4
sh $t0, 0x10($v0) sh $t0, 0x10($v0)
move $k0, $v0 move $k0, $v0
.ifdef VERSION_EU_SH #if defined(VERSION_EU) || defined(VERSION_SH)
lui $t0, %hi(__OSGlobalIntMask) lui $t0, %hi(__OSGlobalIntMask)
lw $k1, 0x118($k0) lw $k1, 0x118($k0)
addiu $t0, %lo(__OSGlobalIntMask) addiu $t0, %lo(__OSGlobalIntMask)
@ -704,7 +697,7 @@ glabel __osDispatchThread
and $k1, $k1, $at and $k1, $k1, $at
or $k1, $k1, $t1 or $k1, $k1, $t1
mtc0 $k1, $12 mtc0 $k1, $12
.endif #endif
.L80326E08: .L80326E08:
ld $k1, 0x108($k0) ld $k1, 0x108($k0)
ld $at, 0x20($k0) ld $at, 0x20($k0)
@ -741,10 +734,10 @@ glabel __osDispatchThread
ld $ra, 0x100($k0) ld $ra, 0x100($k0)
lw $k1, 0x11c($k0) lw $k1, 0x11c($k0)
mtc0 $k1, $14 mtc0 $k1, $14
.ifndef VERSION_EU_SH #if !defined(VERSION_EU) && !defined(VERSION_SH)
lw $k1, 0x118($k0) lw $k1, 0x118($k0)
mtc0 $k1, $12 mtc0 $k1, $12
.endif #endif
lw $k1, 0x18($k0) lw $k1, 0x18($k0)
beqz $k1, .L80326EF0 beqz $k1, .L80326EF0
nop nop
@ -768,13 +761,13 @@ glabel __osDispatchThread
ldc1 $f30, 0x1a8($k0) ldc1 $f30, 0x1a8($k0)
.L80326EF0: .L80326EF0:
lw $k1, 0x128($k0) lw $k1, 0x128($k0)
.ifdef VERSION_EU_SH #if defined(VERSION_EU) || defined(VERSION_SH)
lui $k0, %hi(__OSGlobalIntMask) lui $k0, %hi(__OSGlobalIntMask)
addiu $k0, %lo(__OSGlobalIntMask) addiu $k0, %lo(__OSGlobalIntMask)
lw $k0, ($k0) lw $k0, ($k0)
srl $k0, $k0, 0x10 srl $k0, $k0, 0x10
and $k1, $k1, $k0 and $k1, $k1, $k0
.endif #endif
sll $k1, $k1, 1 sll $k1, $k1, 1
lui $k0, %hi(D_803386D0) lui $k0, %hi(D_803386D0)
addiu $k0, %lo(D_803386D0) addiu $k0, %lo(D_803386D0)
@ -820,13 +813,13 @@ glabel jtbl_80338630
.word L803269B8 .word L803269B8
.word L80326984 .word L80326984
.word L80326AE8 .word L80326AE8
.ifdef VERSION_EU_SH #if defined(VERSION_EU) || defined(VERSION_SH)
.word L802F3B28 .word L802F3B28
.word L802F3B34 .word L802F3B34
.else #else
.word L80326BE8 .word L80326BE8
.word L80326BE8 .word L80326BE8
.endif #endif
.word L80326964 .word L80326964
.word 0 .word 0
.word 0 .word 0

View File

@ -1,7 +1,7 @@
.set noreorder # don't insert nops after branches .set noreorder // don't insert nops after branches
.set gp=64 .set gp=64
.include "macros.inc" #include "macros.inc"
.section .text, "ax" .section .text, "ax"

View File

@ -1,7 +1,7 @@
.set noreorder # don't insert nops after branches .set noreorder // don't insert nops after branches
.set gp=64 .set gp=64
.include "macros.inc" #include "macros.inc"
.section .text, "ax" .section .text, "ax"

View File

@ -1,8 +1,8 @@
.set noat # allow manual use of $at .set noat // allow manual use of $at
.set noreorder # don't insert nops after branches .set noreorder // don't insert nops after branches
.set gp=64 .set gp=64
.include "macros.inc" #include "macros.inc"
.section .text, "ax" .section .text, "ax"
@ -44,8 +44,8 @@ glabel __osProbeTLB
andi $t5, $v0, 2 andi $t5, $v0, 2
beqz $t5, .L8032A0D8 beqz $t5, .L8032A0D8
nop nop
lui $at, (0x3FFFFFC0 >> 16) # lui $at, 0x3fff lui $at, (0x3FFFFFC0 >> 16) // lui $at, 0x3fff
ori $at, (0x3FFFFFC0 & 0xFFFF) # ori $at, $at, 0xffc0 ori $at, (0x3FFFFFC0 & 0xFFFF) // ori $at, $at, 0xffc0
and $v0, $v0, $at and $v0, $v0, $at
sll $v0, $v0, 6 sll $v0, $v0, 6
and $t5, $a0, $t3 and $t5, $a0, $t3

View File

@ -1,7 +1,7 @@
.set noreorder # don't insert nops after branches .set noreorder // don't insert nops after branches
.set gp=64 .set gp=64
.include "macros.inc" #include "macros.inc"
.section .text, "ax" .section .text, "ax"

View File

@ -1,7 +1,7 @@
.set noreorder # don't insert nops after branches .set noreorder // don't insert nops after branches
.set gp=64 .set gp=64
.include "macros.inc" #include "macros.inc"
.section .text, "ax" .section .text, "ax"

View File

@ -1,7 +1,7 @@
.set noreorder # don't insert nops after branches .set noreorder // don't insert nops after branches
.set gp=64 .set gp=64
.include "macros.inc" #include "macros.inc"
.section .text, "ax" .section .text, "ax"

View File

@ -1,7 +1,7 @@
.set noreorder # don't insert nops after branches .set noreorder // don't insert nops after branches
.set gp=64 .set gp=64
.include "macros.inc" #include "macros.inc"
.section .text, "ax" .section .text, "ax"

View File

@ -1,12 +1,12 @@
.set noreorder # don't insert nops after branches .set noreorder // don't insert nops after branches
.set gp=64 .set gp=64
.set noat .set noat
.include "macros.inc" #include "macros.inc"
.section .text, "ax" .section .text, "ax"
# cache related // cache related
glabel __os_eu_802ef550 glabel __os_eu_802ef550
lui $t0,0x8000 lui $t0,0x8000
li $t2,0x2000 li $t2,0x2000

View File

@ -1,8 +1,8 @@
.set noat # allow manual use of $at .set noat // allow manual use of $at
.set noreorder # don't insert nops after branches .set noreorder // don't insert nops after branches
.set gp=64 .set gp=64
.include "macros.inc" #include "macros.inc"
.section .text, "ax" .section .text, "ax"

View File

@ -1,9 +1,9 @@
.set noreorder # don't insert nops after branches .set noreorder // don't insert nops after branches
.set gp=64 .set gp=64
.include "macros.inc" #include "macros.inc"
#this file is probably handwritten // this file is probably handwritten
.section .text, "ax" .section .text, "ax"

View File

@ -1,9 +1,9 @@
# assembler directives // assembler directives
.set noat # allow manual use of $at .set noat // allow manual use of $at
.set noreorder # don't insert nops after branches .set noreorder // don't insert nops after branches
.set gp=64 .set gp=64
.include "macros.inc" #include "macros.inc"
.section .text, "ax" .section .text, "ax"

View File

@ -1,7 +1,7 @@
.set noreorder # don't insert nops after branches .set noreorder // don't insert nops after branches
.set gp=64 .set gp=64
.include "macros.inc" #include "macros.inc"
.section .text, "ax" .section .text, "ax"

View File

@ -1,8 +1,8 @@
.set noat # allow manual use of $at .set noat // allow manual use of $at
.set noreorder # don't insert nops after branches .set noreorder // don't insert nops after branches
.set gp=64 .set gp=64
.include "macros.inc" #include "macros.inc"
.section .text, "ax" .section .text, "ax"

View File

@ -1,8 +1,8 @@
.set noat # allow manual use of $at .set noat // allow manual use of $at
.set noreorder # don't insert nops after branches .set noreorder // don't insert nops after branches
.set gp=64 .set gp=64
.include "macros.inc" #include "macros.inc"
.section .text, "ax" .section .text, "ax"

View File

@ -1,14 +1,14 @@
.set noreorder # don't insert nops after branches .set noreorder // don't insert nops after branches
.set gp=64 .set gp=64
.include "macros.inc" #include "macros.inc"
.section .text, "ax" .section .text, "ax"
# This file is handwritten // This file is handwritten
#void osMapTLB(s32 index, OSPageMask pm, void *vaddr, u32 evenpaddr, u32 oddpaddr, s32 asid); // void osMapTLB(s32 index, OSPageMask pm, void *vaddr, u32 evenpaddr, u32 oddpaddr, s32 asid);
glabel osMapTLB glabel osMapTLB
mfc0 $t0, $10 mfc0 $t0, $10
mtc0 $a0, $0 mtc0 $a0, $0

View File

@ -1,8 +1,8 @@
.set noat # allow manual use of $at .set noat // allow manual use of $at
.set noreorder # don't insert nops after branches .set noreorder // don't insert nops after branches
.set gp=64 .set gp=64
.include "macros.inc" #include "macros.inc"
.section .text, "ax" .section .text, "ax"

View File

@ -1,38 +1,31 @@
.set noat # allow manual use of $at .set noat // allow manual use of $at
.set noreorder # don't insert nops after branches .set noreorder // don't insert nops after branches
.set gp=64 .set gp=64
.include "macros.inc" #include "macros.inc"
.eqv MI_INTR_MASK_REG, 0xA430000C .eqv MI_INTR_MASK_REG, 0xA430000C
.ifdef VERSION_EU
.set VERSION_EU_SH, 1
.endif
.ifdef VERSION_SH
.set VERSION_EU_SH, 1
.endif
.section .text, "ax" .section .text, "ax"
glabel osSetIntMask glabel osSetIntMask
.ifdef VERSION_EU_SH #if defined(VERSION_EU) || defined(VERSION_SH)
mfc0 $t4, $12 mfc0 $t4, $12
andi $v0, $t4, 0xff01 andi $v0, $t4, 0xff01
lui $t0, %hi(__OSGlobalIntMask) # $t0, 0x8030 lui $t0, %hi(__OSGlobalIntMask) // $t0, 0x8030
addiu $t0, %lo(__OSGlobalIntMask) # addiu $t0, $t0, 0x208c addiu $t0, %lo(__OSGlobalIntMask) // addiu $t0, $t0, 0x208c
lw $t3, ($t0) lw $t3, ($t0)
li $at, -1 li $at, -1
xor $t0, $t3, $at xor $t0, $t3, $at
andi $t0, $t0, 0xff00 andi $t0, $t0, 0xff00
or $v0, $v0, $t0 or $v0, $v0, $t0
.else #else
mfc0 $t1, $12 mfc0 $t1, $12
andi $v0, $t1, 0xff01 andi $v0, $t1, 0xff01
.endif #endif
lui $t2, %hi(MI_INTR_MASK_REG) # $t2, 0xa430 lui $t2, %hi(MI_INTR_MASK_REG) // $t2, 0xa430
lw $t2, %lo(MI_INTR_MASK_REG)($t2) lw $t2, %lo(MI_INTR_MASK_REG)($t2)
.ifdef VERSION_EU_SH #if defined(VERSION_EU) || defined(VERSION_SH)
beqz $t2, .L80200074 beqz $t2, .L80200074
srl $t1, $t3, 0x10 srl $t1, $t3, 0x10
li $at, -1 li $at, -1
@ -40,36 +33,36 @@ glabel osSetIntMask
andi $t1, $t1, 0x3f andi $t1, $t1, 0x3f
or $t2, $t2, $t1 or $t2, $t2, $t1
.L80200074: .L80200074:
.endif #endif
sll $t2, $t2, 0x10 sll $t2, $t2, 0x10
or $v0, $v0, $t2 or $v0, $v0, $t2
lui $at, 0x3f lui $at, 0x3f
and $t0, $a0, $at and $t0, $a0, $at
.ifdef VERSION_EU_SH #if defined(VERSION_EU) || defined(VERSION_SH)
and $t0, $t0, $t3 and $t0, $t0, $t3
.endif #endif
srl $t0, $t0, 0xf srl $t0, $t0, 0xf
lui $t2, %hi(D_803386D0) lui $t2, %hi(D_803386D0)
addu $t2, $t2, $t0 addu $t2, $t2, $t0
lhu $t2, %lo(D_803386D0)($t2) lhu $t2, %lo(D_803386D0)($t2)
lui $at, %hi(MI_INTR_MASK_REG) # $at, 0xa430 lui $at, %hi(MI_INTR_MASK_REG) // $at, 0xa430
sw $t2, %lo(MI_INTR_MASK_REG)($at) sw $t2, %lo(MI_INTR_MASK_REG)($at)
andi $t0, $a0, 0xff01 andi $t0, $a0, 0xff01
.ifdef VERSION_EU_SH #if defined(VERSION_EU) || defined(VERSION_SH)
andi $t1, $t3, 0xff00 andi $t1, $t3, 0xff00
and $t0, $t0, $t1 and $t0, $t0, $t1
.endif #endif
lui $at, (0xFFFF00FF >> 16) # lui $at, 0xffff lui $at, (0xFFFF00FF >> 16) // lui $at, 0xffff
ori $at, (0xFFFF00FF & 0xFFFF) # ori $at, $at, 0xff ori $at, (0xFFFF00FF & 0xFFFF) // ori $at, $at, 0xff
.ifdef VERSION_EU_SH #if defined(VERSION_EU) || defined(VERSION_SH)
and $t4, $t4, $at and $t4, $t4, $at
or $t4, $t4, $t0 or $t4, $t4, $t0
mtc0 $t4, $12 mtc0 $t4, $12
.else #else
and $t1, $t1, $at and $t1, $t1, $at
or $t1, $t1, $t0 or $t1, $t1, $t0
mtc0 $t1, $12 mtc0 $t1, $12
.endif #endif
nop nop
nop nop
jr $ra jr $ra

View File

@ -1,7 +1,7 @@
.set noreorder # don't insert nops after branches .set noreorder // don't insert nops after branches
.set gp=64 .set gp=64
.include "macros.inc" #include "macros.inc"
.section .text, "ax" .section .text, "ax"

View File

@ -1,7 +1,7 @@
.set noreorder # don't insert nops after branches .set noreorder // don't insert nops after branches
.set gp=64 .set gp=64
.include "macros.inc" #include "macros.inc"
.section .text, "ax" .section .text, "ax"
@ -34,6 +34,6 @@ glabel osWritebackDCache
.L80324E4C: .L80324E4C:
cache 1, ($t0) cache 1, ($t0)
bltu $t0, $t1, .L80324E4C bltu $t0, $t1, .L80324E4C
addiu $t0, 0x10 # addiu $t0, $t0, 0x10 addiu $t0, 0x10 // addiu $t0, $t0, 0x10
jr $ra jr $ra
nop nop

View File

@ -1,8 +1,8 @@
.set noat # allow manual use of $at .set noat // allow manual use of $at
.set noreorder # don't insert nops after branches .set noreorder // don't insert nops after branches
.set gp=64 .set gp=64
.include "macros.inc" #include "macros.inc"
.section .text, "ax" .section .text, "ax"

View File

@ -1,10 +1,10 @@
.macro gsymbol sym addr .macro gsymbol sym addr
.global \sym .global \sym
.set \sym, \addr .set \sym, \addr
.ifndef VERSION_JP #ifndef VERSION_JP
nop nop
nop nop
.endif #endif
.endm .endm
.text .text
@ -16,7 +16,7 @@ gsymbol osCiCId 0x80000310
gsymbol osVersion 0x80000314 gsymbol osVersion 0x80000314
gsymbol osMemSize 0x80000318 gsymbol osMemSize 0x80000318
gsymbol osAppNmiBuffer 0x8000031C gsymbol osAppNmiBuffer 0x8000031C
.ifdef VERSION_SH #ifdef VERSION_SH
nop nop
nop nop
nop nop
@ -25,4 +25,4 @@ nop
nop nop
nop nop
nop nop
.endif #endif

View File

@ -1,8 +1,8 @@
.set noat # allow manual use of $at .set noat // allow manual use of $at
.set noreorder # don't insert nops after branches .set noreorder // don't insert nops after branches
.set gp=64 .set gp=64
.include "macros.inc" #include "macros.inc"
.section .text, "ax" .section .text, "ax"

110
lib/rsp.s
View File

@ -1,4 +1,4 @@
.include "macros.inc" #include "macros.inc"
.set UCODE_SIZE, 0x800 .set UCODE_SIZE, 0x800
.section .text .section .text
@ -10,22 +10,22 @@ glabel rspF3DBootStart
glabel rspF3DBootEnd glabel rspF3DBootEnd
.balign 16 .balign 16
.ifndef F3DEX_GBI_SHARED #ifndef F3DEX_GBI_SHARED
glabel rspF3DStart /* Use regular Fast3D bins (default) */ glabel rspF3DStart /* Use regular Fast3D bins (default) */
.incbin "rsp/fast3d.bin" .incbin "rsp/fast3d.bin"
glabel rspF3DEnd glabel rspF3DEnd
.else /* Use one of the Fast3DEX series grucodes. */ #else /* Use one of the Fast3DEX series grucodes. */
glabel rspF3DStart glabel rspF3DStart
.if F3DZEX_GBI_2 == 1 #ifdef F3DZEX_GBI_2
.incbin "lib/PR/f3dex2/F3DZEX_NoN.bin" .incbin "lib/PR/f3dex2/F3DZEX_NoN.bin"
.elseif F3DEX_GBI == 1 #elif defined(F3DEX_GBI)
.incbin "lib/PR/f3dex/F3DEX.bin" .incbin "lib/PR/f3dex/F3DEX.bin"
.elseif F3DEX_GBI_2 == 1 #elif defined(F3DEX_GBI_2)
.incbin "lib/PR/f3dex2/F3DEX2.bin" .incbin "lib/PR/f3dex2/F3DEX2.bin"
.endif #endif
glabel rspF3DEnd glabel rspF3DEnd
.endif #endif
/* Audio Bins */ /* Audio Bins */
@ -40,107 +40,107 @@ glabel rspAspMainEnd
*/ */
/* Fast3DEX NoN Text */ /* Fast3DEX NoN Text */
.ifdef F3DEX_NON_GBI #ifdef F3DEX_NON_GBI
glabel rspF3DEXNoNStart glabel rspF3DEXNoNStart
.balign 16 .balign 16
.incbin "lib/PR/f3dex/F3DEX_NoN.bin" .incbin "lib/PR/f3dex/F3DEX_NoN.bin"
glabel rspF3DEXNoNEnd glabel rspF3DEXNoNEnd
.endif #endif
/* Fast3DLX Text */ /* Fast3DLX Text */
.ifdef F3DLX_GBI #ifdef F3DLX_GBI
glabel rspF3DLXStart glabel rspF3DLXStart
.incbin "lib/PR/f3dex/F3DLX.bin" .incbin "lib/PR/f3dex/F3DLX.bin"
glabel rspF3DLXEnd glabel rspF3DLXEnd
.endif #endif
/* Fast3DLX NoN Text */ /* Fast3DLX NoN Text */
.ifdef F3DLX_NON_GBI #ifdef F3DLX_NON_GBI
glabel rspF3DLXNoNStart glabel rspF3DLXNoNStart
.balign 16 .balign 16
.incbin "lib/PR/f3dex/F3DLX_NoN.bin" .incbin "lib/PR/f3dex/F3DLX_NoN.bin"
glabel rspF3DLXNoNEnd glabel rspF3DLXNoNEnd
.endif #endif
/* Fast3DLX Rej Text */ /* Fast3DLX Rej Text */
.ifdef F3DLX_REJ_GBI #ifdef F3DLX_REJ_GBI
glabel rspF3DLXRejStart glabel rspF3DLXRejStart
.balign 16 .balign 16
.incbin "lib/PR/f3dex/F3DLX_Rej.bin" .incbin "lib/PR/f3dex/F3DLX_Rej.bin"
glabel rspF3DLXRejEnd glabel rspF3DLXRejEnd
.endif #endif
/* Line3DEX Text */ /* Line3DEX Text */
.ifdef L3DEX_GBI #ifdef L3DEX_GBI
glabel rspL3DEXStart glabel rspL3DEXStart
.balign 16 .balign 16
.incbin "lib/PR/f3dex/L3DEX.bin" .incbin "lib/PR/f3dex/L3DEX.bin"
glabel rspL3DEXEnd glabel rspL3DEXEnd
.endif #endif
/* S2DEX Text */ /* S2DEX Text */
.ifdef S2DEX_GBI #ifdef S2DEX_GBI
glabel rspS2DEXStart glabel rspS2DEXStart
.balign 16 .balign 16
.incbin "lib/PR/s2dex/S2DEX.bin" .incbin "lib/PR/s2dex/S2DEX.bin"
glabel rspS2DEXEnd glabel rspS2DEXEnd
.endif #endif
/* Fast3DEX2 series */ /* Fast3DEX2 series */
/* Fast3DEX2 NoN Text */ /* Fast3DEX2 NoN Text */
.ifdef F3DEX2_NON_GBI #ifdef F3DEX2_NON_GBI
.balign 16 .balign 16
glabel rspF3DEX2NoNStart glabel rspF3DEX2NoNStart
.incbin "lib/PR/f3dex2/F3DEX2_NoN.bin" .incbin "lib/PR/f3dex2/F3DEX2_NoN.bin"
glabel rspF3DEX2NoNEnd glabel rspF3DEX2NoNEnd
.endif #endif
/* Fast3DEX2 Rej Text */ /* Fast3DEX2 Rej Text */
.ifdef F3DEX2_REJ_GBI #ifdef F3DEX2_REJ_GBI
.balign 16 .balign 16
glabel rspF3DEX2RejStart glabel rspF3DEX2RejStart
.incbin "lib/PR/f3dex2/F3DEX2_Rej.bin" .incbin "lib/PR/f3dex2/F3DEX2_Rej.bin"
glabel rspF3DEX2RejEnd glabel rspF3DEX2RejEnd
.endif #endif
/* Line3DEX2 Text */ /* Line3DEX2 Text */
.ifdef L3DEX2_GBI #ifdef L3DEX2_GBI
.balign 16 .balign 16
glabel rspL3DEX2Start glabel rspL3DEX2Start
.incbin "lib/PR/f3dex2/L3DEX2.bin" .incbin "lib/PR/f3dex2/L3DEX2.bin"
glabel rspL3DEX2End glabel rspL3DEX2End
.endif #endif
/* S2DEX2 Text */ /* S2DEX2 Text */
.ifdef S2DEX_GBI_2 #ifdef S2DEX_GBI_2
.balign 16 .balign 16
glabel rspS2DEXStart glabel rspS2DEXStart
.incbin "lib/PR/s2dex/S2DEX2.bin" .incbin "lib/PR/s2dex/S2DEX2.bin"
glabel rspS2DEXEnd glabel rspS2DEXEnd
.endif #endif
/* DATA SECTION START */ /* DATA SECTION START */
.section .rodata .section .rodata
.balign 16 .balign 16
.ifndef F3DEX_GBI_SHARED /* Use regular Fast3D data (default) */ #ifndef F3DEX_GBI_SHARED /* Use regular Fast3D data (default) */
glabel rspF3DDataStart glabel rspF3DDataStart
.incbin "rsp/fast3d_data.bin" .incbin "rsp/fast3d_data.bin"
glabel rspF3DDataEnd glabel rspF3DDataEnd
.else /* Using one of the Fast3DEX series grucodes */ #else /* Using one of the Fast3DEX series grucodes */
glabel rspF3DDataStart glabel rspF3DDataStart
.if F3DZEX_GBI_2 == 1 #ifdef F3DZEX_GBI_2
.incbin "lib/PR/f3dex2/F3DZEX_NoN_data.bin" .incbin "lib/PR/f3dex2/F3DZEX_NoN_data.bin"
.elseif F3DEX_GBI == 1 #elseif F3DEX_GBI
.incbin "lib/PR/f3dex/F3DEX_data.bin" .incbin "lib/PR/f3dex/F3DEX_data.bin"
.elseif F3DEX_GBI_2 == 1 #elseif F3DEX_GBI_2
.incbin "lib/PR/f3dex2/F3DEX2_data.bin" .incbin "lib/PR/f3dex2/F3DEX2_data.bin"
.endif #endif
glabel rspF3DDataEnd glabel rspF3DDataEnd
.endif #endif
/* Audio Data */ /* Audio Data */
@ -154,83 +154,83 @@ glabel rspAspMainDataEnd
/* Fast3DEX Series */ /* Fast3DEX Series */
/* Fast3DEX NoN Data */ /* Fast3DEX NoN Data */
.ifdef F3DEX_NON_GBI #ifdef F3DEX_NON_GBI
.balign 16 .balign 16
glabel rspF3DEXNoNDataStart glabel rspF3DEXNoNDataStart
.incbin "lib/PR/f3dex/F3DEX_NoN_data.bin" .incbin "lib/PR/f3dex/F3DEX_NoN_data.bin"
glabel rspF3DEXNoNDataEnd glabel rspF3DEXNoNDataEnd
.endif #endif
/* Fast3DLX Data */ /* Fast3DLX Data */
.ifdef F3DLX_GBI #ifdef F3DLX_GBI
.balign 16 .balign 16
glabel rspF3DLXDataStart glabel rspF3DLXDataStart
.incbin "lib/PR/f3dex/F3DLX_data.bin" .incbin "lib/PR/f3dex/F3DLX_data.bin"
glabel rspF3DLXDataEnd glabel rspF3DLXDataEnd
.endif #endif
/* Fast3DLX NoN Data */ /* Fast3DLX NoN Data */
.ifdef F3DLX_NON_GBI #ifdef F3DLX_NON_GBI
.balign 16 .balign 16
glabel rspF3DLXNoNDataStart glabel rspF3DLXNoNDataStart
.incbin "lib/PR/f3dex/F3DLX_NoN_data.bin" .incbin "lib/PR/f3dex/F3DLX_NoN_data.bin"
glabel rspF3DLXNoNDataEnd glabel rspF3DLXNoNDataEnd
.endif #endif
/* Fast3DLX Rej Data */ /* Fast3DLX Rej Data */
.ifdef F3DLX_REJ_GBI #ifdef F3DLX_REJ_GBI
.balign 16 .balign 16
glabel rspF3DLXRejDataStart glabel rspF3DLXRejDataStart
.incbin "lib/PR/f3dex/F3DLX_Rej_data.bin" .incbin "lib/PR/f3dex/F3DLX_Rej_data.bin"
glabel rspF3DLXRejDataEnd glabel rspF3DLXRejDataEnd
.endif #endif
/* Line3DEX Data */ /* Line3DEX Data */
.ifdef L3DEX_GBI #ifdef L3DEX_GBI
.balign 16 .balign 16
glabel rspL3DEXDataStart glabel rspL3DEXDataStart
.incbin "lib/PR/f3dex/L3DEX_data.bin" .incbin "lib/PR/f3dex/L3DEX_data.bin"
glabel rspL3DEXDataEnd glabel rspL3DEXDataEnd
.endif #endif
/* S2DEX Data */ /* S2DEX Data */
.ifdef S2DEX_GBI #ifdef S2DEX_GBI
.balign 16 .balign 16
glabel rspS2DEXDataStart glabel rspS2DEXDataStart
.incbin "lib/PR/s2dex/S2DEX_data.bin" .incbin "lib/PR/s2dex/S2DEX_data.bin"
glabel rspS2DEXDataEnd glabel rspS2DEXDataEnd
.endif #endif
/* Fast3DEX2 Series */ /* Fast3DEX2 Series */
/* Fast3DEX2 NoN Data */ /* Fast3DEX2 NoN Data */
.ifdef F3DEX2_NON_GBI #ifdef F3DEX2_NON_GBI
.balign 16 .balign 16
glabel rspF3DEX2NoNStart glabel rspF3DEX2NoNStart
.incbin "lib/PR/f3dex2/F3DEX2_NoN_data.bin" .incbin "lib/PR/f3dex2/F3DEX2_NoN_data.bin"
glabel rspF3DEX2NoNEnd glabel rspF3DEX2NoNEnd
.endif #endif
/* Fast3DEX2 Rej Data */ /* Fast3DEX2 Rej Data */
.ifdef F3DEX2_REJ_GBI #ifdef F3DEX2_REJ_GBI
.balign 16 .balign 16
glabel rspF3DEX2RejStart glabel rspF3DEX2RejStart
.incbin "lib/PR/f3dex2/F3DEX2_Rej_data.bin" .incbin "lib/PR/f3dex2/F3DEX2_Rej_data.bin"
glabel rspF3DEX2RejEnd glabel rspF3DEX2RejEnd
.endif #endif
/* Line3DEX2 Data */ /* Line3DEX2 Data */
.ifdef L3DEX2_GBI #ifdef L3DEX2_GBI
.balign 16 .balign 16
glabel rspL3DEX2Start glabel rspL3DEX2Start
.incbin "lib/PR/f3dex2/L3DEX2_data.bin" .incbin "lib/PR/f3dex2/L3DEX2_data.bin"
glabel rspL3DEX2End glabel rspL3DEX2End
.endif #endif
/* S2DEX2 Data */ /* S2DEX2 Data */
.ifdef S2DEX_GBI_2 #ifdef S2DEX_GBI_2
.balign 16 .balign 16
glabel rspS2DEXStart glabel rspS2DEXStart
.incbin "lib/PR/s2dex/S2DEX2_data.bin" .incbin "lib/PR/s2dex/S2DEX2_data.bin"
glabel rspS2DEXEnd glabel rspS2DEXEnd
.endif #endif

View File

@ -10,7 +10,7 @@ void __osDevMgrMain(void *args) {
OSMesg dummy; OSMesg dummy;
s32 ret; s32 ret;
OSMgrArgs *sp34; OSMgrArgs *sp34;
#ifndef VERSION_SH #ifdef VERSION_EU
UNUSED u32 sp30; UNUSED u32 sp30;
#endif #endif
u32 sp2c; u32 sp2c;
@ -19,7 +19,7 @@ void __osDevMgrMain(void *args) {
#ifdef VERSION_SH #ifdef VERSION_SH
u32 tmp; u32 tmp;
#endif #endif
#ifndef VERSION_SH #ifdef VERSION_EU
sp30 = 0; sp30 = 0;
#endif #endif
sp2c = 0; sp2c = 0;
@ -108,7 +108,7 @@ void __osDevMgrMain(void *args) {
} }
if (ret == 0) { if (ret == 0) {
osRecvMesg(sp34->eventQueue, &em, OS_MESG_BLOCK); osRecvMesg(sp34->eventQueue, &em, OS_MESG_BLOCK);
#ifndef VERSION_SH #ifdef VERSION_EU
sp30 = sp30 =
#endif #endif
osSendMesg(mb->hdr.retQueue, mb, OS_MESG_NOBLOCK); osSendMesg(mb->hdr.retQueue, mb, OS_MESG_NOBLOCK);

View File

@ -2,7 +2,6 @@
#include "PR/rcp.h" #include "PR/rcp.h"
#include "controller.h" #include "controller.h"
#ifdef VERSION_SH
extern s32 func_8030A5C0(OSMesgQueue *, s32); extern s32 func_8030A5C0(OSMesgQueue *, s32);
void __osPackRamReadData(int channel, u16 address); void __osPackRamReadData(int channel, u16 address);
@ -87,4 +86,3 @@ void __osPackRamReadData(int channel, u16 address) {
ptr += sizeof(__OSContRamReadFormat); ptr += sizeof(__OSContRamReadFormat);
ptr[0] = CONT_CMD_END; ptr[0] = CONT_CMD_END;
} }
#endif

View File

@ -2,7 +2,6 @@
#include "PR/rcp.h" #include "PR/rcp.h"
#include "controller.h" #include "controller.h"
#ifdef VERSION_SH
extern s32 func_8030A5C0(OSMesgQueue *, s32); extern s32 func_8030A5C0(OSMesgQueue *, s32);
void __osPackRamWriteData(int channel, u16 address, u8 *buffer); void __osPackRamWriteData(int channel, u16 address, u8 *buffer);
@ -87,4 +86,3 @@ void __osPackRamWriteData(int channel, u16 address, u8 *buffer) {
ptr += sizeof(__OSContRamReadFormat); ptr += sizeof(__OSContRamReadFormat);
ptr[0] = CONT_CMD_END; ptr[0] = CONT_CMD_END;
} }
#endif

View File

@ -1,7 +1,7 @@
#ifndef _CONTROLLER_H #ifndef _CONTROLLER_H
#define _CONTROLLER_H #define _CONTROLLER_H
#include "PR/os_internal.h" #include "PR/os_internal.h"
#include "os.h" #include "PR/os.h"
#include "PR/rcp.h" #include "PR/rcp.h"
//should go somewhere else but //should go somewhere else but

View File

@ -1,6 +1,5 @@
#include "libultra_internal.h" #include "libultra_internal.h"
#ifdef VERSION_SH
u8 __osContAddressCrc(u16 addr) { u8 __osContAddressCrc(u16 addr) {
u8 temp; u8 temp;
u8 temp2; u8 temp2;
@ -45,4 +44,3 @@ u8 __osContDataCrc(u8 *data) {
} }
return temp; return temp;
} }
#endif

View File

@ -1,4 +1,5 @@
#ifdef VERSION_SH #ifdef VERSION_SH
#include "PR/os_internal.h" #include "PR/os_internal.h"
#include "piint.h" #include "piint.h"
@ -21,4 +22,5 @@ s32 osEPiStartDma(OSPiHandle *pihandle, OSIoMesg *mb, s32 direction) {
} }
return ret; return ret;
} }
#endif #endif

View File

@ -1,7 +1,7 @@
#ifndef _HARDWARE_H_ #ifndef _HARDWARE_H_
#define _HARDWARE_H_ #define _HARDWARE_H_
#define HW_REG(reg, type) *(volatile type *)(uintptr_t)(reg | 0xa0000000) #define HW_REG(reg, type) *(volatile type *)(uintptr_t)((reg) | 0xa0000000)
#define AI_DRAM_ADDR_REG 0x04500000 #define AI_DRAM_ADDR_REG 0x04500000
#define AI_LEN_REG 0x04500004 #define AI_LEN_REG 0x04500004

View File

@ -1,5 +1,5 @@
#include "libultra_internal.h" #include "libultra_internal.h"
#if !defined(VERSION_SH) && !defined(VERSION_EU) #if defined(VERSION_JP) || defined(VERSION_US)
u8 D_80365E40[0x100]; u8 D_80365E40[0x100];
#endif #endif

View File

@ -4,9 +4,10 @@
#include "piint.h" #include "piint.h"
#include "osint.h" #include "osint.h"
u8 leoDiskStack[OS_PIM_STACKSIZE]; //technically should have a OS_LEO_STACKSIZE or something.. u8 leoDiskStack[OS_PIM_STACKSIZE]; // technically should have a OS_LEO_STACKSIZE or something..
#ifdef VERSION_SH #ifdef VERSION_SH
// TODO: so many magic constants :'( // TODO: so many magic constants :'(
static void __osLeoResume(void); static void __osLeoResume(void);
static void __osLeoAbnormalResume(void); static void __osLeoAbnormalResume(void);
@ -179,4 +180,5 @@ static void __osLeoResume(void) {
__osEnqueueThread(&D_80334898, __osPopThread(&mq->mtqueue)); __osEnqueueThread(&D_80334898, __osPopThread(&mq->mtqueue));
} }
} }
#endif #endif

View File

@ -1,6 +1,7 @@
#include "libultra_internal.h" #include "libultra_internal.h"
#include "osAi.h" #include "osAi.h"
#include "hardware.h" #include "hardware.h"
#include "macros.h"
extern s32 osViClock; extern s32 osViClock;
@ -29,9 +30,9 @@ s32 osAiSetFrequency(u32 freq) {
#ifndef VERSION_SH #ifndef VERSION_SH
// put some extra jr $ra's down there please // put some extra jr $ra's down there please
static void filler1(void) { UNUSED static void filler1(void) {
} }
static void filler2(void) { UNUSED static void filler2(void) {
} }
#endif #endif

View File

@ -2,9 +2,9 @@
#include "PR/R4300.h" #include "PR/R4300.h"
#include "PR/rcp.h" #include "PR/rcp.h"
#include "PR/os_pi.h" #include "PR/os_pi.h"
#include "os.h" #include "PR/os.h"
#include "libultra_internal.h"
#ifdef VERSION_SH
OSPiHandle CartRomHandle; OSPiHandle CartRomHandle;
OSPiHandle *osCartRomInit(void) { OSPiHandle *osCartRomInit(void) {
@ -36,4 +36,3 @@ OSPiHandle *osCartRomInit(void) {
return &CartRomHandle; return &CartRomHandle;
} }
#endif

View File

@ -12,7 +12,7 @@ OSMgrArgs __osPiDevMgr = { 0 };
OSPiHandle *__osPiTable = NULL; OSPiHandle *__osPiTable = NULL;
#endif #endif
#ifdef VERSION_SH #ifdef VERSION_SH
OSPiHandle *__osCurrentHandle[2] = { &CartRomHandle, &LeoDiskHandle }; OSPiHandle **__osCurrentHandle[2] = { &CartRomHandle, &LeoDiskHandle };
#endif #endif
OSThread piMgrThread; OSThread piMgrThread;
u32 piMgrStack[0x400]; // stack bottom u32 piMgrStack[0x400]; // stack bottom

View File

@ -7,7 +7,7 @@
extern OSPiHandle *__osPiTable; extern OSPiHandle *__osPiTable;
extern OSPiHandle DriveRomHandle; extern OSPiHandle DriveRomHandle;
OSPiHandle *osDriveRomInit() { // Why is this compiled with -g??? OSPiHandle *osDriveRomInit(void) { // Why is this compiled with -g???
UNUSED s32 sp1c = 0; UNUSED s32 sp1c = 0;
u32 saveMask; u32 saveMask;
@ -32,4 +32,3 @@ OSPiHandle *osDriveRomInit() { // Why is this compiled with -g???
return &DriveRomHandle; return &DriveRomHandle;
} }

View File

@ -96,4 +96,7 @@ s32 __osPackEepReadData(u8 address) {
*(unkStruct2 *) sp14 = sp8; *(unkStruct2 *) sp14 = sp8;
sp14 += 0xc; sp14 += 0xc;
*sp14 = 254; *sp14 = 254;
#ifdef AVOID_UB
return 0;
#endif
} }

View File

@ -108,6 +108,9 @@ s32 __osPackEepWriteData(u8 address, u8 *buffer) {
*(unkStruct2 *) sp14 = sp8; *(unkStruct2 *) sp14 = sp8;
sp14 += 0xc; sp14 += 0xc;
*sp14 = 254; *sp14 = 254;
#ifdef AVOID_UB
return 0;
#endif
} }
s32 __osEepStatus(OSMesgQueue *a0, unkStruct *a1) { s32 __osEepStatus(OSMesgQueue *a0, unkStruct *a1) {

View File

@ -9,7 +9,6 @@ extern OSPiHandle *__osPiTable;
OSPiHandle LeoDiskHandle; OSPiHandle LeoDiskHandle;
OSPiHandle *__osDiskHandle; OSPiHandle *__osDiskHandle;
// some kind of piHandle init function, maybe osDriveRomInit or osCartRomInit
OSPiHandle *osLeoDiskInit(void) { OSPiHandle *osLeoDiskInit(void) {
s32 sp1c; s32 sp1c;
LeoDiskHandle.type = 2; LeoDiskHandle.type = 2;

View File

@ -1,8 +1,7 @@
#include "PR/os_pi.h" #include "PR/os_pi.h"
#include "libultra_internal.h"
#include "controller.h" #include "controller.h"
//#include "siint.h"
#ifdef VERSION_SH
OSPifRam __osPfsPifRam; OSPifRam __osPfsPifRam;
s32 osPfsIsPlug(OSMesgQueue *queue, u8 *pattern) { s32 osPfsIsPlug(OSMesgQueue *queue, u8 *pattern) {
@ -94,4 +93,3 @@ void __osPfsGetInitData(u8 *pattern, OSContStatus *data) {
} }
*pattern = bits; *pattern = bits;
} }
#endif

View File

@ -31,7 +31,7 @@ void osSpTaskLoad(OSTask *task) {
task->t.flags &= ~M_TASK_FLAG0; task->t.flags &= ~M_TASK_FLAG0;
#ifdef VERSION_SH #ifdef VERSION_SH
if (physicalTask->t.flags & M_TASK_FLAG2) { if (physicalTask->t.flags & M_TASK_FLAG2) {
physicalTask->t.ucode = HW_REG((uintptr_t)task->t.yield_data_ptr + 0xBFC, u64*); physicalTask->t.ucode = (u64*)HW_REG((uintptr_t)task->t.yield_data_ptr + 0xBFC, u64*);
} }
#endif #endif
} }

View File

@ -3,7 +3,7 @@
#include "PR/os_internal.h" #include "PR/os_internal.h"
#include "PR/rcp.h" #include "PR/rcp.h"
#include "PR/os_pi.h" #include "PR/os_pi.h"
#include "os.h" #include "PR/os.h"
//https://github.com/LuigiBlood/64dd/wiki/Memory-Map //https://github.com/LuigiBlood/64dd/wiki/Memory-Map

View File

@ -1,7 +1,6 @@
#include "libultra_internal.h" #include "libultra_internal.h"
#include "controller.h" #include "controller.h"
#ifdef VERSION_SH
s32 func_8030A5C0(OSMesgQueue *arg0, s32 arg1) { // TODO: This is almost certainly __osPfsGetStatus. s32 func_8030A5C0(OSMesgQueue *arg0, s32 arg1) { // TODO: This is almost certainly __osPfsGetStatus.
s32 sp34 = 0; s32 sp34 = 0;
OSMesg sp30; OSMesg sp30;
@ -25,4 +24,3 @@ s32 func_8030A5C0(OSMesgQueue *arg0, s32 arg1) { // TODO: This is almost certain
return sp34; return sp34;
} }
#endif

View File

@ -10,4 +10,4 @@ fi
#echo "Replace $1 with $2?" #echo "Replace $1 with $2?"
#read #read
grep -rl "$1" text/**/*.{c,h} assets/**/*.c enhancements/*.patch lib/**/*.{c,h,s} asm/**/*.s bin/**/*.c data/*.c levels/**/*.{c,h} actors/**/*.c src/**/*.{c,h} include/**/*.{h,in} undefined_syms.txt | xargs sed -i "s/\b$1\b/$2/g" grep -rl "$1" text/**/*.{c,h} assets/**/*.c enhancements/*.patch lib/**/*.{c,h,s} asm/**/*.s bin/**/*.c data/*.c levels/**/*.{c,h} actors/**/*.{c,h} src/**/*.{c,h} include/**/*.{h,in} undefined_syms.txt | xargs sed -i "s/\b$1\b/$2/g"

View File

@ -53,15 +53,15 @@ dispatchTable:
jumpTableEntry cmd_SPNOOP jumpTableEntry cmd_SPNOOP
jumpTableEntry cmd_SETLOOP jumpTableEntry cmd_SETLOOP
jumpTableEntry cmd_17e4 jumpTableEntry cmd_DMEMMOVE2
jumpTableEntry cmd_INTERL jumpTableEntry cmd_DOWNSAMPLE_HALF
jumpTableEntry cmd_ENVSETUP1 jumpTableEntry cmd_ENVSETUP1
jumpTableEntry cmd_ENVMIXER jumpTableEntry cmd_ENVMIXER
jumpTableEntry cmd_LOADBUFF jumpTableEntry cmd_LOADBUFF
jumpTableEntry cmd_SAVEBUFF jumpTableEntry cmd_SAVEBUFF
jumpTableEntry cmd_ENVSETUP2 jumpTableEntry cmd_ENVSETUP2
jumpTableEntry cmd_1b78 jumpTableEntry cmd_S8DEC
jumpTableEntry cmd_HILOGAIN jumpTableEntry cmd_HILOGAIN
jumpTableEntry cmd_1c7c jumpTableEntry cmd_1c7c
@ -938,12 +938,12 @@ cmd_RESAMPLE:
.endif .endif
addi $8, $8, -8 addi $8, $8, -8
.ifdef VERSION_SH .ifdef VERSION_SH
sdv $v16[0], 0x00($8) sdv $v16[0], 0x00($8)
.endif .endif
@@audio_c410c: @@audio_c410c:
lsv $v23[14], 0x08($23) // saved pitch_accumulator lsv $v23[14], 0x08($23) // saved pitch_accumulator
.ifdef VERSION_SH .ifdef VERSION_SH
ldv $v16[0], 0x00($8) ldv $v16[0], 0x00($8)
.else .else
ldv $v16[0], 0x00($23) // saved next 4 unprocessed samples ldv $v16[0], 0x00($23) // saved next 4 unprocessed samples
sdv $v16[0], 0x00($8) // store them before the input samples sdv $v16[0], 0x00($8) // store them before the input samples
@ -1100,8 +1100,8 @@ cmd_RESAMPLE:
mtc0 $zero, SP_SEMAPHORE mtc0 $zero, SP_SEMAPHORE
.ifdef VERSION_SH .ifdef VERSION_SH
cmd_17e4: cmd_DMEMMOVE2:
srl $t7, $k0, 16 srl $t7, $k0, 16
andi $t7, $t7, 0xff andi $t7, $t7, 0xff
andi $t5, $k0, 0xffff andi $t5, $k0, 0xffff
srl $t6, $t9, 0x10 srl $t6, $t9, 0x10
@ -1150,7 +1150,7 @@ cmd_DUPLICATE:
j cmd_SPNOOP j cmd_SPNOOP
nop nop
cmd_INTERL: cmd_DOWNSAMPLE_HALF:
andi $t4, $k0, 0xffff andi $t4, $k0, 0xffff
andi $t6, $t9, 0xffff andi $t6, $t9, 0xffff
srl $t5, $t9, 0x10 srl $t5, $t9, 0x10
@ -1606,24 +1606,24 @@ cmd_MIXER:
j cmd_SPNOOP j cmd_SPNOOP
nop nop
cmd_1b78: cmd_S8DEC:
lhu $13, 0x0(r24) lhu $13, (audio_in_buf)(r24)
vxor $v2, $v2, $v2 vxor $v2, $v2, $v2
lhu $14, 0x2(r24) lhu $14, (audio_out_buf)(r24)
vxor $v3, $v3, $v3 vxor $v3, $v3, $v3
lhu $12, 0x4(r24) lhu $12, (audio_count)(r24)
sll $17, $25, 8 sll $17, $25, 8
srl $17, $17, 8 srl $17, $17, 8 // state addr
sqv $v2[0], 0x0(r14) sqv $v2[0], 0x0(r14) // store 0 to first 16 samples if A_INIT
sqv $v3[0], 0x10(r14) sqv $v3[0], 0x10(r14)
srl $1, $26, 16 srl $1, $26, 16
andi $1, $1, 0x1 andi $1, $1, 0x1
bgtz $1, @audio_4001bd8 bgtz $1, @audio_4001bd8 // A_INIT
srl $1, $26, 16 srl $1, $26, 16
andi $1, $1, 0x2 andi $1, $1, 0x2
beq $0, $1, @audio_4001bbc beq $0, $1, @audio_4001bbc // A_LOOP
addi $2, $17, 0x0 addi $2, $17, 0x0
lw $2, 0x10(r24) lw $2, (audio_loop_value)(r24)
@audio_4001bbc: @audio_4001bbc:
addi $1, $14, 0x0 addi $1, $14, 0x0
jal dma_read_start jal dma_read_start
@ -1635,10 +1635,10 @@ cmd_1b78:
mtc0 $0, sp_semaphore mtc0 $0, sp_semaphore
@audio_4001bd8: @audio_4001bd8:
addi $14, $14, 0x20 addi $14, $14, 0x20
beq $12, $0, @audio_4001c04 beq $12, $0, @audio_4001c04 // this of very few ops allows count=0
nop nop
@audio_4001be4: @audio_4001be4:
lpv $v2[0], 0x0(r13) lpv $v2[0], 0x0(r13) // load each byte to upper 8 bits per elem
lpv $v3[0], 0x8(r13) lpv $v3[0], 0x8(r13)
addi $13, $13, 0x10 addi $13, $13, 0x10
addi $12, $12, 0xffe0 addi $12, $12, 0xffe0
@ -1647,7 +1647,7 @@ cmd_1b78:
bgtz $12, @audio_4001be4 bgtz $12, @audio_4001be4
addi $14, $14, 0x20 addi $14, $14, 0x20
@audio_4001c04: @audio_4001c04:
addi $1, $14, 0xffe0 addi $1, $14, 0xffe0 // write last 16 samples to the state
addi $2, $17, 0x0 addi $2, $17, 0x0
jal dma_write_start jal dma_write_start
addi $3, $0, 0x1f addi $3, $0, 0x1f

281
sm64.ld
View File

@ -3,6 +3,7 @@ OUTPUT_ARCH (mips)
/* include/segments.h defines SEG_POOL_START, SEG_POOL_END, SEG_BUFFERS, /* include/segments.h defines SEG_POOL_START, SEG_POOL_END, SEG_BUFFERS,
* SEG_GODDARD, SEG_MAIN, SEG_ENGINE, SEG_FRAMEBUFFERS */ * SEG_GODDARD, SEG_MAIN, SEG_ENGINE, SEG_FRAMEBUFFERS */
#include "segments.h" #include "segments.h"
#include "config.h"
#define BEGIN_SEG(name, addr) \ #define BEGIN_SEG(name, addr) \
_##name##SegmentStart = ADDR(.name); \ _##name##SegmentStart = ADDR(.name); \
@ -94,7 +95,7 @@ SECTIONS
BUILD_DIR/src/game/main.o(.text); BUILD_DIR/src/game/main.o(.text);
BUILD_DIR/src/game/game_init.o(.text); BUILD_DIR/src/game/game_init.o(.text);
BUILD_DIR/src/game/sound_init.o(.text); BUILD_DIR/src/game/sound_init.o(.text);
#ifdef VERSION_SH #if ENABLE_RUMBLE
BUILD_DIR/src/game/rumble_init.o(.text); BUILD_DIR/src/game/rumble_init.o(.text);
#endif #endif
BUILD_DIR/src/game/level_update.o(.text); BUILD_DIR/src/game/level_update.o(.text);
@ -144,11 +145,16 @@ SECTIONS
BUILD_DIR/src/game/hud.o(.text); BUILD_DIR/src/game/hud.o(.text);
BUILD_DIR/src/game/obj_behaviors.o(.text); BUILD_DIR/src/game/obj_behaviors.o(.text);
BUILD_DIR/src/game/obj_behaviors_2.o(.text); BUILD_DIR/src/game/obj_behaviors_2.o(.text);
#ifdef VERSION_SH
BUILD_DIR/src/audio/synthesis_sh.o(.text);
#else
BUILD_DIR/src/audio/synthesis.o(.text); BUILD_DIR/src/audio/synthesis.o(.text);
#endif
BUILD_DIR/src/audio/heap.o(.text); BUILD_DIR/src/audio/heap.o(.text);
BUILD_DIR/src/audio/load.o(.text); BUILD_DIR/src/audio/load.o(.text);
#ifdef VERSION_SH #ifdef VERSION_SH
BUILD_DIR/src/audio/unk_shindou_audio_file.o(.text); BUILD_DIR/src/audio/load_sh.o(.text);
BUILD_DIR/src/audio/port_sh.o(.text);
#endif #endif
BUILD_DIR/src/audio/playback.o(.text); BUILD_DIR/src/audio/playback.o(.text);
BUILD_DIR/src/audio/effects.o(.text); BUILD_DIR/src/audio/effects.o(.text);
@ -194,114 +200,115 @@ SECTIONS
BUILD_DIR/libultra.a:osContStartReadData.o(.text); BUILD_DIR/libultra.a:osContStartReadData.o(.text);
BUILD_DIR/libultra.a:osContInit.o(.text); BUILD_DIR/libultra.a:osContInit.o(.text);
BUILD_DIR/libultra.a:osEepromProbe.o(.text); BUILD_DIR/libultra.a:osEepromProbe.o(.text);
#ifdef VERSION_SH #if ENABLE_RUMBLE
BUILD_DIR/libultra.a:motor.o(.text); BUILD_DIR/libultra.a:motor.o(.text);
#endif #endif
BUILD_DIR/libultra.a:osInvalDCache.o(.text); BUILD_DIR/libultra.a:osInvalDCache.o(.text);
BUILD_DIR/libultra.a:osPiStartDma.o(.text); BUILD_DIR/libultra.a:osPiStartDma.o(.text);
BUILD_DIR/libultra.a:bzero.o(.text) BUILD_DIR/libultra.a:bzero.o(.text);
BUILD_DIR/libultra.a:osInvalICache.o(.text) BUILD_DIR/libultra.a:osInvalICache.o(.text);
BUILD_DIR/libultra.a:osEepromLongRead.o(.text) BUILD_DIR/libultra.a:osEepromLongRead.o(.text);
BUILD_DIR/libultra.a:osEepromLongWrite.o(.text) BUILD_DIR/libultra.a:osEepromLongWrite.o(.text);
BUILD_DIR/libultra.a:bcopy.o(.text) BUILD_DIR/libultra.a:bcopy.o(.text);
BUILD_DIR/libultra.a:guOrthoF.o(.text) BUILD_DIR/libultra.a:guOrthoF.o(.text);
BUILD_DIR/libultra.a:guPerspectiveF.o(.text) BUILD_DIR/libultra.a:guPerspectiveF.o(.text);
BUILD_DIR/libultra.a:llconv.o(.text) BUILD_DIR/libultra.a:llconv.o(.text);
BUILD_DIR/libultra.a:cosf.o(.text) BUILD_DIR/libultra.a:cosf.o(.text);
BUILD_DIR/libultra.a:sinf.o(.text) BUILD_DIR/libultra.a:sinf.o(.text);
BUILD_DIR/libultra.a:guTranslateF.o(.text) BUILD_DIR/libultra.a:guTranslateF.o(.text);
BUILD_DIR/libultra.a:guRotateF.o(.text) BUILD_DIR/libultra.a:guRotateF.o(.text);
BUILD_DIR/libultra.a:guScaleF.o(.text) BUILD_DIR/libultra.a:guScaleF.o(.text);
BUILD_DIR/libultra.a:osAiSetFrequency.o(.text) BUILD_DIR/libultra.a:osAiSetFrequency.o(.text);
#ifdef VERSION_SH #ifdef VERSION_SH
BUILD_DIR/libultra.a:osCartRomInit.o(.text) BUILD_DIR/libultra.a:osCartRomInit.o(.text);
BUILD_DIR/libultra.a:epidma.o(.text) BUILD_DIR/libultra.a:epidma.o(.text);
#else
BUILD_DIR/libultra.a:alBnkfNew.o(.text)
#endif #endif
BUILD_DIR/libultra.a:osAiGetLength.o(.text)
BUILD_DIR/libultra.a:osAiSetNextBuffer.o(.text)
#ifdef VERSION_SH
BUILD_DIR/libultra.a:osGetCount.o(.text)
BUILD_DIR/libultra.a:__osDisableInt.o(.text)
BUILD_DIR/libultra.a:__osRestoreInt.o(.text)
#endif
BUILD_DIR/libultra.a:_Litob.o(.text)
BUILD_DIR/libultra.a:_Ldtob.o(.text)
BUILD_DIR/libultra.a:__osSetSR.o(.text)
BUILD_DIR/libultra.a:__osGetSR.o(.text)
BUILD_DIR/libultra.a:__osSetFpcCsr.o(.text)
BUILD_DIR/libultra.a:__osSiRawReadIo.o(.text)
BUILD_DIR/libultra.a:__osSiRawWriteIo.o(.text)
BUILD_DIR/libultra.a:__osExceptionPreamble.o(.text)
BUILD_DIR/libultra.a:osWritebackDCache.o(.text)
BUILD_DIR/libultra.a:osMapTLBRdb.o(.text)
BUILD_DIR/libultra.a:osPiRawReadIo.o(.text)
BUILD_DIR/libultra.a:EU_D_802f4330.o(.text)
BUILD_DIR/libultra.a:D_802F4380.o(.text)
BUILD_DIR/libultra.a:func_802F4A20.o(.text)
BUILD_DIR/libultra.a:osTimer.o(.text)
#ifdef VERSION_EU #ifdef VERSION_EU
BUILD_DIR/libultra.a:__osDisableInt.o(.text) BUILD_DIR/libultra.a:alBnkfNew.o(.text);
BUILD_DIR/libultra.a:__osRestoreInt.o(.text)
BUILD_DIR/libultra.a:osGetCount.o(.text)
#endif #endif
BUILD_DIR/libultra.a:__osViInit.o(.text) BUILD_DIR/libultra.a:osAiGetLength.o(.text);
BUILD_DIR/libultra.a:__osDequeueThread.o(.text) BUILD_DIR/libultra.a:osAiSetNextBuffer.o(.text);
BUILD_DIR/libultra.a:osVirtualToPhysical.o(.text) #ifdef VERSION_SH
BUILD_DIR/libultra.a:__osSpSetStatus.o(.text) BUILD_DIR/libultra.a:osGetCount.o(.text);
BUILD_DIR/libultra.a:__osSpSetPc.o(.text) BUILD_DIR/libultra.a:__osDisableInt.o(.text);
BUILD_DIR/libultra.a:__osSpRawStartDma.o(.text) BUILD_DIR/libultra.a:__osRestoreInt.o(.text);
BUILD_DIR/libultra.a:__osSpDeviceBusy.o(.text) #endif
BUILD_DIR/libultra.a:__osSpGetStatus.o(.text) BUILD_DIR/libultra.a:_Litob.o(.text);
BUILD_DIR/libultra.a:osGetThreadPri.o(.text) BUILD_DIR/libultra.a:_Ldtob.o(.text);
BUILD_DIR/libultra.a:__osSetSR.o(.text);
BUILD_DIR/libultra.a:__osGetSR.o(.text);
BUILD_DIR/libultra.a:__osSetFpcCsr.o(.text);
BUILD_DIR/libultra.a:__osSiRawReadIo.o(.text);
BUILD_DIR/libultra.a:__osSiRawWriteIo.o(.text);
BUILD_DIR/libultra.a:__osExceptionPreamble.o(.text);
BUILD_DIR/libultra.a:osWritebackDCache.o(.text);
BUILD_DIR/libultra.a:osMapTLBRdb.o(.text);
BUILD_DIR/libultra.a:osPiRawReadIo.o(.text);
BUILD_DIR/libultra.a:EU_D_802f4330.o(.text);
BUILD_DIR/libultra.a:D_802F4380.o(.text);
BUILD_DIR/libultra.a:func_802F4A20.o(.text);
BUILD_DIR/libultra.a:osTimer.o(.text);
#ifdef VERSION_EU
BUILD_DIR/libultra.a:__osDisableInt.o(.text);
BUILD_DIR/libultra.a:__osRestoreInt.o(.text);
BUILD_DIR/libultra.a:osGetCount.o(.text);
#endif
BUILD_DIR/libultra.a:__osViInit.o(.text);
BUILD_DIR/libultra.a:__osDequeueThread.o(.text);
BUILD_DIR/libultra.a:osVirtualToPhysical.o(.text);
BUILD_DIR/libultra.a:__osSpSetStatus.o(.text);
BUILD_DIR/libultra.a:__osSpSetPc.o(.text);
BUILD_DIR/libultra.a:__osSpRawStartDma.o(.text);
BUILD_DIR/libultra.a:__osSpDeviceBusy.o(.text);
BUILD_DIR/libultra.a:__osSpGetStatus.o(.text);
BUILD_DIR/libultra.a:osGetThreadPri.o(.text);
BUILD_DIR/libultra.a:__osViGetCurrentContext.o(.text); BUILD_DIR/libultra.a:__osViGetCurrentContext.o(.text);
BUILD_DIR/libultra.a:__osViSwapContext.o(.text) BUILD_DIR/libultra.a:__osViSwapContext.o(.text);
#ifdef VERSION_SH #ifdef VERSION_SH
BUILD_DIR/libultra.a:osLeoDiskInit.o(.text) BUILD_DIR/libultra.a:osLeoDiskInit.o(.text);
#endif #endif
BUILD_DIR/libultra.a:__osPiCreateAccessQueue.o(.text) BUILD_DIR/libultra.a:__osPiCreateAccessQueue.o(.text);
BUILD_DIR/libultra.a:osPiRawStartDma.o(.text) BUILD_DIR/libultra.a:osPiRawStartDma.o(.text);
BUILD_DIR/libultra.a:osEPiRawStartDma.o(.text) BUILD_DIR/libultra.a:osEPiRawStartDma.o(.text);
BUILD_DIR/libultra.a:__osDevMgrMain.o(.text) BUILD_DIR/libultra.a:__osDevMgrMain.o(.text);
BUILD_DIR/libultra.a:__osSiCreateAccessQueue.o(.text) BUILD_DIR/libultra.a:__osSiCreateAccessQueue.o(.text);
BUILD_DIR/libultra.a:__osSiRawStartDma.o(.text) BUILD_DIR/libultra.a:__osSiRawStartDma.o(.text);
BUILD_DIR/libultra.a:osSetTimer.o(.text) BUILD_DIR/libultra.a:osSetTimer.o(.text);
BUILD_DIR/libultra.a:osEepromWrite.o(.text) BUILD_DIR/libultra.a:osEepromWrite.o(.text);
#ifdef VERSION_SH #if ENABLE_RUMBLE
BUILD_DIR/libultra.a:osPfsIsPlug.o(.text) BUILD_DIR/libultra.a:osPfsIsPlug.o(.text);
BUILD_DIR/libultra.a:crc.o(.text) BUILD_DIR/libultra.a:crc.o(.text);
BUILD_DIR/libultra.a:contramwrite.o(.text) BUILD_DIR/libultra.a:contramwrite.o(.text);
BUILD_DIR/libultra.a:contramread.o(.text) BUILD_DIR/libultra.a:contramread.o(.text);
#endif #endif
BUILD_DIR/libultra.a:osJamMesg.o(.text) BUILD_DIR/libultra.a:osJamMesg.o(.text);
BUILD_DIR/libultra.a:osPiGetCmdQueue.o(.text) BUILD_DIR/libultra.a:osPiGetCmdQueue.o(.text);
BUILD_DIR/libultra.a:osEepromRead.o(.text) BUILD_DIR/libultra.a:osEepromRead.o(.text);
BUILD_DIR/libultra.a:guMtxF2L.o(.text) BUILD_DIR/libultra.a:guMtxF2L.o(.text);
BUILD_DIR/libultra.a:guNormalize.o(.text) BUILD_DIR/libultra.a:guNormalize.o(.text);
BUILD_DIR/libultra.a:__osAiDeviceBusy.o(.text); BUILD_DIR/libultra.a:__osAiDeviceBusy.o(.text);
BUILD_DIR/libultra.a:ldiv.o(.text) BUILD_DIR/libultra.a:ldiv.o(.text);
BUILD_DIR/libultra.a:__osSiDeviceBusy.o(.text); BUILD_DIR/libultra.a:__osSiDeviceBusy.o(.text);
#ifdef VERSION_SH #ifdef VERSION_SH
BUILD_DIR/libultra.a:leointerrupt.o(.text) BUILD_DIR/libultra.a:leointerrupt.o(.text);
#endif #endif
BUILD_DIR/libultra.a:osSetIntMask.o(.text) BUILD_DIR/libultra.a:osSetIntMask.o(.text);
BUILD_DIR/libultra.a:osDestroyThread.o(.text) BUILD_DIR/libultra.a:osDestroyThread.o(.text);
#ifndef VERSION_SH #ifdef VERSION_EU
BUILD_DIR/libultra.a:osLeoDiskInit.o(.text) BUILD_DIR/libultra.a:osLeoDiskInit.o(.text);
#endif #endif
BUILD_DIR/libultra.a:__osSetCompare.o(.text) BUILD_DIR/libultra.a:__osSetCompare.o(.text);
BUILD_DIR/libultra.a:__osDequeueThread.o(.text) BUILD_DIR/libultra.a:__osDequeueThread.o(.text);
BUILD_DIR/libultra.a:__osProbeTLB.o(.text) BUILD_DIR/libultra.a:__osProbeTLB.o(.text);
BUILD_DIR/libultra.a:__osResetGlobalIntMask.o(.text) BUILD_DIR/libultra.a:__osResetGlobalIntMask.o(.text);
BUILD_DIR/libultra.a:__osEPiRawWriteIo.o(.text) BUILD_DIR/libultra.a:__osEPiRawWriteIo.o(.text);
#ifdef VERSION_SH #ifdef VERSION_SH
BUILD_DIR/libultra.a:__osEPiRawReadIo.o(.text) BUILD_DIR/libultra.a:__osEPiRawReadIo.o(.text);
BUILD_DIR/libultra.a:__osSetGlobalIntMask.o(.text) BUILD_DIR/libultra.a:__osSetGlobalIntMask.o(.text);
#endif #endif
BUILD_DIR/libultra.a:func_802F71F0.o(.text) BUILD_DIR/libultra.a:func_802F71F0.o(.text);
#ifdef VERSION_SH #if ENABLE_RUMBLE
BUILD_DIR/libultra.a:unk_shindou_file_3.o(.text) BUILD_DIR/libultra.a:unk_shindou_file_3.o(.text);
#endif #endif
BUILD_DIR/lib/rsp.o(.text); BUILD_DIR/lib/rsp.o(.text);
#else #else
@ -335,6 +342,9 @@ SECTIONS
BUILD_DIR/libultra.a:osContStartReadData.o(.text); BUILD_DIR/libultra.a:osContStartReadData.o(.text);
BUILD_DIR/libultra.a:osContInit.o(.text); BUILD_DIR/libultra.a:osContInit.o(.text);
BUILD_DIR/libultra.a:osEepromProbe.o(.text); BUILD_DIR/libultra.a:osEepromProbe.o(.text);
#if ENABLE_RUMBLE
BUILD_DIR/libultra.a:motor.o(.text);
#endif
BUILD_DIR/libultra.a:llmuldiv.o(.text); BUILD_DIR/libultra.a:llmuldiv.o(.text);
BUILD_DIR/libultra.a:llmuldiv_gcc.o(.text); BUILD_DIR/libultra.a:llmuldiv_gcc.o(.text);
BUILD_DIR/libultra.a:osInvalDCache.o(.text); BUILD_DIR/libultra.a:osInvalDCache.o(.text);
@ -393,6 +403,12 @@ SECTIONS
BUILD_DIR/libultra.a:__osSiRawStartDma.o(.text); BUILD_DIR/libultra.a:__osSiRawStartDma.o(.text);
BUILD_DIR/libultra.a:osSetTimer.o(.text); BUILD_DIR/libultra.a:osSetTimer.o(.text);
BUILD_DIR/libultra.a:osEepromWrite.o(.text); BUILD_DIR/libultra.a:osEepromWrite.o(.text);
#if ENABLE_RUMBLE
BUILD_DIR/libultra.a:osPfsIsPlug.o(.text);
BUILD_DIR/libultra.a:crc.o(.text);
BUILD_DIR/libultra.a:contramwrite.o(.text);
BUILD_DIR/libultra.a:contramread.o(.text);
#endif
BUILD_DIR/libultra.a:osJamMesg.o(.text); BUILD_DIR/libultra.a:osJamMesg.o(.text);
BUILD_DIR/libultra.a:osPiGetCmdQueue.o(.text); BUILD_DIR/libultra.a:osPiGetCmdQueue.o(.text);
BUILD_DIR/libultra.a:osEepromRead.o(.text); BUILD_DIR/libultra.a:osEepromRead.o(.text);
@ -413,6 +429,9 @@ SECTIONS
BUILD_DIR/libultra.a:__osGetCause.o(.text); BUILD_DIR/libultra.a:__osGetCause.o(.text);
BUILD_DIR/libultra.a:__osAtomicDec.o(.text); BUILD_DIR/libultra.a:__osAtomicDec.o(.text);
BUILD_DIR/libultra.a:guLookAtRef.o(.text); /* Fast3DEX2 only */ BUILD_DIR/libultra.a:guLookAtRef.o(.text); /* Fast3DEX2 only */
#if ENABLE_RUMBLE
BUILD_DIR/libultra.a:unk_shindou_file_3.o(.text);
#endif
BUILD_DIR/lib/rsp.o(.text); BUILD_DIR/lib/rsp.o(.text);
#endif #endif
@ -421,7 +440,7 @@ SECTIONS
BUILD_DIR/src/game/main.o(.data*); BUILD_DIR/src/game/main.o(.data*);
BUILD_DIR/src/game/game_init.o(.data*); BUILD_DIR/src/game/game_init.o(.data*);
BUILD_DIR/src/game/sound_init.o(.data*); BUILD_DIR/src/game/sound_init.o(.data*);
#ifdef VERSION_SH #if ENABLE_RUMBLE
BUILD_DIR/src/game/rumble_init.o(.data*); BUILD_DIR/src/game/rumble_init.o(.data*);
#endif #endif
BUILD_DIR/src/game/level_update.o(.data*); BUILD_DIR/src/game/level_update.o(.data*);
@ -465,18 +484,20 @@ SECTIONS
/* wildcard doesn't match on EU due to files being moved to engine/ */ /* wildcard doesn't match on EU due to files being moved to engine/ */
BUILD_DIR/src/game*.o(.data*); BUILD_DIR/src/game*.o(.data*);
#endif #endif
#ifdef VERSION_SH
BUILD_DIR/src/audio/synthesis_sh.o(.data*);
#else
BUILD_DIR/src/audio/synthesis.o(.data*); BUILD_DIR/src/audio/synthesis.o(.data*);
BUILD_DIR/src/audio/heap.o(.data*);
#ifndef VERSION_SH
BUILD_DIR/src/audio/load.o(.data*);
#endif #endif
BUILD_DIR/src/audio/heap.o(.data*);
BUILD_DIR/src/audio/load.o(.data*);
BUILD_DIR/src/audio/playback.o(.data*); BUILD_DIR/src/audio/playback.o(.data*);
BUILD_DIR/src/audio/effects.o(.data*); BUILD_DIR/src/audio/effects.o(.data*);
BUILD_DIR/src/audio/seqplayer.o(.data*); BUILD_DIR/src/audio/seqplayer.o(.data*);
#ifdef VERSION_SH #ifdef VERSION_SH
BUILD_DIR/src/audio/data.o(.data*); BUILD_DIR/src/audio/data.o(.data*);
BUILD_DIR/src/audio/shindou_debug_prints.o(.data*); BUILD_DIR/src/audio/shindou_debug_prints.o(.data*);
BUILD_DIR/src/audio/unk_shindou_audio_file.o(.data*); BUILD_DIR/src/audio/port_sh.o(.data*);
BUILD_DIR/src/audio/external.o(.data*); BUILD_DIR/src/audio/external.o(.data*);
BUILD_DIR/src/audio/audio_session_presets_sh.o(.data*); BUILD_DIR/src/audio/audio_session_presets_sh.o(.data*);
#else #else
@ -492,7 +513,7 @@ SECTIONS
BUILD_DIR/libultra.a:osViTable.o(.data*); BUILD_DIR/libultra.a:osViTable.o(.data*);
BUILD_DIR/libultra.a:osCreatePiManager.o(.data*); BUILD_DIR/libultra.a:osCreatePiManager.o(.data*);
BUILD_DIR/libultra.a:osContInit.o(.data*); BUILD_DIR/libultra.a:osContInit.o(.data*);
#ifdef VERSION_SH #if ENABLE_RUMBLE
BUILD_DIR/libultra.a:motor.o(.data*); BUILD_DIR/libultra.a:motor.o(.data*);
#endif #endif
BUILD_DIR/libultra.a:osAiSetNextBuffer.o(.data*); BUILD_DIR/libultra.a:osAiSetNextBuffer.o(.data*);
@ -510,6 +531,9 @@ SECTIONS
BUILD_DIR/libultra.a:osCreatePiManager.o(.data*); BUILD_DIR/libultra.a:osCreatePiManager.o(.data*);
BUILD_DIR/libultra.a:osInitialize.o(.data*); BUILD_DIR/libultra.a:osInitialize.o(.data*);
BUILD_DIR/libultra.a:osContInit.o(.data*); BUILD_DIR/libultra.a:osContInit.o(.data*);
#if ENABLE_RUMBLE
BUILD_DIR/libultra.a:motor.o(.data*);
#endif
BUILD_DIR/libultra.a:osAiSetNextBuffer.o(.data*); BUILD_DIR/libultra.a:osAiSetNextBuffer.o(.data*);
BUILD_DIR/libultra.a:osTimer.o(.data*); BUILD_DIR/libultra.a:osTimer.o(.data*);
BUILD_DIR/libultra.a:_Printf.o(.data*); BUILD_DIR/libultra.a:_Printf.o(.data*);
@ -556,8 +580,8 @@ SECTIONS
BUILD_DIR/src/game/object_collision.o(.rodata*); BUILD_DIR/src/game/object_collision.o(.rodata*);
BUILD_DIR/src/game/spawn_object.o(.rodata*); BUILD_DIR/src/game/spawn_object.o(.rodata*);
#endif #endif
BUILD_DIR/libultra.a:__osDisableInt.o(.text) BUILD_DIR/libultra.a:__osDisableInt.o(.text);
BUILD_DIR/libultra.a:__osRestoreInt.o(.text) BUILD_DIR/libultra.a:__osRestoreInt.o(.text);
BUILD_DIR/src/game/spawn_sound.o(.rodata*); BUILD_DIR/src/game/spawn_sound.o(.rodata*);
BUILD_DIR/src/game/debug.o(.rodata*); BUILD_DIR/src/game/debug.o(.rodata*);
BUILD_DIR/src/game/screen_transition.o(.rodata*); BUILD_DIR/src/game/screen_transition.o(.rodata*);
@ -577,11 +601,15 @@ SECTIONS
#if defined(VERSION_JP) || defined(VERSION_US) #if defined(VERSION_JP) || defined(VERSION_US)
BUILD_DIR/src/game*.o(.rodata*); BUILD_DIR/src/game*.o(.rodata*);
#endif #endif
#ifdef VERSION_SH
BUILD_DIR/src/audio/synthesis_sh.o(.rodata*);
BUILD_DIR/src/audio/heap.o(.rodata*);
BUILD_DIR/src/audio/load_sh.o(.rodata*);
BUILD_DIR/src/audio/port_sh.o(.rodata*);
#else
BUILD_DIR/src/audio/synthesis.o(.rodata*); BUILD_DIR/src/audio/synthesis.o(.rodata*);
BUILD_DIR/src/audio/heap.o(.rodata*); BUILD_DIR/src/audio/heap.o(.rodata*);
BUILD_DIR/src/audio/load.o(.rodata*); BUILD_DIR/src/audio/load.o(.rodata*);
#ifdef VERSION_SH
BUILD_DIR/src/audio/unk_shindou_audio_file.o(.rodata*);
#endif #endif
BUILD_DIR/src/audio/playback.o(.rodata*); BUILD_DIR/src/audio/playback.o(.rodata*);
BUILD_DIR/src/audio/effects.o(.rodata*); BUILD_DIR/src/audio/effects.o(.rodata*);
@ -619,8 +647,9 @@ SECTIONS
#ifndef VERSION_EU #ifndef VERSION_EU
BUILD_DIR/libultra.a:*.o(.rodata*); BUILD_DIR/libultra.a:*.o(.rodata*);
#endif #endif
/* audio blobs, should really be moved into a separate file */
#ifdef VERSION_SH #ifdef VERSION_SH
BUILD_DIR/src/audio/load.o(.data*); BUILD_DIR/src/audio/load_sh.o(.data*);
#endif #endif
BUILD_DIR/lib/rsp.o(.rodata*); BUILD_DIR/lib/rsp.o(.rodata*);
} }
@ -631,7 +660,7 @@ SECTIONS
BUILD_DIR/src/game/main.o(.bss*); BUILD_DIR/src/game/main.o(.bss*);
BUILD_DIR/src/game/game_init.o(.bss*); BUILD_DIR/src/game/game_init.o(.bss*);
BUILD_DIR/src/game/sound_init.o(.bss*); BUILD_DIR/src/game/sound_init.o(.bss*);
#ifdef VERSION_SH #if ENABLE_RUMBLE
BUILD_DIR/src/game/rumble_init.o(.bss*); BUILD_DIR/src/game/rumble_init.o(.bss*);
#endif #endif
BUILD_DIR/src/game/level_update.o(.bss*); BUILD_DIR/src/game/level_update.o(.bss*);
@ -662,7 +691,7 @@ SECTIONS
BUILD_DIR/src/game/ingame_menu.o(.bss*); BUILD_DIR/src/game/ingame_menu.o(.bss*);
BUILD_DIR/src/game/envfx_snow.o(.bss*); BUILD_DIR/src/game/envfx_snow.o(.bss*);
BUILD_DIR/src/game/envfx_bubbles.o(.bss*); BUILD_DIR/src/game/envfx_bubbles.o(.bss*);
BUILD_DIR/src/game/macro_special_objects.o(.bss*) BUILD_DIR/src/game/macro_special_objects.o(.bss*);
BUILD_DIR/src/game/hud.o(.bss*); BUILD_DIR/src/game/hud.o(.bss*);
BUILD_DIR/src/game/obj_behaviors.o(.bss*); BUILD_DIR/src/game/obj_behaviors.o(.bss*);
BUILD_DIR/src/game/obj_behaviors_2.o(.bss*); BUILD_DIR/src/game/obj_behaviors_2.o(.bss*);
@ -675,9 +704,9 @@ SECTIONS
#endif #endif
#ifdef VERSION_SH #ifdef VERSION_SH
BUILD_DIR/src/audio/globals_start.o(.bss*); BUILD_DIR/src/audio/globals_start.o(.bss*);
BUILD_DIR/src/audio/synthesis.o(.bss*); BUILD_DIR/src/audio/synthesis_sh.o(.bss*);
BUILD_DIR/src/audio/heap.o(.bss*); BUILD_DIR/src/audio/heap.o(.bss*);
BUILD_DIR/src/audio/load.o(.bss*); BUILD_DIR/src/audio/load_sh.o(.bss*);
BUILD_DIR/src/audio/data.o(.bss*); BUILD_DIR/src/audio/data.o(.bss*);
#endif #endif
@ -689,23 +718,23 @@ SECTIONS
BUILD_DIR/libultra.a:osCreatePiManager.o(.bss*); BUILD_DIR/libultra.a:osCreatePiManager.o(.bss*);
BUILD_DIR/libultra.a:osContStartReadData.o(.bss*); BUILD_DIR/libultra.a:osContStartReadData.o(.bss*);
BUILD_DIR/libultra.a:osContInit.o(.bss*); BUILD_DIR/libultra.a:osContInit.o(.bss*);
#ifdef VERSION_SH #if ENABLE_RUMBLE
BUILD_DIR/libultra.a:motor.o(.bss*); BUILD_DIR/libultra.a:motor.o(.bss*);
#endif #endif
BUILD_DIR/libultra.a:guRotateF.o(.bss*); BUILD_DIR/libultra.a:guRotateF.o(.bss*);
#ifdef VERSION_SH #ifdef VERSION_SH
BUILD_DIR/libultra.a:osCartRomInit.o(.bss*); BUILD_DIR/libultra.a:osCartRomInit.o(.bss*);
#endif #endif
#ifndef VERSION_SH #ifdef VERSION_EU
BUILD_DIR/libultra.a:leointerrupt.o(.bss*); BUILD_DIR/libultra.a:leointerrupt.o(.bss*);
#endif #endif
BUILD_DIR/libultra.a:osTimer.o(.bss*); BUILD_DIR/libultra.a:osTimer.o(.bss*);
#ifdef VERSION_SH #ifdef VERSION_SH
BUILD_DIR/libultra.a:osLeoDiskInit.o(.bss*) BUILD_DIR/libultra.a:osLeoDiskInit.o(.bss*);
#endif #endif
BUILD_DIR/libultra.a:__osPiCreateAccessQueue.o(.bss*); BUILD_DIR/libultra.a:__osPiCreateAccessQueue.o(.bss*);
BUILD_DIR/libultra.a:__osSiCreateAccessQueue.o(.bss*); BUILD_DIR/libultra.a:__osSiCreateAccessQueue.o(.bss*);
#ifdef VERSION_SH #if ENABLE_RUMBLE
BUILD_DIR/libultra.a:osPfsIsPlug.o(.bss*); BUILD_DIR/libultra.a:osPfsIsPlug.o(.bss*);
#endif #endif
BUILD_DIR/libultra.a:osEepromWrite.o(.bss*); BUILD_DIR/libultra.a:osEepromWrite.o(.bss*);
@ -713,8 +742,8 @@ SECTIONS
#ifdef VERSION_SH #ifdef VERSION_SH
BUILD_DIR/libultra.a:leointerrupt.o(.bss*); BUILD_DIR/libultra.a:leointerrupt.o(.bss*);
#endif #endif
#ifndef VERSION_SH #ifdef VERSION_EU
BUILD_DIR/libultra.a:osLeoDiskInit.o(.bss*) BUILD_DIR/libultra.a:osLeoDiskInit.o(.bss*);
#endif #endif
BUILD_DIR/libultra.a:_Printf.o(.bss*); BUILD_DIR/libultra.a:_Printf.o(.bss*);
BUILD_DIR/libultra.a:osAiSetNextBuffer.o(.bss*); BUILD_DIR/libultra.a:osAiSetNextBuffer.o(.bss*);
@ -727,11 +756,17 @@ SECTIONS
BUILD_DIR/libultra.a:osInitialize.o(.bss*); BUILD_DIR/libultra.a:osInitialize.o(.bss*);
BUILD_DIR/libultra.a:osContStartReadData.o(.bss*); BUILD_DIR/libultra.a:osContStartReadData.o(.bss*);
BUILD_DIR/libultra.a:osContInit.o(.bss*); BUILD_DIR/libultra.a:osContInit.o(.bss*);
#if ENABLE_RUMBLE
BUILD_DIR/libultra.a:motor.o(.bss*);
#endif
BUILD_DIR/libultra.a:guRotateF.o(.bss*); BUILD_DIR/libultra.a:guRotateF.o(.bss*);
BUILD_DIR/libultra.a:osTimer.o(.bss*); BUILD_DIR/libultra.a:osTimer.o(.bss*);
BUILD_DIR/libultra.a:_Printf.o(.bss*); BUILD_DIR/libultra.a:_Printf.o(.bss*);
BUILD_DIR/libultra.a:__osPiCreateAccessQueue.o(.bss*); BUILD_DIR/libultra.a:__osPiCreateAccessQueue.o(.bss*);
BUILD_DIR/libultra.a:__osSiCreateAccessQueue.o(.bss*); BUILD_DIR/libultra.a:__osSiCreateAccessQueue.o(.bss*);
#if ENABLE_RUMBLE
BUILD_DIR/libultra.a:osPfsIsPlug.o(.bss*);
#endif
BUILD_DIR/libultra.a:osEepromWrite.o(.bss*); BUILD_DIR/libultra.a:osEepromWrite.o(.bss*);
BUILD_DIR/libultra.a:kdebugserver_stack.o(.bss*); BUILD_DIR/libultra.a:kdebugserver_stack.o(.bss*);
BUILD_DIR/libultra.a:kdebugserver.o(.bss*); BUILD_DIR/libultra.a:kdebugserver.o(.bss*);
@ -816,7 +851,6 @@ SECTIONS
__expansionRamStart = 0x80400000; __expansionRamStart = 0x80400000;
ASSERT((. <= __expansionRamStart), "Error: RDRAM expanded into Expansion RAM, despite Expansion RAM not being defined.") ASSERT((. <= __expansionRamStart), "Error: RDRAM expanded into Expansion RAM, despite Expansion RAM not being defined.")
BEGIN_SEG(entry, 0x10000000) BEGIN_SEG(entry, 0x10000000)
{ {
BUILD_DIR/levels/entry.o(.data); BUILD_DIR/levels/entry.o(.data);
@ -867,7 +901,7 @@ SECTIONS
/* 0x8016F000 21D7D0-255EC0 [386F0] */ /* 0x8016F000 21D7D0-255EC0 [386F0] */
BEGIN_SEG(goddard, SEG_GODDARD) BEGIN_SEG(goddard, SEG_GODDARD)
{ {
BUILD_DIR/src/menu/level_select_menu.o(.text); BUILD_DIR/src/menu/title_screen.o(.text);
BUILD_DIR/src/menu/intro_geo.o(.text); BUILD_DIR/src/menu/intro_geo.o(.text);
BUILD_DIR/src/menu/file_select.o(.text); BUILD_DIR/src/menu/file_select.o(.text);
BUILD_DIR/src/menu/star_select.o(.text); BUILD_DIR/src/menu/star_select.o(.text);
@ -889,8 +923,8 @@ SECTIONS
BUILD_DIR/libgoddard.a:renderer.o(.text); BUILD_DIR/libgoddard.a:renderer.o(.text);
BUILD_DIR/libgoddard.a:*.o(.text); BUILD_DIR/libgoddard.a:*.o(.text);
/* data, rodata, per file */ /* data, rodata, per file */
BUILD_DIR/src/menu/level_select_menu.o(.data*); BUILD_DIR/src/menu/title_screen.o(.data*);
BUILD_DIR/src/menu/level_select_menu.o(.rodata*); BUILD_DIR/src/menu/title_screen.o(.rodata*);
BUILD_DIR/src/menu/intro_geo.o(.data*); BUILD_DIR/src/menu/intro_geo.o(.data*);
BUILD_DIR/src/menu/file_select.o(.data*); BUILD_DIR/src/menu/file_select.o(.data*);
BUILD_DIR/src/menu/file_select.o(.rodata*); BUILD_DIR/src/menu/file_select.o(.rodata*);
@ -956,14 +990,12 @@ SECTIONS
{ {
BUILD_DIR/src/buffers/buffers.o(.bss*); BUILD_DIR/src/buffers/buffers.o(.bss*);
BUILD_DIR/src/audio/globals_start.o(.bss*); BUILD_DIR/src/audio/globals_start.o(.bss*);
#ifndef VERSION_SH #ifdef VERSION_SH
BUILD_DIR/src/audio/port_sh.o(.bss*);
#else
BUILD_DIR/src/audio/synthesis.o(.bss*); BUILD_DIR/src/audio/synthesis.o(.bss*);
BUILD_DIR/src/audio/heap.o(.bss*); BUILD_DIR/src/audio/heap.o(.bss*);
#endif
BUILD_DIR/src/audio/load.o(.bss*); BUILD_DIR/src/audio/load.o(.bss*);
#ifdef VERSION_SH
BUILD_DIR/src/audio/unk_shindou_audio_file.o(.bss*);
#else
BUILD_DIR/src/audio/data.o(.bss*); BUILD_DIR/src/audio/data.o(.bss*);
#endif #endif
BUILD_DIR/src/audio*.o(.bss*); BUILD_DIR/src/audio*.o(.bss*);
@ -974,15 +1006,14 @@ SECTIONS
. = ALIGN(0x1000); . = ALIGN(0x1000);
#endif #endif
#ifdef VERSION_SH #ifdef VERSION_SH
. = . + 0xB000; . += 0xB000;
#endif #endif
BUILD_DIR/src/buffers/gfx_output_buffer.o(.bss*); BUILD_DIR/src/buffers/gfx_output_buffer.o(.bss*);
} }
END_NOLOAD(buffers) END_NOLOAD(buffers)
#ifndef VERSION_SH
ASSERT((. <= SEG_MAIN), "Error: buffers segment extended into main") ASSERT((. <= SEG_MAIN), "Error: buffers segment extended into main")
#endif
/* 0x268020 0x268020-0 [0] */ /* 0x268020 0x268020-0 [0] */
BEGIN_SEG(intro, 0x14000000) BEGIN_SEG(intro, 0x14000000)
{ {
@ -1094,5 +1125,3 @@ SECTIONS
*(*); *(*);
} }
} }
EXTERN(osPfsIsPlug)
EXTERN(__osLeoInterrupt)

View File

@ -1,22 +1,16 @@
.include "seq_macros.inc" #include "seq_macros.inc"
.section .rodata .section .rodata
.align 0 .align 0
sequence_start: sequence_start:
.ifdef VERSION_SH
.set VERSION_EU_SH, 1
.endif
.ifdef VERSION_EU
.set VERSION_EU_SH, 1
.endif
seq_setmutebhv 0x60 seq_setmutebhv 0x60
seq_setmutescale 0 seq_setmutescale 0
.ifdef VERSION_SH #ifdef VERSION_SH
seq_setvol 100 seq_setvol 100
.else #else
seq_setvol 127 seq_setvol 127
.endif #endif
seq_settempo 120 seq_settempo 120
seq_initchannels 0x3ff seq_initchannels 0x3ff
seq_startchannel 0, .channel0 seq_startchannel 0, .channel0
@ -77,7 +71,7 @@ chan_stereoheadseteffects 1
chan_setdyntable .channel59_table chan_setdyntable .channel59_table
chan_jump .main_loop_023589 chan_jump .main_loop_023589
# Main loop for standard, non-continuous sound effects // Main loop for standard, non-continuous sound effects
.main_loop_023589: .main_loop_023589:
chan_delay1 chan_delay1
chan_ioreadval 0 chan_ioreadval 0
@ -91,17 +85,17 @@ chan_iowriteval 5
chan_ioreadval 4 chan_ioreadval 4
chan_dyncall chan_dyncall
# keep looping until layer 0 finishes or we are told to stop or to play something else // keep looping until layer 0 finishes or we are told to stop or to play something else
.poll_023589: .poll_023589:
chan_delay1 chan_delay1
chan_ioreadval 0 chan_ioreadval 0
chan_bltz .skip_023589 # if we have a signal: chan_bltz .skip_023589 // if we have a signal:
chan_beqz .force_stop_023589 # told to stop chan_beqz .force_stop_023589 // told to stop
chan_jump .start_playing_023589 # told to play something else chan_jump .start_playing_023589 // told to play something else
.skip_023589: .skip_023589:
chan_testlayerfinished 0 chan_testlayerfinished 0
chan_beqz .poll_023589 # if layer 0 hasn't finished, keep polling chan_beqz .poll_023589 // if layer 0 hasn't finished, keep polling
chan_jump .main_loop_023589 # otherwise go back to the main loop chan_jump .main_loop_023589 // otherwise go back to the main loop
.force_stop_023589: .force_stop_023589:
chan_freelayer 0 chan_freelayer 0
chan_freelayer 1 chan_freelayer 1
@ -144,7 +138,7 @@ chan_stereoheadseteffects 1
chan_setdyntable .channel6_table chan_setdyntable .channel6_table
chan_jump .main_loop_146 chan_jump .main_loop_146
# Main loop for moving, env and air sound effects, which play continuously // Main loop for moving, env and air sound effects, which play continuously
.main_loop_146: .main_loop_146:
chan_delay1 chan_delay1
chan_ioreadval 0 chan_ioreadval 0
@ -159,7 +153,7 @@ chan_iowriteval 5
chan_ioreadval 4 chan_ioreadval 4
chan_dyncall chan_dyncall
# keep looping until we are told to stop or to play something else // keep looping until we are told to stop or to play something else
.poll_146: .poll_146:
chan_delay1 chan_delay1
chan_ioreadval 0 chan_ioreadval 0
@ -181,7 +175,7 @@ chan_iowriteval 5
chan_stereoheadseteffects 1 chan_stereoheadseteffects 1
chan_setdyntable .channel7_table chan_setdyntable .channel7_table
# Loop for menu sound effects // Loop for menu sound effects
.main_loop_7: .main_loop_7:
chan_delay1 chan_delay1
chan_ioreadval 0 chan_ioreadval 0
@ -198,19 +192,19 @@ chan_setpanmix 127
chan_ioreadval 4 chan_ioreadval 4
chan_dyncall chan_dyncall
# keep looping until layer 0 finishes or we are told to stop or to play something else // keep looping until layer 0 finishes or we are told to stop or to play something else
.poll_7: .poll_7:
chan_delay1 chan_delay1
chan_ioreadval 0 chan_ioreadval 0
chan_bltz .skip_7 # if we have a signal: chan_bltz .skip_7 // if we have a signal:
chan_beqz .force_stop_7 # told to stop chan_beqz .force_stop_7 // told to stop
chan_unreservenotes chan_unreservenotes
chan_jump .start_playing_7 # told to play something else chan_jump .start_playing_7 // told to play something else
.skip_7: .skip_7:
chan_testlayerfinished 0 chan_testlayerfinished 0
chan_beqz .poll_7 # if layer 0 hasn't finished, keep polling chan_beqz .poll_7 // if layer 0 hasn't finished, keep polling
chan_unreservenotes chan_unreservenotes
chan_jump .main_loop_7 # otherwise go back to the main loop chan_jump .main_loop_7 // otherwise go back to the main loop
.force_stop_7: .force_stop_7:
chan_freelayer 0 chan_freelayer 0
chan_freelayer 1 chan_freelayer 1
@ -218,7 +212,7 @@ chan_freelayer 2
chan_unreservenotes chan_unreservenotes
chan_jump .main_loop_7 chan_jump .main_loop_7
# Delay for a number of ticks (1-255) in an interruptible manner. // Delay for a number of ticks (1-255) in an interruptible manner.
.delay: .delay:
chan_writeseq_nextinstr 0, 1 chan_writeseq_nextinstr 0, 1
chan_loop 20 chan_loop 20
@ -233,15 +227,15 @@ chan_end
chan_setpanmix 127 chan_setpanmix 127
chan_setvolscale 127 chan_setvolscale 127
chan_setvibratoextent 0 chan_setvibratoextent 0
chan_ioreadval 1 # IO slots 0-3 are reset to -1 when read; restore the value chan_ioreadval 1 // IO slots 0-3 are reset to -1 when read; restore the value
chan_iowriteval 0 chan_iowriteval 0
chan_break # break out of the loop chan_break // break out of the loop
chan_break # force the caller to return immediately chan_break // force the caller to return immediately
chan_end chan_end
# Set reverb in way that takes area echo level and volume into account. This // Set reverb in way that takes area echo level and volume into account. This
# is done by writing to IO slot 5 and letting get_sound_reverb in external.c // is done by writing to IO slot 5 and letting get_sound_reverb in external.c
# do the necessary math. // do the necessary math.
.set_reverb: .set_reverb:
chan_writeseq_nextinstr 0, 1 chan_writeseq_nextinstr 0, 1
chan_setreverb 10 chan_setreverb 10
@ -342,15 +336,15 @@ sound_ref .sound_action_bounce_off_object
sound_ref .chan_7ED sound_ref .chan_7ED
sound_ref .sound_action_read_sign sound_ref .sound_action_read_sign
sound_ref .chan_810 sound_ref .chan_810
.ifdef VERSION_JP #ifdef VERSION_JP
sound_ref .sound_action_jump_default sound_ref .sound_action_jump_default
sound_ref .sound_action_jump_default sound_ref .sound_action_jump_default
sound_ref .sound_action_jump_default sound_ref .sound_action_jump_default
.else #else
sound_ref .chan_828 sound_ref .chan_828
sound_ref .sound_action_intro_unk45e sound_ref .sound_action_intro_unk45e
sound_ref .sound_action_intro_unk45f sound_ref .sound_action_intro_unk45f
.endif #endif
sound_ref .sound_action_heavy_landing_default sound_ref .sound_action_heavy_landing_default
sound_ref .sound_action_heavy_landing_grass sound_ref .sound_action_heavy_landing_grass
sound_ref .sound_action_heavy_landing_water sound_ref .sound_action_heavy_landing_water
@ -988,7 +982,7 @@ layer_portamento 0x81, 42, 255
layer_note1 37, 0x1e, 105 layer_note1 37, 0x1e, 105
layer_end layer_end
.sound_action_climb_down_tree: # unused .sound_action_climb_down_tree: // unused
chan_setbank 0 chan_setbank 0
chan_setinstr 1 chan_setinstr 1
chan_setlayer 0, .layer_579 chan_setlayer 0, .layer_579
@ -999,7 +993,7 @@ layer_portamento 0x81, 44, 255
layer_note1 40, 0xb4, 100 layer_note1 40, 0xb4, 100
layer_end layer_end
.chan_582: # unused .chan_582: // unused
chan_setbank 0 chan_setbank 0
chan_setinstr 2 chan_setinstr 2
chan_setlayer 0, .layer_58A chan_setlayer 0, .layer_58A
@ -1418,8 +1412,8 @@ layer_note1 39, 0xa, 127
layer_note1 42, 0x8, 127 layer_note1 42, 0x8, 127
layer_end layer_end
.ifndef VERSION_JP #ifndef VERSION_JP
.chan_828: # unused .chan_828: // unused
chan_setbank 7 chan_setbank 7
chan_setinstr 3 chan_setinstr 3
chan_setlayer 0, .layer_83C chan_setlayer 0, .layer_83C
@ -1464,7 +1458,7 @@ layer_end
.layer_871: .layer_871:
layer_transpose 8 layer_transpose 8
layer_jump .layer_776 layer_jump .layer_776
.endif #endif
.sound_action_heavy_landing_default: .sound_action_heavy_landing_default:
chan_call .heavy_landing_common chan_call .heavy_landing_common
@ -2029,7 +2023,7 @@ sound_ref .sound_mario_punch_wah
sound_ref .sound_mario_uh sound_ref .sound_mario_uh
sound_ref .sound_mario_hrmm sound_ref .sound_mario_hrmm
sound_ref .sound_mario_wah2 sound_ref .sound_mario_wah2
.ifdef VERSION_JP #ifdef VERSION_JP
sound_ref .sound_mario_jump_hoo sound_ref .sound_mario_jump_hoo
sound_ref .sound_mario_jump_hoo sound_ref .sound_mario_jump_hoo
sound_ref .sound_mario_jump_hoo sound_ref .sound_mario_jump_hoo
@ -2046,7 +2040,7 @@ sound_ref .sound_mario_wah2
sound_ref .sound_mario_jump_hoo sound_ref .sound_mario_jump_hoo
sound_ref .sound_mario_jump_hoo sound_ref .sound_mario_jump_hoo
sound_ref .sound_mario_jump_hoo sound_ref .sound_mario_jump_hoo
.else #else
sound_ref .sound_peach_dear_mario sound_ref .sound_peach_dear_mario
sound_ref .sound_mario_jump_hoo sound_ref .sound_mario_jump_hoo
sound_ref .sound_mario_jump_hoo sound_ref .sound_mario_jump_hoo
@ -2071,7 +2065,7 @@ sound_ref .sound_mario_wah2
sound_ref .sound_peach_bake_a_cake sound_ref .sound_peach_bake_a_cake
sound_ref .sound_peach_for_mario sound_ref .sound_peach_for_mario
sound_ref .sound_peach_mario2 sound_ref .sound_peach_mario2
.endif #endif
.sound_mario_jump_hoo: .sound_mario_jump_hoo:
chan_setbank 8 chan_setbank 8
@ -2080,9 +2074,9 @@ chan_setlayer 0, .layer_C3C
chan_end chan_end
.layer_C3C: .layer_C3C:
.ifdef VERSION_EU_SH #if defined(VERSION_EU) || defined(VERSION_SH)
layer_transpose 2 layer_transpose 2
.endif #endif
layer_portamento 0x82, 41, 127 layer_portamento 0x82, 41, 127
layer_note1 37, 0x14, 127 layer_note1 37, 0x14, 127
layer_end layer_end
@ -2119,9 +2113,9 @@ chan_setlayer 0, .layer_C6C
chan_end chan_end
.layer_C6C: .layer_C6C:
.ifdef VERSION_EU_SH #if defined(VERSION_EU) || defined(VERSION_SH)
layer_transpose 1 layer_transpose 1
.endif #endif
layer_portamento 0x82, 44, 200 layer_portamento 0x82, 44, 200
layer_note1 39, 0x30, 127 layer_note1 39, 0x30, 127
layer_end layer_end
@ -2482,7 +2476,7 @@ chan_end
layer_transpose -1 layer_transpose -1
layer_jump .layer_C4E layer_jump .layer_C4E
.ifndef VERSION_JP #ifndef VERSION_JP
.sound_peach_dear_mario: .sound_peach_dear_mario:
chan_setbank 10 chan_setbank 10
chan_setinstr 15 chan_setinstr 15
@ -2697,9 +2691,9 @@ layer_jump .layer_C4E
.layer_F8A: .layer_F8A:
layer_note1 39, 0x50, 127 layer_note1 39, 0x50, 127
layer_end layer_end
.endif #endif
.ifdef VERSION_EU_SH #if defined(VERSION_EU) || defined(VERSION_SH)
.chan_unused_F9A_eu: .chan_unused_F9A_eu:
chan_setbank 8 chan_setbank 8
chan_setinstr 0 chan_setinstr 0
@ -2709,7 +2703,7 @@ layer_jump .layer_C4E
.layer_FA2_eu: .layer_FA2_eu:
layer_delay 0x5 layer_delay 0x5
layer_end layer_end
.endif #endif
.channel38_table: .channel38_table:
sound_ref .sound_general_activate_cap_switch sound_ref .sound_general_activate_cap_switch
@ -2830,7 +2824,7 @@ sound_ref .sound_general_boing3
sound_ref .sound_general_grand_star sound_ref .sound_general_grand_star
sound_ref .sound_general_grand_star_jump sound_ref .sound_general_grand_star_jump
sound_ref .sound_general_boat_rock sound_ref .sound_general_boat_rock
.ifdef VERSION_JP #ifdef VERSION_JP
sound_ref .sound_menu_enter_hole sound_ref .sound_menu_enter_hole
sound_ref .sound_menu_enter_hole sound_ref .sound_menu_enter_hole
sound_ref .sound_menu_enter_hole sound_ref .sound_menu_enter_hole
@ -2841,7 +2835,7 @@ sound_ref .sound_general_boat_rock
sound_ref .sound_general_bubbles sound_ref .sound_general_bubbles
sound_ref .sound_menu_enter_hole sound_ref .sound_menu_enter_hole
sound_ref .sound_menu_enter_hole sound_ref .sound_menu_enter_hole
.else #else
sound_ref .sound_general_vanish_sfx sound_ref .sound_general_vanish_sfx
sound_ref .sound_menu_enter_hole sound_ref .sound_menu_enter_hole
sound_ref .sound_general_red_coin sound_ref .sound_general_red_coin
@ -2852,7 +2846,7 @@ sound_ref .sound_general_boat_rock
sound_ref .sound_general_boing2 sound_ref .sound_general_boing2
sound_ref .sound_general_yoshi_walk sound_ref .sound_general_yoshi_walk
sound_ref .sound_general_enemy_alert1 sound_ref .sound_general_enemy_alert1
.endif #endif
.sound_general_activate_cap_switch: .sound_general_activate_cap_switch:
chan_setbank 5 chan_setbank 5
@ -3408,17 +3402,17 @@ chan_setbank 9
chan_setinstr 3 chan_setinstr 3
chan_setval 40 chan_setval 40
chan_call .set_reverb chan_call .set_reverb
.ifdef VERSION_SH #ifdef VERSION_SH
chan_setreverb 40 chan_setreverb 40
.endif #endif
chan_setlayer 0, .layer_141A chan_setlayer 0, .layer_141A
chan_end chan_end
.layer_141A: .layer_141A:
layer_transpose 24 layer_transpose 24
.ifdef VERSION_SH #ifdef VERSION_SH
layer_note1 51, 0xc, 90 layer_note1 51, 0xc, 90
.endif #endif
layer_note1 39, 0x4, 90 layer_note1 39, 0x4, 90
layer_note1 51, 0xc, 90 layer_note1 51, 0xc, 90
layer_note1 39, 0x4, 50 layer_note1 39, 0x4, 50
@ -3487,18 +3481,18 @@ layer_end
.sound_general_chain_chomp2: .sound_general_chain_chomp2:
chan_setbank 7 chan_setbank 7
.ifdef VERSION_JP #ifdef VERSION_JP
chan_setinstr 8 chan_setinstr 8
.else #else
chan_setinstr 14 chan_setinstr 14
.endif #endif
chan_setval 15 chan_setval 15
chan_call .set_reverb chan_call .set_reverb
chan_setlayer 0, .layer_14C6 chan_setlayer 0, .layer_14C6
chan_setlayer 1, .layer_14E3 chan_setlayer 1, .layer_14E3
.ifndef VERSION_JP #ifndef VERSION_JP
chan_setlayer 2, .layer_14E3 chan_setlayer 2, .layer_14E3
.endif #endif
chan_setval 1 chan_setval 1
chan_call .delay chan_call .delay
chan_setenvelope .envelope_3368 chan_setenvelope .envelope_3368
@ -3507,11 +3501,11 @@ chan_setinstr 7
chan_setval 13 chan_setval 13
chan_call .delay chan_call .delay
chan_setbank 7 chan_setbank 7
.ifdef VERSION_JP #ifdef VERSION_JP
chan_setinstr 8 chan_setinstr 8
.else #else
chan_setinstr 14 chan_setinstr 14
.endif #endif
chan_end chan_end
.layer_14C6: .layer_14C6:
@ -3527,12 +3521,12 @@ layer_end
.layer_14E3: .layer_14E3:
layer_loop 2 layer_loop 2
.ifdef VERSION_JP #ifdef VERSION_JP
layer_portamento 0x81, 36, 255 layer_portamento 0x81, 36, 255
layer_note1 24, 0x18, 127 layer_note1 24, 0x18, 127
.else #else
layer_note1 34, 0x19, 100 layer_note1 34, 0x19, 100
.endif #endif
layer_loopend layer_loopend
layer_end layer_end
@ -4154,24 +4148,27 @@ layer_note1 31, 0x14, 127
layer_end layer_end
.sound_general_red_coin: .sound_general_red_coin:
.ifdef VERSION_JP #ifdef VERSION_JP
chan_setbank 9 chan_setbank 9
chan_setinstr 3 chan_setinstr 3
chan_setlayer 0, .layer_1909 chan_setlayer 0, .layer_1909
chan_setlayer 1, .layer_1902 chan_setlayer 1, .layer_1902
chan_setlayer 2, .layer_1907 chan_setlayer 2, .layer_1907
.else #else
.ifdef VERSION_EU_SH #if defined(VERSION_EU) || defined(VERSION_SH)
chan_setbank 9 chan_setbank 9
chan_setinstr 3 chan_setinstr 3
.else #else
chan_setinstr 128 chan_setinstr 128
.endif #endif
chan_setenvelope .envelope_3378 chan_setenvelope .envelope_3378
// Small bugfix: .main_loop_023589 expects layer 0 to live the longest.
// I don't think this actually makes any audible difference given the
// silence at the end.
chan_setlayer 0, .layer_1907 chan_setlayer 0, .layer_1907
chan_setlayer 1, .layer_1902 chan_setlayer 1, .layer_1902
chan_setlayer 2, .layer_1909 chan_setlayer 2, .layer_1909
.endif #endif
chan_end chan_end
.layer_1902: .layer_1902:
@ -4191,6 +4188,12 @@ layer_note0 58, 0x10, 100, 80
layer_note0 58, 0x10, 60, 80 layer_note0 58, 0x10, 60, 80
layer_note0 58, 0x10, 40, 80 layer_note0 58, 0x10, 40, 80
layer_note0 58, 0x10, 25, 80 layer_note0 58, 0x10, 25, 80
// This small delay should not have any effect, but decreases the probability of
// encountering double red coin glitch. Without it, layer 0 finishes in 1.04
// seconds, and with some bad luck around scheduling/lag the sound spawner with
// a lifetime of 30 frames that creates the sound may deactivate on the same
// frame. That leads to double sound glitch on JP, see src/audio/external.c.
// With the delay, the same thing can still happen but requires more CPU lag.
layer_delay 0xa layer_delay 0xa
layer_end layer_end
@ -4422,7 +4425,7 @@ layer_portamento 0x81, 36, 40
layer_note1 41, 0xc, 127 layer_note1 41, 0xc, 127
layer_end layer_end
.ifdef VERSION_JP #ifdef VERSION_JP
.sound_general_boat_rock: .sound_general_boat_rock:
chan_setbank 9 chan_setbank 9
chan_setinstr 0 chan_setinstr 0
@ -4438,7 +4441,7 @@ layer_end
layer_portamento 0x1, 32, 0x7f layer_portamento 0x1, 32, 0x7f
layer_note1 60, 0x28, 100 layer_note1 60, 0x28, 100
layer_end layer_end
.else #else
.sound_general_boat_rock: .sound_general_boat_rock:
chan_setbank 4 chan_setbank 4
chan_setinstr 2 chan_setinstr 2
@ -4476,7 +4479,7 @@ layer_end
layer_portamento 0x81, 19, 255 layer_portamento 0x81, 19, 255
layer_note1 31, 0x32, 115 layer_note1 31, 0x32, 115
layer_end layer_end
.endif #endif
.channel4_table: .channel4_table:
sound_ref .sound_env_waterfall1 sound_ref .sound_env_waterfall1
@ -4525,21 +4528,21 @@ chan_setbank 5
chan_setinstr 1 chan_setinstr 1
chan_setval 25 chan_setval 25
chan_call .set_reverb chan_call .set_reverb
.ifdef VERSION_JP #ifdef VERSION_JP
chan_setenvelope .envelope_32E4 chan_setenvelope .envelope_32E4
.else #else
chan_setenvelope .envelope_32C4 chan_setenvelope .envelope_32C4
.endif #endif
chan_setlayer 0, .layer_1B53 chan_setlayer 0, .layer_1B53
chan_end chan_end
.layer_1B53: .layer_1B53:
layer_somethingon layer_somethingon
.ifdef VERSION_JP #ifdef VERSION_JP
layer_delay 0x6 layer_delay 0x6
.else #else
layer_delay 0x4 layer_delay 0x4
.endif #endif
.layer_1B56: .layer_1B56:
layer_note1 41, 0x12c, 95 layer_note1 41, 0x12c, 95
layer_jump .layer_1B56 layer_jump .layer_1B56
@ -4694,11 +4697,11 @@ chan_end
.layer_1C69: .layer_1C69:
layer_portamento 0x81, 15, 255 layer_portamento 0x81, 15, 255
.ifdef VERSION_JP #ifdef VERSION_JP
layer_note1 11, 0x1f4, 100 layer_note1 11, 0x1f4, 100
.else #else
layer_note1 11, 0x1f4, 127 layer_note1 11, 0x1f4, 127
.endif #endif
layer_end layer_end
.sound_env_elevator3: .sound_env_elevator3:
@ -5374,11 +5377,11 @@ chan_end
.layer_20D2: .layer_20D2:
layer_portamento 0x81, 44, 255 layer_portamento 0x81, 44, 255
.ifdef VERSION_JP #ifdef VERSION_JP
layer_note1 36, 0x18, 90 layer_note1 36, 0x18, 90
.else #else
layer_note1 36, 0x18, 115 layer_note1 36, 0x18, 115
.endif #endif
layer_delay 0x32 layer_delay 0x32
layer_end layer_end
@ -5398,13 +5401,13 @@ layer_note1 31, 0x26, 127
layer_end layer_end
.layer_20F4: .layer_20F4:
.ifdef VERSION_JP #ifdef VERSION_JP
layer_note1 38, 0x8, 120 layer_note1 38, 0x8, 120
layer_note1 33, 0x1e, 120 layer_note1 33, 0x1e, 120
.else #else
layer_note1 38, 0x8, 127 layer_note1 38, 0x8, 127
layer_note1 33, 0x1e, 127 layer_note1 33, 0x1e, 127
.endif #endif
layer_end layer_end
.sound_obj_bully_metal: .sound_obj_bully_metal:
@ -6989,7 +6992,7 @@ sound_ref .sound_menu_thank_you_playing_my_game
sound_ref .sound_menu_read_a_sign sound_ref .sound_menu_read_a_sign
sound_ref .sound_menu_exit_a_sign sound_ref .sound_menu_exit_a_sign
sound_ref .sound_menu_mario_castle_warp2 sound_ref .sound_menu_mario_castle_warp2
.ifdef VERSION_JP #ifdef VERSION_JP
sound_ref .sound_menu_message_next_page sound_ref .sound_menu_message_next_page
sound_ref .sound_menu_coin_its_a_me_mario sound_ref .sound_menu_coin_its_a_me_mario
sound_ref .sound_menu_yoshi_gain_lives sound_ref .sound_menu_yoshi_gain_lives
@ -7003,7 +7006,7 @@ sound_ref .sound_menu_mario_castle_warp2
sound_ref .sound_menu_mario_castle_warp sound_ref .sound_menu_mario_castle_warp
sound_ref .sound_menu_star_sound sound_ref .sound_menu_star_sound
sound_ref .sound_menu_change_select sound_ref .sound_menu_change_select
.else #else
sound_ref .sound_menu_star_sound_okey_dokey sound_ref .sound_menu_star_sound_okey_dokey
sound_ref .sound_menu_star_sound_lets_a_go sound_ref .sound_menu_star_sound_lets_a_go
sound_ref .sound_menu_yoshi_gain_lives sound_ref .sound_menu_yoshi_gain_lives
@ -7033,7 +7036,7 @@ sound_ref .sound_menu_mario_castle_warp2
sound_ref .sound_menu_power_meter sound_ref .sound_menu_power_meter
sound_ref .sound_menu_camera_buzz sound_ref .sound_menu_camera_buzz
sound_ref .sound_menu_camera_turn sound_ref .sound_menu_camera_turn
.endif #endif
.sound_menu_change_select: .sound_menu_change_select:
chan_setbank 9 chan_setbank 9
@ -7506,13 +7509,13 @@ layer_end
chan_reservenotes 4 chan_reservenotes 4
chan_setbank 9 chan_setbank 9
chan_setinstr 2 chan_setinstr 2
.ifdef VERSION_SH #ifdef VERSION_SH
chan_setval 15 chan_setval 15
.set EXIT_PIPE_NOTE_VELOCITY, 106 .set EXIT_PIPE_NOTE_VELOCITY, 106
.else #else
chan_setval 30 chan_setval 30
.set EXIT_PIPE_NOTE_VELOCITY, 126 .set EXIT_PIPE_NOTE_VELOCITY, 126
.endif #endif
chan_call .set_reverb chan_call .set_reverb
chan_setenvelope .envelope_3464 chan_setenvelope .envelope_3464
chan_setdecayrelease 220 chan_setdecayrelease 220
@ -7774,7 +7777,7 @@ chan_setlayer 0, .layer_3041
chan_setlayer 1, .layer_2FC9 chan_setlayer 1, .layer_2FC9
chan_end chan_end
.ifndef VERSION_JP #ifndef VERSION_JP
.sound_menu_star_sound_okey_dokey: .sound_menu_star_sound_okey_dokey:
chan_setbank 4 chan_setbank 4
chan_setinstr 14 chan_setinstr 14
@ -7828,33 +7831,33 @@ chan_end
.layer_3146: .layer_3146:
layer_delay 0x6 layer_delay 0x6
.ifdef VERSION_SH #ifdef VERSION_SH
.set RED_COIN_NOTE_VELOCITY_SUB, 10 .set RED_COIN_NOTE_VELOCITY_SUB, 10
.else #else
.set RED_COIN_NOTE_VELOCITY_SUB, 0 .set RED_COIN_NOTE_VELOCITY_SUB, 0
.endif #endif
.layer_3148: .layer_3148:
layer_call .transpose_by_coin_index layer_call .transpose_by_coin_index
layer_note0 46, 0xc, 75 - RED_COIN_NOTE_VELOCITY_SUB, 20 layer_note0 46, 0xc, (75 - RED_COIN_NOTE_VELOCITY_SUB), 20
layer_note0 45, 0xc, 75 - RED_COIN_NOTE_VELOCITY_SUB, 20 layer_note0 45, 0xc, (75 - RED_COIN_NOTE_VELOCITY_SUB), 20
layer_note0 46, 0xc, 75 - RED_COIN_NOTE_VELOCITY_SUB, 20 layer_note0 46, 0xc, (75 - RED_COIN_NOTE_VELOCITY_SUB), 20
layer_note0 58, 0x10, 80 - RED_COIN_NOTE_VELOCITY_SUB, 80 layer_note0 58, 0x10, (80 - RED_COIN_NOTE_VELOCITY_SUB), 80
layer_note0 58, 0x10, 45 - RED_COIN_NOTE_VELOCITY_SUB, 80 layer_note0 58, 0x10, (45 - RED_COIN_NOTE_VELOCITY_SUB), 80
layer_note0 58, 0x10, 20 - RED_COIN_NOTE_VELOCITY_SUB, 80 layer_note0 58, 0x10, (20 - RED_COIN_NOTE_VELOCITY_SUB), 80
layer_note0 58, 0x10, 15 - RED_COIN_NOTE_VELOCITY_SUB, 80 layer_note0 58, 0x10, (15 - RED_COIN_NOTE_VELOCITY_SUB), 80
layer_end layer_end
.layer_3168: .layer_3168:
layer_call .transpose_by_coin_index layer_call .transpose_by_coin_index
layer_note0 41, 0xc, 75 - RED_COIN_NOTE_VELOCITY_SUB, 20 layer_note0 41, 0xc, (75 - RED_COIN_NOTE_VELOCITY_SUB), 20
layer_note0 40, 0xc, 75 - RED_COIN_NOTE_VELOCITY_SUB, 20 layer_note0 40, 0xc, (75 - RED_COIN_NOTE_VELOCITY_SUB), 20
layer_note0 41, 0xc, 75 - RED_COIN_NOTE_VELOCITY_SUB, 20 layer_note0 41, 0xc, (75 - RED_COIN_NOTE_VELOCITY_SUB), 20
layer_note0 53, 0x10, 80 - RED_COIN_NOTE_VELOCITY_SUB, 80 layer_note0 53, 0x10, (80 - RED_COIN_NOTE_VELOCITY_SUB), 80
layer_note0 53, 0x10, 45 - RED_COIN_NOTE_VELOCITY_SUB, 80 layer_note0 53, 0x10, (45 - RED_COIN_NOTE_VELOCITY_SUB), 80
layer_note0 53, 0x10, 20 - RED_COIN_NOTE_VELOCITY_SUB, 80 layer_note0 53, 0x10, (20 - RED_COIN_NOTE_VELOCITY_SUB), 80
layer_note0 53, 0x10, 15 - RED_COIN_NOTE_VELOCITY_SUB, 80 layer_note0 53, 0x10, (15 - RED_COIN_NOTE_VELOCITY_SUB), 80
layer_end layer_end
.transpose_by_coin_index: .transpose_by_coin_index:
@ -7877,7 +7880,7 @@ chan_end
layer_transpose 0 layer_transpose 0
layer_note1 32, 0x7f, 115 layer_note1 32, 0x7f, 115
layer_end layer_end
.endif #endif
.sound_general_bird_chirp2: .sound_general_bird_chirp2:
chan_setbank 5 chan_setbank 5
@ -8084,14 +8087,14 @@ envelope_line 1 32700
envelope_line 10 0 envelope_line 10 0
envelope_goto 2 envelope_goto 2
.ifndef VERSION_JP #ifndef VERSION_JP
.envelope_3378: .envelope_3378:
envelope_line 3 32700 envelope_line 3 32700
envelope_line 10 30000 envelope_line 10 30000
envelope_line 10 10000 envelope_line 10 10000
envelope_line 100 0 envelope_line 100 0
envelope_goto 3 envelope_goto 3
.endif #endif
.envelope_338C: .envelope_338C:
envelope_line 1 32700 envelope_line 1 32700
@ -8150,11 +8153,11 @@ envelope_goto 2
.envelope_341C: .envelope_341C:
envelope_line 25 32760 envelope_line 25 32760
envelope_line 60 10000 envelope_line 60 10000
.ifdef VERSION_SH #ifdef VERSION_SH
envelope_hang envelope_hang
.else #else
envelope_goto 2 envelope_goto 2
.endif #endif
.envelope_3428: .envelope_3428:
envelope_line 1 10000 envelope_line 1 10000

View File

@ -877,12 +877,6 @@ u16 unk_sh_data_4[] = {
0x5FFF, 0x9001, 0x5FFF, 0x9001,
0x7FFF, 0x8001 0x7FFF, 0x8001
}; };
char shindouDebugPrint1[] = "Terminate-Canceled Channel %d,Phase %d\n";
char shindouDebugPrint2[] = "S->W\n";
char shindouDebugPrint3[] = "W->S\n";
char shindouDebugPrint4[] = "S-Resample Pitch %x (old %d -> delay %d)\n";
// These debug prints are continued in shindou_debug_prints_1.c.
#endif #endif
#ifndef VERSION_SH #ifndef VERSION_SH

Some files were not shown because too many files have changed in this diff Show More