Updated to splat 0.11.2 and split microcode text/data

This commit is contained in:
Mr-Wiseguy 2022-09-28 12:21:41 -04:00
parent ebf23b94bd
commit 2ebb9ea472
25 changed files with 46 additions and 131 deletions

View File

@ -208,7 +208,7 @@ endef
### Flags ###
# Build tool flags
CFLAGS := -c -Wab,-r4300_mul -non_shared -G 0 -Xfullwarn -Xcpluscomm $(OPT_FLAGS) $(MIPSBIT) -D_FINALROM -DF3DEX_GBI -DVERSION='$(C_VERSION)'
CFLAGS := -c -Wab,-r4300_mul -non_shared -G 0 -Xcpluscomm $(OPT_FLAGS) $(MIPSBIT) -D_FINALROM -DF3DEX_GBI -DVERSION='$(C_VERSION)'
CFLAGS += -woff 649,654,838,807
CFLAGS += $(IN_CFLAGS)
CPPFLAGS := -D_FINALROM -DN_MICRO
@ -303,7 +303,7 @@ define overlay_rules
# split overlay
$(BUILD_DIR)/$(1)_SPLAT_TIMESTAMP : $(SUBYAML)/$(1).$(VERSION).yaml $(BUILD_DIR)/$(1).$(VERSION).bin $(SYMBOL_ADDRS)
$(call print1,Splitting bin:,$$<)
$(SPLAT) --target $(BUILD_DIR)/$(1).$(VERSION).bin $(SUBYAML)/$(1).$(VERSION).yaml --basedir .
$(SPLAT) $(SUBYAML)/$(1).$(VERSION).yaml
@touch $$@
@touch $(1).ld
# Dummy target to make sure extraction happens before compilation, mainly for extracted asm
@ -464,7 +464,7 @@ $(OVERLAY_CODE_BINS) : $(BUILD_DIR)/%.code : $(BUILD_DIR)/%.full $(BUILD_DIR)/%.
$(call print2,Converting overlay code:,$<,$@)
@head -c $(shell {\
text_offset=0x$$(nm $(BUILD_DIR)/$*.elf | grep $*_TEXT_START | head -c 8) ;\
data_offset=0x$$(nm $(BUILD_DIR)/$*.elf | grep $*_DATA_START | head -c 8) ;\
data_offset=0x$$(nm $(BUILD_DIR)/$*.elf | grep $*_DATA_START | sort -r | head -c 8) ;\
echo $$(($$data_offset - $$text_offset)) ;\
}) $< > $@
# @$(OBJCOPY) -I elf32-tradbigmips -O binary --only-section .$*_code --only-section .$*_mips3 $< $@
@ -474,7 +474,7 @@ $(OVERLAY_DATA_BINS) : $(BUILD_DIR)/%.data : $(BUILD_DIR)/%.full $(BUILD_DIR)/%.
$(call print2,Converting overlay data:,$<,$@)
@tail -c +$(shell {\
text_offset=0x$$(nm $(BUILD_DIR)/$*.elf | grep $*_TEXT_START | head -c 8) ;\
data_offset=0x$$(nm $(BUILD_DIR)/$*.elf | grep $*_DATA_START | head -c 8) ;\
data_offset=0x$$(nm $(BUILD_DIR)/$*.elf | grep $*_DATA_START | sort -r | head -c 8) ;\
echo $$(($$data_offset - $$text_offset + 1)) ;\
}) $< > $@
# @$(OBJCOPY) -I elf32-tradbigmips -O binary --only-section .$*_data --only-section .*_data_* $< $@

View File

@ -1,4 +1,4 @@
# banjo (88.0773%)
# banjo (88.8665%)
<img src="./progress/progress_total.svg">

View File

@ -9,7 +9,7 @@
</mask>
<g mask="url(#anybadge_1)">
<path fill="#555" d="M0 0h44v20H0z"/>
<path fill="#91e000" d="M44 0h67v20H44z"/>
<path fill="#78e000" d="M44 0h67v20H44z"/>
<path fill="url(#b)" d="M0 0h111v20H0z"/>
</g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
@ -17,7 +17,7 @@
<text x="22.0" y="14">core1</text>
</g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
<text x="78.5" y="15" fill="#010101" fill-opacity=".3">67.6862%</text>
<text x="77.5" y="14">67.6862%</text>
<text x="78.5" y="15" fill="#010101" fill-opacity=".3">73.1238%</text>
<text x="77.5" y="14">73.1238%</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -9,7 +9,7 @@
</mask>
<g mask="url(#anybadge_1)">
<path fill="#555" d="M0 0h150v20H0z"/>
<path fill="#35e000" d="M150 0h67v20H150z"/>
<path fill="#32e000" d="M150 0h67v20H150z"/>
<path fill="url(#b)" d="M0 0h217v20H0z"/>
</g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
@ -17,7 +17,7 @@
<text x="75.0" y="14">Banjo-Kazooie (us.v10)</text>
</g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
<text x="184.5" y="15" fill="#010101" fill-opacity=".3">88.0773%</text>
<text x="183.5" y="14">88.0773%</text>
<text x="184.5" y="15" fill="#010101" fill-opacity=".3">88.8665%</text>
<text x="183.5" y="14">88.8665%</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -1,90 +0,0 @@
#include <ultra64.h>
#include "functions.h"
#include "variables.h"
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_34B70/func_80272590.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_34B70/func_8027275C.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_34B70/func_80272790.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_34B70/func_802727E8.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_34B70/func_8027285C.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_34B70/func_80272898.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_34B70/func_802728B0.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_34B70/func_80272B6C.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_34B70/func_80272D00.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_34B70/func_80272F78.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_34B70/func_80273198.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_34B70/func_802731F0.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_34B70/func_802731F8.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_34B70/func_80273484.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_34B70/func_80273490.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_34B70/func_802734A4.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_34B70/func_802734B8.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_34B70/func_802734C0.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_34B70/func_802734C8.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_34B70/func_80273504.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_34B70/func_80274148.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_34B70/func_80274170.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_34B70/func_802741C8.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_34B70/func_802745B0.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_34B70/func_802745BC.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_34B70/func_80274618.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_34B70/func_80274A80.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_34B70/func_80274A8C.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_34B70/func_80274AA0.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_34B70/func_80274AB4.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_34B70/func_80274ABC.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_34B70/func_80274AC4.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_34B70/func_80274B34.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_34B70/func_80274D98.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_34B70/func_80274DFC.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_34B70/func_80274E24.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_34B70/func_80274E6C.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_34B70/func_80274E7C.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_34B70/func_80274EB8.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_34B70/func_802754A8.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_34B70/func_8027552C.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_34B70/func_80275578.s")
#pragma GLOBAL_ASM("asm/nonmatchings/core1/code_34B70/func_802755A0.s")

View File

@ -20,13 +20,13 @@ void func_80247224(void);
#define CORE1_8C50_EVENT_CONT_TIMER 13
/* .extern */
extern void (*func_80272590)(void);
extern void (*func_802731F0)(void);
extern u64 D_80274620[];
extern u8 D_80272590[];
extern u8 D_802731F0[];
extern u8 D_80274620[];
extern u64 D_80278E80[]; //ucode_data
extern u64 D_80279130[];
extern u64 D_80279930[];
extern u8 D_80278E80[]; //ucode_data
extern u8 D_80279130[];
extern u8 D_80279930[];
/* .data */
OSTask D_80275910 = {
@ -120,7 +120,7 @@ void func_80246744(OSMesg arg0){
void func_80246794(Struct_Core1_8C50_s * arg0){
func_80255D0C(&D_80275910.t.ucode_boot, &D_80275910.t.ucode_boot_size);
D_80275910.t.ucode = &func_80272590;
D_80275910.t.ucode = D_80272590;
D_80275910.t.ucode_data = D_80278E80;
D_80275910.t.data_ptr = (void*) arg0->unk8;
D_80275910.t.data_size = (arg0->unkC - arg0->unk8) >> 3 << 3;
@ -134,7 +134,7 @@ void func_80246794(Struct_Core1_8C50_s * arg0){
void func_80246844(Struct_Core1_8C50_s * arg0){
func_80255D0C(&D_80275950.t.ucode_boot, &D_80275950.t.ucode_boot_size);
D_80275950.t.ucode = &func_802731F0;
D_80275950.t.ucode = D_802731F0;
D_80275950.t.ucode_data = D_80279130;
D_80275950.t.data_ptr = (void*) arg0->unk8;
D_80275950.t.data_size = (arg0->unkC - arg0->unk8) >> 3 << 3;

View File

@ -17,7 +17,7 @@ options:
symbol_addrs_path: symbol_addrs.us.v10.txt
undefined_funcs_auto_path: undefined_funcs_auto.BGS.us.v10.txt
undefined_syms_auto_path: undefined_syms_auto.BGS.us.v10.txt
base_path: .
base_path: ..
target_path: build/us.v10/BGS.us.v10.bin
asset_path: bin
build_path: build/us.v10

View File

@ -17,7 +17,7 @@ options:
symbol_addrs_path: symbol_addrs.us.v10.txt
undefined_funcs_auto_path: undefined_funcs_auto.CC.us.v10.txt
undefined_syms_auto_path: undefined_syms_auto.CC.us.v10.txt
base_path: .
base_path: ..
target_path: build/us.v10/CC.us.v10.bin
asset_path: bin
build_path: build/us.v10

View File

@ -17,7 +17,7 @@ options:
symbol_addrs_path: symbol_addrs.us.v10.txt
undefined_funcs_auto_path: undefined_funcs_auto.CCW.us.v10.txt
undefined_syms_auto_path: undefined_syms_auto.CCW.us.v10.txt
base_path: .
base_path: ..
target_path: build/us.v10/CCW.us.v10.bin
asset_path: bin
build_path: build/us.v10

View File

@ -17,7 +17,7 @@ options:
symbol_addrs_path: symbol_addrs.us.v10.txt
undefined_funcs_auto_path: undefined_funcs_auto.FP.us.v10.txt
undefined_syms_auto_path: undefined_syms_auto.FP.us.v10.txt
base_path: .
base_path: ..
target_path: build/us.v10/FP.us.v10.bin
asset_path: bin
build_path: build/us.v10

View File

@ -17,7 +17,7 @@ options:
symbol_addrs_path: symbol_addrs.us.v10.txt
undefined_funcs_auto_path: undefined_funcs_auto.GV.us.v10.txt
undefined_syms_auto_path: undefined_syms_auto.GV.us.v10.txt
base_path: .
base_path: ..
target_path: build/us.v10/GV.us.v10.bin
asset_path: bin
build_path: build/us.v10

View File

@ -17,7 +17,7 @@ options:
symbol_addrs_path: symbol_addrs.us.v10.txt
undefined_funcs_auto_path: undefined_funcs_auto.MM.us.v10.txt
undefined_syms_auto_path: undefined_syms_auto.MM.us.v10.txt
base_path: .
base_path: ..
target_path: build/us.v10/MM.us.v10.bin
asset_path: bin
build_path: build/us.v10

View File

@ -17,7 +17,7 @@ options:
symbol_addrs_path: symbol_addrs.us.v10.txt
undefined_funcs_auto_path: undefined_funcs_auto.MMM.us.v10.txt
undefined_syms_auto_path: undefined_syms_auto.MMM.us.v10.txt
base_path: .
base_path: ..
target_path: build/us.v10/MMM.us.v10.bin
asset_path: bin
build_path: build/us.v10

View File

@ -17,7 +17,7 @@ options:
symbol_addrs_path: symbol_addrs.us.v10.txt
undefined_funcs_auto_path: undefined_funcs_auto.RBB.us.v10.txt
undefined_syms_auto_path: undefined_syms_auto.RBB.us.v10.txt
base_path: .
base_path: ..
target_path: build/us.v10/RBB.us.v10.bin
asset_path: bin
build_path: build/us.v10

View File

@ -17,7 +17,7 @@ options:
symbol_addrs_path: symbol_addrs.pal.txt
undefined_funcs_auto_path: undefined_funcs_auto.SM.pal.txt
undefined_syms_auto_path: undefined_syms_auto.SM.pal.txt
base_path: .
base_path: ..
target_path: build/pal/SM.pal.bin
asset_path: bin
build_path: build/pal

View File

@ -17,7 +17,7 @@ options:
symbol_addrs_path: symbol_addrs.us.v10.txt
undefined_funcs_auto_path: undefined_funcs_auto.SM.us.v10.txt
undefined_syms_auto_path: undefined_syms_auto.SM.us.v10.txt
base_path: .
base_path: ..
target_path: build/us.v10/SM.us.v10.bin
asset_path: bin
build_path: build/us.v10

View File

@ -17,7 +17,7 @@ options:
symbol_addrs_path: symbol_addrs.us.v10.txt
undefined_funcs_auto_path: undefined_funcs_auto.TTC.us.v10.txt
undefined_syms_auto_path: undefined_syms_auto.TTC.us.v10.txt
base_path: .
base_path: ..
target_path: build/us.v10/TTC.us.v10.bin
asset_path: bin
build_path: build/us.v10

View File

@ -17,7 +17,7 @@ options:
symbol_addrs_path: symbol_addrs.us.v10.txt
undefined_funcs_auto_path: undefined_funcs_auto.core1.us.v10.txt
undefined_syms_auto_path: undefined_syms_auto.core1.us.v10.txt
base_path: .
base_path: ..
target_path: build/us.v10/core1.us.v10.bin
asset_path: bin
build_path: build/us.v10
@ -232,7 +232,10 @@ segments:
- [0x34A80, c, done/io/epirawread] #DONE
- [0x34AD0, c, done/os/setglobalintmask] #DONE
- [0x34B20, c, done/os/yieldthread] #DONE
- [0x34B70, c, code_34B70] #mips3
- [0x34B70, bin, n_aspMain_text]
- [0x357D0, bin, gSPF3DEX_fifo_text]
- [0x36C00, bin, gSPL3DEX_fifo_text]
- [0x37BF0, linker_offset, DATA_START] #data Section
- [0x37BF0, bin, data_37BF0] #data Section
- [0x37C50, .data, code_660]
- [0x37D50, .data, code_1D00]
@ -298,7 +301,9 @@ segments:
- [0x3B3B0, .rodata, done/io/devmgr]
- [0x3B3D0, .rodata, done/audio/env]
- [0x3B420, .rodata, done/audio/resample]
- [0x3B460, bin, data_3B460]
- [0x3B460, bin, n_aspMain_data]
- [0x3B710, bin, gSPF3DEX_fifo_data]
- [0x3BF10, bin, gSPL3DEX_fifo_data]
- [0x3c710, .bss, code_0]
- [0x3c710, .bss, code_660]
- [0x3c710, .bss, inflate]

View File

@ -17,7 +17,7 @@ options:
symbol_addrs_path: symbol_addrs.us.v10.txt
undefined_funcs_auto_path: undefined_funcs_auto.core2.us.v10.txt
undefined_syms_auto_path: undefined_syms_auto.core2.us.v10.txt
base_path: .
base_path: ..
target_path: build/us.v10/core2.us.v10.bin
asset_path: bin
build_path: build/us.v10

View File

@ -17,7 +17,7 @@ options:
symbol_addrs_path: symbol_addrs.us.v10.txt
undefined_funcs_auto_path: undefined_funcs_auto.cutscenes.us.v10.txt
undefined_syms_auto_path: undefined_syms_auto.cutscenes.us.v10.txt
base_path: .
base_path: ..
target_path: build/us.v10/cutscenes.us.v10.bin
asset_path: bin
build_path: build/us.v10

View File

@ -18,7 +18,7 @@ options:
symbol_addrs_path: symbol_addrs.us.v10.txt
undefined_funcs_auto_path: undefined_funcs_auto.fight.us.v10.txt
undefined_syms_auto_path: undefined_syms_auto.fight.us.v10.txt
base_path: .
base_path: ..
target_path: build/us.v10/fight.us.v10.bin
asset_path: bin
build_path: build/us.v10

View File

@ -18,7 +18,7 @@ options:
symbol_addrs_path: symbol_addrs.us.v10.txt
undefined_funcs_auto_path: undefined_funcs_auto.fight.us.v10.txt
undefined_syms_auto_path: undefined_syms_auto.fight.us.v10.txt
base_path: .
base_path: ..
target_path: build/us.v10/fight.us.v10.bin
asset_path: bin
build_path: build/us.v10

View File

@ -17,7 +17,7 @@ options:
symbol_addrs_path: symbol_addrs.us.v10.txt
undefined_funcs_auto_path: undefined_funcs_auto.lair.us.v10.txt
undefined_syms_auto_path: undefined_syms_auto.lair.us.v10.txt
base_path: .
base_path: ..
target_path: build/us.v10/lair.us.v10.bin
asset_path: bin
build_path: build/us.v10

@ -1 +1 @@
Subproject commit 2a94bfcabcbda111920a7795086317678ac8a399
Subproject commit 2b7cbe565f9205f2a5eaf6eadd33a21f13417108

View File

@ -12,8 +12,8 @@ def main(config_path):
config = yaml.load(f.read(), Loader=yaml.SafeLoader)
options.initialize(config, config_path, None, None)
options.set("modes", [])
options.set("verbose", False)
options.opts.modes = []
options.opts.verbose = False
all_segments = initialize_segments(config["segments"])