Closed dirkwhoffmann closed 1 year ago
The Copper list reveals what I've expected: Sprites are created on-the-fly by the Copper. Hence, it's most likely a sprite register timing issue.
TODO:
Probably related to this comment in WinUAE:
SPRxDATA and SPRxDATB is moved to shift register when SPRxPOS matches. When copper writes to SPRxDATx exactly when SPRxPOS matches:
- If sprite low x bit (SPRCTL bit 0) is not set, shift register copy is done first (previously loaded SPRxDATx value is shown) and then new SPRxDATx gets stored for future use.
- If sprite low x bit is set, new SPRxDATx is stored, then SPRxPOS matches and value written to SPRxDATx is visible.
- Writing to SPRxPOS when SPRxPOS matches: shift register copy is always done first, then new SPRxPOS value is stored for future use. (SPRxCTL not tested)
Here's a small test that shows a difference for SPRxPOS: sprxpos.zip. There should be a striped rgb pattern in the middle of the screen, but the screen is blank in vAmiga. As a hack you can add 1 to pos in Denise::pokeSPRxPOS to make it show up.
For reference: sprxpos.exe
on my Amiga 500 (ECS, 68010):
Fixed. The error was due to what @mras0 expected: Timing of SPRxPOS.
Relevant new regression tests for this issue:
Denise/Sprites/timing/sprtimpos1
Denise/Sprites/timing/sprtimctl1
Denise/Sprites/timing/sprxpos
Test sprtimctl1
has shown that timing of the SPRxCTL register needed the same adjustment.
There are two more new tests:
Denise/Sprites/timing/sprtimdat1
Denise/Sprites/timing/sprtimdat2
They show that SPRxDATA and SPRxDATB have no issues in the old and the new code.
Fixed in v2.2b1
Reported by @chris70c: Colors of the player sprite are wrong and part of the score and health bar are missing.
X-ray: