dm2-music: name INST volume (inferred) + document SONG/INST field analysis #160
No reviewers
Labels
No labels
area/ci-release
area/cli
area/docs
area/dungeon
area/ftl
area/graphics
area/gui
area/music
area/saves
area/tooling
port/amiga
port/dos
port/fm-towns
port/mac
port/pc98
port/sega-cd
priority/high
priority/low
priority/medium
type/bug
type/chore
type/docs
type/feature
type/research
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jqueuniet/dm2-tools!160
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refs/pull/160/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up to the SONG/INST decoders: interprets the
field_NNplaceholderbytes as far as the fixture honestly allows, and tidies three deferred nits.
No byte-layout or behavior change — names and prose only.
What lands
docs/formats/mac-resources.md).A new "Empirical field analysis" subsection records, per field, the observed
value distribution and a confidence-tagged hypothesis, plus two structural
findings: loop data lives in the
'snd 'sample header (not the'INST'),and
'SONG'field_09 == 2 × field_0bacross all 28 records.Inst.field_05→Inst.volume(probableper-instrument level — always a multiple of
0x20,0xC0default). Appliedin sync across the struct,
formats/dm2_inst.ksy, and both doc tables, andguarded by a new
volume % 0x20 == 0assertion over all 136 records. Thename is marked inferred everywhere it appears.
field_NN. The remaining fields are toolow-confidence to name into a public API; they're documented as hypotheses
instead.
useinsms.rs, comment theSONG arm in
extract.rs, and add the<rfork>positional to a ROADMAPcommand.
Why so conservative
Profiling one port's data yields at most a moderate-confidence read for a
single field. Committing speculative names to a public struct is worse than
leaving them neutral, so this documents the analysis and renames only what's
defensible — deferring the rest until an external SoundMusicSys reference or an
engine disassembly raises confidence.
Test plan
cargo test --workspace --locked— green (round-trip stays byte-exact; newvolume % 0x20assertion holds for all 136 INST records).cargo fmt --all -- --check,cargo clippy --workspace --all-targets --locked -- -D warnings,cargo doc … -D warnings— all clean.ksccompilesdm2_inst.ksy/dm2_song.ksy; all 136 INST parse with.volumepresent.