diff --git a/Makefile b/Makefile
index cc2cf081..43b3a653 100644
--- a/Makefile
+++ b/Makefile
@@ -44,7 +44,7 @@ PRINT := printf
ASM_PROCESSOR_DIR := tools/asm-processor
BK_ROM_COMPRESS := tools/bk_rom_compressor/target/release/bk_rom_compress
BK_ROM_DECOMPRESS := tools/bk_rom_compressor/target/release/bk_rom_decompress
-BK_ASSET_TOOL := tools/bk_asset_tool/bk_asset_tool
+BK_ASSET_TOOL := tools/bk_asset_tool/target/release/bk_asset_tool
ASM_PROCESSOR := $(PYTHON) $(ASM_PROCESSOR_DIR)/asm_processor.py
SPLAT_INPUTS := $(PYTHON) tools/splat_inputs.py
PROGRESS := $(PYTHON) tools/progress.py
@@ -166,7 +166,7 @@ OPT_FLAGS := -O2
MIPSBIT := -mips2
ASFLAGS := -EB -mtune=vr4300 -march=vr4300 -mabi=32 -I include
GCC_ASFLAGS := -c -x assembler-with-cpp -mabi=32 -ffreestanding -mtune=vr4300 -march=vr4300 -mfix4300 -G 0 -O -mno-shared -fno-PIC -mno-abicalls
-LDFLAGS := -T $(LD_SCRIPT) -Map $(ELF:.elf=.map) --no-check-sections --accept-unknown-input-arch -T undefined_syms.libultra.txt
+LDFLAGS := -T $(LD_SCRIPT) -Map $(ELF:.elf=.map) --no-check-sections --accept-unknown-input-arch -T manual_syms.txt
BINOFLAGS := -I binary -O elf32-tradbigmips
### Rules ###
@@ -316,7 +316,7 @@ $(DECOMPRESSED_BASEROM): $(BASEROM) $(BK_ROM_DECOMPRESS)
# .o -> .elf (dummy symbols)
$(PRELIM_ELF): $(ALL_OBJS) $(LD_SCRIPT) $(ASSET_OBJS)
$(call print1,Linking elf:,$@)
- @$(LD) $(LDFLAGS) -T undefined_syms_auto.$(VERSION).txt -T undefined_syms.$(VERSION).txt -T rzip_dummy_addrs.txt -o $@
+ @$(LD) $(LDFLAGS) -T rzip_dummy_addrs.txt -o $@
# .elf -> .z64 (dummy symbols)
$(PRELIM_Z64) : $(PRELIM_ELF)
@@ -330,7 +330,7 @@ $(COMPRESSED_SYMBOLS): $(PRELIM_ELF) $(PRELIM_Z64) $(BK_ROM_COMPRESS)
# .o -> .elf (game)
$(ELF): $(ALL_OBJS) $(LD_SCRIPT) $(ASSET_OBJS) $(COMPRESSED_SYMBOLS)
$(call print1,Linking elf:,$@)
- @$(LD) $(LDFLAGS) -T undefined_syms_auto.$(VERSION).txt -T undefined_syms.$(VERSION).txt -T $(COMPRESSED_SYMBOLS) -o $@
+ @$(LD) $(LDFLAGS) -T $(COMPRESSED_SYMBOLS) -o $@
# .elf -> .z64 (uncompressed)
$(UNCOMPRESSED_Z64) : $(ELF)
@@ -341,15 +341,18 @@ $(UNCOMPRESSED_Z64) : $(ELF)
$(FINAL_Z64) : $(UNCOMPRESSED_Z64) $(ELF) $(BK_ROM_COMPRESS)
@$(BK_ROM_COMPRESS) $(ELF) $(UNCOMPRESSED_Z64) $@
+# TOOLS
+# Tool for spliting BK asset sections into and from ROM Bin and transforming certain file types
$(BK_ASSET_TOOL):
- @$(CD) tools/bk_asset_tool && cargo build --release
- @$(CP) tools/bk_asset_tool/target/release/bk_asset_tool $@
+ @$(CD) tools/bk_asset_tool && cargo build --release 2> /dev/null
+# Tool to compress BK and correct checksums from elf and uncompressed rom
$(BK_ROM_COMPRESS):
- @$(CD) tools/bk_rom_compressor && cargo build --release --bin bk_rom_compress
+ @$(CD) tools/bk_rom_compressor && cargo build --release --bin bk_rom_compress 2> /dev/null
+# Tool to turn compressed BK into uncompressed ROM
$(BK_ROM_DECOMPRESS):
- @$(CD) tools/bk_rom_compressor && cargo build --release --bin bk_rom_decompress
+ @$(CD) tools/bk_rom_compressor && cargo build --release --bin bk_rom_decompress 2> /dev/null
clean:
$(call print0,Cleaning build artifacts)
@@ -361,7 +364,6 @@ clean:
@$(RM) -rf $(addprefix $(ASM_ROOT)/,$(filter-out core1,$(OVERLAYS)))
@$(RM) -rf $(ASM_ROOT)/core1/*.s
@$(RM) -rf $(ASM_ROOT)/core1/os
- @$(RM) -f undefined_syms_auto* undefined_funcs_auto*
@$(RM) -f *.ld
# Per-file flag definitions
@@ -415,7 +417,9 @@ MAKEFLAGS += -r
.SUFFIXES:
# Phony targets
-.PHONY: all clean verify $(OVERLAYS) progress $(addprefix progress-,$(OVERLAYS))
+.PHONY: all clean verify $(OVERLAYS) progress $(addprefix progress-,$(OVERLAYS)) \
+ $(BK_ASSET_TOOL) $(BK_ROM_COMPRESS) $(BK_ROM_DECOMPRESS)
+
# Set up pipefail
SHELL = /bin/bash -e -o pipefail
diff --git a/README.md b/README.md
index 86eedbba..9ae98068 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# banjo (98.6934%)
+# banjo (100.0000%)
diff --git a/asm/core1/ultra/exceptasm.s b/asm/core1/ultra/exceptasm.s
index 6620a849..6048455b 100644
--- a/asm/core1/ultra/exceptasm.s
+++ b/asm/core1/ultra/exceptasm.s
@@ -1,4 +1,5 @@
#include
+#include
.include "macro.inc"
/* assembler directives */
@@ -59,6 +60,8 @@ __osIntTable:
.section .text, "ax"
+/* Generated by spimdisasm 1.24.3 */
+
# Handwritten function
glabel func_8026A2E0
/* F45B10 8026A2E0 3C1A8027 */ lui $k0, %hi(D_8026A300)
@@ -141,8 +144,8 @@ D_8026A300:
/* F45C40 8026A410 0369D825 */ or $k1, $k1, $t1
/* F45C44 8026A414 AF5B0118 */ sw $k1, 0x118($k0)
.L8026A418:
-/* F45C48 8026A418 3C09A430 */ lui $t1, %hi(D_A430000C)
-/* F45C4C 8026A41C 8D29000C */ lw $t1, %lo(D_A430000C)($t1)
+/* F45C48 8026A418 3C09A430 */ lui $t1, %hi(PHYS_TO_K1(MI_INTR_MASK_REG))
+/* F45C4C 8026A41C 8D29000C */ lw $t1, %lo(PHYS_TO_K1(MI_INTR_MASK_REG))($t1)
/* F45C50 8026A420 5120000C */ beql $t1, $zero, .L8026A454
/* F45C54 8026A424 AF490128 */ sw $t1, 0x128($k0)
/* F45C58 8026A428 3C088027 */ lui $t0, %hi(__OSGlobalIntMask)
@@ -258,21 +261,21 @@ rcp:
/* F45DE4 8026A5B4 3C088027 */ lui $t0, %hi(__OSGlobalIntMask)
/* F45DE8 8026A5B8 25087130 */ addiu $t0, $t0, %lo(__OSGlobalIntMask)
/* F45DEC 8026A5BC 8D080000 */ lw $t0, 0x0($t0)
-/* F45DF0 8026A5C0 3C11A430 */ lui $s1, %hi(D_A4300008)
-/* F45DF4 8026A5C4 8E310008 */ lw $s1, %lo(D_A4300008)($s1)
+/* F45DF0 8026A5C0 3C11A430 */ lui $s1, %hi(PHYS_TO_K1(MI_INTR_REG))
+/* F45DF4 8026A5C4 8E310008 */ lw $s1, %lo(PHYS_TO_K1(MI_INTR_REG))($s1)
/* F45DF8 8026A5C8 00084402 */ srl $t0, $t0, 16
/* F45DFC 8026A5CC 02288824 */ and $s1, $s1, $t0
/* F45E00 8026A5D0 32290001 */ andi $t1, $s1, 0x1
/* F45E04 8026A5D4 51200014 */ beql $t1, $zero, .L8026A628
/* F45E08 8026A5D8 32290008 */ andi $t1, $s1, 0x8
-/* F45E0C 8026A5DC 3C0CA404 */ lui $t4, %hi(D_A4040010)
-/* F45E10 8026A5E0 8D8C0010 */ lw $t4, %lo(D_A4040010)($t4)
+/* F45E0C 8026A5DC 3C0CA404 */ lui $t4, %hi(PHYS_TO_K1(SP_STATUS_REG))
+/* F45E10 8026A5E0 8D8C0010 */ lw $t4, %lo(PHYS_TO_K1(SP_STATUS_REG))($t4)
/* F45E14 8026A5E4 24090008 */ addiu $t1, $zero, 0x8
-/* F45E18 8026A5E8 3C01A404 */ lui $at, %hi(D_A4040010)
+/* F45E18 8026A5E8 3C01A404 */ lui $at, %hi(PHYS_TO_K1(SP_STATUS_REG))
/* F45E1C 8026A5EC 318C0300 */ andi $t4, $t4, 0x300
/* F45E20 8026A5F0 3231003E */ andi $s1, $s1, 0x3E
/* F45E24 8026A5F4 11800007 */ beqz $t4, .L8026A614
-/* F45E28 8026A5F8 AC290010 */ sw $t1, %lo(D_A4040010)($at)
+/* F45E28 8026A5F8 AC290010 */ sw $t1, %lo(PHYS_TO_K1(SP_STATUS_REG))($at)
/* F45E2C 8026A5FC 0C09AA09 */ jal func_8026A824
/* F45E30 8026A600 24040020 */ addiu $a0, $zero, 0x20
/* F45E34 8026A604 52200039 */ beql $s1, $zero, .L8026A6EC
@@ -287,9 +290,9 @@ rcp:
/* F45E54 8026A624 32290008 */ andi $t1, $s1, 0x8
.L8026A628:
/* F45E58 8026A628 11200007 */ beqz $t1, .L8026A648
-/* F45E5C 8026A62C 3C01A440 */ lui $at, %hi(D_A4400010)
+/* F45E5C 8026A62C 3C01A440 */ lui $at, %hi(PHYS_TO_K1(VI_CURRENT_REG))
/* F45E60 8026A630 32310037 */ andi $s1, $s1, 0x37
-/* F45E64 8026A634 AC200010 */ sw $zero, %lo(D_A4400010)($at)
+/* F45E64 8026A634 AC200010 */ sw $zero, %lo(PHYS_TO_K1(VI_CURRENT_REG))($at)
/* F45E68 8026A638 0C09AA09 */ jal func_8026A824
/* F45E6C 8026A63C 24040038 */ addiu $a0, $zero, 0x38
/* F45E70 8026A640 5220002A */ beql $s1, $zero, .L8026A6EC
@@ -299,9 +302,9 @@ rcp:
/* F45E7C 8026A64C 5120000A */ beql $t1, $zero, .L8026A678
/* F45E80 8026A650 32290002 */ andi $t1, $s1, 0x2
/* F45E84 8026A654 24090001 */ addiu $t1, $zero, 0x1
-/* F45E88 8026A658 3C01A450 */ lui $at, %hi(D_A450000C)
+/* F45E88 8026A658 3C01A450 */ lui $at, %hi(PHYS_TO_K1(AI_STATUS_REG))
/* F45E8C 8026A65C 3231003B */ andi $s1, $s1, 0x3B
-/* F45E90 8026A660 AC29000C */ sw $t1, %lo(D_A450000C)($at)
+/* F45E90 8026A660 AC29000C */ sw $t1, %lo(PHYS_TO_K1(AI_STATUS_REG))($at)
/* F45E94 8026A664 0C09AA09 */ jal func_8026A824
/* F45E98 8026A668 24040030 */ addiu $a0, $zero, 0x30
/* F45E9C 8026A66C 5220001F */ beql $s1, $zero, .L8026A6EC
@@ -309,9 +312,9 @@ rcp:
/* F45EA4 8026A674 32290002 */ andi $t1, $s1, 0x2
.L8026A678:
/* F45EA8 8026A678 11200007 */ beqz $t1, .L8026A698
-/* F45EAC 8026A67C 3C01A480 */ lui $at, %hi(D_A4800018)
+/* F45EAC 8026A67C 3C01A480 */ lui $at, %hi(PHYS_TO_K1(SI_STATUS_REG))
/* F45EB0 8026A680 3231003D */ andi $s1, $s1, 0x3D
-/* F45EB4 8026A684 AC200018 */ sw $zero, %lo(D_A4800018)($at)
+/* F45EB4 8026A684 AC200018 */ sw $zero, %lo(PHYS_TO_K1(SI_STATUS_REG))($at)
/* F45EB8 8026A688 0C09AA09 */ jal func_8026A824
/* F45EBC 8026A68C 24040028 */ addiu $a0, $zero, 0x28
/* F45EC0 8026A690 52200016 */ beql $s1, $zero, .L8026A6EC
@@ -321,9 +324,9 @@ rcp:
/* F45ECC 8026A69C 5120000A */ beql $t1, $zero, .L8026A6C8
/* F45ED0 8026A6A0 32290020 */ andi $t1, $s1, 0x20
/* F45ED4 8026A6A4 24090002 */ addiu $t1, $zero, 0x2
-/* F45ED8 8026A6A8 3C01A460 */ lui $at, %hi(D_A4600010)
+/* F45ED8 8026A6A8 3C01A460 */ lui $at, %hi(PHYS_TO_K1(PI_STATUS_REG))
/* F45EDC 8026A6AC 3231002F */ andi $s1, $s1, 0x2F
-/* F45EE0 8026A6B0 AC290010 */ sw $t1, %lo(D_A4600010)($at)
+/* F45EE0 8026A6B0 AC290010 */ sw $t1, %lo(PHYS_TO_K1(PI_STATUS_REG))($at)
/* F45EE4 8026A6B4 0C09AA09 */ jal func_8026A824
/* F45EE8 8026A6B8 24040040 */ addiu $a0, $zero, 0x40
/* F45EEC 8026A6BC 5220000B */ beql $s1, $zero, .L8026A6EC
@@ -333,9 +336,9 @@ rcp:
/* F45EF8 8026A6C8 51200008 */ beql $t1, $zero, .L8026A6EC
/* F45EFC 8026A6CC 2401FBFF */ addiu $at, $zero, -0x401
/* F45F00 8026A6D0 24090800 */ addiu $t1, $zero, 0x800
-/* F45F04 8026A6D4 3C01A430 */ lui $at, %hi(D_A4300000)
+/* F45F04 8026A6D4 3C01A430 */ lui $at, %hi(PHYS_TO_K1(MI_MODE_REG))
/* F45F08 8026A6D8 3231001F */ andi $s1, $s1, 0x1F
-/* F45F0C 8026A6DC AC290000 */ sw $t1, %lo(D_A4300000)($at)
+/* F45F0C 8026A6DC AC290000 */ sw $t1, %lo(PHYS_TO_K1(MI_MODE_REG))($at)
/* F45F10 8026A6E0 0C09AA09 */ jal func_8026A824
/* F45F14 8026A6E4 24040048 */ addiu $a0, $zero, 0x48
/* F45F18 8026A6E8 2401FBFF */ addiu $at, $zero, -0x401
@@ -427,6 +430,7 @@ enqueueRunning:
/* F4604C 8026A81C 0809AA99 */ j __osDispatchThread
/* F46050 8026A820 00000000 */ nop
endlabel func_8026A2E0
+.size func_8026A2E0, . - func_8026A2E0
# Handwritten function
glabel func_8026A824
@@ -493,6 +497,7 @@ glabel func_8026A824
/* F46134 8026A904 1000FFB5 */ b enqueueRunning
/* F46138 8026A908 AF5B0118 */ sw $k1, 0x118($k0)
endlabel func_8026A824
+.size func_8026A824, . - func_8026A824
# Handwritten function
glabel __osEnqueueAndYield
@@ -528,7 +533,7 @@ glabel __osEnqueueAndYield
/* F461AC 8026A97C 8CBB0118 */ lw $k1, 0x118($a1)
/* F461B0 8026A980 3369FF00 */ andi $t1, $k1, 0xFF00
/* F461B4 8026A984 5120000E */ beql $t1, $zero, .L8026A9C0
-/* F461B8 8026A988 3C1BA430 */ lui $k1, %hi(D_A430000C)
+/* F461B8 8026A988 3C1BA430 */ lui $k1, %hi(PHYS_TO_K1(MI_INTR_MASK_REG))
/* F461BC 8026A98C 3C088027 */ lui $t0, %hi(__OSGlobalIntMask)
/* F461C0 8026A990 25087130 */ addiu $t0, $t0, %lo(__OSGlobalIntMask)
/* F461C4 8026A994 8D080000 */ lw $t0, 0x0($t0)
@@ -541,9 +546,9 @@ glabel __osEnqueueAndYield
/* F461E0 8026A9B0 0361D824 */ and $k1, $k1, $at
/* F461E4 8026A9B4 0369D825 */ or $k1, $k1, $t1
/* F461E8 8026A9B8 ACBB0118 */ sw $k1, 0x118($a1)
-/* F461EC 8026A9BC 3C1BA430 */ lui $k1, %hi(D_A430000C)
+/* F461EC 8026A9BC 3C1BA430 */ lui $k1, %hi(PHYS_TO_K1(MI_INTR_MASK_REG))
.L8026A9C0:
-/* F461F0 8026A9C0 8F7B000C */ lw $k1, %lo(D_A430000C)($k1)
+/* F461F0 8026A9C0 8F7B000C */ lw $k1, %lo(PHYS_TO_K1(MI_INTR_MASK_REG))($k1)
/* F461F4 8026A9C4 1360000B */ beqz $k1, .L8026A9F4
/* F461F8 8026A9C8 00000000 */ nop
/* F461FC 8026A9CC 3C1A8027 */ lui $k0, %hi(__OSGlobalIntMask)
@@ -565,6 +570,7 @@ glabel __osEnqueueAndYield
/* F46234 8026AA04 0809AA99 */ j __osDispatchThread
/* F46238 8026AA08 00000000 */ nop
endlabel __osEnqueueAndYield
+.size __osEnqueueAndYield, . - __osEnqueueAndYield
glabel __osEnqueueThread
/* F4623C 8026AA0C 8C980000 */ lw $t8, 0x0($a0)
@@ -588,6 +594,7 @@ glabel __osEnqueueThread
/* F4627C 8026AA4C 03E00008 */ jr $ra
/* F46280 8026AA50 ACA40008 */ sw $a0, 0x8($a1)
endlabel __osEnqueueThread
+.size __osEnqueueThread, . - __osEnqueueThread
glabel __osPopThread
/* F46284 8026AA54 8C820000 */ lw $v0, 0x0($a0)
@@ -595,6 +602,7 @@ glabel __osPopThread
/* F4628C 8026AA5C 03E00008 */ jr $ra
/* F46290 8026AA60 AC990000 */ sw $t9, 0x0($a0)
endlabel __osPopThread
+.size __osPopThread, . - __osPopThread
# Handwritten function
glabel __osDispatchThread
@@ -686,8 +694,8 @@ glabel __osDispatchThread
/* F463E4 8026ABB4 275A8C60 */ addiu $k0, $k0, %lo(__osRcpImTable)
/* F463E8 8026ABB8 037AD821 */ addu $k1, $k1, $k0
/* F463EC 8026ABBC 977B0000 */ lhu $k1, 0x0($k1)
-/* F463F0 8026ABC0 3C1AA430 */ lui $k0, %hi(D_A430000C)
-/* F463F4 8026ABC4 275A000C */ addiu $k0, $k0, %lo(D_A430000C)
+/* F463F0 8026ABC0 3C1AA430 */ lui $k0, %hi(PHYS_TO_K1(MI_INTR_MASK_REG))
+/* F463F4 8026ABC4 275A000C */ addiu $k0, $k0, %lo(PHYS_TO_K1(MI_INTR_MASK_REG))
/* F463F8 8026ABC8 AF5B0000 */ sw $k1, 0x0($k0)
/* F463FC 8026ABCC 00000000 */ nop
/* F46400 8026ABD0 00000000 */ nop
@@ -695,6 +703,7 @@ glabel __osDispatchThread
/* F46408 8026ABD8 00000000 */ nop
/* F4640C 8026ABDC 42000018 */ eret
endlabel __osDispatchThread
+.size __osDispatchThread, . - __osDispatchThread
glabel __osCleanupThread
/* F46410 8026ABE0 0C09936C */ jal osDestroyThread
@@ -702,6 +711,7 @@ glabel __osCleanupThread
/* F46418 8026ABE8 00000000 */ nop
/* F4641C 8026ABEC 00000000 */ nop
endlabel __osCleanupThread
+.size __osCleanupThread, . - __osCleanupThread
# Handwritten function
glabel osMapTLBRdb
@@ -730,3 +740,4 @@ glabel osMapTLBRdb
/* F46478 8026AC48 00000000 */ nop
/* F4647C 8026AC4C 00000000 */ nop
endlabel osMapTLBRdb
+.size osMapTLBRdb, . - osMapTLBRdb
diff --git a/asm/core1/ultra/parameters.s b/asm/core1/ultra/parameters.s
new file mode 100644
index 00000000..450af31b
--- /dev/null
+++ b/asm/core1/ultra/parameters.s
@@ -0,0 +1,17 @@
+#include "PR/R4300.h"
+#include "sys/asm.h"
+#include "sys/regdef.h"
+
+.text
+ABS(leoBootID, 0x800001a0)
+ABS(osTvType, 0x80000300)
+ABS(osRomType, 0x80000304)
+ABS(osRomBase, 0x80000308)
+ABS(osResetType, 0x8000030c)
+ABS(osCicId, 0x80000310)
+ABS(osVersion, 0x80000314)
+ABS(osMemSize, 0x80000318)
+ABS(osAppNMIBuffer, 0x8000031c)
+
+.space 0x60
+/* padded to 0x60 in the object file */
diff --git a/asm/core1/ultra/setintmask.s b/asm/core1/ultra/setintmask.s
index a561e22f..a5cf9f88 100644
--- a/asm/core1/ultra/setintmask.s
+++ b/asm/core1/ultra/setintmask.s
@@ -1,4 +1,5 @@
#include
+#include
.include "macro.inc"
# assembler directives
.set noat # allow manual use of $at
@@ -100,8 +101,8 @@ glabel osSetIntMask
xor $t0, $t3, $at
andi $t0, $t0, 0xff00
or $v0, $v0, $t0
- lui $t2, %hi(D_A430000C)
- lw $t2, %lo(D_A430000C)($t2)
+ lui $t2, %hi(PHYS_TO_K1(MI_INTR_MASK_REG))
+ lw $t2, %lo(PHYS_TO_K1(MI_INTR_MASK_REG))($t2)
beqz $t2, setintmask_1
srl $t1, $t3, 0x10
addiu $at, $zero, -1
@@ -118,8 +119,8 @@ setintmask_1:
lui $t2, %hi(__osRcpImTable)
addu $t2, $t2, $t0
lhu $t2, %lo(__osRcpImTable)($t2)
- lui $at, %hi(D_A430000C)
- sw $t2, %lo(D_A430000C)($at)
+ lui $at, %hi(PHYS_TO_K1(MI_INTR_MASK_REG))
+ sw $t2, %lo(PHYS_TO_K1(MI_INTR_MASK_REG))($at)
andi $t0, $a0, 0xff01
andi $t1, $t3, 0xff00
and $t0, $t0, $t1
diff --git a/asm/data/fight/code_180.data.s b/asm/data/fight/code_180.data.s
deleted file mode 100644
index d589d122..00000000
--- a/asm/data/fight/code_180.data.s
+++ /dev/null
@@ -1,429 +0,0 @@
-.include "macro.inc"
-
-.section .data
-
-dlabel D_80392100
-.double -500.0
-
-dlabel jtbl_80392108
-.word L80387794_13A4, L803877F8_1408, L803878FC_150C, L803879A0_15B0, L80387A20_1630, L80387A98_16A8
-
-dlabel D_80392120
-.float 0.95
-
-dlabel D_80392124
-.float 1.05
-
-dlabel D_80392128
-.float 5000.0
-
-dlabel D_8039212C
-.float 12000.0
-
-dlabel D_80392130
-.float 1e8
-
-dlabel jtbl_80392134
-.word L80388254_1E64, L80388558_2168, L80388558_2168, L80388268_1E78, L80388314_1F24, L8038837C_1F8C, L80388420_2030, L80388468_2078, L80388484_2094, L80388558_2168, L803884CC_20DC, L803884E0_20F0
-
-dlabel D_80392164
-.float 0.95
-
-dlabel D_80392168
-.float 1.05
-
-dlabel D_8039216C
-.float 5000.0
-
-dlabel D_80392170
-.float 12000.0, 0.95
-
-dlabel D_80392178
-.float 1.05
-
-dlabel D_8039217C
-.float 5000.0
-
-dlabel D_80392180
-.float 12000.0
-
-dlabel D_80392184
-.float 0.4
-
-dlabel D_80392188
-.float 5000.0
-
-dlabel D_8039218C
-.float 12000.0, 2700.0
-
-dlabel D_80392194
-.float 1150.0
-
-dlabel D_80392198
-.float 0.95
-
-dlabel D_8039219C
-.float 1.05
-
-dlabel D_803921A0
-.float 5000.0
-
-dlabel D_803921A4
-.float 12000.0
-
-dlabel D_803921A8
-.float 0.95
-
-dlabel D_803921AC
-.float 1.05
-
-dlabel D_803921B0
-.float 5000.0
-
-dlabel D_803921B4
-.float 12000.0
-
-dlabel jtbl_803921B8
-.word L803887AC_23BC, L803888A8_24B8, L80388964_2574, L803889EC_25FC, L80388B24_2734, L80388DC4_29D4, L80388E84_2A94, L80388F5C_2B6C, L80388FC4_2BD4, L80389054_2C64, L803890C0_2CD0, L80389158_2D68
-
-dlabel D_803921E8
-.double 0.3333333333333333
-
-dlabel D_803921F0
-.double 3300.0, 0.7333333333333334
-
-dlabel D_80392200
-.double 3300.0
-
-dlabel D_80392208
-.double 0.66
-
-dlabel D_80392210
-.double 0.65
-
-dlabel jtbl_80392218
-.word L803893E8_2FF8, L803894CC_30DC, L803894F0_3100, L80389594_31A4, L803895D8_31E8, L80389638_3248, L80389660_3270
-
-dlabel jtbl_80392234
-.word L8038975C_336C, L80389788_3398, L803897B4_33C4, L803897E0_33F0, L8038980C_341C
-
-dlabel D_80392248
-.float 1.54
-
-dlabel jtbl_8039224C
-.word L80389BD8_37E8, L80389CFC_390C, L80389D48_3958, L80389D80_3990, L80389E14_3A24, L80389E3C_3A4C, L80389F40_3B50
-
-dlabel D_80392268
-.word 0x3F99999A, 0x00000000
-
-dlabel D_80392270
-.double 0.1
-
-dlabel D_80392278
-.double 0.8
-
-dlabel jtbl_80392280
-.word L80389FEC_3BFC, L8038A4D4_40E4, L8038A01C_3C2C, L8038A4D4_40E4, L8038A1B4_3DC4, L8038A208_3E18, L8038A3D4_3FE4
-
-dlabel D_8039229C
-.float 2.2
-
-dlabel D_803922A0
-.float 2.2
-
-dlabel D_803922A4
-.float 2.2
-
-dlabel D_803922A8
-.float 4.4
-
-dlabel D_803922AC
-.float 4.4
-
-dlabel D_803922B0
-.float 4.4
-
-dlabel D_803922B4
-.float 6.6
-
-dlabel D_803922B8
-.float 6.6
-
-dlabel D_803922BC
-.float 6.6
-
-dlabel D_803922C0
-.float 8.8
-
-dlabel D_803922C4
-.float 8.8
-
-dlabel D_803922C8
-.float 8.8
-
-dlabel D_803922CC
-.float 0.95
-
-dlabel D_803922D0
-.float 1.05
-
-dlabel D_803922D4
-.float 5000.0
-
-dlabel D_803922D8
-.float 12000.0
-
-dlabel D_803922DC
-.float 0.6
-
-dlabel D_803922E0
-.double 1.7, -1190.0
-
-dlabel D_803922F0
-.float 1.7
-
-dlabel D_803922F4
-.float 1.7
-
-dlabel D_803922F8
-.float 1.7
-
-dlabel D_803922FC
-.float 1.7
-
-dlabel D_80392300
-.float 0.95
-
-dlabel D_80392304
-.float 1.05
-
-dlabel D_80392308
-.float 0.95
-
-dlabel D_8039230C
-.float 1.05
-
-dlabel jtbl_80392310
-.word L8038A778_4388, L8038A7D0_43E0, L8038A818_4428, L8038A8A0_44B0, L8038A8FC_450C, L8038A924_4534, L8038AA3C_464C
-
-dlabel D_8039232C
-.float 0.95
-
-dlabel D_80392330
-.float 1.05
-
-dlabel D_80392334
-.float 0.95
-
-dlabel D_80392338
-.float 1.05
-
-dlabel D_8039233C
-.float 0.95
-
-dlabel D_80392340
-.float 1.05
-
-dlabel D_80392344
-.float 0.95
-
-dlabel D_80392348
-.float 1.05
-
-dlabel D_8039234C
-.float 0.95
-
-dlabel D_80392350
-.float 1.05
-
-dlabel D_80392354
-.float 0.95
-
-dlabel D_80392358
-.float 1.05, 0.0
-
-dlabel D_80392360
-.double 0.4
-
-dlabel D_80392368
-.double 0.65
-
-dlabel D_80392370
-.double 0.005
-
-dlabel D_80392378
-.double 1.99
-
-dlabel D_80392380
-.float 0.95
-
-dlabel D_80392384
-.float 1.05
-
-dlabel jtbl_80392388
-.word L8038ACE8_48F8, L8038AD90_49A0, L8038ADA0_49B0, L8038AF14_4B24, L8038AF70_4B80, L8038ADA8_49B8, L8038AE00_4A10, L8038AE5C_4A6C, L8038AF28_4B38
-
-dlabel D_803923AC
-.float 0.95
-
-dlabel D_803923B0
-.float 1.05
-
-dlabel D_803923B4
-.float 5000.0
-
-dlabel D_803923B8
-.float 12000.0, 0.95
-
-dlabel D_803923C0
-.float 1.05
-
-dlabel D_803923C4
-.float 5000.0
-
-dlabel D_803923C8
-.float 12000.0
-
-dlabel D_803923CC
-.float 0.95
-
-dlabel D_803923D0
-.float 1.05
-
-dlabel D_803923D4
-.float 5000.0
-
-dlabel D_803923D8
-.float 12000.0
-
-dlabel D_803923DC
-.float 0.6
-
-dlabel D_803923E0
-.float 0.6, 2.4
-
-dlabel D_803923E8
-.float 2.4
-
-dlabel D_803923EC
-.float 4.4
-
-dlabel D_803923F0
-.float 4.4
-
-dlabel jtbl_803923F4
-.word L8038B290_4EA0, L8038B2A4_4EB4, L8038B2DC_4EEC, L8038B368_4F78, L8038B3B4_4FC4, L8038B460_5070, L8038B4FC_510C, L8038B564_5174, L8038B58C_519C
-
-dlabel D_80392418
-.double 0.56
-
-dlabel D_80392420
-.double 0.99
-
-dlabel D_80392428
-.float 4.8
-
-dlabel jtbl_8039242C
-.word L8038B874_5484, L8038B8D0_54E0, L8038B91C_552C, L8038B93C_554C, L8038B95C_556C
-
-dlabel D_80392440
-.float 0.95
-
-dlabel D_80392444
-.float 1.05
-
-dlabel D_80392448
-.float 5000.0
-
-dlabel D_8039244C
-.float 12000.0
-
-dlabel D_80392450
-.float 0.6
-
-dlabel jtbl_80392454
-.word L8038BF30_5B40, L8038BF40_5B50, L8038BF50_5B60, L8038BF60_5B70, L8038BF70_5B80, L8038BF80_5B90, 0
-
-dlabel D_80392470
-.double 0.08
-
-dlabel D_80392478
-.float 2.88, 0.0
-
-dlabel D_80392480
-.double 0.35
-
-dlabel D_80392488
-.double 0.65
-
-dlabel D_80392490
-.float 0.3, 0.0
-
-dlabel D_80392498
-.double 45.0
-
-dlabel D_803924A0
-.double 0.3
-
-dlabel D_803924A8
-.double 2.26
-
-dlabel D_803924B0
-.double 182.04444
-
-dlabel jtbl_803924B8
-.word L8038C92C_653C, L8038C980_6590, L8038CA48_6658, L8038CA48_6658, L8038CE68_6A78
-
-dlabel D_803924CC
-.float 0.95
-
-dlabel D_803924D0
-.float 1.05
-
-dlabel D_803924D4
-.float 5000.0
-
-dlabel D_803924D8
-.float 0.95
-
-dlabel D_803924DC
-.float 1.05
-
-dlabel D_803924E0
-.float 5000.0
-
-dlabel D_803924E4
-.float 12000.0
-
-dlabel D_803924E8
-.double 0.1
-
-dlabel D_803924F0
-.double 0.8
-
-dlabel D_803924F8
-.double 0.2
-
-dlabel D_80392500
-.float 0.1
-
-dlabel D_80392504
-.float 5000.0
-
-dlabel D_80392508
-.float 12000.0
-
-dlabel D_8039250C
-.float 2500.0
-
-dlabel D_80392510
-.double 0.98
-
-dlabel D_80392518
-.float 1.15
-
-dlabel D_8039251C
-.float 0.1
-
-dlabel D_80392520
-.float 2.26, 0.0, 0.0, 0.0
diff --git a/asm/ultra/exceptasm.s b/asm/ultra/exceptasm.s
index 307ba0fa..ac13e866 100644
--- a/asm/ultra/exceptasm.s
+++ b/asm/ultra/exceptasm.s
@@ -1,4 +1,5 @@
#include
+#include
.include "macro.inc"
# assembler directives
@@ -146,8 +147,8 @@ glabel __osException
/* 2F90 80002390 0369D825 */ or $k1, $k1, $t1
/* 2F94 80002394 AF5B0118 */ sw $k1, 0x118($k0)
.L80002398:
-/* 2F98 80002398 3C09A430 */ lui $t1, %hi(D_A430000C)
-/* 2F9C 8000239C 8D29000C */ lw $t1, %lo(D_A430000C)($t1)
+/* 2F98 80002398 3C09A430 */ lui $t1, %hi(PHYS_TO_K1(MI_INTR_MASK_REG))
+/* 2F9C 8000239C 8D29000C */ lw $t1, %lo(PHYS_TO_K1(MI_INTR_MASK_REG))($t1)
/* 2FA0 800023A0 5120000C */ beql $t1, $zero, .L800023D4
/* 2FA4 800023A4 AF490128 */ sw $t1, 0x128($k0)
/* 2FA8 800023A8 3C088000 */ lui $t0, %hi(__OSGlobalIntMask)
@@ -262,21 +263,21 @@ rcp:
/* 3134 80002534 3C088000 */ lui $t0, %hi(__OSGlobalIntMask)
/* 3138 80002538 250850F0 */ addiu $t0, $t0, %lo(__OSGlobalIntMask)
/* 313C 8000253C 8D080000 */ lw $t0, ($t0)
-/* 3140 80002540 3C11A430 */ lui $s1, %hi(D_A4300008)
-/* 3144 80002544 8E310008 */ lw $s1, %lo(D_A4300008)($s1)
+/* 3140 80002540 3C11A430 */ lui $s1, %hi(PHYS_TO_K1(MI_INTR_REG))
+/* 3144 80002544 8E310008 */ lw $s1, %lo(PHYS_TO_K1(MI_INTR_REG))($s1)
/* 3148 80002548 00084402 */ srl $t0, $t0, 0x10
/* 314C 8000254C 02288824 */ and $s1, $s1, $t0
/* 3150 80002550 32290001 */ andi $t1, $s1, 1
/* 3154 80002554 51200014 */ beql $t1, $zero, .L800025A8
/* 3158 80002558 32290008 */ andi $t1, $s1, 8
-/* 315C 8000255C 3C0CA404 */ lui $t4, %hi(D_A4040010)
-/* 3160 80002560 8D8C0010 */ lw $t4, %lo(D_A4040010)($t4)
+/* 315C 8000255C 3C0CA404 */ lui $t4, %hi(PHYS_TO_K1(SP_STATUS_REG))
+/* 3160 80002560 8D8C0010 */ lw $t4, %lo(PHYS_TO_K1(SP_STATUS_REG))($t4)
/* 3164 80002564 24090008 */ addiu $t1, $zero, 8
-/* 3168 80002568 3C01A404 */ lui $at, %hi(D_A4040010)
+/* 3168 80002568 3C01A404 */ lui $at, %hi(PHYS_TO_K1(SP_STATUS_REG))
/* 316C 8000256C 318C0300 */ andi $t4, $t4, 0x300
/* 3170 80002570 3231003E */ andi $s1, $s1, 0x3e
/* 3174 80002574 11800007 */ beqz $t4, .L80002594
-/* 3178 80002578 AC290010 */ sw $t1, %lo(D_A4040010)($at)
+/* 3178 80002578 AC290010 */ sw $t1, %lo(PHYS_TO_K1(SP_STATUS_REG))($at)
/* 317C 8000257C 0C0009E9 */ jal send_mesg
/* 3180 80002580 24040020 */ addiu $a0, $zero, 0x20
/* 3184 80002584 52200039 */ beql $s1, $zero, .L8000266C
@@ -291,9 +292,9 @@ rcp:
/* 31A4 800025A4 32290008 */ andi $t1, $s1, 8
.L800025A8:
/* 31A8 800025A8 11200007 */ beqz $t1, .L800025C8
-/* 31AC 800025AC 3C01A440 */ lui $at, %hi(D_A4400010)
+/* 31AC 800025AC 3C01A440 */ lui $at, %hi(PHYS_TO_K1(VI_CURRENT_REG))
/* 31B0 800025B0 32310037 */ andi $s1, $s1, 0x37
-/* 31B4 800025B4 AC200010 */ sw $zero, %lo(D_A4400010)($at)
+/* 31B4 800025B4 AC200010 */ sw $zero, %lo(PHYS_TO_K1(VI_CURRENT_REG))($at)
/* 31B8 800025B8 0C0009E9 */ jal send_mesg
/* 31BC 800025BC 24040038 */ addiu $a0, $zero, 0x38
/* 31C0 800025C0 5220002A */ beql $s1, $zero, .L8000266C
@@ -303,9 +304,9 @@ rcp:
/* 31CC 800025CC 5120000A */ beql $t1, $zero, .L800025F8
/* 31D0 800025D0 32290002 */ andi $t1, $s1, 2
/* 31D4 800025D4 24090001 */ addiu $t1, $zero, 1
-/* 31D8 800025D8 3C01A450 */ lui $at, %hi(D_A450000C)
+/* 31D8 800025D8 3C01A450 */ lui $at, %hi(PHYS_TO_K1(AI_STATUS_REG))
/* 31DC 800025DC 3231003B */ andi $s1, $s1, 0x3b
-/* 31E0 800025E0 AC29000C */ sw $t1, %lo(D_A450000C)($at)
+/* 31E0 800025E0 AC29000C */ sw $t1, %lo(PHYS_TO_K1(AI_STATUS_REG))($at)
/* 31E4 800025E4 0C0009E9 */ jal send_mesg
/* 31E8 800025E8 24040030 */ addiu $a0, $zero, 0x30
/* 31EC 800025EC 5220001F */ beql $s1, $zero, .L8000266C
@@ -313,9 +314,9 @@ rcp:
/* 31F4 800025F4 32290002 */ andi $t1, $s1, 2
.L800025F8:
/* 31F8 800025F8 11200007 */ beqz $t1, .L80002618
-/* 31FC 800025FC 3C01A480 */ lui $at, %hi(D_A4800018)
+/* 31FC 800025FC 3C01A480 */ lui $at, %hi(PHYS_TO_K1(SI_STATUS_REG))
/* 3200 80002600 3231003D */ andi $s1, $s1, 0x3d
-/* 3204 80002604 AC200018 */ sw $zero, %lo(D_A4800018)($at)
+/* 3204 80002604 AC200018 */ sw $zero, %lo(PHYS_TO_K1(SI_STATUS_REG))($at)
/* 3208 80002608 0C0009E9 */ jal send_mesg
/* 320C 8000260C 24040028 */ addiu $a0, $zero, 0x28
/* 3210 80002610 52200016 */ beql $s1, $zero, .L8000266C
@@ -325,9 +326,9 @@ rcp:
/* 321C 8000261C 5120000A */ beql $t1, $zero, .L80002648
/* 3220 80002620 32290020 */ andi $t1, $s1, 0x20
/* 3224 80002624 24090002 */ addiu $t1, $zero, 2
-/* 3228 80002628 3C01A460 */ lui $at, %hi(D_A4600010)
+/* 3228 80002628 3C01A460 */ lui $at, %hi(PHYS_TO_K1(PI_STATUS_REG))
/* 322C 8000262C 3231002F */ andi $s1, $s1, 0x2f
-/* 3230 80002630 AC290010 */ sw $t1, %lo(D_A4600010)($at)
+/* 3230 80002630 AC290010 */ sw $t1, %lo(PHYS_TO_K1(PI_STATUS_REG))($at)
/* 3234 80002634 0C0009E9 */ jal send_mesg
/* 3238 80002638 24040040 */ addiu $a0, $zero, 0x40
/* 323C 8000263C 5220000B */ beql $s1, $zero, .L8000266C
@@ -545,9 +546,9 @@ glabel __osEnqueueAndYield
/* 3530 80002930 0361D824 */ and $k1, $k1, $at
/* 3534 80002934 0369D825 */ or $k1, $k1, $t1
/* 3538 80002938 ACBB0118 */ sw $k1, 0x118($a1)
-/* 353C 8000293C 3C1BA430 */ lui $k1, %hi(D_A430000C)
+/* 353C 8000293C 3C1BA430 */ lui $k1, %hi(PHYS_TO_K1(MI_INTR_MASK_REG))
.L80002940:
-/* 3540 80002940 8F7B000C */ lw $k1, %lo(D_A430000C)($k1)
+/* 3540 80002940 8F7B000C */ lw $k1, %lo(PHYS_TO_K1(MI_INTR_MASK_REG))($k1)
/* 3544 80002944 1360000B */ beqz $k1, .L80002974
/* 3548 80002948 00000000 */ nop
/* 354C 8000294C 3C1A8000 */ lui $k0, %hi(__OSGlobalIntMask)
@@ -689,8 +690,8 @@ glabel __osDispatchThread
/* 3734 80002B34 275A51D0 */ addiu $k0, $k0, %lo(__osRcpImTable)
/* 3738 80002B38 037AD821 */ addu $k1, $k1, $k0
/* 373C 80002B3C 977B0000 */ lhu $k1, ($k1)
-/* 3740 80002B40 3C1AA430 */ lui $k0, %hi(D_A430000C)
-/* 3744 80002B44 275A000C */ addiu $k0, $k0, %lo(D_A430000C)
+/* 3740 80002B40 3C1AA430 */ lui $k0, %hi(PHYS_TO_K1(MI_INTR_MASK_REG))
+/* 3744 80002B44 275A000C */ addiu $k0, $k0, %lo(PHYS_TO_K1(MI_INTR_MASK_REG))
/* 3748 80002B48 AF5B0000 */ sw $k1, ($k0)
/* 374C 80002B4C 00000000 */ nop
/* 3750 80002B50 00000000 */ nop
diff --git a/asm/ultra/parameters.s b/asm/ultra/parameters.s
new file mode 100644
index 00000000..450af31b
--- /dev/null
+++ b/asm/ultra/parameters.s
@@ -0,0 +1,17 @@
+#include "PR/R4300.h"
+#include "sys/asm.h"
+#include "sys/regdef.h"
+
+.text
+ABS(leoBootID, 0x800001a0)
+ABS(osTvType, 0x80000300)
+ABS(osRomType, 0x80000304)
+ABS(osRomBase, 0x80000308)
+ABS(osResetType, 0x8000030c)
+ABS(osCicId, 0x80000310)
+ABS(osVersion, 0x80000314)
+ABS(osMemSize, 0x80000318)
+ABS(osAppNMIBuffer, 0x8000031c)
+
+.space 0x60
+/* padded to 0x60 in the object file */
diff --git a/asm/ultra/setintmask.s b/asm/ultra/setintmask.s
index 5af09ba5..c5c891d8 100644
--- a/asm/ultra/setintmask.s
+++ b/asm/ultra/setintmask.s
@@ -1,4 +1,5 @@
#include
+#include
.include "macro.inc"
# assembler directives
.set noat # allow manual use of $at
@@ -100,8 +101,8 @@ glabel func_80003A30
/* 4648 80003A48 01614026 */ xor $t0, $t3, $at
/* 464C 80003A4C 3108FF00 */ andi $t0, $t0, 0xff00
/* 4650 80003A50 00481025 */ or $v0, $v0, $t0
-/* 4654 80003A54 3C0AA430 */ lui $t2, %hi(D_A430000C)
-/* 4658 80003A58 8D4A000C */ lw $t2, %lo(D_A430000C)($t2)
+/* 4654 80003A54 3C0AA430 */ lui $t2, %hi(PHYS_TO_K1(MI_INTR_MASK_REG))
+/* 4658 80003A58 8D4A000C */ lw $t2, %lo(PHYS_TO_K1(MI_INTR_MASK_REG))($t2)
/* 465C 80003A5C 11400005 */ beqz $t2, .L80003A74
/* 4660 80003A60 000B4C02 */ srl $t1, $t3, 0x10
/* 4664 80003A64 2401FFFF */ addiu $at, $zero, -1
@@ -118,8 +119,8 @@ glabel func_80003A30
/* 468C 80003A8C 3C0A8000 */ lui $t2, %hi(__osRcpImTable)
/* 4690 80003A90 01485021 */ addu $t2, $t2, $t0
/* 4694 80003A94 954A51D0 */ lhu $t2, %lo(__osRcpImTable)($t2)
-/* 4698 80003A98 3C01A430 */ lui $at, %hi(D_A430000C)
-/* 469C 80003A9C AC2A000C */ sw $t2, %lo(D_A430000C)($at)
+/* 4698 80003A98 3C01A430 */ lui $at, %hi(PHYS_TO_K1(MI_INTR_MASK_REG))
+/* 469C 80003A9C AC2A000C */ sw $t2, %lo(PHYS_TO_K1(MI_INTR_MASK_REG))($at)
/* 46A0 80003AA0 3088FF01 */ andi $t0, $a0, 0xff01
/* 46A4 80003AA4 3169FF00 */ andi $t1, $t3, 0xff00
/* 46A8 80003AA8 01094024 */ and $t0, $t0, $t1
diff --git a/decompressed.us.v10.yaml b/decompressed.us.v10.yaml
index 801cc009..618e3a3e 100644
--- a/decompressed.us.v10.yaml
+++ b/decompressed.us.v10.yaml
@@ -15,12 +15,14 @@ options:
#include "variables.h"
undefined_syms_path: undefined_syms.us.v10.txt
symbol_addrs_path: symbol_addrs.us.v10.txt
- undefined_funcs_auto_path: undefined_funcs_auto.us.v10.txt
- undefined_syms_auto_path: undefined_syms_auto.us.v10.txt
+ create_undefined_funcs_auto: no
+ create_undefined_syms_auto: no
base_path: .
target_path: decompressed.us.v10.z64
asset_path: bin
build_path: build/us.v10
+ libultra_symbols: True
+ hardware_regs: True
segments:
- name: header
type: header
@@ -63,7 +65,7 @@ segments:
- [0x3870, hasm, maptlbrdb]
- [0x38D0, c, done/pirawread]
- [0x3930, c, done/ll]
- - [0x3BF0, bin, padding3BF0] # Empty space
+ - [0x3BF0, hasm, ultra/parameters]
- [0x3C50, c, done/virtualtophysical]
- [0x3CD0, c, done/si]
- [0x3D00, c, done/thread]
@@ -123,18 +125,20 @@ segments:
start: 0x5E90
subsegments:
- [0x5E90, bin, assets]
-- name: soundfont1
+- name: soundfont1ctl
type: bin
start: 0xD846C0
- subsegments:
- - [0xD846C0, bin, soundfont1.ctl]
- - [0xD954B0, bin, soundfont1.tbl]
-- name: soundfont2
+- name: soundfont1tbl
+ type: bin
+ start: 0xD954B0
+
+- name: soundfont2ctl
type: bin
start: 0xEA3EB0
- subsegments:
- - [0xEA3EB0, bin, soundfont2.ctl]
- - [0xEADE60, bin, soundfont2.tbl]
+- name: soundfont2tbl
+ type: bin
+ start: 0xEADE60
+
- name: core1
dir: core1
type: code
@@ -233,7 +237,7 @@ segments:
- [0xF3F820, c, gu/sinf] #DONE
- [0xF3F9E0, c, audio/cents2ratio] #DONE
- [0xF3FA30, c, audio/heapinit] #DONE
- - [0xF3FA70, asm, padding] # 0x60 bytes of zeroes?
+ - [0xF3FA70, hasm, ultra/parameters] #DONE
- [0xF3FAD0, c, os/createmesgqueue] #DONE
- [0xF3FB00, c, io/aisetfreq] #DONE
- [0xF3FC60, c, audio/sl] #DONE
@@ -501,13 +505,13 @@ segments:
follows_vram: core1
subsegments:
- [0xF55960, c, animctrl] #DONE
- - [0xF56430, c, code_AD0] #DONE
+ - [0xF56430, c, anim/sprite] #DONE
- [0xF56A40, c, animcache] #DONE
- [0xF56EB0, c, code_1550] #DONE
- [0xF57290, c, code_1930] #DONE
- [0xF57BA0, c, code_2240] #DONE
- [0xF581F0, c, ba/anim] #DONE
- - [0xF58DE0, c, code_3480] #DONE
+ - [0xF58DE0, c, snackerctl] #DONE
- [0xF59330, c, code_39D0] #DONE
- [0xF5A120, c, ba/marker] #DONE
- [0xF5C490, c, code_6B30] #DONE
@@ -522,14 +526,14 @@ segments:
- [0xF60040, c, statetimer] #DONE
- [0xF602C0, c, code_A960] #DONE
- [0xF603C0, c, ba/model] #DONE
- - [0xF60FB0, c, code_B650] #DONE
+ - [0xF60FB0, c, ba/drone] #DONE
- [0xF611B0, c, code_B850] #DONE
- [0xF614B0, c, eggshatter] #DONE
- [0xF61680, c, code_BD20] #DONE
- - [0xF61A40, c, code_C0E0] #DONE
+ - [0xF61A40, c, ba/falldamage] #DONE
- [0xF61D50, c, code_C3F0] #DONE
- [0xF61E10, c, code_C4B0]
- - [0xF63160, c, code_D800] #DONE
+ - [0xF63160, c, ba/carry] #DONE
- [0xF63310, c, code_D9B0] #DONE
- [0xF638D0, c, code_DF70] #DONE
- [0xF63D70, c, code_E410] #DONE
@@ -537,7 +541,7 @@ segments:
- [0xF64270, c, code_E910] #DONE
- [0xF647A0, c, code_EE40] #DONE
- [0xF648B0, c, code_EF50] #DONE
- - [0xF656C0, c, code_FD60] #DONE
+ - [0xF656C0, c, ba/physics] #DONE
- [0xF66630, c, code_10CD0] #DONE
- [0xF66700, c, pitch] #DONE
- [0xF669A0, c, code_11040] #DONE
@@ -702,7 +706,7 @@ segments:
- [0xFAF0E0, c, code_59780] #DONE
- [0xFAF340, c, code_599E0] #DONE
- [0xFAF3E0, c, code_59A80] #DONE
- - [0xFAF6A0, c, code_59D40] #DONE
+ - [0xFAF6A0, c, ch/snacker] #DONE
- [0xFB0490, c, ch/snowman] #DONE
- [0xFB1000, c, ch/snowball] #DONE
- [0xFB16F0, c, ch/snowmanhat] #DONE
@@ -771,7 +775,7 @@ segments:
- [0xFDAB30, c, code_851D0] #DONE
- [0xFDB110, c, code_857B0] #DONE
- [0xFDB160, c, code_85800] #DONE
- - [0xFDD790, c, code_87E30]
+ - [0xFDD790, c, gc/dialog]
- [0xFE0110, c, gc/pauseMenu] #DONE
- [0xFE3580, c, code_8DC20] #DONE
- [0xFE3BD0, c, gc/zoombox] #DONE
@@ -897,16 +901,16 @@ segments:
- [0x1031F60, bin, data_DC600] #unreferenced
- [0x1031F90, .data, code_1550]
- [0x1031FB0, .data, ba/anim]
- - [0x1031FE0, .data, code_3480]
+ - [0x1031FE0, .data, snackerctl]
- [0x1032000, .data, ba/marker]
- [0x1032060, .data, code_7060]
- [0x10320A0, .data, code_90E0]
- [0x1032150, .data, ba/model]
- [0x1032150, .data, code_B850]
- [0x1032170, .data, eggshatter]
- - [0x10321C0, .data, code_C0E0]
+ - [0x10321C0, .data, ba/falldamage]
- [0x10321F0, .data, code_E910]
- - [0x1032E10, .data, code_FD60]
+ - [0x1032E10, .data, ba/physics]
- [0x1032E20, .data, code_117D0]
- [0x1032F30, .data, code_126C0]
- [0x1032F50, .data, code_12F30]
@@ -999,7 +1003,7 @@ segments:
- [0x1036D80, .data, ch/bottlesbonuscursor]
- [0x1036E10, .data, code_59780]
- [0x1036F70, .data, code_59A80]
- - [0x1036FA0, .data, code_59D40]
+ - [0x1036FA0, .data, ch/snacker]
- [0x1037020, .data, ch/snowman]
- [0x10370E0, .data, ch/snowball]
- [0x1037190, .data, ch/snowmanhat]
@@ -1044,7 +1048,7 @@ segments:
- [0x103A710, .data, gc/sky]
- [0x103AB20, .data, gc/transition]
- [0x103AE20, .data, code_851D0]
- - [0x103AEA0, .data, code_87E30]
+ - [0x103AEA0, .data, gc/dialog]
- [0x103AEB0, .data, gc/pauseMenu]
- [0x103B000, .data, code_8DC20]
- [0x103B090, .data, gc/zoombox]
@@ -1116,10 +1120,10 @@ segments:
- [0x1041CB0, .data, code_DB010]
- [0x1042790, .data, code_DC4B0]
- [0x10427C0, ".rodata", animctrl]
- - [0x10427F0, .rodata, code_AD0]
+ - [0x10427F0, .rodata, anim/sprite]
- [0x1042800, .rodata, code_1930]
- [0x1042880, .rodata, ba/anim]
- - [0x1042890, .rodata, code_3480]
+ - [0x1042890, .rodata, snackerctl]
- [0x10428A0, .rodata, code_39D0]
- [0x1042940, .rodata, ba/marker]
- [0x1042D70, .rodata, code_6B30]
@@ -1128,15 +1132,15 @@ segments:
- [0x1042FC0, .rodata, code_9900]
- [0x1042FD0, .rodata, code_9BD0]
- [0x1043010, .rodata, ba/model]
- - [0x10430C0, .rodata, code_B650]
+ - [0x10430C0, .rodata, ba/drone]
- [0x10430D0, .rodata, code_B850]
- [0x10430F0, .rodata, code_BD20]
- - [0x1043110, .rodata, code_C0E0]
+ - [0x1043110, .rodata, ba/falldamage]
- [0x1043130, .rodata, code_C4B0]
- [0x1043170, .rodata, code_D9B0]
- [0x1043180, .rodata, abilityprogress]
- [0x10431B0, .rodata, code_EF50]
- - [0x1043350, .rodata, code_FD60]
+ - [0x1043350, .rodata, ba/physics]
- [0x10433B0, .rodata, code_10CD0]
- [0x10433C0, .rodata, pitch]
- [0x10433F0, .rodata, code_11040]
@@ -1255,7 +1259,7 @@ segments:
- [0x10459A0, .rodata, ch/bottlesbonuscursor]
- [0x1045A00, .rodata, code_599E0]
- [0x1045A10, .rodata, code_59A80]
- - [0x1045A20, .rodata, code_59D40]
+ - [0x1045A20, .rodata, ch/snacker]
- [0x1045A70, .rodata, ch/snowman]
- [0x1045AA0, .rodata, ch/snowball]
- [0x1045AD0, .rodata, code_5C240]
@@ -1291,7 +1295,7 @@ segments:
- [0x1046E10, .rodata, gc/sky]
- [0x1046E20, .rodata, gc/transition]
- [0x1046E80, .rodata, code_85800]
- - [0x1046EA0, .rodata, code_87E30]
+ - [0x1046EA0, .rodata, gc/dialog]
- [0x1046F10, .rodata, gc/pauseMenu]
- [0x1047250, .rodata, gc/zoombox]
- [0x1047320, .rodata, code_91E10]
@@ -1366,12 +1370,12 @@ segments:
- [0x1048450, .rodata, code_DA3A0]
- [0x1048460, .rodata, code_DA760]
- [0x1048480, .rodata, code_DB010]
- - [0x1048560, .bss, code_AD0]
+ - [0x1048560, .bss, anim/sprite]
- [0x1048560, .bss, animcache]
- [0x1048560, .bss, code_1550]
- [0x1048560, .bss, code_1930]
- [0x1048560, .bss, ba/anim]
- - [0x1048560, .bss, code_3480]
+ - [0x1048560, .bss, snackerctl]
- [0x1048560, .bss, code_39D0]
- [0x1048560, .bss, ba/marker]
- [0x1048560, .bss, code_6B30]
@@ -1385,13 +1389,13 @@ segments:
- [0x1048560, .bss, code_A600]
- [0x1048560, .bss, statetimer]
- [0x1048560, .bss, ba/model]
- - [0x1048560, .bss, code_B650]
+ - [0x1048560, .bss, ba/drone]
- [0x1048560, .bss, eggshatter]
- [0x1048560, .bss, code_BD20]
- - [0x1048560, .bss, code_C0E0]
+ - [0x1048560, .bss, ba/falldamage]
- [0x1048560, .bss, code_C3F0]
- [0x1048560, .bss, code_C4B0]
- - [0x1048560, .bss, code_D800]
+ - [0x1048560, .bss, ba/carry]
- [0x1048560, .bss, code_D9B0]
- [0x1048560, .bss, code_DF70]
- [0x1048560, .bss, code_E410]
@@ -1399,7 +1403,7 @@ segments:
- [0x1048560, .bss, code_E910]
- [0x1048560, .bss, code_EE40]
- [0x1048560, .bss, code_EF50]
- - [0x1048560, .bss, code_FD60]
+ - [0x1048560, .bss, ba/physics]
- [0x1048560, .bss, code_10CD0]
- [0x1048560, .bss, pitch]
- [0x1048560, .bss, code_11040]
@@ -1496,6 +1500,7 @@ segments:
- [0x1048560, .bss, code_41FB0]
- [0x1048560, .bss, code_42CB0]
- [0x1048560, .bss, mapspecificflags]
+ - [0x1048560, .bss, code_47BD0]
- [0x1048560, .bss, code_4A6F0]
- [0x1048560, .bss, code_4C020]
- [0x1048560, .bss, ch/badShad]
@@ -1511,7 +1516,7 @@ segments:
- [0x1048560, .bss, code_581D0]
- [0x1048560, .bss, ch/bottlesbonuscursor]
- [0x1048560, .bss, code_59A80]
- - [0x1048560, .bss, code_59D40]
+ - [0x1048560, .bss, ch/snacker]
- [0x1048560, .bss, ch/snowball]
- [0x1048560, .bss, code_5BEB0]
- [0x1048560, .bss, code_5C240]
@@ -1559,7 +1564,7 @@ segments:
- [0x1048560, .bss, code_851D0]
- [0x1048560, .bss, code_857B0]
- [0x1048560, .bss, code_85800]
- - [0x1048560, .bss, code_87E30]
+ - [0x1048560, .bss, gc/dialog]
- [0x1048560, .bss, gc/pauseMenu]
- [0x1048560, .bss, code_8DC20]
- [0x1048560, .bss, gc/zoombox]
@@ -1614,6 +1619,7 @@ segments:
- [0x1048560, .bss, code_C5440]
- [0x1048560, .bss, code_C89C0]
- [0x1048560, .bss, code_C97F0]
+ - [0x1048560, .bss, code_C9E70]
- [0x1048560, .bss, code_C9F00]
- [0x1048560, .bss, code_CB8A0]
- [0x1048560, .bss, code_CBBF0]
@@ -1882,7 +1888,7 @@ segments:
- [0x1068340, .rodata, ch/grublin]
- [0x1068350, .rodata, ch/jujuhitbox]
- [0x1068360, .rodata, ch/juju]
- - [0x1068370, .bss, bss_pad]
+ - [0x1068370, .bss, ch/hut]
- [0x1068370, .bss, ch/juju]
- name: BGS
dir: BGS
@@ -2112,7 +2118,8 @@ segments:
- [0x108AB50, .bss, sirslushgame]
- [0x108AB50, .bss, snowmanbuttongame]
- [0x108AB50, .bss, racectrl]
- - [0x108AB50, .bss, bss_end_pad]
+ - [0x108AB50, .bss, ch/xmastreestar]
+ - [0x108AB50, .bss, code_B4D0]
- name: SM
dir: SM
type: code
@@ -2300,8 +2307,8 @@ segments:
- [0x10BA9E0, c, code_76C0] #DONE
- [0x10BAEE0, c, code_7BC0] #DONE
- [0x10BAF10, c, code_7BF0] #DONE
- - [0x10BB370, c, code_8050] #DONE
- - [0x10BB990, c, code_8670] #DONE
+ - [0x10BB370, c, ch/grublinhood] #DONE
+ - [0x10BB990, c, ch/vacationtexttrigger] #DONE
- [0x10BBA80, .data, code_0]
- [0x10BBAD0, .data, code_160]
- [0x10BBB00, .data, code_950]
@@ -2328,8 +2335,8 @@ segments:
- [0x10BC650, .data, code_76C0]
- [0x10BC7E0, .data, code_7BC0]
- [0x10BC820, .data, code_7BF0]
- - [0x10BC860, .data, code_8050]
- - [0x10BC930, .data, code_8670]
+ - [0x10BC860, .data, ch/grublinhood]
+ - [0x10BC930, .data, ch/vacationtexttrigger]
- [0x10BC960, .rodata, code_160]
- [0x10BC980, .rodata, code_950]
- [0x10BC9E0, .rodata, code_1B20]
@@ -2348,7 +2355,7 @@ segments:
- [0x10BCC20, .rodata, code_6AC0]
- [0x10BCC40, .rodata, code_76C0]
- [0x10BCC50, .rodata, code_7BF0]
- - [0x10BCC60, .rodata, code_8050]
+ - [0x10BCC60, .rodata, ch/grublinhood]
- [0x10BCD00, .bss, bss_pad]
- [0x10BCD00, .bss, code_3310]
- name: emptyLvl
diff --git a/first_diff.py b/first_diff.py
index a2546fc1..3bffd788 100755
--- a/first_diff.py
+++ b/first_diff.py
@@ -184,7 +184,7 @@ def hexbytes(bs):
found_instr_diff = []
map_search_diff = []
diffs = 0
-shift_cap = 1000
+shift_cap = 100000
for i in range(24, len(mybin), 4):
# (mybin[i:i+4] != basebin[i:i+4], but that's slightly slower in CPython...)
if diffs <= shift_cap and (
diff --git a/include/actor.h b/include/actor.h
new file mode 100644
index 00000000..b805b435
--- /dev/null
+++ b/include/actor.h
@@ -0,0 +1,33 @@
+#ifndef ACTOR_H
+#define ACTOR_H
+
+#define ACTOR_FLAG_NONE (0)
+#define ACTOR_FLAG_UNKNOWN_0 (1 << 0) // 0x1
+#define ACTOR_FLAG_UNKNOWN_1 (1 << 1) // 0x2
+#define ACTOR_FLAG_UNKNOWN_2 (1 << 2) // 0x4
+#define ACTOR_FLAG_UNKNOWN_3 (1 << 3) // 0x8
+#define ACTOR_FLAG_UNKNOWN_4 (1 << 4) // 0x10
+#define ACTOR_FLAG_UNKNOWN_5 (1 << 5) // 0x20
+#define ACTOR_FLAG_UNKNOWN_6 (1 << 6) // 0x40
+#define ACTOR_FLAG_UNKNOWN_7 (1 << 7) // 0x80
+#define ACTOR_FLAG_UNKNOWN_8 (1 << 8) // 0x100
+#define ACTOR_FLAG_UNKNOWN_9 (1 << 9) // 0x200
+#define ACTOR_FLAG_UNKNOWN_10 (1 << 10) // 0x400
+#define ACTOR_FLAG_UNKNOWN_11 (1 << 11) // 0x800
+#define ACTOR_FLAG_UNKNOWN_12 (1 << 12) // 0x1000
+#define ACTOR_FLAG_UNKNOWN_13 (1 << 13) // 0x2000
+#define ACTOR_FLAG_UNKNOWN_14 (1 << 14) // 0x4000
+#define ACTOR_FLAG_UNKNOWN_15 (1 << 15) // 0x8000
+#define ACTOR_FLAG_UNKNOWN_16 (1 << 16) // 0x10000
+#define ACTOR_FLAG_UNKNOWN_17 (1 << 17) // 0x20000
+#define ACTOR_FLAG_UNKNOWN_18 (1 << 18) // 0x40000
+#define ACTOR_FLAG_UNKNOWN_19 (1 << 19) // 0x80000
+#define ACTOR_FLAG_UNKNOWN_20 (1 << 20) // 0x100000
+#define ACTOR_FLAG_UNKNOWN_21 (1 << 21) // 0x200000
+#define ACTOR_FLAG_UNKNOWN_22 (1 << 22) // 0x400000
+#define ACTOR_FLAG_UNKNOWN_23 (1 << 23) // 0x800000
+#define ACTOR_FLAG_UNKNOWN_24 (1 << 24) // 0x1000000
+#define ACTOR_FLAG_UNKNOWN_25 (1 << 25) // 0x2000000
+#define ACTOR_FLAG_UNKNOWN_26 (1 << 26) // 0x4000000
+
+#endif // ACTOR_H
diff --git a/include/animation.h b/include/animation.h
index 7c0235e7..3ee0a63a 100644
--- a/include/animation.h
+++ b/include/animation.h
@@ -40,11 +40,6 @@ typedef struct animation_file_s{
u8 pad6[2];
} AnimationFile;
-typedef struct animation_file_cache_s{
- AnimationFile *unk0;
- u16 unk4_15:15;
- u16 unk4_0:1;
- u8 pad6[2];
-}AnimationFileCache;
+
#endif
diff --git a/include/assets.h b/include/assets.h
index a762c0e1..6dde267f 100644
--- a/include/assets.h
+++ b/include/assets.h
@@ -16,6 +16,6 @@ typedef struct asset_file_meta_s{
} AssetFileMeta;
-extern u8 D_5E90; //rom file asset bin;
+extern u8 assets_ROM_START[]; //rom file asset bin;
#endif
diff --git a/include/bs_funcs.h b/include/bs_funcs.h
index 0c71258f..0e4c04d6 100644
--- a/include/bs_funcs.h
+++ b/include/bs_funcs.h
@@ -696,9 +696,9 @@ void func_802AADBC(void);
void func_802AAE08(void);
void func_802AAE4C(void);
-void func_802AEDE8(void);
-void func_802AEE48(void);
-void func_802AEE9C(void);
+void bsDroneGoTo_init(void);
+void bsDroneGoTo_update(void);
+void bsDroneGoTo_end(void);
void bsDroneLook_init(void);
void bsDroneLook_update(void);
void bsDroneLook_end(void);
diff --git a/include/core1/core1.h b/include/core1/core1.h
index 82b04394..7f03b235 100644
--- a/include/core1/core1.h
+++ b/include/core1/core1.h
@@ -4,8 +4,6 @@
#include "core1/mem.h"
void func_8025235C(f32[3], f32[3]);
-void func_80252C08(f32[3], f32[3], f32, f32[3]);
-
void func_80252C08(f32 arg0[3], f32 arg1[3], f32 scale, f32 arg3[3]);
#endif
diff --git a/include/core1/mem.h b/include/core1/mem.h
index 069133a4..029d7882 100644
--- a/include/core1/mem.h
+++ b/include/core1/mem.h
@@ -1,6 +1,19 @@
#ifndef __MEM_H__
#define __MEM_H__
+/**
+* copy memory area
+*/
void memcpy(void * dst, void *src, int size);
-void func_80254630(void * dst, void *src, int size); //memcopy_fast
+
+/**
+* copy an array of wide_characters
+*/
+void wmemcpy(void * dst, void *src, int size);
+
+
+/**
+ * copy memory area
+*/
+void memmove(u8* dst, u8* src, s32 n);
#endif
diff --git a/include/core2/anim/sprite.h b/include/core2/anim/sprite.h
new file mode 100644
index 00000000..d6427bb1
--- /dev/null
+++ b/include/core2/anim/sprite.h
@@ -0,0 +1,51 @@
+#ifndef __CORE2_ANIM_SPRITE_H__
+#define __CORE2_ANIM_SPRITE_H__
+
+#include
+
+
+typedef struct{
+ u8 index;
+ u8 duration;
+} AnimSpriteStep;
+
+typedef enum {
+ ANIM_SPRITE_STATE_NONE,
+ ANIM_SPRITE_STATE_ONCE,
+ ANIM_SPRITE_STATE_LOOP,
+ ANIM_SPRITE_STATE_STOPPED
+} AnimSpriteState;
+
+typedef struct{
+ AnimSpriteStep *steps;
+ f32 remaining_time;
+ f32 speed_multiplier;
+ u32 step_count:7; //This is the index in the AnimSpriteStep list
+ u32 current_step:7; //current frame
+ u32 start_step:7;
+ u32 current_frame:7; //This is the actual sprite frame
+ u32 state:2;
+ u32 unknown:1;
+ u32 active:1; //active
+} AnimSprite;
+
+void animsprite_init(void);
+AnimSprite * animsprite_new(void);
+void animsprite_free(AnimSprite *this);
+void animsprite_terminate(void);
+void animsprite_update(AnimSprite *this);
+void animsprite_default(AnimSprite *this);
+void animsprite_loop(AnimSprite *this);
+void animsprite_set_steps(AnimSprite *this, AnimSpriteStep *step_list, s32 size);
+void animsprite_set_state(AnimSprite *this, AnimSpriteState step);
+void animsprite_set_unknown(AnimSprite *this, s32 value);
+void animsprite_set_frame(AnimSprite *this, s32 frame_index);
+void animsprite_set_speed(AnimSprite *this, f32 speed);
+void animsprite_set_start_step(AnimSprite *this, s32 step);
+s32 animsprite_get_frame(AnimSprite *this);
+AnimSpriteState animsprite_get_current_state(AnimSprite *this);
+s32 animsprite_get_unknown(AnimSprite *this);
+f32 animsprite_get_speed(AnimSprite *this);
+int animsprite_is_stopped(AnimSprite *this);
+int animsprite_is_at_step(AnimSprite *this, s32 frame);
+#endif
diff --git a/include/core2/ba/carry.h b/include/core2/ba/carry.h
new file mode 100644
index 00000000..5c74db27
--- /dev/null
+++ b/include/core2/ba/carry.h
@@ -0,0 +1,17 @@
+#ifndef __BA_CARRY_H__
+#define __BA_CARRY_H__
+
+#include
+#include "prop.h"
+
+void bacarry_init(void);
+void bacarry_end(void);
+void bacarry_update(void);
+
+void bacarry_reset_marker(void);
+ActorMarker *bacarry_get_marker(void);
+void bacarry_set_marker(ActorMarker *arg0);
+void bacarry_set_offsets(f32 height, f32 rotation);
+
+
+#endif
diff --git a/include/core2/ba/drone.h b/include/core2/ba/drone.h
new file mode 100644
index 00000000..5f0e7442
--- /dev/null
+++ b/include/core2/ba/drone.h
@@ -0,0 +1,24 @@
+#ifndef __BA_DRONE_H__
+#define __BA_DRONE_H__
+
+#include
+#include "prop.h"
+
+typedef enum ba_drone_type_e{
+ BA_DRONE_NONE,
+ BA_DRONE_GOTO,
+ BA_DRONE_LOOK,
+ BA_DRONE_UNKNOWN_3,
+ BA_DRONE_TRANSFORM,
+ BA_DRONE_ENTER,
+ BA_DRONE_VANISH
+} BaDroneType;
+
+void badrone_set_type(BaDroneType type);
+BaDroneType badrone_get_type(void);
+void badrone_get_position_and_duration(f32 position[3], f32 *duration);
+
+enum bs_e badrone_enter(void);
+enum bs_e badrone_goto(f32 position[3], f32 duration, void (*arg2)(ActorMarker *), ActorMarker *arg3);
+
+#endif
diff --git a/include/core2/ba/physics.h b/include/core2/ba/physics.h
new file mode 100644
index 00000000..23518022
--- /dev/null
+++ b/include/core2/ba/physics.h
@@ -0,0 +1,53 @@
+#ifndef __BA_PHYSICS_H__
+#define __BA_PHYSICS_H__
+
+#include
+
+typedef enum ba_physics_type_e{
+ BA_PHYSICS_NONE,
+ BA_PHYSICS_UNK1,
+ BA_PHYSICS_NORMAL,
+ BA_PHYSICS_LOCKED_ROTATION,
+ BA_PHYSICS_UNK4,
+ BA_PHYSICS_INVERTED_YAW,
+ BA_PHYSICS_AIRBORN,
+ BA_PHYSICS_FREEZE,
+ BA_PHYSICS_UNK8,
+ BA_PHYSICS_NO_GRAVITY,
+ BA_PHYSICS_CLIMB,
+ BA_PHYSICS_TRANSFORM,
+ BA_PHYSICS_GOTO,
+ BA_PHYSICS_END
+}BaPhysicsType;
+
+void baphysics_get_position_change(f32 dst[3]);
+void baphysics_init(void);
+void baphysics_update(void);
+void baphysics_reset_horizontal_velocity(void);
+void baphysics_set_type(BaPhysicsType);
+void baphysics_set_target_velocity(f32 src[3]);
+void baphysics_set_target_horizontal_velocity(f32);
+void baphysics_set_target_yaw(f32);
+void baphysics_set_vertical_velocity(f32);
+void baphysics_set_horizontal_velocity(f32, f32);
+void baphysics_set_velocity(f32 src[3]);
+f32 baphysics_get_gravity(void);
+BaPhysicsType baphysics_get_type(void);
+f32 baphysics_get_target_horizontal_velocity(void);
+f32 baphysics_get_target_vertical_velocity(void);
+f32 baphysics_get_target_yaw(void);
+void baphysics_get_velocity(f32 dst[3]);
+f32 baphysics_get_vertical_velocity(void);
+f32 baphysics_get_horizontal_velocity(void);
+f32 baphysics_get_horizontal_velocity_percentage(void);
+void baphysics_reset(void);
+void baphysics_set_acceleration(f32);
+void baphysics_reset_gravity(void);
+void baphysics_reset_terminal_velocity(void);
+void baphysics_set_goto_duration(f32);
+void baphysics_set_goto_position(f32 src[3]);
+void baphysics_set_gravity(f32);
+void baphysics_set_terminal_velocity(f32);
+int baphysics_is_slower_than(f32);
+int baphysics_goto_done(void);
+#endif
diff --git a/include/core2/nc/camera.h b/include/core2/nc/camera.h
index e6934dd4..255f839d 100644
--- a/include/core2/nc/camera.h
+++ b/include/core2/nc/camera.h
@@ -8,4 +8,4 @@ enum camera_type_e{
CAMERA_TYPE_4_RANDOM = 4
};
-#endif
\ No newline at end of file
+#endif
diff --git a/include/core2/yaw.h b/include/core2/yaw.h
index 82015cab..ab1a616c 100644
--- a/include/core2/yaw.h
+++ b/include/core2/yaw.h
@@ -5,7 +5,7 @@ enum yaw_state_e{
YAW_STATE_0_NONE,
YAW_STATE_1_DEFAULT,
YAW_STATE_2_UNBOUNDED,
- YAW_STATE_3_BOUNDED,
+ YAW_STATE_3_BOUNDED
};
void yaw_init(void);
diff --git a/include/enums.h b/include/enums.h
index 0a381ba6..03eee84c 100644
--- a/include/enums.h
+++ b/include/enums.h
@@ -235,6 +235,8 @@ enum unkflags_1{
UNKFLAGS1_A_HAS_SEEN_TIPTUP_FF_MINIGAME,
UNKFLAGS1_B_HAS_SEEN_SANDCASTLE_FF_MINIGAME,
+ UNKFLAGS1_13_HAS_TRIGGERED_MUMBO_VACATION_TEXT = 0x13,
+
UNKFLAGS1_1F_IN_CHARACTER_PARADE = 0x1F,
UNKFLAGS1_20_BEGIN_CHARACTER_PARADE,
@@ -1654,8 +1656,8 @@ enum actor_e
ACTOR_65_WADING_BOOTS = 0x65,
ACTOR_67_SNIPPET = 0x67,
-
- ACTOR_69_CLAM = 0x69,
+ ACTOR_68_SNACKER,
+ ACTOR_69_CLAM,
ACTOR_6D_GV_BANJO_DOOR = 0x6D,
@@ -1966,7 +1968,8 @@ enum actor_e
ACTOR_TOPPER_B = 0x36F,
ACTOR_370_GOLD_FEATHER = 0x370,
- ACTOR_375_GRUBLIN_HOOD = 0x375,
+ ACTOR_374_VACATION_TEXT_TRIGGER = 0x374,
+ ACTOR_375_GRUBLIN_HOOD,
ACTOR_376_FF_MINIGAME,
ACTOR_379_UNKNOWN = 0x379,
@@ -2378,7 +2381,7 @@ enum asset_e
/* [0x74, 0x75] empty */
ASSET_76_ANIM_JIGSAWDANCE_HOLD = 0x76,
ASSET_77_ANIM_BSTIMEOUT,
- //ASSET_78 // snacker_swimming
+ ASSET_78_ANIM_SNACKER_SWIMMING,
//ASSET_79 // Mumbo Concert Playing Instrument
//ASSET_7A // Banjo Concert Angry
//ASSET_7B // Banjo Concert Play
@@ -2556,8 +2559,8 @@ enum asset_e
ASSET_14A_ANIM_BSREST_LISTEN,
ASSET_153_ANIM_BURIED_TREASURE_APPEAR = 0x153,
-
- ASSET_155_ANIM_CRAB_FLIP_UPRIGHT = 0x155,
+ ASSET_154_ANIM_SNACKER_EATING,
+ ASSET_155_ANIM_CRAB_FLIP_UPRIGHT,
ASSET_156_ANIM_MUTANT_CRAB_WALK,
ASSET_157_ANIM_MUTANT_CRAB_FLIP_UPSIDEDOWN,
ASSET_158_ANIM_MUTANT_CRAB_UPSIDEDOWN,
@@ -2660,7 +2663,10 @@ enum asset_e
ASSET_256_ANIM_TERMITE_OW,
ASSET_25B_ANIM_ACORN_IDLE = 0x25B,
-
+
+ ASSET_273_ANIM_SNACKER_HURT = 0x273,
+ ASSET_274_ANIM_SNACKER_DIE,
+
ASSET_281_ANIM_WISHYWASHY_DOOOH = 0x281,
ASSET_282_ANIM_BSJIG_NOTEDOOR,
@@ -2894,7 +2900,7 @@ enum asset_e
ASSET_3AD_FIRE_SPARKLE = 0x3AD,
ASSET_3AE_MODEL_GRAVE_FLOWER_POT,
// 3af (Green Plank?)
- // 3b0 Snacker
+ ASSET_3B0_SNACKER = 0x3B0,
// 3b1 Concert Mumbo
// 3b2 (Two Poles?)
// 3b3 Mumbo's Hut
@@ -4197,8 +4203,8 @@ enum marker_e{
MARKER_11_WADING_BOOTS = 0x11,
MARKER_13_SNIPPET = 0x13,
-
- MARKER_15_CLAM = 0x15,
+ MARKER_14_SNACKER,
+ MARKER_15_CLAM,
MARKER_28_CLANKER_SAWBLADE = 0x28,
@@ -4420,6 +4426,8 @@ enum marker_e{
MARKER_1E1_FF_MINIGAME = 0x1E1,
MARKER_1E2_GRUBLIN_HOOD,
+ MARKER_1E3_VACATION_TEXT_TRIGGER,
+
MARKER_1E5_GOLD_FEATHER_COLLECTIBLE = 0x1E5,
MARKER_1E6_TOPPER_B,
diff --git a/include/file_and_line.h b/include/file_and_line.h
index a67656c6..06231717 100644
--- a/include/file_and_line.h
+++ b/include/file_and_line.h
@@ -15,7 +15,7 @@ extern void func_8033F000(const char *, const char *, int);
#else
#define FILE(file_name) "file_name"
#endif
- #define matching_assert(EX, F, L) assert(EX)
+
#ifdef __ANSI_CPP__
#define matching_assert(EX, F, L) ((EX)?((void)0):func_8033F000( # EX , # F, L))
#else
diff --git a/include/functions.h b/include/functions.h
index 468f7507..145deaec 100644
--- a/include/functions.h
+++ b/include/functions.h
@@ -108,10 +108,6 @@ void pitch_setIdeal(f32);
f32 pitch_get(void);
f32 player_getYPosition(void);
-void func_80297970(f32);
-
-f32 _get_vertVelocity(void);
-
void climbGetBottom(f32 dst[3]);
void yaw_setIdeal(f32);
@@ -155,7 +151,7 @@ void actor_collisionOff(Actor *);
void *assetcache_get(enum asset_e assetId);
-Actor *actor_new(s32 (*position)[3], s32 yaw, ActorInfo *actorInfo, u32 flags);
+Actor *actor_new(s32 position[3], s32 yaw, ActorInfo *actorInfo, u32 flags);
Actor *func_802C8A54(s32 position[3], s32 yaw, ActorInfo* actorInfo, u32 flags);
Actor *func_802C8AA8(s32 position[3], s32 yaw, ActorInfo* actorInfo, u32 flags);
Actor *func_802C8AF8(s32 position[3], s32 yaw, ActorInfo* actorInfo, u32 flags);
@@ -166,7 +162,7 @@ Actor *func_802C8C04(s32 position[3], s32 yaw, ActorInfo* actorInfo, u32 flags);
Actor *marker_getActor(ActorMarker *);
f32 time_getDelta(void);
-void jiggySpawn(enum jiggy_e jiggy_id, f32 pos[3]);
+void jiggy_spawn(enum jiggy_e jiggy_id, f32 pos[3]);
struct3s *func_802F8264(s32 arg0);
struct6s *func_802F8BE0(s32 arg0);
@@ -209,7 +205,7 @@ void fxhealthscore_free(enum item_e, struct8s *);
struct7s *fxairscore_new(s32);
void fxairscore_update(enum item_e, struct7s *);
void fxairscore_draw(enum item_e, struct8s *, Gfx**, Mtx**, Vtx **);
-void fxairscore_free(s32, struct8s *);
+void fxairscore_free(s32, struct7s *);
@@ -252,9 +248,9 @@ void particleEmitter_setParticleVelocityRange(ParticleEmitter *, f32, f32, f32,
void func_802EFF50(ParticleEmitter *, f32);
void particleEmitter_setRGB(ParticleEmitter *this, s32 arg1[3]);
void particleEmitter_setSpawnInterval(ParticleEmitter *, f32);
-
int func_8024DC04(f32, f32, f32);
void func_8024E3A8(f32 [3], f32);
+OSContPad *func_8024F3F4(void);
OSMesgQueue *pfsManager_getFrameReplyQ(void);
void ml_vec3f_clear(f32 dst[3]);
@@ -280,13 +276,6 @@ void comusic_8025AB44(enum comusic_e comusic_id, s32 arg1, s32 arg2);
f32 cosf(f32);
-struct54s * func_80287CA8(void);
-void func_80287F50(struct54s *, struct53s *, s32);
-void func_80287FD0(struct54s *, f32);
-void func_80287F7C(struct54s *arg0, s32 arg1);
-void func_80287F98(struct54s *arg0, s32 arg1);
-void func_80287FDC(struct54s *arg0, s32 arg1);
-
void baanim_setDurationRange(f32, f32);
@@ -313,7 +302,7 @@ void func_80292974(f32, f32, f32);
void func_80292900(f32, f32);
void func_80292E80(s32, f32);
-void func_80293350(void);
+void bafalldamage_start(void);
void func_80293D48(f32, f32);
f32 func_80294438(void);
f32 func_80294500(void);
@@ -322,20 +311,6 @@ void func_80294980(f32 arg0[3]);
f32 get_slope_timer(void);
f32 get_turbo_duration(void);
void func_80295C08(void (* arg0)(void));
-void func_802978DC(int);
-void func_80297970(f32);
-void func_8029797C(f32);
-void player_setYVelocity(f32);
-void func_802979AC(f32, f32);
-f32 func_80297A64(void);
-f32 func_80297A70(void);
-f32 func_80297A7C(void);
-f32 _get_horzVelocity(void);
-f32 func_80297AF0(void);
-void gravity_set(f32);
-void func_80297B64(f32);
-void func_80297BF8(f32);
-int func_80297C04(f32);
void func_80297CCC(f32);
f32 pitch_getIdeal(void);
void pitch_setAngVel(f32, f32);
@@ -406,14 +381,14 @@ extern s32 func_802F9AA8(enum sfx_e);
Actor * func_803055E0(enum actor_e id, s32 pos[3], s32 arg2, s32 arg3, s32 arg4);
-Actor * func_803056FC(enum actor_e id, s32 pos[3], s32 yaw);
+Actor * spawn_actor(enum actor_e id, s32 pos[3], s32 yaw);
f32 func_80309724(f32[3]);
BKModelBin *func_8030A428(s32);
u8 func_8030D90C(void);
void sfxsource_setSfxId(u8 indx, enum sfx_e uid);
void func_8030DBB4(u8, f32);
void func_8030DD14(u8, int);
-void func_8030DF68(u8, f32[3]);
+void sfxsource_set_position(u8, f32[3]);
void func_8030DFF0(u8, s32);
void func_8030E04C(u8, f32, f32, f32);
void func_8030E0FC(u8, f32, f32, f32);
@@ -455,11 +430,11 @@ void func_8032728C(f32[3], f32, s32, int(*)(Actor *));
Actor *func_8032813C(enum actor_e actor_id, f32 position[3], s32 yaw);
int func_8032863C(AnimCtrl *, f32, f32);
int func_80328A2C(Actor *, f32, s32, f32);
-void func_80328A84(Actor *, u32);
+void subaddie_set_state(Actor *, u32);
ActorMarker *func_8032B16C(enum jiggy_e jiggy_id);
-int func_80328B38(Actor *, s32, f32);
-void func_80328B8C(Actor * this, s32 myAnimId, f32 arg2, s32 direction);
-int func_80328BD4(Actor *, s32, f32, s32, f32 );
+int subaddie_maybe_set_state(Actor *, s32, f32);
+void subaddie_set_state_with_direction(Actor * this, s32 myAnimId, f32 arg2, s32 direction);
+int subaddie_maybe_set_state_position_direction(Actor *, s32, f32, s32, f32 );
void func_80328CEC(Actor *, s32, s32, s32);
void func_80328FB0(Actor *, f32);
int func_80329030(Actor *, s32);
@@ -501,7 +476,6 @@ void func_80352CF4(f32 *, f32 *, f32, f32);
AnimCtrl *baanim_getAnimCtrlPtr(void);
-void _get_velocity(f32 dst[3]);
void player_setYPosition(f32);
NodeProp *func_80304C38(enum actor_e arg0, Actor *arg1);
@@ -534,7 +508,7 @@ Actor *actorArray_findActorFromActorId(enum actor_e);
f32 func_8038A6B8(ActorMarker *);
void *defrag_asset(void *);
void ml_interpolate_vec3f(f32 [3], f32 [3], f32 [3], f32);
-void func_8030DEB4(u8, f32, f32);
+void sfxsource_set_fade_distances(u8, f32, f32);
void func_8030DB04(u8, s32, f32 position[3], f32, f32);
void func_80258A4C(f32 [3], f32, f32 [3], f32 *, f32 *, f32 *);
@@ -576,6 +550,6 @@ void ability_unlock(enum ability_e);
extern void func_802EE278(Actor *, s32, s32, s32, f32, f32);
extern void fxSparkle_chTreasure(s16[3]);
extern void actor_collisionOn(Actor *);
-extern void func_80328AC8(Actor *, s32);
+extern void subaddie_set_state_forward(Actor *, s32);
#endif
diff --git a/include/gc/gc.h b/include/gc/gc.h
index 9a4b3879..4ea14c0e 100644
--- a/include/gc/gc.h
+++ b/include/gc/gc.h
@@ -3,6 +3,5 @@
#include "gc/gcbound.h"
#include "gc/gctransition.h"
-#include "gc/gczoombox.h"
#endif
diff --git a/include/gc/gctransition.h b/include/gc/gctransition.h
index c5b2ad44..a891672a 100644
--- a/include/gc/gctransition.h
+++ b/include/gc/gctransition.h
@@ -1,12 +1,12 @@
#ifndef __GC_TRANSITION__
#define __GC_TRANSITION__
-void gctransition_8030B740(void);
+void gctransition_defrag(void);
void gctransition_draw(Gfx **arg0, Mtx **arg1, Vtx **arg2);
void gctransition_8030BD4C(void);
f32 gctransition_8030BD88(void);
-int gctransition_8030BD98(void);
-int gctransition_8030BDAC(void);
+int gctransition_done(void);
+int gctransition_active(void);
int gctransition_8030BDC0(void);
void gctransition_8030BE3C(void);
void gctransition_8030BE60(void);
diff --git a/include/gc/gczoombox.h b/include/gc/gczoombox.h
deleted file mode 100644
index f8dd39ce..00000000
--- a/include/gc/gczoombox.h
+++ /dev/null
@@ -1,212 +0,0 @@
-#ifndef GCZOOMBOX_H
-#define GCZOOMBOX_H
-
-#include
-
-#include "structs.h"
-
-enum talk_pic_e {
- TALK_PIC_0_GRUNTILDA_1,
- TALK_PIC_1_VILE_1,
- TALK_PIC_2_VILE_2,
- TALK_PIC_3_VILE_3,
- TALK_PIC_4_BANJO_1,
- TALK_PIC_5_GRUNTILDA_2,
- TALK_PIC_6_JIGGY_1,
- TALK_PIC_7_TOOTY_1,
- TALK_PIC_8_MUSIC_NOTE_1,
- TALK_PIC_9_JIGGY_2,
- TALK_PIC_A_EXTRA_HEALTH_MAX,
- TALK_PIC_B_CLOCK,
- TALK_PIC_C_BANJO_2,
- TALK_PIC_D_KAZOOIE_1,
- TALK_PIC_E_KAZOOIE_2,
- TALK_PIC_F_BOTTLES,
- TALK_PIC_10_MUMBO_1,
- TALK_PIC_11_CHIMPY,
- TALK_PIC_12_CONGA,
- TALK_PIC_13_BLUBBER,
- TALK_PIC_14_NIPPER,
- TALK_PIC_15_CLANKER,
- TALK_PIC_16_SNIPPET,
- TALK_PIC_17_VILE_4,
- TALK_PIC_18_TIPTUP,
- TALK_PIC_19_TANKTUP,
- TALK_PIC_1A_FLIBBIT,
- TALK_PIC_1B_TRUNKER,
- TALK_PIC_1C_RUBEE,
- TALK_PIC_1D_GOBI,
- TALK_PIC_1E_GRABBA,
- TALK_PIC_1F_TEEHEE,
- TALK_PIC_20_JINJO_YELLOW,
- TALK_PIC_21_JINJO_GREEN,
- TALK_PIC_22_JINJO_BLUE,
- TALK_PIC_23_JINJO_PINK,
- TALK_PIC_24_JINJO_ORANGE,
- TALK_PIC_25_MUSIC_NOTE_2,
- TALK_PIC_26_MUMBO_TOKEN,
- TALK_PIC_27_BLUE_EGG,
- TALK_PIC_28_RED_FEATHER,
- TALK_PIC_29_GOLD_FEATHER,
- TALK_PIC_2A_ORANGE,
- TALK_PIC_2B_GOLD_BULLION,
- TALK_PIC_2C_HONEYCOMB,
- TALK_PIC_2D_EXTRA_HEALTH_MAX,
- TALK_PIC_2E_EXTRA_LIFE,
- TALK_PIC_2F_JIGGY_3,
- TALK_PIC_30_EXTRA_HONEYCOMB,
- TALK_PIC_31_CATERPILLAR,
- TALK_PIC_32_WADING_BOOTS,
- TALK_PIC_33_PIRANHA,
- TALK_PIC_34_TERMITE,
- TALK_PIC_35_JUJU,
- TALK_PIC_36_YUMYUM,
- TALK_PIC_37_LITTLE_LOCKUP,
- TALK_PIC_38_LEAKY,
- TALK_PIC_39_GLOOP,
- TALK_PIC_3A_TIPTUP_CHOIR_MEMBER,
- TALK_PIC_3B_SNACKER,
- TALK_PIC_3C_ANCIENT_ONE,
- TALK_PIC_3D_SAND_EEL,
- TALK_PIC_3E_SNORKEL,
- TALK_PIC_3F_JINXY,
- TALK_PIC_40_CROCTUS,
- TALK_PIC_41_GRUNTILDA_3,
- TALK_PIC_42_TOOTY_2,
- TALK_PIC_43_BOGGY,
- TALK_PIC_44_WOZZA,
- TALK_PIC_45_MOTZHAND,
- TALK_PIC_46_TUMBLAR,
- TALK_PIC_47_MUMMUM,
- TALK_PIC_48_XMAS_GIFT_BLUE,
- TALK_PIC_49_WORM,
- TALK_PIC_4A_FREEZING_WATER,
- TALK_PIC_4B_TWINKLY,
- TALK_PIC_4C_TWINKLY_CHOMPER,
- TALK_PIC_4D_GNAWTY,
- TALK_PIC_4E_BOSS_BOOM_BOX,
- TALK_PIC_4F_ZUBBA,
- TALK_PIC_50_NABNUT,
- TALK_PIC_51_POLAR_BEAR_CUBS,
- TALK_PIC_52_YOUNG_EEYRIE_1,
- TALK_PIC_53_YOUNG_EEYRIE_2,
- TALK_PIC_54_YOUNG_EEYRIE_3,
- TALK_PIC_55_ADULT_EEYRIE,
- TALK_PIC_56_WARP_CAULDRON,
- TALK_PIC_57_BRENTILDA,
- TALK_PIC_58_TOOTY_3,
- TALK_PIC_59_BLACK_SNIPPET,
- TALK_PIC_5A_LOGGO,
- TALK_PIC_5B_CHEATO,
- TALK_PIC_5C_XMAS_GIFT_GREEN,
- TALK_PIC_5D_KLUNGO,
- TALK_PIC_5E_SEXY_GRUNTY,
- TALK_PIC_5F_TOOTY_4,
- TALK_PIC_60_BANJO_3,
- TALK_PIC_61_KAZOOIE_3,
- TALK_PIC_62_TOOTY_5,
- TALK_PIC_63_DINGPOT,
- TALK_PIC_64_CROC_BANJO,
- TALK_PIC_65_GRUNTILDA_4,
- TALK_PIC_66_LOCKUP,
- TALK_PIC_67_VILE_5,
- TALK_PIC_68_VILE_6,
- TALK_PIC_69_VILE_7
-};
-
-typedef struct {
- u8 unk0[0x30]; //string1
- u8 unk30[0x30]; //string2
- u8 unk60[0x30];
- u8 unk90[0x20];
- u8 unkB0[0x40];
- BKModelBin *model;
- AnimCtrl *anim_ctrl;
- BKSprite *unkF8;
- BKSpriteDisplayData *unkFC;
- BKSprite *unk100;
- BKSpriteDisplayData *unk104;
- u8 unk108[5]; //sfx_ids
- u8 pad10D[3];
- f32 unk110[5]; //sfx_???
- s16 unk124[5]; //sfx_???
- s16 unk12E;
- void (*unk130)(s32, s32);
- u8 unk134;
- u8 state;
- u8 portrait_id; //0x136
- u8 unk137; //string_cnt
- u8 unk138; //current_string
- u8 unk139;
- u8 unk13A;
- u8 sfx_count;
- char *raw_str[8]; //string_ptrs
- u8 unk15C;
- u8 unk15D;
- u8 unk15E;
- u8 pad15F[0x1];
- u8 *unk160;
- s16 unk164;
- s16 unk166; //top_transparency???
- s16 unk168; //rgb???
- s16 unk16A; //x_pos
- s16 unk16C; //y1_pos
- s16 unk16E; //y2_pos
- s16 unk170;
- s16 unk172;
- s16 unk174;
- s8 unk176;
- s8 unk177;
- s8 unk178;
- s8 unk179;
- u8 pad17A[0x2];
- f32 unk17C;
- s8 unk180;
- s8 unk181;
- u8 unk182;
- u8 unk183;
- u8 unk184;
- u8 unk185;
- s8 unk186;
- u8 unk187;
- u8 frame_count; //sprite frame count
- u8 unk189;
- u8 unk18A;
- u8 prev_sfx; //next_sfx
- f32 unk18C;
- f32 unk190;
- f32 unk194;
- f32 unk198;
- f32 unk19C;
- f32 unk1A0;
- u32 unk1A4_31:1;
- u32 unk1A4_30:1;
- u32 unk1A4_29:1;
- u32 unk1A4_28:1;
- u32 unk1A4_27:1;
- u32 unk1A4_26:1;
- u32 unk1A4_25:1;
- u32 unk1A4_24:1;
- u32 unk1A4_23:1;
- u32 unk1A4_22:1;
- u32 unk1A4_21:1;
- u32 unk1A4_20:1;
- u32 unk1A4_19:1;
- u32 unk1A4_18:1; //highlighted
- u32 unk1A4_17:1;
- u32 unk1A4_16:1;
- u32 unk1A4_15:1;
- u32 unk1A4_14:1;
- u32 unk1A4_13:1;
- u32 unk1A4_12:1;
- u32 unk1A4_11:1;
- u32 unk1A4_10:1;
- u32 pad1A4_9:10;
-}gczoombox_t; //size 0x1A8
-
-
-void gczoombox_draw(gczoombox_t *this, Gfx **gdl, Mtx ** mptr, void *vptr);
-void gczoombox_free(gczoombox_t* this);
-gczoombox_t *gczoombox_new(s32 arg0, enum talk_pic_e arg1, s32 arg2, s32 arg3, void (*arg4)(s32, s32));
-
-#endif
diff --git a/include/macro.inc b/include/macro.inc
index e1048cf1..6d60e311 100644
--- a/include/macro.inc
+++ b/include/macro.inc
@@ -16,6 +16,10 @@
\label:
.endm
+.macro jlabel label
+ \label:
+.endm
+
.macro endlabel label
.end \label
.endm
diff --git a/include/math.h b/include/math.h
new file mode 100644
index 00000000..95e8fe93
--- /dev/null
+++ b/include/math.h
@@ -0,0 +1,6 @@
+#ifndef __BANJO_KAZOOIE_MATH_H__
+#define __BANJO_KAZOOIE_MATH_H__
+
+#define SQ(x) ((x)*(x))
+
+#endif // __BANJO_KAZOOIE_MATH_H__
diff --git a/include/prelude.s b/include/prelude.s
index 216bf780..5144efa8 100644
--- a/include/prelude.s
+++ b/include/prelude.s
@@ -11,5 +11,9 @@
\label:
.endm
+.macro jlabel label
+ \label:
+.endm
+
.macro endlabel label
.endm
\ No newline at end of file
diff --git a/include/prop.h b/include/prop.h
index f285d328..4025977b 100644
--- a/include/prop.h
+++ b/include/prop.h
@@ -48,18 +48,23 @@ typedef struct model_prop_s{
typedef struct actor_prop_s{
- struct actorMarker_s* marker;
- s16 x;
- s16 y;
- s16 z;
- u16 unk8_15:5;
- u16 unk8_10:5;
- u16 unk8_5:1;
- u16 unk8_4:1;
- u16 unk8_3:1;
- u16 unk8_2:1;
- u16 unk8_1:1;
- u16 unk8_0:1;
+ union {
+ struct {
+ struct actorMarker_s* marker;
+ s16 x;
+ s16 y;
+ s16 z;
+ u16 unk8_15:5;
+ u16 unk8_10:5;
+ u16 unk8_5:1;
+ u16 unk8_4:1;
+ u16 unk8_3:1;
+ u16 unk8_2:1;
+ u16 unk8_1:1;
+ u16 unk8_0:1;
+ };
+ s32 words[3];
+ };
} ActorProp;
typedef void(*MarkerCollisionFunc)(struct actorMarker_s *this, struct actorMarker_s *other);
@@ -337,7 +342,7 @@ typedef struct {
s16 y;
s16 z;
struct {
- u16 bit15: 9; //selector_value //volume??? diameter
+ u16 radius: 9; //selector_value //volume??? diameter
u16 bit6: 6; //category
u16 bit0: 1;
}unk6;
@@ -393,4 +398,9 @@ typedef struct actor_array{
Actor data[]; //variable size array
}ActorArray;
+typedef struct {
+ u32 cnt;
+ Actor *actor_save_state[];
+}ActorListSaveState;
+
#endif
diff --git a/include/structs.h b/include/structs.h
index c3f12473..b38fb70a 100644
--- a/include/structs.h
+++ b/include/structs.h
@@ -246,29 +246,12 @@ typedef struct struct_8_s{
f32 unk60;
}struct8s;
-typedef struct struct_9_s{
- u8 uid;
- u8 unk1;
- u8 unk2;
- // u8 pad3[1];
- f32 unk4; //duration
- s32 unk8; //asset_indx
- s32 unkC; //animation_indx
- f32 unk10;
-}struct9s;
-
-typedef struct struct_10_s{
- u8 map_indx;
- u8 unk1;
- u8 unk2;
-}struct10s;
-
typedef struct struct_11_s{
f32 unk0;
f32 unk4;
s32 unk8;
s32 unkC;
- s16 unk10; //trackId
+ s16 track_id; //trackId
s16 unk12;
u8 unk14;
u8 unk15;
@@ -504,23 +487,7 @@ typedef struct{
u8 pad4[8];
}struct52s;
-typedef struct{
- u8 unk0;
- u8 unk1;
-} struct53s;
-typedef struct{
- struct53s *unk0;
- f32 unk4;
- f32 unk8;
- u32 unkC_31:7;
- u32 unkC_24:7;
- u32 unkC_17:7;
- u32 unkC_10:7;
- u32 unkC_3:2;
- u32 unkC_1:1;
- u32 unkC_0:1;
-} struct54s;
typedef struct{
s32 unk0;
diff --git a/undefined_syms.us.v10.txt b/manual_syms.txt
similarity index 59%
rename from undefined_syms.us.v10.txt
rename to manual_syms.txt
index 38d9bf15..4cc3d756 100644
--- a/undefined_syms.us.v10.txt
+++ b/manual_syms.txt
@@ -1,25 +1,4 @@
-/* lair */
-FF_QuestionTypeInfoArr = 0x80394340;
-D_80392EB0 = 0x80392EB0;
-D_80392E20 = 0x80392E20;
-lair_D_80392D90 = 0x80392D90;
-MMM_D_8038C510 = 0x8038C510;
-func_803863F0 = 0x803863F0;
-D_8038D6A0 = 0x8038D6A0;
-D_8038D378 = 0x8038D378;
-D_8038D4DC = 0x8038D4DC;
-D_8038D534 = 0x8038D534;
-D_8038D590 = 0x8038D590;
-D_8038D6DC = 0x8038D6DC;
-D_8038D844 = 0x8038D844;
-fight_D_80391A10 = 0x80391A10;
-FP_D_80392840 = 0x80392840;
-core1_D_803727F4 = 0x803727F4;
-__osBaseTimer = 0x80285D00;
-FP_D_80392864 = 0x80392864;
-D_803687F0 = 0x803687F0;
-D_80276E70 = 0x80276E70;
-
+/* Microcode renames to match ucode.h names */
n_aspMainTextStart = _binary_bin_core1_n_aspMain_text_bin_start;
n_aspMainTextEnd = _binary_bin_core1_n_aspMain_text_bin_end;
gSPF3DEX_fifoTextStart = _binary_bin_core1_gSPF3DEX_fifo_text_bin_start;
@@ -32,3 +11,21 @@ gSPF3DEX_fifoDataStart = _binary_bin_core1_gSPF3DEX_fifo_data_bin_start;
gSPF3DEX_fifoDataEnd = _binary_bin_core1_gSPF3DEX_fifo_data_bin_end;
gSPL3DEX_fifoDataStart = _binary_bin_core1_gSPL3DEX_fifo_data_bin_start;
gSPL3DEX_fifoDataEnd = _binary_bin_core1_gSPL3DEX_fifo_data_bin_end;
+
+/* Fixed-address buffers */
+D_8000E800 = 0x8000E800;
+D_8002D500 = 0x8002D500;
+D_8023DA00 = 0x8023DA00; /* confirm */
+D_803FBE00 = 0x803FBE00;
+D_803FFE00 = 0x803FFE00;
+D_803FFE10 = 0x803FFE10;
+gOverlayTable = 0x803FFE10;
+D_803A5D00 = 0x803A5D00; /* framebuffers */
+
+/* Renames for the boot segment */
+boot_D_8002D500 = D_8002D500;
+boot_core1_VRAM = core1_VRAM;
+boot_D_803FBE00 = D_803FBE00;
+boot_D_803FFE00 = D_803FFE00;
+boot_gOverlayTable = gOverlayTable;
+boot_func_8023DA20 = func_8023DA20;
diff --git a/progress/progress_core1.svg b/progress/progress_core1.svg
index 64b21518..deb4a51c 100644
--- a/progress/progress_core1.svg
+++ b/progress/progress_core1.svg
@@ -1,23 +1,23 @@
-