View Single Post
Old 29 December 2014, 14:00   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,519
It is nearly exactly right. (Bottom line and sprite corruption mostly)

Copper list is different in OCS vs ECS Agnus modes and system assumes ECS Agnus if ECS Denise is detected.

ECS copper list has following lines

00000440: 008e 0181 [000 024] ; DIWSTRT := 0x0181
00000444: 0090 0281 [000 028] ; DIWSTOP := 0x0281
00000448: 01e4 0000 [000 02c] ; DIWHIGH := 0x0000
0000044c: 0092 0018 [000 030] ; DDFSTRT := 0x0018
00000450: 0094 0020 [000 034] ; DDFSTOP := 0x0020

I have no idea why, perhaps workaround for some chip revision bug. (Bitplane DMA enabled for few fetches from line 1 to 2..)

Because OCS Agnus does not have DIWHIGH, DIWSTOP becomes $102 = vertical display window stays open.

When DMA attempts to fetch sprite 0 SPR and CTL words, CTL can't be fetched because bitplane DMA is active with max overscan and OCS Agnus has recently emulated "sprite dma vs bitplane dma off by one" bug.

-> mouse pointer CTL is not fetched, sprite pointer gets "unaligned" (CTL data goes to DATA, first word that was supposed to go to DATA goes to DATB and so on) -> sprite is start position is correct (CTL) but data is corrupted.

Screen start position changes because DIW is already open (due to above copper instructions), starts when BPLCON0 is written at line $2a (actually display starts next line, $2b, due to yet another OCS Agnus feature), not when DIWSTRT is set to ($2c).

Interesting side-effects!

Only unexplained part is how sprite still stops at (mostly) correct position on real hardware instead of staying active until end of display or so. Logic analyzer testing soon.
Toni Wilen is online now  
 
Page generated in 0.04858 seconds with 9 queries