mirror of
https://github.com/pmret/papermario.git
synced 2024-11-08 12:02:30 +01:00
improve ld script & asset building
makefile go brrrr
This commit is contained in:
parent
0e554072d1
commit
5ddfce7824
6
.gitignore
vendored
6
.gitignore
vendored
@ -9,15 +9,15 @@ venv/
|
||||
ctx.c
|
||||
expected/
|
||||
|
||||
# Assets
|
||||
assets
|
||||
|
||||
# Build artifacts
|
||||
*.ld
|
||||
*.z64
|
||||
*.bin
|
||||
*.i
|
||||
*.Yay0
|
||||
bin/
|
||||
build/
|
||||
docs/doxygen/
|
||||
include/ld_addrs.h
|
||||
|
||||
.vscode/launch.json
|
||||
|
7
.vscode/c_cpp_properties.json
vendored
7
.vscode/c_cpp_properties.json
vendored
@ -3,6 +3,13 @@
|
||||
"configurations": [
|
||||
{
|
||||
"name": "papermario",
|
||||
"browse": {
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"path": [
|
||||
"${workspaceFolder}/include",
|
||||
"${workspaceFolder}/src"
|
||||
]
|
||||
},
|
||||
"includePath": [
|
||||
"${workspaceFolder}/include",
|
||||
"${workspaceFolder}/src"
|
||||
|
4
.vscode/settings.json
vendored
4
.vscode/settings.json
vendored
@ -12,4 +12,8 @@
|
||||
],
|
||||
"python.pythonPath": "/usr/bin/python3",
|
||||
"git.ignoreLimitWarning": true,
|
||||
"search.exclude": {
|
||||
"build": true,
|
||||
"docs/doxygen": true,
|
||||
},
|
||||
}
|
||||
|
180
Makefile
180
Makefile
@ -14,33 +14,29 @@ ifeq ($(wildcard $(BASEROM)),)
|
||||
$(error Baserom `$(BASEROM)' not found.)
|
||||
endif
|
||||
|
||||
|
||||
### Sources ###
|
||||
|
||||
include sources.mk
|
||||
# NON_MATCHING=1 implies COMPARE=0
|
||||
ifeq ($(NON_MATCHING),1)
|
||||
override COMPARE=0
|
||||
endif
|
||||
|
||||
|
||||
### Output ###
|
||||
|
||||
BUILD_DIR = build
|
||||
ROM = $(TARGET).z64
|
||||
ELF = $(BUILD_DIR)/$(TARGET).elf
|
||||
LD_SCRIPT = $(TARGET).ld
|
||||
LD_MAP = $(BUILD_DIR)/$(TARGET).map
|
||||
|
||||
ifdef ASSETS_FS
|
||||
ASSETS_FS_OBJ = $(BUILD_DIR)/$(ASSETS_FS).o
|
||||
endif
|
||||
BUILD_DIR := build
|
||||
ROM := $(TARGET).z64
|
||||
ELF := $(BUILD_DIR)/$(TARGET).elf
|
||||
LD_SCRIPT := $(TARGET).ld
|
||||
LD_MAP := $(BUILD_DIR)/$(TARGET).map
|
||||
ASSETS_BIN := $(BUILD_DIR)/bin/assets/assets.bin
|
||||
|
||||
|
||||
### Tools ###
|
||||
|
||||
PYTHON = python3
|
||||
N64CKSUM = tools/n64crc
|
||||
SPLAT_YAML = tools/splat.yaml
|
||||
PYTHON := python3
|
||||
N64CKSUM := tools/n64crc
|
||||
SPLAT_YAML := tools/splat.yaml
|
||||
SPLAT = $(PYTHON) tools/n64splat/split.py $(BASEROM) $(SPLAT_YAML) .
|
||||
YAY0COMPRESS = tools/Yay0compress
|
||||
BUILD_ASSETS_FS := $(PYTHON) tools/build_assets_fs.py $(ASSETS_FS) $(BUILD_DIR)/$(ASSETS_FS)
|
||||
|
||||
ifndef EMULATOR
|
||||
ifneq ($(shell which mupen64plus-gui),)
|
||||
@ -53,25 +49,30 @@ endif
|
||||
|
||||
### Compiler Options ###
|
||||
|
||||
CROSS = mips-linux-gnu-
|
||||
AS = $(CROSS)as
|
||||
OLD_AS = tools/mips-nintendo-nu64-as
|
||||
CC = tools/cc1
|
||||
CPP = cpp
|
||||
LD = $(CROSS)ld
|
||||
OBJCOPY = $(CROSS)objcopy
|
||||
CROSS := mips-linux-gnu-
|
||||
AS := $(CROSS)as
|
||||
OLD_AS := tools/mips-nintendo-nu64-as
|
||||
CC := tools/cc1
|
||||
CPP := cpp
|
||||
LD := $(CROSS)ld
|
||||
OBJCOPY := $(CROSS)objcopy
|
||||
|
||||
CPPFLAGS = -Iinclude -Isrc -D _LANGUAGE_C -ffreestanding -DF3DEX_GBI_2
|
||||
ASFLAGS = -EB -Iinclude -march=vr4300 -mtune=vr4300
|
||||
OLDASFLAGS = -EB -Iinclude -G 0
|
||||
CFLAGS = -O2 -quiet -G 0 -mcpu=vr4300 -mfix4300 -mips3 -mgp32 -mfp32 -Wimplicit -Wuninitialized -Wshadow
|
||||
LDFLAGS = -T undefined_syms.txt -T undefined_funcs.txt -T $(LD_SCRIPT) -Map $(LD_MAP) --no-check-sections
|
||||
CPPFLAGS := -Iinclude -Isrc -D _LANGUAGE_C -ffreestanding -DF3DEX_GBI_2 -D_MIPS_SZLONG=0 -Wundef -Wcomment
|
||||
ASFLAGS := -EB -Iinclude -march=vr4300 -mtune=vr4300
|
||||
OLDASFLAGS := -EB -Iinclude -G 0
|
||||
CFLAGS := -O2 -quiet -G 0 -mcpu=vr4300 -mfix4300 -mips3 -mgp32 -mfp32 -Wimplicit -Wuninitialized -Wshadow
|
||||
LDFLAGS := -T undefined_syms.txt -T undefined_funcs.txt -T $(BUILD_DIR)/$(LD_SCRIPT) -Map $(LD_MAP) --no-check-sections
|
||||
|
||||
ifeq ($(NON_MATCHING),1)
|
||||
CPPFLAGS += -DNON_MATCHING
|
||||
endif
|
||||
|
||||
|
||||
### Sources ###
|
||||
|
||||
include sources.mk
|
||||
|
||||
|
||||
### Targets ###
|
||||
|
||||
clean:
|
||||
@ -87,11 +88,14 @@ submodules:
|
||||
git submodule update --init --recursive
|
||||
|
||||
split:
|
||||
rm -rf bin assets
|
||||
rm -rf bin
|
||||
$(SPLAT) --modes ld bin Yay0 PaperMarioMapFS
|
||||
|
||||
split-bin:
|
||||
$(SPLAT) --modes ld bin
|
||||
|
||||
split-all:
|
||||
rm -rf bin assets
|
||||
rm -rf bin
|
||||
$(SPLAT) --modes all
|
||||
|
||||
test: $(ROM)
|
||||
@ -101,9 +105,61 @@ else
|
||||
@echo "N64 emulator not detected." && false
|
||||
endif
|
||||
|
||||
# Compressed files
|
||||
%.Yay0: %
|
||||
@mkdir -p $(shell dirname $@)
|
||||
$(YAY0COMPRESS) $< $@
|
||||
$(BUILD_DIR)/%.bin.Yay0: %.bin
|
||||
@mkdir -p $(shell dirname $@)
|
||||
$(YAY0COMPRESS) $< $@
|
||||
|
||||
# Data objects
|
||||
$(BUILD_DIR)/%.bin.o: %.bin
|
||||
@mkdir -p $(shell dirname $@)
|
||||
$(LD) -r -b binary -o $@ $<
|
||||
|
||||
# Compressed data objects
|
||||
$(BUILD_DIR)/%.Yay0.o: $(BUILD_DIR)/%.bin.Yay0
|
||||
@mkdir -p $(shell dirname $@)
|
||||
$(LD) -r -b binary -o $@ $<
|
||||
|
||||
# Compile C files
|
||||
$(BUILD_DIR)/%.c.o: %.c
|
||||
@mkdir -p $(shell dirname $@)
|
||||
$(CPP) $(CPPFLAGS) -o - $< | $(CC) $(CFLAGS) -o - - | $(OLD_AS) $(OLDASFLAGS) -o $@ -
|
||||
|
||||
# Compile C files (with DSL macros)
|
||||
$(foreach cfile, $(DSL_C_FILES), $(BUILD_DIR)/$(cfile).o): $(BUILD_DIR)/%.c.o: %.c
|
||||
@mkdir -p $(shell dirname $@)
|
||||
$(CPP) $(CPPFLAGS) -o - $< | tools/compile_dsl_macros.py | $(CC) $(CFLAGS) -o - - | $(OLD_AS) $(OLDASFLAGS) -o $@ -
|
||||
|
||||
# Assemble handwritten ASM
|
||||
$(BUILD_DIR)/%.s.o: %.s
|
||||
@mkdir -p $(shell dirname $@)
|
||||
$(AS) $(ASFLAGS) -o $@ $<
|
||||
|
||||
ASSET_FILES := $(foreach asset, $(ASSETS), $(BUILD_DIR)/bin/assets/$(asset))
|
||||
YAY0_ASSET_FILES := $(foreach asset, $(filter-out %_tex, $(ASSET_FILES)), $(asset).Yay0)
|
||||
|
||||
$(BUILD_DIR)/bin/assets/%: bin/assets/%.bin
|
||||
@mkdir -p $(shell dirname $@)
|
||||
@cp $< $@
|
||||
|
||||
$(ASSETS_BIN): $(ASSET_FILES) $(YAY0_ASSET_FILES)
|
||||
@mkdir -p $(shell dirname $@)
|
||||
@echo "building $@"
|
||||
@$(PYTHON) tools/build_assets_bin.py $@ $(ASSET_FILES)
|
||||
|
||||
$(ASSETS_BIN:.bin=.o): $(ASSETS_BIN)
|
||||
$(LD) -r -b binary -o $@ $<
|
||||
|
||||
$(LD_SCRIPT): $(SPLAT_YAML)
|
||||
$(SPLAT) --modes ld
|
||||
|
||||
$(BUILD_DIR)/$(LD_SCRIPT): $(LD_SCRIPT)
|
||||
@mkdir -p $(shell dirname $@)
|
||||
$(CPP) -P -DBUILD_DIR=$(BUILD_DIR) -o $@ $<
|
||||
|
||||
$(ROM): $(BUILD_DIR)/$(TARGET).bin
|
||||
@cp $< $@
|
||||
ifeq ($(COMPARE),1)
|
||||
@ -113,70 +169,16 @@ endif
|
||||
$(BUILD_DIR)/$(TARGET).bin: $(BUILD_DIR)/$(TARGET).elf
|
||||
$(OBJCOPY) $< $@ -O binary
|
||||
|
||||
$(BUILD_DIR)/$(TARGET).elf: $(LD_SCRIPT) $(OBJECTS) $(ASSETS_FS_OBJ)
|
||||
$(BUILD_DIR)/$(TARGET).elf: $(BUILD_DIR)/$(LD_SCRIPT) $(OBJECTS)
|
||||
$(LD) $(LDFLAGS) -o $@
|
||||
|
||||
# `make print-VARNAME' to print the value of $(VARNAME)
|
||||
print-%: ; $(info $* is a $(flavor $*) variable set to [$($*)]) @true
|
||||
|
||||
|
||||
### Object Targets (see sources.mk) ###
|
||||
|
||||
ifndef OBJECTS
|
||||
$(warning OBJECTS is not defined by `sources.mk'.)
|
||||
else
|
||||
|
||||
# C
|
||||
$(filter %.c.o,$(OBJECTS)): $(BUILD_DIR)/%.c.o: %.c
|
||||
@mkdir -p $(shell dirname $@)
|
||||
|
||||
cpp $(CPPFLAGS) $< > $(BUILD_DIR)/$*.i
|
||||
@grep -cF "SCRIPT(" $(BUILD_DIR)/$*.i | tools/compile_dsl_macros.py $(BUILD_DIR)/$*.i
|
||||
$(CC) $(CFLAGS) -o - $(BUILD_DIR)/$*.i | $(OLD_AS) $(OLDASFLAGS) - -o $@
|
||||
|
||||
# Assembly
|
||||
$(filter %.s.o,$(OBJECTS)): $(BUILD_DIR)/%.s.o: %.s
|
||||
@mkdir -p $(shell dirname $@)
|
||||
$(AS) $(ASFLAGS) -o $@ $<
|
||||
|
||||
# Uncompressed data
|
||||
$(filter %.bin.o,$(OBJECTS)): $(BUILD_DIR)/%.bin.o: %.bin
|
||||
@mkdir -p $(shell dirname $@)
|
||||
$(LD) -r -b binary -o $@ $<
|
||||
|
||||
# Compressed data
|
||||
$(filter %.Yay0.o,$(OBJECTS)): $(BUILD_DIR)/%.Yay0.o: %.bin
|
||||
@mkdir -p $(shell dirname $@)
|
||||
$(YAY0COMPRESS) $< $(BUILD_DIR)/$*.Yay0
|
||||
$(LD) -r -b binary -o $@ $(BUILD_DIR)/$*.Yay0
|
||||
|
||||
endif
|
||||
|
||||
|
||||
### Asset Filesystem (see sources.mk) ###
|
||||
|
||||
# Complain if ASSETS_FS_SOURCES is undefined but ASSETS_FS is.
|
||||
ifndef ASSETS_FS_SOURCES
|
||||
ifdef ASSETS_FS
|
||||
$(warning ASSETS_FS_SOURCES is not defined by `sources.mk' but ASSETS_FS is.)
|
||||
endif
|
||||
else
|
||||
|
||||
$(BUILD_DIR)/$(ASSETS_FS)/%: $(ASSETS_FS)/%
|
||||
@mkdir -p $(shell dirname $@)
|
||||
@rm -f $@
|
||||
$(BUILD_ASSETS_FS) $*
|
||||
|
||||
$(ASSETS_FS_OBJ): $(ASSETS_FS).json $(foreach file,$(ASSETS_FS_SOURCES),$(BUILD_DIR)/$(file))
|
||||
$(BUILD_ASSETS_FS)
|
||||
$(LD) -r -b binary -o $@ $(BUILD_DIR)/$(ASSETS_FS).bin
|
||||
|
||||
endif
|
||||
|
||||
|
||||
### Make Settings ###
|
||||
|
||||
.PHONY: clean test setup submodules split $(ROM)
|
||||
.DELETE_ON_ERROR:
|
||||
.SECONDARY:
|
||||
.PRECIOUS: $(ROM) %.Yay0
|
||||
.DEFAULT_GOAL := $(ROM)
|
||||
|
||||
# Remove built-in implicit rules to improve performance
|
||||
|
@ -5,3 +5,4 @@ def apply(config, args):
|
||||
config['myimg'] = 'papermario.z64'
|
||||
config['mapfile'] = 'build/papermario.map'
|
||||
config['source_directories'] = ['.']
|
||||
config['makeflags'] = ['COMPARE=0']
|
||||
|
86
sources.mk
86
sources.mk
@ -1,35 +1,57 @@
|
||||
### ASSETS_FS and ASSETS_FS_SOURCES ###
|
||||
OBJECTS := $(subst BUILD_DIR, $(BUILD_DIR), $(shell grep -E 'BUILD_DIR.+\.o' papermario.ld -o))
|
||||
|
||||
# The asset filesystem path.
|
||||
ASSETS_FS = assets/fs
|
||||
DSL_C_FILES := $(shell grep -lrF "SCRIPT" src)
|
||||
|
||||
# Source files to build the asset filesystem with. Each of these must be configured in `assets/fs.json'.
|
||||
ASSETS_FS_SOURCES = $(wildcard $(ASSETS_FS)/*.bin)
|
||||
MAPS := \
|
||||
dro_01 dro_02 \
|
||||
hos_00 hos_01 hos_02 hos_03 hos_04 hos_05 hos_06 hos_10 hos_20 \
|
||||
isk_01 isk_02 isk_03 isk_04 isk_05 isk_06 isk_07 isk_08 isk_09 isk_10 isk_11 isk_12 isk_13 isk_14 isk_16 isk_18 isk_19 \
|
||||
iwa_00 iwa_01 iwa_02 iwa_03 iwa_04 iwa_10 iwa_11 \
|
||||
osr_00 osr_01 osr_02 osr_03 kkj_00 kkj_01 kkj_02 kkj_03 kkj_10 kkj_11 kkj_12 kkj_13 kkj_14 kkj_15 kkj_16 kkj_17 kkj_18 kkj_19 kkj_20 kkj_21 kkj_22 kkj_23 kkj_24 kkj_25 kkj_26 kkj_27 kkj_28 kkj_29 \
|
||||
kmr_00 kmr_02 kmr_03 kmr_04 kmr_05 kmr_06 kmr_07 kmr_09 kmr_10 kmr_11 kmr_12 kmr_20 kmr_30 \
|
||||
kpa_01 kpa_03 kpa_04 kpa_08 kpa_09 kpa_10 kpa_11 kpa_12 kpa_13 kpa_14 kpa_15 kpa_16 kpa_17 kpa_32 kpa_33 kpa_40 kpa_41 kpa_50 kpa_52 kpa_60 kpa_61 kpa_62 kpa_63 kpa_70 kpa_80 kpa_90 kpa_91 kpa_94 kpa_95 kpa_96 kpa_102 kpa_111 kpa_112 kpa_113 kpa_115 kpa_116 kpa_117 kpa_118 kpa_119 kpa_121 kpa_130 kpa_133 kpa_134 \
|
||||
machi mac_00 mac_01 mac_02 mac_03 mac_04 mac_05 mac_06 \
|
||||
tik_01 tik_02 tik_03 tik_04 tik_05 tik_06 tik_07 tik_08 tik_09 tik_10 tik_12 tik_14 tik_15 tik_17 tik_18 tik_19 tik_20 tik_21 tik_22 tik_23 tik_25 \
|
||||
kgr_01 kgr_02 \
|
||||
nok_01 nok_02 nok_03 nok_04 nok_11 nok_12 nok_13 nok_14 nok_15 \
|
||||
sbk_00 sbk_01 sbk_02 sbk_03 sbk_04 sbk_05 sbk_06 sbk_10 sbk_11 sbk_12 sbk_13 sbk_14 sbk_15 sbk_16 sbk_20 sbk_21 sbk_22 sbk_23 sbk_24 sbk_25 sbk_26 sbk_30 sbk_31 sbk_32 sbk_33 sbk_34 sbk_35 sbk_36 sbk_40 sbk_41 sbk_42 sbk_43 sbk_44 sbk_45 sbk_46 sbk_50 sbk_51 sbk_52 sbk_53 sbk_54 sbk_55 sbk_56 sbk_60 sbk_61 sbk_62 sbk_63 sbk_64 sbk_65 sbk_66 sbk_99 \
|
||||
trd_00 trd_01 trd_02 trd_03 trd_04 trd_05 trd_06 trd_07 trd_08 trd_09 trd_10 \
|
||||
tst_01 tst_02 tst_03 tst_04 tst_10 tst_11 tst_12 tst_13 tst_20 \
|
||||
jan_00 jan_01 jan_02 jan_03 jan_04 jan_05 jan_06 jan_07 jan_08 jan_09 jan_10 jan_11 jan_12 jan_13 jan_14 jan_15 jan_16 jan_17 jan_18 jan_19 jan_22 jan_23 \
|
||||
mim_01 mim_02 mim_03 mim_04 mim_05 mim_06 mim_07 mim_08 mim_09 mim_10 mim_11 mim_12 \
|
||||
obk_01 obk_02 obk_03 obk_04 obk_05 obk_06 obk_07 obk_08 obk_09 \
|
||||
arn_02 arn_03 arn_04 arn_05 arn_07 arn_08 arn_09 arn_10 arn_11 arn_12 arn_13 arn_20 \
|
||||
dgb_01 dgb_02 dgb_03 dgb_04 dgb_05 dgb_06 dgb_07 dgb_08 dgb_09 dgb_10 dgb_11 dgb_12 dgb_13 dgb_14 dgb_15 dgb_16 dgb_17 dgb_18 \
|
||||
kzn_01 kzn_02 kzn_03 kzn_04 kzn_05 kzn_06 kzn_07 kzn_08 kzn_09 kzn_10 kzn_11 kzn_17 kzn_18 kzn_19 kzn_20 kzn_22 kzn_23 \
|
||||
flo_00 flo_03 flo_07 flo_08 flo_09 flo_10 flo_11 flo_12 flo_13 flo_14 flo_15 flo_16 flo_17 flo_18 flo_19 flo_21 flo_22 flo_23 flo_24 flo_25 \
|
||||
sam_01 sam_02 sam_03 sam_04 sam_05 sam_06 sam_07 sam_08 sam_09 sam_10 sam_11 sam_12 \
|
||||
pra_01 pra_02 pra_03 pra_04 pra_05 pra_09 pra_10 pra_11 pra_13 pra_14 pra_15 pra_16 pra_18 pra_19 pra_20 pra_21 pra_22 pra_29 pra_31 pra_32 pra_33 pra_34 pra_35 pra_40 \
|
||||
omo_01 omo_02 omo_03 omo_04 omo_05 omo_06 omo_07 omo_08 omo_09 omo_10 omo_11 omo_12 omo_13 omo_14 omo_15 omo_16 omo_17 \
|
||||
end_00 end_01 \
|
||||
mgm_00 mgm_01 mgm_02 mgm_03 \
|
||||
gv_01 \
|
||||
kmr_bt03 kmr_bt04 kmr_bt05 kmr_bt06 \
|
||||
nok_bt01 nok_bt02 nok_bt03 nok_bt04 \
|
||||
trd_bt00 trd_bt01 trd_bt02 trd_bt03 trd_bt04 trd_bt05 \
|
||||
iwa_bt01 iwa_bt02 \
|
||||
sbk_bt02 \
|
||||
isk_bt01 isk_bt02 isk_bt03 isk_bt04 isk_bt05 isk_bt06 isk_bt07 isk_bt08 \
|
||||
arn_bt01 arn_bt02 arn_bt03 arn_bt04 arn_bt05 arn_bt06 \
|
||||
dgb_bt01 dgb_bt02 dgb_bt03 dgb_bt04 dgb_bt05 \
|
||||
mim_bt01 \
|
||||
omo_bt01 omo_bt02 omo_bt03 omo_bt04 omo_bt05 omo_bt06 omo_bt07 \
|
||||
kgr_bt01 flo_bt01 flo_bt02 flo_bt03 flo_bt04 flo_bt05 flo_bt06 \
|
||||
jan_bt00 jan_bt01 jan_bt02 jan_bt03 jan_bt04 \
|
||||
kzn_bt01 kzn_bt02 kzn_bt04 kzn_bt05 sam_bt01 sam_bt02 sam_bt03 sam_bt04 \
|
||||
tik_bt01 tik_bt02 tik_bt03 tik_bt04 tik_bt05 \
|
||||
pra_bt01 pra_bt02 pra_bt03 pra_bt04 mac_bt01 mac_bt02 \
|
||||
kpa_bt01 kpa_bt02 kpa_bt03 kpa_bt04 kpa_bt05 kpa_bt07 kpa_bt08 kpa_bt09 kpa_bt11 kpa_bt13 kpa_bt14 \
|
||||
hos_bt01 hos_bt02 \
|
||||
kkj_bt01 kkj_bt02
|
||||
|
||||
|
||||
### OBJECTS ###
|
||||
|
||||
C_FILES = $(shell find src -type f -name "*.c" -not -name "*.inc.c")
|
||||
S_FILES = $(wildcard asm/*.s asm/os/*.s)
|
||||
|
||||
BIN_FILES = $(foreach dir, $(shell mkdir -p bin && find bin -type d -not -name Yay0), $(wildcard $(dir)/*.bin))
|
||||
COMPRESSED_BIN_FILES = $(wildcard bin/Yay0/*.bin)
|
||||
|
||||
# The OBJECTS variable holds the filenames of all object files to be linked.
|
||||
# Each of these objects should appear in `papermario.ld' (generated by n64splat).
|
||||
#
|
||||
# The extension of each object file specifies its source type (and, therefore, how it should be built):
|
||||
#
|
||||
# Object ext | Source ext | Description
|
||||
# ------------+------------+-------------
|
||||
# .o | | Special; must have build steps declared here
|
||||
# .c.o | .c | C sourcecode
|
||||
# .s.o | .s | Assembly (built with modern assembler)
|
||||
# .bin.o | .bin | Uncompressed data
|
||||
# .Yay0.o | .bin | Compressed data
|
||||
#
|
||||
# Note that ASSETS_FS is linked implicitly and does not need to be listed here.
|
||||
|
||||
OBJECTS = \
|
||||
$(foreach file, $(C_FILES) $(S_FILES) $(BIN_FILES), $(BUILD_DIR)/$(file).o) \
|
||||
$(foreach file, $(COMPRESSED_BIN_FILES), $(BUILD_DIR)/$(file:.bin=.Yay0.o))
|
||||
ASSETS := \
|
||||
$(foreach map, $(MAPS), $(map)_shape $(map)_hit) \
|
||||
mac_tex tik_tex kgr_tex kmr_tex iwa_tex sbk_tex dro_tex isk_tex trd_tex nok_tex hos_tex kpa_tex osr_tex kkj_tex tst_tex jan_tex mim_tex obk_tex arn_tex dgb_tex kzn_tex flo_tex sam_tex pra_tex omo_tex end_tex mgm_tex gv__tex \
|
||||
kmr_bg nok_bg sbk_bg sbk3_bg iwa_bg hos_bg arn_bg obk_bg omo_bg yos_bg jan_bg fla_bg flb_bg sra_bg yki_bg sam_bg kpa_bg title_bg \
|
||||
title_data \
|
||||
party_kurio party_kameki party_pinki party_pareta party_resa party_akari party_opuku party_pokopi
|
||||
|
@ -1,43 +1,40 @@
|
||||
#! /usr/bin/python3
|
||||
|
||||
import os
|
||||
import json
|
||||
import sys
|
||||
from subprocess import call
|
||||
from sys import argv
|
||||
from pathlib import Path
|
||||
import shutil
|
||||
|
||||
tools_dir = Path(__file__).parent.absolute()
|
||||
|
||||
def next_multiple(pos, multiple):
|
||||
return pos + pos % multiple
|
||||
|
||||
def build_mapfs(src_dir, build_dir, out_bin):
|
||||
with open(src_dir + ".json", "r") as f:
|
||||
config = json.loads(f.read())
|
||||
|
||||
def build_mapfs(out_bin, assets):
|
||||
# every TOC entry's name field has data after the null terminator made up from all the previous name fields.
|
||||
# we probably don't have to do this for the game to read the data properly (it doesn't read past the null terminator
|
||||
# of `string`), but the original devs' equivalent to build_assets_fs.py had this bug so we need to replicate it to match.
|
||||
written_names = []
|
||||
|
||||
with open(out_bin, "wb") as f:
|
||||
f.write(config["title"].encode("ascii"))
|
||||
f.write("Map Ver.00/11/07 15:36".encode("ascii"))
|
||||
|
||||
next_data_pos = (len(config["assets"]) + 1) * 0x1C
|
||||
next_data_pos = (len(assets) + 1) * 0x1C
|
||||
|
||||
asset_idx = 0
|
||||
for asset in config["assets"]:
|
||||
for decompressed in assets:
|
||||
toc_entry_pos = 0x20 + asset_idx * 0x1C
|
||||
|
||||
src_path = Path(src_dir, asset["path"])
|
||||
build_path = Path(build_dir, asset["path"])
|
||||
decompressed = Path(decompressed)
|
||||
compressed = decompressed.with_suffix(".Yay0")
|
||||
|
||||
# non-texture assets should be compressed
|
||||
if not decompressed.stem.endswith("_tex") and not compressed.exists():
|
||||
print(f"uncompressed asset: {decompressed} (expected {compressed} to exist)")
|
||||
exit(1)
|
||||
|
||||
# data for TOC entry
|
||||
name = asset["name"] + "\0"
|
||||
name = decompressed.stem + "\0"
|
||||
offset = next_data_pos
|
||||
size = next_multiple(build_path.stat().st_size, 2)
|
||||
decompressed_size = src_path.stat().st_size
|
||||
decompressed_size = decompressed.stat().st_size
|
||||
size = next_multiple(compressed.stat().st_size, 2) if compressed.exists() else decompressed_size
|
||||
|
||||
#print(f"{name} {offset:08X} {size:08X} {decompressed_size:08X}")
|
||||
|
||||
@ -55,7 +52,7 @@ def build_mapfs(src_dir, build_dir, out_bin):
|
||||
|
||||
# write data.
|
||||
f.seek(0x20 + next_data_pos)
|
||||
f.write(build_path.read_bytes())
|
||||
f.write(compressed.read_bytes() if compressed.exists() else decompressed.read_bytes())
|
||||
next_data_pos += size
|
||||
|
||||
asset_idx += 1
|
||||
@ -71,36 +68,8 @@ def build_mapfs(src_dir, build_dir, out_bin):
|
||||
f.seek(toc_entry_pos + 0x18)
|
||||
f.write((0x903F0000).to_bytes(4, byteorder="big")) # TODO: figure out purpose
|
||||
|
||||
def build_file(src_dir, out_dir, filename):
|
||||
with open(src_dir + ".json", "r") as f:
|
||||
config = json.loads(f.read())
|
||||
|
||||
asset = None
|
||||
for a in config["assets"]:
|
||||
if (a["path"] == filename):
|
||||
asset = a
|
||||
|
||||
if not asset:
|
||||
print("asset not configured in {}.json".format(src_dir))
|
||||
exit(1)
|
||||
|
||||
src_path = Path(src_dir, filename)
|
||||
out_path = Path(out_dir, filename)
|
||||
|
||||
if asset["compress"]:
|
||||
call([f"{tools_dir}/Yay0compress", src_path, out_path])
|
||||
else:
|
||||
shutil.copy(src_path, out_path)
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.argv.pop(0)
|
||||
src = sys.argv.pop(0)
|
||||
dest = sys.argv.pop(0)
|
||||
argv.pop(0) # python3
|
||||
out = argv.pop(0)
|
||||
|
||||
if len(sys.argv) > 0:
|
||||
# copy (and compress if required) the given file(s)
|
||||
while len(sys.argv) > 0:
|
||||
build_file(src, dest, sys.argv.pop())
|
||||
else:
|
||||
# build the aggregate file
|
||||
build_mapfs(src, dest, dest + ".bin")
|
||||
build_mapfs(out, argv)
|
@ -8,11 +8,11 @@ import traceback
|
||||
def eprint(*args, **kwargs):
|
||||
print(*args, file=stderr, **kwargs)
|
||||
|
||||
write_buf = ""
|
||||
#write_buf = ""
|
||||
def write(s):
|
||||
global write_buf
|
||||
write_buf += s
|
||||
#print(s, end="")
|
||||
#global write_buf
|
||||
#write_buf += s
|
||||
print(s, end="")
|
||||
|
||||
ANSI_RED = "\033[1;31;40m"
|
||||
ANSI_RESET = "\u001b[0m"
|
||||
@ -436,7 +436,7 @@ def read_until_closing_paren(depth=1, lex_strings=False):
|
||||
string_escape = False
|
||||
|
||||
while True:
|
||||
char = f.read(1)
|
||||
char = stdin.read(1)
|
||||
|
||||
if len(char) == 0:
|
||||
# EOF
|
||||
@ -463,7 +463,7 @@ def read_line():
|
||||
line = ""
|
||||
|
||||
while True:
|
||||
char = f.read(1)
|
||||
char = stdin.read(1)
|
||||
|
||||
if len(char) == 0:
|
||||
# EOF
|
||||
@ -501,16 +501,10 @@ if __name__ == "__main__":
|
||||
file_info = []
|
||||
error = False
|
||||
|
||||
num_scripts = int(stdin.read())
|
||||
if num_scripts == 0:
|
||||
exit(0)
|
||||
print(f"compiling {num_scripts} scripts")
|
||||
|
||||
with open(argv[1], 'r') as f:
|
||||
macro_name = "" # captures recent UPPER_CASE identifier
|
||||
prev_char = ""
|
||||
while True:
|
||||
char = f.read(1)
|
||||
char = stdin.read(1)
|
||||
|
||||
if len(char) == 0:
|
||||
# EOF
|
||||
@ -610,6 +604,4 @@ if __name__ == "__main__":
|
||||
if error:
|
||||
exit(1)
|
||||
else:
|
||||
with open(argv[1], "w") as f:
|
||||
f.write(write_buf)
|
||||
exit(0)
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 895abeff31cc0bd5de3a05a55715d3457f8425eb
|
||||
Subproject commit 2e2ba8632c604aadb8055905340962c0182f844e
|
268
tools/splat.yaml
268
tools/splat.yaml
@ -4,7 +4,8 @@ options:
|
||||
find-file-boundaries: True
|
||||
compiler: "GCC"
|
||||
mnemonic_ljust: 10
|
||||
ld_o_replace_extension: no
|
||||
ld_o_replace_extension: False
|
||||
ld_addrs_header: include/ld_addrs.h
|
||||
segments:
|
||||
- name: header
|
||||
type: header
|
||||
@ -19,8 +20,7 @@ segments:
|
||||
files:
|
||||
- [0x0040, "asm", "boot"]
|
||||
- [0x0B70, "bin", "bootcode_font"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x1000
|
||||
vram: 0x80025C00
|
||||
files:
|
||||
@ -198,8 +198,7 @@ segments:
|
||||
- [0x4ac90, "c", "os/code_4ac90_len_3910"]
|
||||
- [0x4E5A0, "bin"]
|
||||
- [0x6E8F0, "bin", "world/area_table"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x759B0
|
||||
vram: 0x800DC500
|
||||
files:
|
||||
@ -213,8 +212,7 @@ segments:
|
||||
- [0x8a860, "c", "code_8a860_len_3f30"]
|
||||
- [0x8e790, "c", "code_8e790_len_2850"]
|
||||
- [0x90fe0, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0xA5DD0
|
||||
vram: 0x8010F6D0
|
||||
files:
|
||||
@ -233,8 +231,7 @@ segments:
|
||||
- [0xe16b0, "bin"]
|
||||
- [0xE5820, ".data", "code_dc470_len_14c0"]
|
||||
- [0xE5830, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0xE79B0
|
||||
vram: 0x802C3000
|
||||
files:
|
||||
@ -253,16 +250,14 @@ segments:
|
||||
- [0xFE660, "bin"]
|
||||
- [0xFE730, ".rodata", "code_e79b0_len_1920"]
|
||||
- [0xFE748, "bin"] # rodata chunk for above overlay; here to avoid the 0x10 alignment
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0xFEE30
|
||||
vram: 0x802DBD40
|
||||
files:
|
||||
- [0xfee30, "c", "code_fee30_len_2d60"]
|
||||
- [0x101b90, "c", "code_101b90_len_8f0"]
|
||||
- [0x102480, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x102610
|
||||
vram: 0x802E0D90
|
||||
files:
|
||||
@ -275,8 +270,7 @@ segments:
|
||||
- [0x10A8D0, "c", "code_10A8D0"]
|
||||
- [0x10A9F0, "bin"] # todo split this further
|
||||
- [0x131340, "bin"] # 0x8023E000
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x135EE0
|
||||
vram: 0x80242BA0
|
||||
files:
|
||||
@ -286,8 +280,7 @@ segments:
|
||||
- [0x140C70, "c"]
|
||||
- [0x1421C0, "c"]
|
||||
- [0x1422A0, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x163400
|
||||
vram: 0x80242BA0
|
||||
files:
|
||||
@ -297,8 +290,7 @@ segments:
|
||||
- [0x168590, "c"]
|
||||
- [0x169BE0, "c"]
|
||||
- [0x16A3E0, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x16C8E0
|
||||
vram: 0x8023E000
|
||||
files:
|
||||
@ -321,112 +313,96 @@ segments:
|
||||
- [0x1AF230, "c"]
|
||||
- [0x1AF2D0, "bin"]
|
||||
- [0x1CC310, "bin"] # icon images and palettes, vram unknown
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x3169F0
|
||||
vram: 0x80200000
|
||||
files:
|
||||
- [0x3169f0, "c", "code_3169f0"]
|
||||
- [0x316a70, "c", "code_316a70"]
|
||||
- [0x316c00, "bin"] # 0x802AE000
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x316D90
|
||||
vram: 0x802AE000
|
||||
files:
|
||||
- [0x316d90, "c", "code_316d90"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x316f30
|
||||
vram: 0x802B2000
|
||||
files:
|
||||
- [0x316f30, "c", "code_316f30"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x317020
|
||||
vram: 0x802BD100
|
||||
files:
|
||||
- [0x317020, "c"]
|
||||
- [0x317b60, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x317e50
|
||||
vram: 0x802BD100
|
||||
files:
|
||||
- [0x317e50, "c"]
|
||||
- [0x3195d0, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x319670
|
||||
vram: 0x802BD100
|
||||
files:
|
||||
- [0x319670, "c"]
|
||||
- [0x31b000, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x31b120
|
||||
vram: 0x802BD100
|
||||
files:
|
||||
- [0x31b120, "c"]
|
||||
- [0x31cb60, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x31cc70
|
||||
vram: 0x802BD100
|
||||
files:
|
||||
- [0x31cc70, "c"]
|
||||
- [0x31ddc0, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x31de70
|
||||
vram: 0x802BD100
|
||||
files:
|
||||
- [0x31de70, "c"]
|
||||
- [0x320b20, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x320c50
|
||||
vram: 0x802BD100
|
||||
files:
|
||||
- [0x320c50, "c"]
|
||||
- [0x3239b0, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x323A50
|
||||
vram: 0x802BD100
|
||||
files:
|
||||
- [0x323A50, "c"]
|
||||
- [0x324930, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x324a10
|
||||
vram: 0x802BD100
|
||||
files:
|
||||
- [0x324a10, "c", "world_goompa"]
|
||||
- [0x324e80, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x324f10
|
||||
vram: 0x802BD100
|
||||
files:
|
||||
- [0x324f10, "c", "world_goombaria"]
|
||||
- [0x325000, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x325070
|
||||
vram: 0x802BD100
|
||||
files:
|
||||
- [0x325070, "c", "world_twink"]
|
||||
- [0x325160, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x3251d0
|
||||
vram: 0x802BD100
|
||||
files:
|
||||
- [0x3251d0, "c"]
|
||||
- [0x3255e0, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x325ad0
|
||||
vram: 0xE0200000
|
||||
files:
|
||||
@ -434,23 +410,20 @@ segments:
|
||||
- [0x325ee0, "c"]
|
||||
- [0x326160, "bin"]
|
||||
- [0x326410, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x3278f0
|
||||
vram: 0xE0002000
|
||||
files:
|
||||
- [0x3278f0, "c"]
|
||||
- [0x328050, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x328110
|
||||
vram: 0xE000C000
|
||||
files:
|
||||
- [0x328110, "c"]
|
||||
- [0x328d20, "bin"]
|
||||
- [0x328EA0, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x32C110
|
||||
vram: 0xE000E000
|
||||
files:
|
||||
@ -468,179 +441,156 @@ segments:
|
||||
- [0x330440, "bin"] # data/rodata section for above.
|
||||
- [0x330910, "bin"] # code, unknown VRAM addr. Leaving as bin for now.
|
||||
- [0x330ef0, "bin"] # data/rodata section for above.
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x331940
|
||||
vram: 0xE001E000
|
||||
files:
|
||||
- [0x331940, "c"]
|
||||
- [0x332690, "bin"]
|
||||
- [0x3326A0, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x333ec0
|
||||
vram: 0xE0020000
|
||||
files:
|
||||
- [0x333ec0, "c"]
|
||||
- [0x334b50, "bin"]
|
||||
- [0x334C70, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x337240
|
||||
vram: 0xE0022000
|
||||
files:
|
||||
- [0x337240, "c"]
|
||||
- [0x337f10, "bin"]
|
||||
- [0x337FC0, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x339250
|
||||
vram: 0xE0024000
|
||||
files:
|
||||
- [0x339250, "c"]
|
||||
- [0x339f10, "bin"]
|
||||
- [0x339F60, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x33B180
|
||||
vram: 0xE0026000
|
||||
files:
|
||||
- [0x33B180, "c"]
|
||||
- [0x33bb70, "bin"]
|
||||
- [0x33BBD0, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x33CDF0
|
||||
vram: 0xE0028000
|
||||
files:
|
||||
- [0x33CDF0, "c"]
|
||||
- [0x33d5d0, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x33E8C0
|
||||
vram: 0xE002A000
|
||||
files:
|
||||
- [0x33E8C0, "c"]
|
||||
- [0x33efe0, "bin"]
|
||||
- [0x33D610, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x33FE80
|
||||
vram: 0xE002C000
|
||||
files:
|
||||
- [0x33FE80, "c"]
|
||||
- [0x3407c0, "bin"]
|
||||
- [0x340880, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x3419E0
|
||||
vram: 0xE002E000
|
||||
files:
|
||||
- [0x3419E0, "c"]
|
||||
- [0x342120, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x342140
|
||||
vram: 0xE0030000
|
||||
files:
|
||||
- [0x342140, "c"]
|
||||
- [0x342fd0, "bin"]
|
||||
- [0x343040, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x343680
|
||||
vram: 0xE0032000
|
||||
files:
|
||||
- [0x343680, "c"]
|
||||
- [0x343f30, "bin"]
|
||||
- [0x343F70, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x344a10
|
||||
vram: 0xE0034000
|
||||
files:
|
||||
- [0x344a10, "c"]
|
||||
- [0x345190, "bin"]
|
||||
- [0x3451E0, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x3454E0
|
||||
vram: 0xE0036000
|
||||
files:
|
||||
- [0x3454E0, "c"]
|
||||
- [0x345b10, "bin"]
|
||||
- [0x345B40, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x34EC80
|
||||
vram: 0xE003A000
|
||||
files:
|
||||
- [0x34EC80, "c"]
|
||||
- [0x34f480, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x34F4C0
|
||||
vram: 0xE003C000
|
||||
files:
|
||||
- [0x34F4C0, "c"]
|
||||
- [0x350160, "bin"]
|
||||
- [0x350220, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x352440
|
||||
vram: 0xE003E000
|
||||
files:
|
||||
- [0x352440, "c"]
|
||||
- [0x352cb0, "bin"]
|
||||
- [0x352CE0, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x354F60
|
||||
vram: 0xE0044000
|
||||
files:
|
||||
- [0x354F60, "c"]
|
||||
- [0x355d10, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x355EE0
|
||||
vram: 0xE0046000
|
||||
files:
|
||||
- [0x355EE0, "c"]
|
||||
- [0x3564e0, "bin"]
|
||||
- [0x356530, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x356980
|
||||
vram: 0xE0048000
|
||||
files:
|
||||
- [0x356980, "c"]
|
||||
- [0x357380, "bin"]
|
||||
- [0x3573A0, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x3584C0
|
||||
vram: 0xE004A000
|
||||
files:
|
||||
- [0x3584C0, "c"]
|
||||
- [0x359320, "bin"]
|
||||
- [0x3593B0, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x35B9D0
|
||||
vram: 0xE004E000
|
||||
files:
|
||||
- [0x35B9D0, "c"]
|
||||
- [0x35bfb0, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x35BFD0
|
||||
vram: 0xE0050000
|
||||
files:
|
||||
- [0x35BFD0, "c"]
|
||||
- [0x35c530, "bin"]
|
||||
- [0x35C550, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x3602C0
|
||||
vram: 0xE005A000
|
||||
files:
|
||||
@ -657,78 +607,68 @@ segments:
|
||||
- [0x364bc0, "bin"] # data/rodata for the above, and some extra unknown data.
|
||||
- [0x364f10, "bin"] # code, unknown VRAM addr. Leaving as bin for now.
|
||||
- [0x365970, "bin"] # data/rodata for the above, and some extra unknown data.
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x366030
|
||||
vram: 0xE0066000
|
||||
files:
|
||||
- [0x366030, "c"]
|
||||
- [0x366c80, "bin"]
|
||||
- [0x366D60, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x36A8D0
|
||||
vram: 0xE0068000
|
||||
files:
|
||||
- [0x36A8D0, "c"]
|
||||
- [0x36ae80, "bin"]
|
||||
- [0x36AEE0, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x36D020
|
||||
vram: 0xE006A000
|
||||
files:
|
||||
- [0x36D020, "c"]
|
||||
- [0x36de10, "bin"]
|
||||
- [0x36DF90, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x36E1D0
|
||||
vram: 0xE006C000
|
||||
files:
|
||||
- [0x36E1D0, "c"]
|
||||
- [0x36ed30, "bin"]
|
||||
- [0x36ED60, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x372790
|
||||
vram: 0xE006E000
|
||||
files:
|
||||
- [0x372790, "c"]
|
||||
- [0x373390, "bin"]
|
||||
- [0x3733E0, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x3740B0
|
||||
vram: 0xE0070000
|
||||
files:
|
||||
- [0x3740B0, "c"]
|
||||
- [0x374d80, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x374E50
|
||||
vram: 0xE0072000
|
||||
files:
|
||||
- [0x374E50, "c"]
|
||||
- [0x375500, "bin"]
|
||||
- [0x375510, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x376460
|
||||
vram: 0xE0074000
|
||||
files:
|
||||
- [0x376460, "c"]
|
||||
- [0x376fc0, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x377070
|
||||
vram: 0xE0076000
|
||||
files:
|
||||
- [0x377070, "c"]
|
||||
- [0x377f00, "bin"]
|
||||
- [0x377F80, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x37A3F0
|
||||
vram: 0xE0078000
|
||||
files:
|
||||
@ -736,79 +676,69 @@ segments:
|
||||
- [0x37acf0, "bin"]
|
||||
- [0x37ADD0, "bin"]
|
||||
- [0x37D9D0, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x37F720
|
||||
vram: 0xE007E000
|
||||
files:
|
||||
- [0x37F720, "c"]
|
||||
- [0x380350, "bin"]
|
||||
- [0x3803A0, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x3812C0
|
||||
vram: 0xE0080000
|
||||
files:
|
||||
- [0x3812C0, "c"]
|
||||
- [0x381d80, "bin"]
|
||||
- [0x381E00, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x385640
|
||||
vram: 0xE0082000
|
||||
files:
|
||||
- [0x385640, "c"]
|
||||
- [0x386340, "bin"]
|
||||
- [0x3863B0, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x3889D0
|
||||
vram: 0xE0084000
|
||||
files:
|
||||
- [0x3889D0, "c"]
|
||||
- [0x3897e0, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x389850
|
||||
vram: 0xE0086000
|
||||
files:
|
||||
- [0x389850, "c"]
|
||||
- [0x38a2f0, "bin"]
|
||||
- [0x38A350, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x38ADF0
|
||||
vram: 0xE0088000
|
||||
files:
|
||||
- [0x38ADF0, "c"]
|
||||
- [0x38bab0, "bin"]
|
||||
- [0x38BBA0, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x38EE60
|
||||
vram: 0xE008E000
|
||||
files:
|
||||
- [0x38EE60, "c"]
|
||||
- [0x38f6f0, "bin"]
|
||||
- [0x38F710, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x38F900
|
||||
vram: 0xE0090000
|
||||
files:
|
||||
- [0x38F900, "c"]
|
||||
- [0x390340, "bin"]
|
||||
- [0x3903D0, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x391D30
|
||||
vram: 0xE0092000
|
||||
files:
|
||||
- [0x391D30, "c"]
|
||||
- [0x3923c0, "bin"]
|
||||
- [0x392440, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x3928D0
|
||||
vram: 0xE0094000
|
||||
files:
|
||||
@ -829,78 +759,68 @@ segments:
|
||||
- [0x3a2440, "bin"] # data/rodata for the above, and some extra unknown data.
|
||||
- [0x3a2990, "bin"] # code, unknown VRAM addr. Leaving as bin for now.
|
||||
- [0x3a3360, "bin"] # data/rodata for the above, and some extra unknown data.
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x3A37E0
|
||||
vram: 0xE00A4000
|
||||
files:
|
||||
- [0x3A37E0, "c"]
|
||||
- [0x3a42b0, "bin"]
|
||||
- [0x3A4320, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x3A70F0
|
||||
vram: 0xE00A8000
|
||||
files:
|
||||
- [0x3A70F0, "c"]
|
||||
- [0x3A7710, "bin"]
|
||||
- [0x3A77A0, "bin"] # split further
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x3AA920
|
||||
vram: 0xE00AA000
|
||||
files:
|
||||
- [0x3AA920, "c"]
|
||||
- [0x3AAFE0, "bin"]
|
||||
- [0x3AB030, "bin"] # todo split this further
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x3AEE20
|
||||
vram: 0xE00AC000
|
||||
files:
|
||||
- [0x3AEE20, "c"]
|
||||
- [0x3AF5D0, "bin"]
|
||||
- [0x3AF700, "bin"] # todo split this further
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x3B2350
|
||||
vram: 0xE00AE000
|
||||
files:
|
||||
- [0x3B2350, "c"]
|
||||
- [0x3B2D90, "bin"] # todo split this further
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x3B3EB0
|
||||
vram: 0xE00B0000
|
||||
files:
|
||||
- [0x3B3EB0, "c"]
|
||||
- [0x3B4690, "bin"]
|
||||
- [0x3B46A0, "bin"] # todo split this further
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x3B7B80
|
||||
vram: 0xE00B8000
|
||||
files:
|
||||
- [0x3B7B80, "c"]
|
||||
- [0x3B8470, "bin"]
|
||||
- [0x3B8860, "bin"] # todo split this further
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x3BA030
|
||||
vram: 0xE00BC000
|
||||
files:
|
||||
- [0x3BA030, "c"]
|
||||
- [0x3BAC60, "bin"]
|
||||
- [0x3BAEA0, "bin"] # todo split this further ADD STUFF AFTER HERE
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x415D90
|
||||
vram: 0x802A1000
|
||||
files:
|
||||
- [0x415D90, "c"]
|
||||
- [0x4200C0, "bin"] # todo split this further
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
start: 0x7E0E80
|
||||
vram: 0x80280000
|
||||
files:
|
||||
@ -909,6 +829,7 @@ segments:
|
||||
- [0x7E3700, "c"]
|
||||
- [0x7e4d00, "bin"]
|
||||
- name: world/area_mac/machi/
|
||||
ld_name: machi
|
||||
type: code
|
||||
overlay: True
|
||||
start: 0x7E73A0
|
||||
@ -4031,17 +3952,6 @@ segments:
|
||||
- [0xB13500, "bin"]
|
||||
- [0xB13A40, "bin"]
|
||||
- [0xB13D50, "bin"] # rodata
|
||||
- name: world/area_kkj/kkj_26/
|
||||
type: code
|
||||
overlay: True
|
||||
start: 0xB13120
|
||||
vram: 0x80240000
|
||||
files:
|
||||
- [0xB13120, "c"]
|
||||
- [0xB13150, "bin"]
|
||||
- [0xB13500, "bin"]
|
||||
- [0xB13A40, "bin"]
|
||||
- [0xB13D50, "bin"] # rodata
|
||||
- name: world/area_kkj/kkj_27/
|
||||
type: code
|
||||
overlay: True
|
||||
@ -6590,16 +6500,14 @@ segments:
|
||||
- [0xE1E460, "c"]
|
||||
- [0xE1EC20, "bin"]
|
||||
- [0xE20110, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
overlay: True
|
||||
start: 0xE20EB0
|
||||
vram: 0x802B7000
|
||||
files:
|
||||
- [0xe20eb0, "c", "code_e20eb0"]
|
||||
- [0xE215C0, "bin"]
|
||||
- name: code
|
||||
type: code
|
||||
- type: code
|
||||
overlay: True
|
||||
start: 0xE21870
|
||||
vram: 0x802B7000
|
||||
@ -6999,8 +6907,6 @@ segments:
|
||||
- [0x1B81E88, "Yay0"]
|
||||
- [0x1B82058, "Yay0"]
|
||||
- [0x1B82202, "bin"]
|
||||
- name: assets/fs
|
||||
type: PaperMarioMapFS
|
||||
start: 0x1E40000
|
||||
- [0x1E40000, "PaperMarioMapFS"]
|
||||
- [0x27FEE22, "bin"]
|
||||
- [0x2800000]
|
||||
|
Loading…
Reference in New Issue
Block a user