home *** CD-ROM | disk | FTP | other *** search
/ Vectronix 2 / VECTRONIX2.iso / FILES_03 / C_JS_108.ZIP / DOCS / JAG_TIPS.TXT next >
Text File  |  1995-12-08  |  2KB  |  59 lines

  1. ---------------------------------------------------------------------
  2. - Some Quick Jaguar Notes on how to assemble Jaguar Programs..      -
  3. - ╜ Roine Stenberg '95                                              -
  4. - Last update 951205 for V. 1.06                                    -
  5. ---------------------------------------------------------------------
  6.  
  7. 1. To be sure that object lists and such are alligned to a 16 byte or 32
  8.    byte in the Jaguars main ram, i use Devpac 3 CNOP directive as a macro.
  9.    This way, the Atari standard dphase and phase are used. 
  10.  
  11. .dphase  MACRO
  12.          CNOP 0,32
  13.          ENDM
  14.  
  15. .phase   MACRO
  16.          CNOP 0,16
  17.          ENDM
  18.  
  19. 2. When writing GPU program's and compiling with madmac from within
  20.    Devpac 3's menu, use the command line %?
  21.    This passes the filename to madmac automaticly. Of course you
  22.    should have set the "Save files" to YES, as madmac reads the file from
  23.    disk.
  24.    To be able to link this file and later include it with "incbin" into
  25.    the binary file assembled from Devpac, it is necessary to strip the
  26.    headers with ALN, the Jaguar Linker.
  27.    Command line to ALN linker should be -a 5000 5000 5000 -n %?
  28.    The 5000 is just a dummy number. This way, the GPU code can be used:
  29.    
  30. ;================================================================================================
  31. gpuinit
  32.     lea    gpucode,a0
  33.     lea    gpucode_e,a1
  34.     move.l    #$f03000,a2        * GPU local ram.
  35. cloop    move.w    (a0)+,(a2)+
  36.     cmp.l    a0,a1
  37.     bne    cloop
  38.     rts
  39.     
  40. gpurun
  41.     move.l    #$f03000,$f02110    * GPU program counter
  42.     move.l    #$1,$f02114        * Set GPUGO flag
  43.     rts
  44.  
  45. gpucode
  46.     incbin        "gpu.abs"    * Output from Madmac, linked
  47.                     * with ALN.
  48. gpucode_e
  49.  
  50. ;================================================================================================
  51.  
  52. 3. The Jaguar server software accepts command lines also. If you output
  53.    a filename named "L:\JAGTEST.JAG" from Devpac, command line to Jaguar
  54.    Server should be "L:\JAGTEST.JAG -Q". The "-Q" is optional, and will
  55.    cause Jaguar Server to return to Devpac, right after uploading.
  56.    
  57. Well, that was some notes that popped up right now. Hope they are at
  58. least a little bit usefull....
  59.