sotn-decomp/config/splat.us.stst0.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

72 lines
2.0 KiB
YAML

options:
platform: psx
basename: stst0
base_path: ..
build_path: build/us
target_path: disks/us/ST/ST0/ST0.BIN
asm_path: asm/us/st/st0
asset_path: assets/st/st0
src_path: src/st/st0
ld_script_path: build/us/stst0.ld
compiler: GCC
symbol_addrs_path: config/generated.symbols.us.stst0.txt
undefined_funcs_auto_path: config/undefined_funcs_auto.us.stst0.txt
undefined_syms_auto_path: config/undefined_syms_auto.us.stst0.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"
- ".sbss"
segments:
- name: stst0
type: code
start: 0x00000000
vram: 0x80180000
subalign: 4
subsegments:
- [0x0, data]
- [0x580, data]
- [0x770, data]
- [0x990, data]
- [0xAB0, data]
- [0x2060, roomdef, g_Rooms]
- [0x2084, data]
#- [0x3D1C, cmp]
- [0x487C, data]
#- [0x17F80, cmp]
- [0x187BC, data]
#- [0x1A40C, cmp]
- [0x1A750, data]
- [0x27984, .rodata, 27D64]
- [0x279E8, rodata]
- [0x27A74, .rodata, 28BF8] # EntityCutscene
- [0x27AB4, .rodata, 2A8DC] # EntitySecretButton
- [0x27ACC, .rodata, 2A8DC] # EntitySecretStairs
- [0x27AE0, .rodata, 2B0C8] # EntityStageTitleFadeout
- [0x27B00, .rodata, 2B0C8] # EntityStageTitleCard
- [0x27B18, rodata]
- [0x27B40, .rodata, 2C564] # EntityDracula
- [0x27B7C, rodata]
- [0x27BFC, rodata]
- [0x27C8C, .rodata, 36358]
- [0x27CAC, rodata]
- [0x27CC4, rodata]
- [0x27D64, c]
- [0x28BF8, c] # Dracula Cutscene
- [0x2A8DC, c]
- [0x2B0C8, c]
- [0x2C564, c] # EntityDracula
- [0x30030, c]
- [0x3186C, c, random]
- [0x3189C, c, update]
- [0x31B98, c, update_stage_entities]
- [0x31CA0, c]
- [0x36358, c]
- [0x3EB00, sbss]
- [0x425C4]