home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 3419 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.8 KB

  1. Path: informatik.tu-muenchen.de!fischerj
  2. From: fischerj@Informatik.TU-Muenchen.DE (Juergen "Rally" Fischer)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Qblit intereference again
  5. Date: 20 Feb 1996 01:05:26 GMT
  6. Organization: Technische Universitaet Muenchen, Germany
  7. Distribution: world
  8. Message-ID: <4gb6om$104@sunsystem5.informatik.tu-muenchen.de>
  9. NNTP-Posting-Host: hphalle5.informatik.tu-muenchen.de
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. My Qblit function still locks up if OS does small blits between it.
  13. help please.
  14.  
  15. Best is IMHO I post the source:
  16.  
  17. * === THE QBLIT CALL 
  18.    move.w #1,_bltbsy ;MY FLAG TELLING THAT QBLIT SEQUENCE IS WORKING.
  19.  
  20.    move.l bltnode,a0
  21.  
  22.    clr.l (a0)+ : move.l #function,(a0)+
  23.    move.w #$4000,(a0)+ ;do cleanup
  24.    move.w #$2020,(a0)+ ;DUMMY SIZE. HOW TO DO LARGE BLIT IN A .W ? HUH HUH 
  25.    clr.w (a0)+
  26.    move.l #cleanup,(a0)+
  27.  
  28.    move.l bltnode,a1 : move.l _GfxBase,a6 : jsr -276(a6)
  29.  
  30. * NO I WON'T TOUCH THIS BLTNODE UNTIL MY cleanup: WAS CALLED.
  31.  
  32. *===== THE FUNCTIONS
  33. function:
  34. * DO I MISS CLEARING THE BLITTER INTREQ BIT HERE ?
  35.  
  36.    movem.l d1/a6,-(sp)
  37.    move.l bltpc(pc),a6
  38.  
  39. bltsetreg:
  40.    move.l (a6)+,d0 : move.w d0,d1 : swap d0
  41.    move.w d0,0(a0,d1.w)
  42. *               ^------- ??? $DFF000 BY OS ???
  43.  
  44.    cmp.w #$5e,d1 : beq.s bltstarted
  45.    cmp.w #$58,d1 : bne.s bltsetreg
  46. * ---
  47. bltstarted:
  48.    move.l a6,bltpc
  49.    cmp.l #0,(a6) : beq bltintend
  50.  
  51.    movem.l (sp)+,d1/a6
  52.  
  53.    move.l #1,d0 ;TO BE RECALLED
  54.    rts
  55.  
  56. bltintend:
  57.    movem.l (sp)+,d1/a6
  58.  
  59.    move.l #0,d0 ;ALL DONE
  60.    rts
  61.  
  62. cleanup:
  63.    clr.w _bltbsy
  64.    moveq #0,d0
  65.    rts
  66.  
  67. *===============================
  68.  
  69. The bugs:
  70.  
  71.    blitter lockup most likely if lots of small blits are done
  72.    by other programs, while mine does quite large blits.
  73.  
  74.    if I just let the function run without any pokes to blitter,
  75.    the lockup is also caused!
  76.  
  77.    It's just a lockup, no memory trashed.
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.