home *** CD-ROM | disk | FTP | other *** search
/ Vectronix 2 / VECTRONIX2.iso / FILES_01 / JAGDEV_1.LZH / DEVELOP.JAG / VECTRONI.X! / LZJAG / TESTLZSS.S < prev   
Text File  |  1994-09-21  |  3KB  |  88 lines

  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ;;; JAGUAR Multimedia Entertainment System Source Code
  3. ;;;
  4. ;;;    COPYRIGHT (c)1994 Atari Computer Corporation
  5. ;;;    UNAUTHORIZED REPRODUCTION, ADAPTATION, DISTRIBUTION,
  6. ;;;    PERFORMANCE OR DISPLAY OF THIS COMPUTER PROGRAM OR
  7. ;;;    THE ASSOCIATED AUDIOVISUAL WORK IS STRICTLY PROHIBITED.
  8. ;;;    ALL RIGHTS RESERVED.
  9. ;;;
  10. ;;;    Module: testlzss.s
  11. ;;;        Test LZSS Decompression Routine
  12. ;;;
  13. ;;;   History: 09/20/94 - Created (SDS)
  14. ;;;
  15. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  16.  
  17.         .include    "jaguar.inc"
  18.         
  19.         .extern        _dlzstart
  20.         .extern        _dlzend
  21.         .extern        delzss
  22.  
  23.         .extern        lzinbuf
  24.         .extern        lzoutbuf
  25.         .extern        lzworkbuf
  26.  
  27.         .extern        moucode
  28.  
  29. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  30. ;;; Program Entry Point Follows
  31.  
  32.         move.l    #$00070007,G_END
  33.         move.w    #$FFFF,VI
  34.         
  35. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  36. ; Load the GPU with the DELZSS routine
  37. blitwait:
  38.         move.l    B_CMD,d0    ; Make sure blitter is idle
  39.         andi.l    #1,d0
  40.         beq    blitwait
  41.  
  42.         lea    _dlzstart,a0    ; Start of GPU code in ROM
  43.         move.l    #_dlzend,d0    ; End of GPU code in ROM
  44.         sub.l    a0,d0        ; Find # of bytes to copy
  45.         lsr.l    #2,d0        ; make # of longs to copy
  46.  
  47. ; The destination pointer is the GPU RAM Address + $8000 for 32-bit copies
  48.         move.l    #delzss+$8000,A1_BASE    
  49.         move.l    a0,A2_BASE    ; Source in ROM from above
  50.  
  51.         move.l    #PITCH1|PIXEL32|XADDPHR,A1_FLAGS
  52.         move.l    #PITCH1|PIXEL32|XADDPHR,A2_FLAGS
  53.  
  54.         move.l    #0,A1_CLIP    ; Required for Blitter Bug
  55.  
  56.         move.l    #0,A1_PIXEL
  57.         move.l    #0,A2_PIXEL
  58.  
  59.         or.l    #$00010000,d0    ; One outer loop
  60.         move.l    d0,B_COUNT
  61.         move.l    #SRCEN|LFU_REPLACE,B_CMD
  62.  
  63. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  64. ; Now set up the Decompression parameters
  65.         move.l    #moucode,lzinbuf    ; Pointer to compressed data
  66.         move.l    #$100000,lzoutbuf    ; Pointer where code executes
  67.         move.l    #$40000,lzworkbuf    ; 8k working buffer
  68.  
  69.         move.l    #delzss,G_PC
  70.         move.l    #1,G_CTRL
  71.  
  72. ;;; If you have other things to do here that don't need the buffers
  73. ;;; or the GPU, now would be a good time. Just wait for the GPU to
  74. ;;; stop as shown below before using any of the above
  75.  
  76. gpuwait:
  77.         move.l    G_CTRL,d0        ; Wait for GPU to finish
  78.         andi.l    #1,d0
  79.         bne    gpuwait
  80.  
  81. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  82. ; Start the newly decompressed code
  83.  
  84.         move.l    #$100000,a0
  85.         jmp    (a0)
  86.  
  87.         .end
  88.