View Single Post
Old 06 September 2021, 18:28   #852
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,506
Finally tried it on OCS A500 and it works without garbage on top of scroller. Only if KS 1.3. If KS 1.2: CLI flash at the bottom happens few times.

This is quite badly coded and seems like was fixed in a hurry, just enough to get it working, mostly..?

It updates copper wait vertical position very soon in vblank interrupt. Unfortunately copper also reads this instruction almost at the same time and if copper reads between CPU writes, it gets too too early position, wait finishes far too early: glitches.

Code:
0004AC82 13d8 0004 a200           MOVE.B (A0)+,$0004a200
0004AC88 0639 0080 0004 a200      ADD.B #$80,$0004a200
EDIT: I suspect this was originally coded on A1000 which has delayed vblank interrupt by 1 line, which would completely "fix" this problem.

It also sets one of scroller bitplane pointers to almost end of 1M chip RAM (and modulo equaling negative length of bitplane width). Which equals end of 512k chip ram if Agnus is OCS (this area is zeroed). But it becomes real end of 1M chip if ECS (even if system only has 512k chip). Which is normally not zeroed. Result is tall bars on top of scroller.

And finally, it also pointlessly calls KS vertb handler after it has finished its own vertb stuff. If it happens just in wrong position, systems copper list 2 gets executed at the bottom of screen (CLI window flashes).

More testing needed for correct fix that does not break anything else.

Last edited by Toni Wilen; 06 September 2021 at 19:08.
Toni Wilen is offline  
 
Page generated in 0.10205 seconds with 10 queries