View Single Post
Old 27 November 2018, 08:36   #6
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,483
Quote:
Originally Posted by phx View Post
To be honest, I'm probably too tired to see the race condition.
The same here, but maybe because I still have not got a nice strong espresso.
EDIT: no effect from coffee

Quote:
The old solution with two INTREQ-writes after BLTSIZE even looks more dangerous to me, because a very fast blit could be finished before you cleared its IRQ flag for the second time.
And not only this.. an IRQ with high level can occur immediately after the blitter start and disrupt future chain
(the blitter, meanwhile, could finish before the INTREQ cleanup and lost a loop).
EDIT: lol, before the coffee I had not even seen that ohth313 written the same

This can be a solution:
Code:
move.w    #$4000,intena(a6)    ; Disable
move.w    (a0),bltsize(a6)     ; Start blitter
move.w    #$40,intreq(a6)      ; Acknowledge interrupt
move.w    #$c000,intena(a6)    ; re-Enable and double bus access
<pop stack here>
rte
Anyway the speech is worth if BLTPRI=0 (and a decent sized blit ), otherwise what phx wrote could happen even in this situation
(but from what I remember you do not set it at 1 if you can).

EDIT2:
It would be interesting to check if for a single word blit (with BLTPRI=0, considering the prefetch of the blitter and the relative delayed destination write in memory) the BLIT INTREQ bit is set before or after the CPU cleaning in a slow machine (like on A500).

Last edited by ross; 27 November 2018 at 10:15. Reason: better explained, maybe..
ross is offline  
 
Page generated in 0.04428 seconds with 11 queries