mirror of
https://github.com/Xeeynamo/sotn-decomp.git
synced 2024-11-23 13:09:44 +00:00
358b7a10df
I did not do it for `weapon`. This is the script I used: `python3 a.py asm/us/st/dre/data/23264.sbss.s > src/st/dre/bss.c` ```python import sys with open(sys.argv[1], "r") as f: lines = f.readlines() print('#include "common.h"') print("") for line in lines: if line == "\n": continue elif line.startswith(".include"): continue elif line.startswith(".section"): continue elif line.startswith("glabel"): label = line[7:].replace("\n", "") len = 0 elif ".word" in line: if len > 0 and n != 4: print(f"WARN: {label}", file=sys.stderr) n = 4 len += 1 elif ".short" in line: if len > 0 and n != 2: print(f"WARN: {label}", file=sys.stderr) n = 2 len += 1 elif ".byte" in line: if len > 0 and n != 1: print(f"WARN: {label}", file=sys.stderr) n = 1 len += 1 elif line.startswith(".size"): if len == 1: if n == 1: print(f"u8 {label};") elif n == 2: print(f"u16 {label};") elif n == 4: print(f"u32 {label};") else: if n == 1: print(f"u8 {label}[{len}];") elif n == 2: print(f"u16 {label}[{len}];") elif n == 4: print(f"u32 {label}[{len}];") ``` the script is a bit dumb. It does not account of the header. Some types are wrong compared to their prototype. The memory layout matches though, so we can keep iterating on top of this.
104 lines
3.2 KiB
YAML
104 lines
3.2 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/symbols.us.txt
|
|
- config/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"
|
|
- ".bss"
|
|
- ".sbss"
|
|
segments:
|
|
- name: stst0
|
|
type: code
|
|
start: 0x00000000
|
|
vram: 0x80180000
|
|
align: 4
|
|
subalign: 4
|
|
subsegments:
|
|
- [0x0, .data, header]
|
|
- [0x124, .data, header] # layers
|
|
- [0x1A4, data]
|
|
- [0x314, .data, e_laydef] # layout entries header
|
|
- [0x4BC, data]
|
|
- [0x580, data]
|
|
- [0x770, data]
|
|
- [0x828, .data, draculacutscene] # "Richter, Dracula"
|
|
- [0x830, data]
|
|
- [0x990, data]
|
|
- [0xAB0, data]
|
|
- [0x1618, .data, collision]
|
|
- [0x1978, .data, e_red_door]
|
|
- [0x1990, data]
|
|
- [0x2060, .data, rooms]
|
|
- [0x2084, data]
|
|
- [0x26B8, .data, e_layout] # layout entries data
|
|
- [0x29D8, data]
|
|
#- [0x3D1C, cmp]
|
|
- [0x487C, data]
|
|
#- [0x17F80, cmp]
|
|
- [0x187BC, data]
|
|
#- [0x1A40C, cmp]
|
|
- [0x1A750, data]
|
|
- [0x1B2D0, .data, tile_data] # tile data
|
|
- [0x1E6D0, .data, tile_data] # tile definitions
|
|
- [0x226E0, .data, sprites]
|
|
- [0x27984, .rodata, 27D64]
|
|
- [0x279E8, .rodata, draculacutscene] # EntityDraculaCutscene
|
|
- [0x27A74, .rodata, 2A218] # EntityCutscene
|
|
- [0x27AB4, .rodata, 2A8DC] # EntitySecretButton
|
|
- [0x27ACC, .rodata, 2A8DC] # EntitySecretStairs
|
|
- [0x27AE0, .rodata, 2B0C8] # EntityStageTitleFadeout
|
|
- [0x27B00, .rodata, 2B0C8] # EntityStageTitleCard
|
|
- [0x27B18, .rodata, 2B0C8] # func_801ABBBC
|
|
- [0x27B40, .rodata, 2C564] # EntityDracula
|
|
- [0x27B7C, .rodata, 2DAC8] # "charal %x\n"
|
|
- [0x27B8C, .rodata, 2DAC8] # EntityDraculaFinalForm
|
|
- [0x27BDC, .rodata, 2DAC8] # "can't get effect works!\n"
|
|
- [0x27BFC, .rodata, 2DAC8] # func_801AF774
|
|
- [0x27C1C, .rodata, 30030] # PrologueScroll
|
|
- [0x27C6C, .rodata, e_red_door] # EntityRedDoor
|
|
- [0x27C84, rodata]
|
|
- [0x27C8C, .rodata, 36358]
|
|
- [0x27CAC, .rodata, 36358] # EntityEquipItemDrop
|
|
- [0x27CC4, rodata]
|
|
- [0x27D3C, .rodata, prim_helpers]
|
|
- [0x27D44, rodata]
|
|
- [0x27D64, c]
|
|
- [0x28984, c, draculacutscene]
|
|
- [0x2A218, c]
|
|
- [0x2A8DC, c]
|
|
- [0x2B0C8, c]
|
|
- [0x2C564, c] # EntityDracula
|
|
- [0x2DAC8, c]
|
|
- [0x30030, c]
|
|
- [0x3186C, c, random]
|
|
- [0x3189C, c, update]
|
|
- [0x31B98, c, update_stage_entities]
|
|
- [0x31CA0, c, collision]
|
|
- [0x330E0, c, create_entity]
|
|
- [0x33C58, c, e_red_door]
|
|
- [0x34908, c]
|
|
- [0x36358, c]
|
|
- [0x3D0C0, c, prim_helpers]
|
|
- [0x3D8F0, c]
|
|
- [0x3EB00, .bss, bss]
|
|
- [0x425C4]
|