home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 113 / EnigmaAmiga113CD.iso / software / sviluppo / quake_src / vid_turboupd68k.s < prev    next >
Text File  |  2000-06-17  |  2KB  |  95 lines

  1. * Copyright (C) 1996-1997 Id Software, Inc. 
  2. * This program is free software; you can redistribute it and/or 
  3. * modify it under the terms of the GNU General Public License 
  4. * as published by the Free Software Foundation; either version 2 
  5. * of the License, or (at your option) any later version. 
  6. * This program is distributed in the hope that it will be useful, 
  7. * but WITHOUT ANY WARRANTY; without even the implied warranty of 
  8. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.   
  9. * See the GNU General Public License for more details. 
  10. * You should have received a copy of the GNU General Public License 
  11. * along with this program; if not, write to the Free Software 
  12. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. 
  13.  
  14. **
  15. ** vid_turboupd68k.s
  16. **
  17. ** turbo video buffer update for Quake-Amiga68k (68040/060 only!)
  18. **
  19. ** Written by Frank Wille <frank@phoenix.owl.de>
  20. **
  21.  
  22.     code
  23.  
  24.     xdef    _TurboUpdate68k
  25.     xdef    _ChunkyCopy68k
  26.  
  27.  
  28.     cnop    0,4
  29. _ChunkyCopy68k:
  30. ; 4(sp) = ModeScreen
  31. ; 8(sp) = gfxaddr
  32. ; 12(sp) = vid_buffer
  33. ; rest is irrelevant
  34.  
  35.     movem.l    d2-d4,-(sp)
  36.     move.l    12+4(sp),a0
  37.     moveq    #0,d1
  38.     move.l    8(a0),d4    ; ms.bpr
  39.     moveq    #0,d0
  40.     move.l    544(a0),d2    ; ms.SCREENWIDTH
  41.     mulu    d4,d1
  42.     move.l    548(a0),d3    ; ms.SCREENHEIGHT
  43.     sub.l    d2,d4
  44.     move.l    12+8(sp),a1
  45.     lsr.l    #6,d2
  46.     move.l    12+12(sp),a0
  47.     add.l    d0,a1
  48.     add.l    d1,a1
  49. 1$:    move.l    d2,d0
  50. 2$:    move16    (a0)+,(a1)+
  51.     move16    (a0)+,(a1)+
  52.     move16    (a0)+,(a1)+
  53.     move16    (a0)+,(a1)+
  54.     subq.l    #1,d0
  55.     bne.b    2$
  56.     add.l    d4,a1
  57.     subq.l    #1,d3
  58.     bne.b    1$
  59.     movem.l    (sp)+,d2-d4
  60.     rts
  61.  
  62.  
  63.     cnop    0,4
  64. _TurboUpdate68k:
  65. ; a0 = vid_buffer
  66. ; a1 = gfxaddr
  67. ; d4 = bytesperrow
  68. ; d0 = x
  69. ; d1 = y
  70. ; d2 = width
  71. ; d3 = height
  72.  
  73.     mulu    d4,d1
  74.     add.l    d0,a1
  75.     sub.l    d2,d4
  76.     add.l    d1,a1
  77.     lsr.l    #6,d2
  78. 1$:    move.l    d2,d0
  79. 2$:    move16    (a0)+,(a1)+
  80.     move16    (a0)+,(a1)+
  81.     move16    (a0)+,(a1)+
  82.     move16    (a0)+,(a1)+
  83.     subq.l    #1,d0
  84.     bne.b    2$
  85.     add.l    d4,a1
  86.     subq.l    #1,d3
  87.     bne.b    1$
  88.     rts
  89.