View Single Post
Old 23 December 2013, 14:55   #502
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,524
Quote:
Originally Posted by StingRay View Post
That sounds like an interesting bug, out of curiosity, how come this doesn't happen on a real Amiga?
"First" bug: http://eab.abime.net/showpost.php?p=579713&postcount=17 (Lots of demos do accidental blitter register modifications while it is active but this is probably the only that self-destructs if it isn't emulated exactly. All others simply have some random graphics garbage)

Second bug is even trickier, D channel starts from $40A40, then D channel pointer is changed to 0 (move.l #0,$dff054) and because 68000 is 16-bit, high word is cleared first and D becomes 00000Axx temporarily and blitter uses this address for one D write (because cycle mode is -D-D-D), after the D-write low word gets cleared too.

Of course this does not happen on real hardware and reason is most likely already known Agnus DMA feature, DMA fetch exactly 1 cycle after channel's DMA pointer modification gets either ignored or DMA uses old address and new address become valid after DMA fetch. (EDIT: also high and low address pointers seem to work slightly differently, this needs confirmation first)

Bitplane and sprite pointers have similar behavior and there are demos that only work correctly if write is ignored..

This also explains why there is no same channel DMA fetches back to back, Agnus probably has some kind of 2 stage pipeline for DMA accesses.

EDIT: Confirmed. Write goes nowhere, both low and high address writes are totally ignored by Agnus. This actually means there are two blitter side-effects that both "protects" this demo from crashing. Write to DPTL or DPTH: nothing happens, blitter keeps writing to original address, no self-destruct. Then write to BLTCON0 stops the blitter from doing D writes at all.

Last edited by Toni Wilen; 23 December 2013 at 16:50.
Toni Wilen is online now  
 
Page generated in 0.12081 seconds with 9 queries