Skip to content

vAmigaTS comparator: correct horizontal anchor, un-mask the dumps#104

Merged
LinuxJedi merged 1 commit into
mainfrom
test/vamigats-comparator-recalibration
Jul 4, 2026
Merged

vAmigaTS comparator: correct horizontal anchor, un-mask the dumps#104
LinuxJedi merged 1 commit into
mainfrom
test/vamigats-comparator-recalibration

Conversation

@LinuxJedi

Copy link
Copy Markdown
Owner

What

Two calibration fixes for the vAmigaTS sweep pipeline (PR #100):

  1. tools/vamigats-compare.py: X_SHIFT 16 -> 0. vAmiga's regression cutout starts at colour clock 0x31 (RegressionTester::X1 = 4 * 0x31), which is the same beam position as Copperline's framebuffer origin - aligned frames need no horizontal shift. The old value of 16 came from calibration cases that turned out to be blank screens (shift-invariant) or striped patterns (which alias modulo their period). Verified with mid-line copper COLOR00 write steps: they land on identical raw x in both emulators' dumps.

  2. tests/vamiga_ts.rs: dump the full unmasked field. The harness saved screenshots through the default TV-bezel presentation, which blanks the first 16 framebuffer columns and the deep vertical overscan rows. That mask is what made X_SHIFT=16 look right - it dodged the blanked columns instead of aligning frames. The harness now runs with [display] overscan="full" and COPPERLINE_HCENTER=0, so the dump carries neither the TV mask nor the content-recentring shift.

A --xshift N override was added to the comparator for isolating placement classes.

Impact

  • A copper-bar case (CIA/TOD/tod/latch2) now compares pixel-perfect (0.000%).
  • Bucket averages drop across the sweep, since every case previously paid the mask/shift tax: Copper/Wait 14.9 -> 1.0, Blitter/sblit 10.9 -> 1.1, Copper/oldJump 25.9 -> 9.2, sprite buckets 4-18 -> 1.6-6.2, Misc/Init 3.7 -> 0.2.
  • What remains large is real: the new top of the table is Mainboard/POT (~99%), CPU/IPL/MOVES (~99%), Blitter/cputim (~86-98%), Memory/memspeed (96%), Agnus/DIW/DIWV/diwvmras (96%), plus the OLDDIW/DDF placement classes.
  • One real placement divergence surfaced cleanly: DDFSTRT $30 lores pictures sit exactly 2 px right of vAmiga's (score those buckets with --xshift 2 to isolate; tracked separately).

Full sweep regeneration with the fixed harness is running; the updated triage will inform the next round of fixes.

The sweep comparator was calibrated with X_SHIFT=16, derived from cases
that turned out to be blank screens (shift-invariant) or periodic test
patterns (which alias modulo their stripe period). The real reason 16
scored well on the remaining cases was that Copperline's dumps were
saved through the default TV-bezel presentation, which blanks the first
16 framebuffer columns (and the deep vertical overscan rows): the shift
dodged the mask instead of aligning the frames.

vAmiga's regression cutout starts at colour clock 0x31 (RegressionTester
X1 = 4 * 0x31), the same beam position as Copperline's framebuffer
origin, so aligned frames need no x shift at all. Verified against
mid-line copper COLOR00 write steps, which land on identical raw x in
both dumps, and against aperiodic bitmap/text content.

- tools/vamigats-compare.py: X_SHIFT 16 -> 0 (with a --xshift override
  for isolating placement classes; DDFSTRT $30 lores pictures currently
  sit 2 px right of vAmiga's, a real divergence tracked separately).
- tests/vamiga_ts.rs: run the emulator with [display] overscan="full"
  and COPPERLINE_HCENTER=0 so the raw dump carries neither the TV mask
  nor the content recentring shift.

With both fixes a copper-bar case (CIA/TOD/tod/latch2) compares
pixel-perfect (0.000%), and bucket averages drop across the sweep
(Copper/Wait 14.9 -> 1.0, Blitter/sblit 10.9 -> 1.1, Copper/oldJump
25.9 -> 9.2, sprite buckets 4-18 -> 1-6); the remaining large scores
are real divergences.
@LinuxJedi LinuxJedi merged commit b9830f1 into main Jul 4, 2026
5 checks passed
@LinuxJedi LinuxJedi deleted the test/vamigats-comparator-recalibration branch July 4, 2026 05:36
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