sotn-decomp/config/splat.us.stnz0.yaml
Luciano Ciccariello fa21ce1442
Enhance make extract on PSX (#662)
Previously if either the YAML or the symbol list were changed, we were
forced to either manually delete the `asm` folder of the specific
overlay or to invoke `make clean`, where the latter forced us to
re-extract all the overlays via `make -j extract`.

That changes with this PR. How `make` works is `target: dep1 dep2` where
if one of the dependencies has the last modified date greater than the
target, the rule is triggered again. Previously we were extracting
overlays doing `make extract_stcen`. But since every overlay extraction
generates a linker script I now changed the rules to do `make
build/us/stcen.ld` to extract the same overlay. As I explained above, if
either the YAML or one of the related symbols changes, the linker
modified date will be older and the extraction for that overlay to be
trigger again.

The above allowed me to stop polluting the repo root with the linker
scripts as they are now moved into `build/us` or `build/hd` depending of
what you're trying to build. If you do `make extract` twice in a row you
will be welcomed with a `make: Nothing to be done for 'extract'.`.

There are still some instances where you **might** need `make clean`
beforehand, especially when modifying the `segment` section in the YAML
or renaming the symbols. A `rm -rf asm/$(VERSION)/$*` can help but I
want to see if the current solution will be enough.

### Please try removing `make clean` from your workflow, once this is
merged, to quickly detect possible problems with this new approach.

I am also planning to make more substantial changes on our build-chain
like this PR or #660 in the future. I am aiming to small incremental
changes over time in case I break someone's flow or detect design flaws.
I am also considering the breaking changes introduced in make 4.4, which
will most likely be included in Ubuntu 24.04 LTS. I set March 2024 as a
deadline to finish all the new build-chain work.

---------

Co-authored-by: sozud <122322823+sozud@users.noreply.github.com>
2023-10-05 09:26:29 +01:00

124 lines
4.2 KiB
YAML

options:
platform: psx
basename: stnz0
base_path: ..
build_path: build/us
target_path: disks/us/ST/NZ0/NZ0.BIN
asm_path: asm/us/st/nz0
asset_path: assets/st/nz0
src_path: src/st/nz0
ld_script_path: build/us/stnz0.ld
compiler: GCC
symbol_addrs_path: config/generated.symbols.us.stnz0.txt
undefined_funcs_auto_path: config/undefined_funcs_auto.us.stnz0.txt
undefined_syms_auto_path: config/undefined_syms_auto.us.stnz0.txt
find_file_boundaries: yes
use_legacy_include_asm: no
migrate_rodata_to_functions: no
asm_jtbl_label_macro: jlabel
extensions_path: tools/splat_ext
section_order:
- ".data"
- ".rodata"
- ".text"
- ".bss"
segments:
- name: stnz0
type: code
start: 0x00000000
vram: 0x80180000
subalign: 4
subsegments:
- [0x0, data]
- [0x164, layers, rooms]
- [0x47C, data]
- [0x18C0, data]
- [0x1DD0, data]
- [0x1E68, .data, entity_relic_orb]
- [0x1ECC, data]
- [0x20A0, data]
- [0x20B0, data]
- [0x2220, data]
- [0x2600, data]
- [0x2710, data]
- [0x272C, roomdef, g_Rooms]
- [0x2830, data]
- [0x2840, data]
- [0x2850, data]
- [0x16A5C, tilelayout, D_80196A5C]
- [0x16C5C, tilelayout, D_80196C5C]
- [0x16E5C, tilelayout, D_80196E5C]
- [0x1725C, tilelayout, D_8019725C]
- [0x17A5C, tilelayout, D_80197A5C]
- [0x17C5C, tilelayout, D_80197C5C]
- [0x17E5C, tilelayout, D_80197E5C]
- [0x1805C, tilelayout, D_8019805C]
- [0x1845C, tilelayout, D_8019845C]
- [0x1865C, tilelayout, D_8019865C]
- [0x1885C, tilelayout, D_8019885C]
- [0x18A5C, tilelayout, D_80198A5C]
- [0x1905C, tilelayout, D_8019905C]
- [0x1925C, tilelayout, D_8019925C]
- [0x19C5C, tilelayout, D_80199C5C]
- [0x1A05C, tilelayout, D_8019A05C]
- [0x1A45C, tilelayout, D_8019A45C]
- [0x1AA5C, tilelayout, D_8019AA5C]
- [0x1AE5C, tilelayout, D_8019AE5C]
- [0x1BE5C, tilelayout, D_8019BE5C]
- [0x1C65C, tilelayout, D_8019C65C]
- [0x1C85C, tilelayout, D_8019C85C]
- [0x1D45C, tilelayout, D_8019D45C]
- [0x1D65C, tilelayout, D_8019D65C]
- [0x1E25C, tilelayout, D_8019E25C]
- [0x1EE5C, tilelayout, D_8019EE5C]
- [0x1F25C, tilelayout, D_8019F25C]
- [0x2005C, tilelayout, D_801A005C]
- [0x2025C, tilelayout, D_801A025C]
- [0x2045C, tilelayout, D_801A045C]
- [0x2065C, tilelayout, D_801A065C]
- [0x2085C, tilelayout, D_801A085C]
- [0x20A5C, data]
- [0x305A4, .rodata, 30958] # func_801B3C38
- [0x305B8, rodata]
- [0x305E8, .rodata, 33FCC] # EntityBossRoomBlock
- [0x305FC, .rodata, 33FCC] # EntitySlogra
- [0x30618, rodata] # EntityGaibon .rodata, 33FCC
- [0x3063C, .rodata, 36DE4] # func_801B7034
- [0x3064C, rodata]
- [0x30790, .rodata, 3E30C]
- [0x307B0, .rodata, 3E30C]
- [0x307C8, .rodata, entity_relic_orb]
- [0x30800, .rodata, entity_message_box]
- [0x30814, .rodata, 43708] # EntityBoneScimitar
- [0x30834, .rodata, 43F9C] # EntityAxeKnight
- [0x30858, .rodata, 44EAC] # EntityBloodyZombie
- [0x30880, .rodata, 45F2C] # EntitySkeleton
- [0x3089C, .rodata, 4672C] # EntitySpittleBone
- [0x308C8, .rodata, 47048] # EntitySubWeaponContainer
- [0x308D4, .rodata, 47958] # EntityBloodSkeleton
- [0x308E8, rodata]
- [0x30958, c]
- [0x33FCC, c] # Slogra & Gaibon Boss
- [0x36DE4, c]
- [0x394D4, c, random]
- [0x39504, c, update]
- [0x39800, c, update_stage_entities]
- [0x39908, c]
- [0x3E30C, c]
- [0x3F5B8, c, entity_relic_orb]
- [0x40088, c, entity_heart_drop]
- [0x401B0, c, entity_message_box]
- [0x4070C, c]
- [0x43708, c] # EntityBoneScimitar
- [0x43F9C, c] # EntityAxeKnight
- [0x44EAC, c] # EntityBloodyZombie
- [0x45F2C, c] # EntitySkeleton
- [0x4672C, c] # EntitySpittleBone
- [0x47048, c] # EntitySubWeaponContainer
- [0x47958, c] # EntityBloodSkeleton
- [0x47CF0, c] # EntityMagicallySealedDoor
- [0x48ADC, c] # EntityStageNamePopup
- [0x49930, c]
- [0x4AA10, sbss]
- [0x4B780]