CSB V1 - GAP: Graphics/UI Implementation Gaps

File: docs/csb/csb_gap_graphics.md Audit: Firestaff CSB V1 Audit Runner Date: 2026-05-25 Reference: docs/source-lock/csb_graphics.md


Executive Summary

CSB graphics/UI changes vs DM1 are MINIMAL:

No new graphic assets, no new sprite sheets, no new animation types.


GAP 1: VBL Handler Fix (BUG0_03)

What source-lock says:

Implementation status (2026-08-30): Partial. The source-defined scheduling discipline is implemented by csb_v1_atari_st_vblank_deliver: every arrival starts palette setup, a re-entrant arrival increments a pending counter, and the outer handler drains the counter while its modelled interrupt priority is 3. The implementation is locked by csb_v1_atari_st_vblank, including a nested two-arrival regression. The native Atari ST ANIMATE.SCR title path is now a live consumer: each 50 Hz tick passes through the model, invalidates the retained source frame, and re-decodes the original P4B1 palette for that VBlank. The complete original STX CLI/title/input/menu regression covers this path. After the verified ANIM.C → FTLCODE handoff, every Atari gameplay tick also delivers the same model and its palette-start callback installs the source-selected C232 GRAPHICS.DAT light palette before host presentation. The generic PC 3.4 F0693_WaitVerticalBlank_PC34 gate remains a synchronous wait only and is not used as Atari ST parity evidence. Remaining work is original gameplay-frame capture comparison across palette changes; an earlier audit incorrectly cited F0613_VBL_Process, which is a champion-text helper.

Source evidence used for implementation: ReDMCSB WIP BASE.C:E0017_MAIN_Exception28Handler_VerticalBlank_CPSDF and CHANGE7_01_FIX identify G0351_i_ConcurrentVerticalBlankExceptionCount, the level-4-to-level-3 priority change, and the drain loop. This source was read from the published WIP archive; no game bytes are embedded or extracted.

Remaining evidence gap: The native scheduler and palette-start callback are covered. Do not promote that to original-frame pixel parity until a capture across a real palette transition exists. The capture must identify the original STX member and its palette timing; a synthetic frame or a generic synchronous VBlank wait is not acceptable evidence.

Source: BASE.C (CHANGE7_01_FIX) · csb_graphics.md Part I


GAP 2: Engine Version Display (CHANGE7_36, CHANGE8_13)

What source-lock says:

Implementation status (2026-08-31): Source modelled. csb_v1_engine_version_display_pc34_compat owns the version-state transition, while the CSB boot/title route sets v2.1 only after an admitted CSB profile and resets to the DM1 baseline after cleanup. The focused csb_v1_graphics_extras_pc34_compat and csb_v1_boot_title_import_ui_gate_pc34_compat tests cover both strings and the no-stale-version boundary. This is state/render-plan evidence; an original dialog frame capture is still needed before pixel parity is claimed.

Source: DIALOG.C (CHANGE7_36,8_13) · csb_graphics.md Part I


GAP 3: Wall Drawing Optimization (CHANGE7_15)

What source-lock says:

Implementation gap: This is an optimization, not a functional gap. No implementation required unless performance issues are observed. Document as non-blocking.

Source: DUNVIEW.C (CHANGE7_15_OPTIMIZATION)


GAP 4: BUG7_01 - CSB Creature Palette Quirks

What source-lock says:

Implementation status (2026-08-31): BUG7_01 is a CSB source behavior, not a Modern-mode correction target. csb_v1_f0093_apply_replacement_palette_pc34 now takes the live current-map allowed-creature order and applies F0093’s final owners to the M11 D2/D3 creature palette before the source sprite is blitted. It first performs the source reset (slot 9 via replacement set 8; slot 10 via set 12), then applies the map-ordered final writers. This prevents a prior sprite’s local remap from leaking into an unowned CSB map palette. Slot 9/10 assignments, including a valid replacement value of zero, therefore follow ReDMCSB rather than a per-creature approximation. The adapter selects the Atari ST target table for ST 2.0/2.1/F20 variants and ReDMCSB’s separate G2025/F0695 version-3 table for Amiga and FM Towns variants. The two non-PC source families decode to the same host indices here, but both differ from PC D3 targets for some replacement sets, so PC values are not applied to either platform family. csb_v1_f0093_replacement_palette_pc34_compat pins the ordered ownership, reset and Atari-specific result. The real Atari ST STX startup and M12→M11 handoff tests verify that the rebuilt native CSB path remains bootable; they do not substitute for a creature-on-Worm-map frame capture.

Remaining evidence is visual, not a known unbound code path: capture the three real Worm-map outcomes before claiming renderer/pixel parity. Original mode must retain source colors; any Modern correction needs separate user consent and must never replace Original.

Source: ReDMCSB DUNVIEW.C · BugsAndChanges.htm#BUG7_01


GAP 5: Mouse Pointer Handling Fix (BUG0_00 part)

What source-lock says:

Implementation gap: No functional gap - code cleanup fix. Audit for residual useless code from DM1. Not a blocking issue.

Source: DUNVIEW.C, CHEST.C, LOADSAVE.C, MOVESENS.C, STARTUP1.C (CHANGE7_14)


GAP 6: Code-to-Assembly Conversion (CHANGE7_16)

What source-lock says:

Implementation gap: Not a functional gap. Firestaff uses portable C++ - assembly conversion is platform-specific. Document as non-gap.

Source: CHAMDRAW.C, CHAMPION.C, DUNGEON.C, REVIVE.C, TIMELINE.C (CHANGE7_16)


What Does NOT Need Implementation


Summary Table

Gap Severity Description
VBL handler fix (BUG0_03) PARTIAL / source-modelled No ignored VBL interrupts; precise palette switching
Engine version display (CHANGE7_36) SOURCE MODELLED v2.0/v2.1 state is bound to the CSB boot/title path; original dialog capture pending
Wall drawing optimization NONE Performance only; no functional gap
BUG7_01 (CSB creature palette) RUNTIME BOUND / capture pending Map-ordered F0093 D2/D3 binding is live; original Worm-map overlay evidence remains required
Mouse pointer fix NONE Code cleanup; not blocking
Code-to-assembly conversion NONE Platform-specific; not applicable

Reference Sources

Source Content
docs/source-lock/csb_graphics.md Existing source-lock audit (primary)
BASE.C (CHANGE7_01_FIX) VBL handler fix
DIALOG.C (CHANGE7_36,8_13) Engine version display
DUNVIEW.C (CHANGE7_15) Wall drawing optimization
csb_graphics.md Part II BUG0_04 persistence
BugsAndChanges.htm CHANGE7_01,14,15,16,36,8_13

The authoritative online reproduction and resolution are at http://dmweb.free.fr/Stuff/ReDMCSB/Documentation/BugsAndChanges.htm#BUG0_03. It specifies that BUG0_03 affects the Atari ST DM releases, is fixed in Atari ST CSB 2.0/2.1, and requires that no VBlank interrupt be ignored.