Format reference: PSIN binary-XML (PSO v122) #24

Open
opened 2026-11-27 18:40:38 +00:00 by github-bot · 0 comments
Owner

@⁠nineforge0 on GitHub · 2026-11-27 18:36 UTC · original

First public documentation of the PSIN container internals

docs/psin_format.md now documents the complete PSIN binary-XML format as decoded by forge9:

  • IFF-chunk chain: PSIN → LSCH → LENM → LSNS → LGID → LRSC → CHKS
  • LSCH struct schema: 32-byte headers with 0xAA sentinel, 16-byte member records
  • LENM enum definitions: 24-byte headers with 0xEE sentinel, 16-byte values
  • Block layout: contiguous header table → align16 → sequential data blocks
  • DOM tree: 5 atArray refs (attributes, strings, vec3s, u64 hashes, nodes)
  • Pool reference encoding: bits 0..11 = 1-based block index, bits 20..63 = byte offset
  • DomNode (16 bytes) and DomAttr (16 bytes) field layouts
  • 6 attribute types, 19+ member type codes

Statistics (script.rpf/1)

  • 1,012 PSIN entries decoded
  • 20,379 DOM nodes
  • 34,238 lines of XML output
  • 6,710 unique struct definitions, 1,132 unique enums

Open research

16 unknowns catalogued, including LSNS encryption, LGID/LRSC contents, and ~6,500 unresolved struct name hashes. See the doc for the full list.

forge9 psin script.rpf 1/10 --xml renders any entry as XML.

**@⁠nineforge0** on GitHub · 2026-11-27 18:36 UTC · [original](https://github.com/nineforge0/forge9/issues/24) ## First public documentation of the PSIN container internals [`docs/psin_format.md`](docs/psin_format.md) now documents the complete PSIN binary-XML format as decoded by forge9: - **IFF-chunk chain**: PSIN → LSCH → LENM → LSNS → LGID → LRSC → CHKS - **LSCH struct schema**: 32-byte headers with `0xAA` sentinel, 16-byte member records - **LENM enum definitions**: 24-byte headers with `0xEE` sentinel, 16-byte values - **Block layout**: contiguous header table → align16 → sequential data blocks - **DOM tree**: 5 atArray refs (attributes, strings, vec3s, u64 hashes, nodes) - **Pool reference encoding**: bits 0..11 = 1-based block index, bits 20..63 = byte offset - **DomNode** (16 bytes) and **DomAttr** (16 bytes) field layouts - **6 attribute types**, **19+ member type codes** ### Statistics (script.rpf/1) - 1,012 PSIN entries decoded - 20,379 DOM nodes - 34,238 lines of XML output - 6,710 unique struct definitions, 1,132 unique enums ### Open research 16 unknowns catalogued, including LSNS encryption, LGID/LRSC contents, and ~6,500 unresolved struct name hashes. See the doc for the full list. `forge9 psin script.rpf 1/10 --xml` renders any entry as XML.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 18:40:38 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.