Quote:
Originally Posted by hooverphonique
The reason for 'owning' the blitter is, that the os could be in the process of setting up a blit just as you disable everything. This could cause the blit to go haywire once you enable everything again, because you probably modified some registers.
|
Makes sense, no idea if it's doing anything.
I did:
Code:
move.l a5,a6 ;gfxbase -> a6
move.l 34(a6),-(sp) ;save old view ?
sub.l a1,a1 ;blank screen to trigger screen switch
jsr -222(a6) ;on Amigas with graphics cards
jsr -270(a6) ;WaitTOF
jsr -270(a6) ;WaitTOF
jsr -456(a6) ;OwnBlitter
... ; game code always waits for blitter before use.
move.l a5,a6 ;gfxbase -> a6
move.l (sp)+,a1 ;previously saved view
jsr -222(a6) ;restore OS screen
jsr -270(a6) ;WaitTOF
jsr -270(a6) ;WaitTOF
jsr -228(a6) ;WaitBlit
jsr -462(a6) ;DisownBlitter