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.
281 lines
11 KiB
YAML
281 lines
11 KiB
YAML
options:
|
|
platform: psx
|
|
basename: dra
|
|
base_path: ..
|
|
build_path: build/us
|
|
target_path: disks/us/DRA.BIN
|
|
asm_path: asm/us/dra
|
|
asset_path: assets/dra
|
|
src_path: src/dra
|
|
ld_script_path: build/us/dra.ld
|
|
compiler: GCC
|
|
symbol_addrs_path:
|
|
- config/symbols.us.txt
|
|
- config/symbols.us.dra.txt
|
|
undefined_funcs_auto_path: config/undefined_funcs_auto.us.dra.txt
|
|
undefined_syms_auto_path: config/undefined_syms_auto.us.dra.txt
|
|
find_file_boundaries: yes
|
|
use_legacy_include_asm: no
|
|
asm_jtbl_label_macro: jlabel
|
|
extensions_path: tools/splat_ext
|
|
section_order:
|
|
- ".data"
|
|
- ".rodata"
|
|
- ".text"
|
|
- ".bss"
|
|
- ".sbss"
|
|
segments:
|
|
- name: dra
|
|
type: code
|
|
start: 0x00000000
|
|
vram: 0x800A0000
|
|
align: 4
|
|
subalign: 4
|
|
subsegments:
|
|
- [0x0, .data, dra_header]
|
|
- [0x144, .data, 42398]
|
|
- [0x160, .data, play]
|
|
- [0x240, .data, loading]
|
|
- [0x248, .data, 47BB8]
|
|
- [0x510, .data, save_mgr_pre]
|
|
- [0x518, palette, memcard_0]
|
|
- [0x538, palette, memcard_1]
|
|
- [0x558, palette, memcard_2]
|
|
- [0x578, palette, memcard_3]
|
|
- [0x598, palette, memcard_4]
|
|
- [0x5B8, palette, memcard_5]
|
|
- [0x5D8, palette, memcard_6]
|
|
- [0x5F8, palette, memcard_7]
|
|
- [0x618, palette, memcard_8]
|
|
- [0x638, palette, memcard_9]
|
|
- [0x658, palette, memcard_10]
|
|
- [0x678, palette, memcard_11]
|
|
- [0x698, palette, memcard_12]
|
|
- [0x6B8, palette, memcard_13]
|
|
- [0x6D8, palette, memcard_14]
|
|
- [0x6F8, palette, memcard_15]
|
|
- [0x718, ci4, memcard_0, 16, 48]
|
|
- [0x898, ci4, memcard_1, 16, 48]
|
|
- [0xA18, ci4, memcard_2, 16, 48]
|
|
- [0xB98, ci4, memcard_3, 16, 48]
|
|
- [0xD18, ci4, memcard_4, 16, 48]
|
|
- [0xE98, ci4, memcard_5, 16, 48]
|
|
- [0x1018, ci4, memcard_6, 16, 48]
|
|
- [0x1198, ci4, memcard_7, 16, 48]
|
|
- [0x1318, ci4, memcard_8, 16, 48]
|
|
- [0x1498, ci4, memcard_9, 16, 48]
|
|
- [0x1618, ci4, memcard_10, 16, 48]
|
|
- [0x1798, ci4, memcard_11, 16, 48]
|
|
- [0x1918, ci4, memcard_12, 16, 48]
|
|
- [0x1A98, ci4, memcard_13, 16, 48]
|
|
- [0x1C18, ci4, memcard_14, 16, 48]
|
|
- [0x1D98, ci4, memcard_15, 16, 48]
|
|
- [0x1F18, .data, save_mgr]
|
|
- [0x21B8, .data, 4A538] # D_800A21B8
|
|
- [0x2438, .data, 4A538] # D_800A2438
|
|
- [0x243C, .data, demo] # D_800A243C
|
|
- [0x245C, .data, 5087C] # D_800A245C
|
|
- [0x297C, .data, 5087C] # D_800A297C
|
|
- [0x2BC0, .data, 5087C] # D_800A2BC0
|
|
- [0x2C0C, .data, 5087C] # D_800A2C0C, D_800A2D44
|
|
- [0x2D48, .data, menu]
|
|
- [0x2EC0, .data, 5D5BC] # g_LevelHPIncrease
|
|
- [0x2EE8, .data, 5D5BC] # hud sprites def
|
|
- [0x2FBC, .data, 5D5BC] # g_CapePaletteDefs
|
|
- [0x300C, .data, 5D5BC] # g_CheatCodes
|
|
- [0x3014, .data, 5D5BC] # D_800A3014
|
|
- [0x3134, .data, 627C4] # D_800A3194
|
|
- [0x31B0, .data, 63ED4] # D_800A3210
|
|
- [0x3330, .data, 63ED4] # D_800A33A0-D_800A35D0
|
|
- [0x37D8, .data, 63ED4] # Palette, GFX desc until D_800A3BB8
|
|
- [0x3C40, .data, lba_stage]
|
|
- [0x4A00, .data, config_us] # subweapons
|
|
- [0x4B04, .data, config_us] # equipments
|
|
- [0x7718, .data, config_us] # accessories
|
|
- [0x8258, .data, config_us] # menu
|
|
- [0x8410, .data, config_us] # spells
|
|
- [0x8720, .data, config_us] # relics
|
|
- [0x8900, .data, config_us] # enemies
|
|
- [0xC910, .data, d_C910]
|
|
- [0xC958, .data, cd]
|
|
- [0xCD80, .data, d_CD80]
|
|
- [0xCDF8, .data, 692E8]
|
|
- [0xCF18, .data, 6D59C]
|
|
- [0xCF74, .data, d_CF74]
|
|
- [0xD0C4, .data, 7A4D0]
|
|
- [0xD1D4, assets, factory_blueprint, g_FactoryBlueprints]
|
|
- [0xD4B8, .data, 7E4BC]
|
|
- [0xDBD4, .data, d_DBD4]
|
|
- [0xE294, .data, d_E294]
|
|
- [0x10798, .data, d_10798]
|
|
- [0x10924, .data, 8D3E8] # D_800B0924 to D_800B09F8
|
|
- [0x10A3C, .data, 8D3E8] # D_800B0A3C to D_800B0AEC
|
|
- [0x10B34, .data, 8D3E8] # D_800B0CB4 and D_800B0F94
|
|
- [0x1107C, raw, vh_0] # aPbav
|
|
- [0x1407C, raw, vh_1] # aPbav_0
|
|
- [0x1607C, raw, vh_2] # aPbav_2
|
|
- [0x1807C, raw, vh_3] # aPbav_1
|
|
- [0x1A07C, data] # aPqes_1
|
|
- [0x1D07C, .data, 91EBC] # g_CdVolumeTable
|
|
- [0x1D19C, .data, 91EBC] # g_VolumeTable
|
|
- [0x1D1C0, .data, 91EBC] # g_DebugEnabled
|
|
- [0x1D1C4, .data, 91EBC] # D_800BD1C4
|
|
- [0x1D1C8, .data, 91EBC] # g_VabAddrs
|
|
- [0x1D1E0, .data, 91EBC] # g_SeqInfo
|
|
- [0x1D224, assets, music_xa, g_XaMusicConfigs]
|
|
- [0x1F554, assets, sfx, g_SfxData]
|
|
- [0x2097C, .data, 953A0]
|
|
- [0x2217C, cmp, D_800C217C]
|
|
- [0x227B0, cmp, D_800C27B0]
|
|
- [0x23560, cmp, D_800C3560]
|
|
- [0x24864, cmp, D_800C4864]
|
|
- [0x24A90, cmp, D_800C4A90]
|
|
- [0x24CEC, .data, d_24CEC]
|
|
- [0x25324, raw, g_GfxEquipIcon]
|
|
- [0x2F324, .data, d_2F324]
|
|
- [0x388D4, raw, g_PalEquipIcon]
|
|
- [0x3B0D4, .data, d_3B0D4]
|
|
- [0x3B3B4, .rodata, 42398] # func_800E2398
|
|
# - [0x3B3B8, .rodata, 42398] # func_800E249C
|
|
# - [0x3B3F0, .rodata, 42398] # func_800E2824
|
|
# - [0x3B430, .rodata, 42398] # func_800E2B00
|
|
# - [0x3B44C, .rodata, 42398] # func_800E2F3C
|
|
# - [0x3B524, .rodata, 42398] # func_800E31C0
|
|
- [0x3B530, .rodata, play] # func_800E4A14
|
|
# - [0x3B560, .rodata, play] # HandleGameOver
|
|
- [0x3B720, .rodata, loading] # func_800E6358
|
|
# - [0x3B7E8, .rodata, loading] # func_800E6FD4
|
|
# - [0x3B808, .rodata, loading] # func_800E7458
|
|
# - [0x3B828, .rodata, loading] # func_800E7AEC
|
|
- [0x3B9B8, .rodata, 47BB8] # func_800E7BB8
|
|
# - [0x3BD88, .rodata, 47BB8] # func_800E7E08
|
|
# - [0x3BDE0, .rodata, 47BB8] # func_800E81FC
|
|
- [0x3BEE0, .rodata, save_mgr] # func_800E930C
|
|
# - [0x3BEEC, .rodata, save_mgr] # func_800E9640
|
|
# - [0x3BEF8, .rodata, save_mgr] # func_800E9880
|
|
# - [0x3C160, .rodata, save_mgr] # func_800E9C14
|
|
# - [0x3C194, .rodata, save_mgr] # func_800EA48C
|
|
- [0x3C1A8, .rodata, 4A538] # func_800EA7CC
|
|
# - [0x3C1E8, .rodata, 4A538] # func_800EB098
|
|
# - [0x3C228, .rodata, 4A538] # func_800EB314
|
|
# - [0x3C238, .rodata, 4A538] # RenderPrimitives
|
|
- [0x3C290, .rodata, collider] # CheckCollision
|
|
- [0x3C490, .rodata, demo] # func_800F0334
|
|
# - [0x3C4C0, .rodata, demo] # func_800F04A4
|
|
# - [0x3C4C8, .rodata, demo] # func_800F0608
|
|
- [0x3C514, .rodata, 5087C] # func_800F0940
|
|
# - [0x3C534, .rodata, 5087C] # func_800F2860
|
|
# - [0x3C55C, .rodata, 5087C] # func_800F298C
|
|
- [0x3C5D4, .rodata, menu] # func_800F7F64
|
|
# - [0x3C6AC, .rodata, menu] # MenuDraw
|
|
# - [0x3C6EC, .rodata, menu] # func_800F9F40
|
|
# - [0x3C71C, .rodata, menu] # MenuHandleCursorInput
|
|
# - [0x3C734, .rodata, menu] # MenuHandle
|
|
- [0x3CBAC, .rodata, 5D5BC] # func_800FD6C4
|
|
# - [0x3CBC4, .rodata, 5D5BC] # func_800FD7C0
|
|
# - [0x3CBDC, .rodata, 5D5BC] # GetStatusAilmentTimer
|
|
- [0x3CC0C, .rodata, 627C4] # func_801027C4
|
|
# - [0x3CC2C, .rodata, 627C4] # func_801028AC
|
|
# - [0x3CC54, .rodata, 627C4] # func_80102D70
|
|
# - [0x3CC70, .rodata, 627C4] # HandleSaveMenu
|
|
- [0x3CDC0, .rodata, 63ED4] # func_80103ED4
|
|
- [0x3CDDC, .rodata, lba_stage]
|
|
- [0x3D188, .rodata, config_us]
|
|
- [0x40D38, .rodata, cd] # func_801080DC
|
|
# - [0x40D54, .rodata, cd] # func_80108448
|
|
- [0x40E28, .rodata, 692E8] # EntityAlucard
|
|
- [0x4108C, .rodata, 6D59C] # func_8010EDB8
|
|
- [0x41308, .rodata, 704D0] # func_80110968
|
|
# - [0x41320, .rodata, 704D0] # func_80110BC8
|
|
# - [0x41334, .rodata, 704D0] # func_80110DF8
|
|
# - [0x41360, .rodata, 704D0] # func_80111018
|
|
# - [0x41380, .rodata, 704D0] # func_801112AC
|
|
# - [0x413A0, .rodata, 704D0] # func_8011151C
|
|
- [0x413C0, .rodata, 71830] # func_80111830
|
|
# - [0x41400, .rodata, 71830] # func_801119C4
|
|
- [0x41410, .rodata, 71830] # func_801120B4
|
|
- [0x41588, .rodata, 72BB0] # PlayerStepJump
|
|
# - [0x41750, .rodata, 72BB0] # func_801131C4
|
|
# - [0x418E0, .rodata, 72BB0] # func_80113AAC
|
|
# - [0x418F4, .rodata, 72BB0] # AlucardHandleDamage
|
|
# - [0x419D0, .rodata, 72BB0] # func_80115DA0
|
|
- [0x419E8, .rodata, 75F54] # PlayerStepHellfire
|
|
# - [0x41A00, .rodata, 75F54] # func_80116994
|
|
# - [0x41A20, .rodata, 75F54] # func_80116B0C
|
|
# - [0x41A38, .rodata, 75F54] # func_80117DEC
|
|
- [0x41A44, .rodata, 78D0C] # EntityNumberMovesToHpMeter
|
|
# - [0x41A74, .rodata, 78D0C] # EntityGuardText
|
|
- [0x41AA4, .rodata, 7A4D0] # func_8011A4D0
|
|
# - [0x41AB4, .rodata, 7A4D0] # EntityEntFactory
|
|
# - [0x41AF4, .rodata, 7A4D0] # EntityPlayerBlinkWhite
|
|
# - [0x41B94, .rodata, 7A4D0] # EntityMpReplenished
|
|
- [0x41CB4, .rodata, 7E4BC] # func_8011E4BC
|
|
# - [0x41D84, .rodata, 7E4BC] # EntityPlayerPinkEffect
|
|
# - [0x41DA4, .rodata, 7E4BC] # EntityPlayerDissolves
|
|
# - [0x41DBC, .rodata, 7E4BC] # EntityMist
|
|
- [0x41DD4, .rodata, 843B0] # EntityTeleport
|
|
# - [0x41E34, .rodata, 843B0] # EntitySubwpnCrashCross
|
|
# - [0x41E48, .rodata, 843B0] # EntityHellfireHandler
|
|
# - [0x41E7C, .rodata, 843B0] # func_80128C2C
|
|
- [0x41E90, .rodata, 8A0A4] # EntityStopWatch
|
|
- [0x41EB0, .rodata, 8D3E8] # func_8012D3E8
|
|
# - [0x41EC8, .rodata, 8D3E8] # func_8012EF2C
|
|
# - [0x41EF0, .rodata, 8D3E8] # func_8012F894
|
|
- [0x41F30, .rodata, 8D3E8] # func_80130264
|
|
# - [0x41F70, .rodata, 90264] # func_80130618
|
|
# - [0x41FB0, .rodata, 90264] # func_801309B4
|
|
# - [0x41FD8, .rodata, 90264] # func_80130E94
|
|
# - [0x42000, .rodata, 90264] # func_8013136C
|
|
# - [0x42024, .rodata, 90264] # func_801315F8
|
|
- [0x42034, .rodata, 92F60] # CdSoundCommand4
|
|
- [0x4205C, .rodata, 93290] # CdSoundCommand6
|
|
# - [0x42074, .rodata, 93290] # CdSoundCommand12
|
|
- [0x4208C, .rodata, 93BDC] # CdSoundCommand14
|
|
- [0x420B4, .rodata, 94F50] # func_80134F50
|
|
- [0x42354, .rodata, 953A0] # func_801353A0
|
|
- [0x42398, c, 42398]
|
|
- [0x4493C, c, play]
|
|
- [0x45D30, c, loading]
|
|
- [0x47BB8, c, 47BB8]
|
|
- [0x48D24, c, pads]
|
|
- [0x48EE4, c, save_mgr]
|
|
- [0x4A538, c, 4A538]
|
|
- [0x4F45C, c, collider]
|
|
- [0x4FBF8, c, demo]
|
|
- [0x5087C, c, 5087C]
|
|
- [0x5483C, c, menu]
|
|
- [0x5D5BC, c, 5D5BC]
|
|
- [0x627C4, c, 627C4]
|
|
- [0x63ED4, c, 63ED4]
|
|
- [0x673C0, c, cd]
|
|
- [0x692E8, c, 692E8]
|
|
- [0x6D59C, c, 6D59C]
|
|
- [0x704D0, c, 704D0]
|
|
- [0x71830, c, 71830]
|
|
- [0x72BB0, c, 72BB0]
|
|
- [0x75F54, c, 75F54]
|
|
- [0x78D0C, c, 78D0C]
|
|
- [0x7A4D0, c, 7A4D0]
|
|
- [0x7E4BC, c, 7E4BC]
|
|
- [0x843B0, c, 843B0]
|
|
- [0x8A0A4, c, 8A0A4]
|
|
- [0x8D3E8, c, 8D3E8]
|
|
- [0x91EBC, c, 91EBC]
|
|
- [0x92F60, c, 92F60]
|
|
- [0x93290, c, 93290]
|
|
- [0x93BDC, c, 93BDC]
|
|
- [0x94F50, c, 94F50]
|
|
- [0x953A0, c, 953A0]
|
|
- [0x962AC, .bss, bss]
|
|
- name: dra_data
|
|
type: data
|
|
start: 0x9B6A0
|
|
vram: 0x8013B6A0
|
|
subsegments:
|
|
- [0x9B6A0, raw, vb_0] # D_8013B6A0
|
|
- [0xDD350, raw, vb_1] # D_8017D350
|
|
- [0xEB4E0, raw, vb_2] # D_8018B4E0 (len 108048)
|
|
- [0x105AF0]
|
|
- [0x109C80, raw, vb_3] # D_801A9C80 (len 64496)
|
|
- [0x119870]
|