feat(magicmap): render Amiga, FM-Towns and Sega CD maps #415

Merged
jqueuniet merged 1 commit from feat/410-console-chip-palette into main 2026-10-29 22:58:10 +01:00
Owner

Second and last part of #410.

Finding: on archives without a master palette, magic-map chips are drawn with the UI palette (0x01, 0x00, 0x09, 0x00).

  • A Sega CD US magic-map screenshot matches it. The tree chip's raw (0,136,0), (0,204,0) and (102,34,0) show as (0,146,0), (0,206,0) and (119,49,0) through the emulator's colour curve; the greys match the same way.
  • Our previous resolution picked graphics-set or heuristic sub-palettes, which gave darker trees with red dots.
  • Amiga, FM-Towns and Sega CD JP store a byte-identical UI palette and the same ~203 map chips, so the same rule applies without screenshots from those ports.

Changes:

  • dm2-graphics: new resolution rule. Map chips (cls4 = 0xf9) take the UI palette ahead of the console sub-palette rules. This also fixes dm2 extract's map-chip colours on those ports.
  • dm2-magicmap: every retail port now renders, so the palette guard and MagicMapError::NoMasterPalette (unreleased) are removed. A DOS dungeon with a Sega CD graphics.dat is still refused, for byte order.
  • Tests:
    • the UI palette resolves for map chips on all four ports, with the screenshot-matched colours;
    • map 0 renders on all eight non-DOS-family ports;
    • the CLI writes map and level images for Sega CD.
  • Docs: CLI help, READMEs, format doc and CHANGELOG.

Workspace suite (without music): 1210 passed, 0 failed.

Closes #410

https://claude.ai/code/session_01WCNjYNkYSAapvFewz9wfkw

Second and last part of #410. **Finding:** on archives without a master palette, magic-map chips are drawn with the UI palette `(0x01, 0x00, 0x09, 0x00)`. - A Sega CD US magic-map screenshot matches it. The tree chip's raw (0,136,0), (0,204,0) and (102,34,0) show as (0,146,0), (0,206,0) and (119,49,0) through the emulator's colour curve; the greys match the same way. - Our previous resolution picked graphics-set or heuristic sub-palettes, which gave darker trees with red dots. - Amiga, FM-Towns and Sega CD JP store a byte-identical UI palette and the same ~203 map chips, so the same rule applies without screenshots from those ports. **Changes:** - `dm2-graphics`: new resolution rule. Map chips (`cls4 = 0xf9`) take the UI palette ahead of the console sub-palette rules. This also fixes `dm2 extract`'s map-chip colours on those ports. - `dm2-magicmap`: every retail port now renders, so the palette guard and `MagicMapError::NoMasterPalette` (unreleased) are removed. A DOS dungeon with a Sega CD `graphics.dat` is still refused, for byte order. - Tests: - the UI palette resolves for map chips on all four ports, with the screenshot-matched colours; - map 0 renders on all eight non-DOS-family ports; - the CLI writes map and level images for Sega CD. - Docs: CLI help, READMEs, format doc and CHANGELOG. Workspace suite (without music): 1210 passed, 0 failed. Closes #410 https://claude.ai/code/session_01WCNjYNkYSAapvFewz9wfkw
feat(magicmap): render Amiga, FM-Towns and Sega CD maps
All checks were successful
CI / python bindings (3.11) (pull_request) Successful in 25s
CI / audit (push) Successful in 19s
CI / msrv (1.90) (pull_request) Successful in 28s
CI / audit (pull_request) Successful in 19s
CI / stable (pull_request) Successful in 55s
CI / msrv (1.90) (push) Successful in 27s
CI / stable (push) Successful in 55s
CI / python bindings (3.11) (push) Successful in 25s
91383ef611
Without a master palette, map chips take the UI palette
(0x01, 0x00, 0x09, 0x00): its colours match a Sega CD US magic-map
screenshot, and Amiga and FM-Towns store the same palette and chips.
Every retail port now renders, so the palette guard and
`NoMasterPalette` go.

Closes #410

Claude-Session: https://claude.ai/code/session_01WCNjYNkYSAapvFewz9wfkw
jqueuniet deleted branch feat/410-console-chip-palette 2026-10-29 22:58:10 +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!415
No description provided.