Xeeynamo / sotn-decomp

Decompilation of Castlevania: Symphony of the Night (PSX+Saturn)
https://sotn.xee.dev/
GNU Affero General Public License v3.0
480 stars 55 forks source link

Allow make-config to cross-reference symbols from `data` and `bss` #1650

Closed Xeeynamo closed 5 days ago

Xeeynamo commented 5 days ago

Improve make-config.py to internally use the symbols.py cross and cross-reference symbols from duplicate functions. This allows to add even more symbols for new overlays with a third pass.

This was one of my biggest pain points when I was de-duplicating the boss MAR overlay as I was not able to directly copy&paste duplicate functions or include shared ones without having to individually fix the symbols coming from .data and .bss. This is now automated.

$ python3 ./tools/make-config.py ric --version hd
✔ generating psx splat config
✔ splitting config/splat.hd.ric.yaml
✔ adjusting files at src/ric
✔ disassembling matched functions
✔ finding duplicates across overlays
✔ adding cross-referenced function names
✔ renamed 141 functions, splitting again
✔ cross-referencing 141 functions
✔ adding cross-referenced symbol names
✔ renamed 145 data/bss symbols, splitting again