Skip to content

Blank display before the SID player's run_prg kick#79

Merged
kfox merged 1 commit into
mainfrom
fix/waveform-run-prg-reset-flash
Jul 8, 2026
Merged

Blank display before the SID player's run_prg kick#79
kfox merged 1 commit into
mainfrom
fix/waveform-run-prg-reset-flash

Conversation

@kfox

@kfox kfox commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • Launching a waveform scene over a previous hires/mhires (bitmap) scene briefly flashed the outgoing scene's leftover bitmap RAM, with a black border / stuck-blue background in between — run_prg's soft-reset has the same reset-latency window reset() already guards with blank_display(), but the SID player's _launch_sid_player kick skipped that guard.
  • Ultimate64API._launch_sid_player now blanks the display (DEN off) immediately before DMA'ing the SID payload/player/stub, mirroring reset()'s existing guard for the identical class of glitch. TeensyROM is untouched — its vector-swap kick doesn't reset the machine and blanking there would stall its cycle-clean DMA gate (documented elsewhere).
  • This is a single fix point in _SidPlayerBackend's shared orchestration, so it covers every run_sid_player caller on the Ultimate (WaveformScene, MidiScene's SID paths, and generative scenes with audio_source = "sid"), not just the reported waveform-to-waveform case.
  • Documented the guard in docs/caveats.md's "SID playback uses a C64-side player PRG" section.

Test plan

  • make lint / make typecheck / full unit suite all pass; updated tests/test_api.py's RunSidPlayerTest fixture to track the new pre-flight $D011 write separately from the SID-upload DMA sequence it was already asserting on.
  • Functional smoke test against real hardware: a two-scene waveform→waveform playlist ran the run_prg transition cleanly with no errors.

run_prg soft-resets the C64, which has the same reset-latency window
reset() already guards with blank_display() — without it, launching the
SID player over a previous hires/mhires scene briefly flashes that
scene's leftover bitmap RAM before the kernal reinitializes VIC and
WaveformScene re-engages its own bitmap mode. Mirrors the guard reset()
already uses for the identical class of glitch.
@codecov

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.64%. Comparing base (e50876d) to head (6b9ddd2).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #79   +/-   ##
=======================================
  Coverage   79.64%   79.64%           
=======================================
  Files          77       77           
  Lines       15701    15702    +1     
  Branches     2379     2379           
=======================================
+ Hits        12505    12506    +1     
  Misses       2657     2657           
  Partials      539      539           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@kfox kfox merged commit ab9e622 into main Jul 8, 2026
8 checks passed
@kfox kfox deleted the fix/waveform-run-prg-reset-flash branch July 8, 2026 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant