agnus/denise: overprogrammed BPU fetch and arming rules (DDF sequencer follow-ups)#110
Merged
Conversation
… write Align the sequencer's CON strobe with vAmiga's Agnus-side BPLCON0 commit (DMA_CYCLES(4)); the previous three-cck figure was the legacy coarse fetcher delay. Denise's own interpretation of BPLCON0 is unchanged. Score-neutral on the vAmigaTS BPLCON0/DDFTIM buckets; kept for source fidelity with the hardware-verified sequencer model.
…layfield Two halves of one hardware rule, verified on the invplanes1 A500 photo (hi-res BPU=7 with armed BPL5DAT/BPL6DAT latches shows BLACK): - Agnus's fetch-unit table schedules at most 4 plane streams in hi-res and 2 in SHRES; an overprogrammed BPU (hi-res 5-7, SHRES 3-7) fetches NOTHING, unlike the lo-res BPU=7 overprogrammed 4-plane fetch. Both plane-count decoders (agnus::bitplane_dma_planes and the Denise BitplaneMode dma_planes) now follow the fetch-unit table. - Denise's playfield output arms on BPL1DAT loads: a row whose fetch table carries no plane streams never loads BPL1DAT, so the non-DMA planes' latches are not painted on their own. Manual BPL1DAT writes still display through the manual-BPL replay. vAmigaTS Denise/Registers/BPLCON0 (vs vAmiga 4.4 refs): invplanes1 20.7% -> 0.000%, invprio2 11.8% -> 3.3%, invprio0 16.3% -> 7.8%, invprio1 14.9% -> 6.4%, invprio3 20.3% -> 11.8%, modes0-2 b/c variants 10.8-11.1% -> 4.0%, modes3/3b/3c 14-15% -> 8%. KS1.3, Inside the Machine, Hamazing, Zool, and A1200 boot screenshots stay byte-identical to main.
Sprite N's two DMA slots sit at colour clocks $15+4N and $17+4N (the HRM slot chart and vAmiga's DAS table). Copperline reserved a pair-shaped band four clocks later ($19..$37, two sprites per 8-cck band) and captured both sprites of a pair at one coarse position. Now each sprite owns its own two odd slots in the arbiter, capture happens at each sprite's first slot, and SPREN is sampled per slot (honouring the DMACON commit delay). The corrected band phase-locks the copper's free-running loops against sprite DMA: vAmigaTS Agnus/Copper/oldJump jumpbpu1 16.1% -> 0.016%, jumpbpu2 7.4% -> 0.000%, jumpbpu3 5.9% -> 0.000%, jumpbpu4 1.5% -> 0.001% (the precession residual documented in #109). The blitter timing family net-improves (timing8/9/9f/12/15 -2.2, timing6/10/15l +1..2 - the remaining spread sits in the blitter model). The sprena/sprdis DMACON sweeps (29-43%) still need the true two-slot fetch split - the atomic per-line sprite capture cannot express a word-level SPREN edge between a sprite's two slots; unchanged here. KS1.3, Inside the Machine, Hamazing, Gen-X, and Zool screenshots are byte-identical to main. Second Nature's falling-leaves scene renders identically with a small animation-phase drift (timing-sensitive demo; chip-bus contention legitimately changed).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-ups to the DDF sequencer work (#109), each photo-arbitrated:
The invplanes1 A500 photo shows black for hi-res BPU=7 even with armed
BPL5DAT/BPL6DAT latches. Agnus's fetch-unit table schedules at most 4
plane streams in hi-res and 2 in SHRES - overprogrammed counts fetch
nothing (unlike lo-res BPU=7's 4-plane fetch), and with no BPL1DAT
load the playfield never arms, so the latches are not painted. Manual
BPL1DAT writes still display through the manual-BPL replay.
Agnus-side DMA_CYCLES(4); score-neutral, source fidelity).
Scores (vs vAmiga 4.4 refs)
invplanes1 also closes the one regression flagged in the #109 audit
(13.7% pre-FSM), ending well below it.
Verification
cargo test --releasegreen (one SHRES plane-count expectationre-derived to the fetch-unit table), clippy/fmt clean.
boot screenshots byte-identical to main.
Update: sprite DMA slot geometry (third commit)
Sprite N's two DMA slots now sit at their hardware positions ($15+4N /
$17+4N per the HRM chart and vAmiga's DAS table) instead of a pair-shaped
band four clocks later; capture samples SPREN per slot with the DMACON
commit delay. The corrected band phase-locks the copper's free-running
loops: jumpbpu1-4 go 16.1/7.4/5.9/1.5% -> all 0.00x% (closing the
precession residual documented in #109), and the blitter timing family
net-improves. The sprena/sprdis sweeps still need the two-slot fetch
split (documented follow-up). Demo set byte-identical except Second
Nature's benign animation-phase drift (timing-sensitive; scene
pixel-perfect).