feat(bindings): decode graphics.dat sounds, music, text, fonts and palettes #435

Merged
jqueuniet merged 1 commit from feat/430-graphics-decoders into main 2026-10-30 18:22:53 +01:00
Owner

Closes #430.

By full class tuple, in wasm, FFI and Python:

  • graphicsSoundWav: WAV, framed SFX or console raw PCM.
  • graphicsMusicMidi: DOS HMP to Standard MIDI File.
  • graphicsFontPng(…, spacing): glyph sheet.
  • graphicsTextJson(…, language): {language, text, glyph_text}. The language picks among cls5 variants; untranslated records match any.
  • graphicsPaletteJson: [index, r, g, b] entries, or Palette16 master indices.

Decoders live in dm2_convert::graphics over a parsed Archive. dm2 extract writes sounds, music and fonts through them; output byte-identical on DOS EN, Mac US, Sega CD US.

Differences from dm2 extract: palettes are JSON instead of .gpl / .indices (same values, tested); text spells runes as names instead of raw font glyphs. The CLI's own outputs are unchanged.

https://claude.ai/code/session_01SnENBXnZbhNNrojZT5jbJ7

Closes #430. By full class tuple, in wasm, FFI and Python: - `graphicsSoundWav`: WAV, framed SFX or console raw PCM. - `graphicsMusicMidi`: DOS HMP to Standard MIDI File. - `graphicsFontPng(…, spacing)`: glyph sheet. - `graphicsTextJson(…, language)`: `{language, text, glyph_text}`. The language picks among `cls5` variants; untranslated records match any. - `graphicsPaletteJson`: `[index, r, g, b]` entries, or Palette16 master indices. Decoders live in `dm2_convert::graphics` over a parsed `Archive`. `dm2 extract` writes sounds, music and fonts through them; output byte-identical on DOS EN, Mac US, Sega CD US. Differences from `dm2 extract`: palettes are JSON instead of `.gpl` / `.indices` (same values, tested); text spells runes as names instead of raw font glyphs. The CLI's own outputs are unchanged. https://claude.ai/code/session_01SnENBXnZbhNNrojZT5jbJ7
feat(bindings): decode graphics.dat sounds, music, text, fonts and palettes
All checks were successful
CI / msrv (1.90) (pull_request) Successful in 28s
CI / audit (pull_request) Successful in 19s
CI / stable (pull_request) Successful in 55s
CI / python bindings (3.11) (pull_request) Successful in 25s
CI / msrv (1.90) (push) Successful in 27s
CI / audit (push) Successful in 19s
CI / stable (push) Successful in 55s
CI / python bindings (3.11) (push) Successful in 25s
bd954fa40c
One record by class tuple: WAV, Standard MIDI File, text JSON in a
language, font sheet PNG, palette JSON. dm2 extract writes its sounds,
music and fonts through the same dm2-convert code; output unchanged.

Closes #430

Claude-Session: https://claude.ai/code/session_01SnENBXnZbhNNrojZT5jbJ7
jqueuniet deleted branch feat/430-graphics-decoders 2026-10-30 18:22:53 +01:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jqueuniet/dm2-tools!435
No description provided.