home *** CD-ROM | disk | FTP | other *** search
/ Falcon 030 Power 2 / F030_POWER2.iso / ST_STE / MAGS / STOSBTS2.ARJ / stosbts2.msa / DATA / BARREL.DAT < prev    next >
Text File  |  1987-04-22  |  3KB  |  87 lines

  1. Not another article by Eddie, yes it is,first of all I must 
  2. thank Leon for taking control of this mega disc magazine, so I 
  3. have more time to do my other stuff, cheers.
  4.      below all this bullshit is the 68000 source code for a mega 
  5. fast barrel scroll for STOS, this is alot better than the one that was 
  6. on a previous issue of Disc Maggie, mainly because it doesn't use 
  7. the crappy STOS basic scroll and copy commands.Don't worry if you 
  8. don't have DEVPAC 2, I have included the assembled code in the 
  9. STOS folder called BARREL.PRG.
  10.      To use the routine you need to load the file into a STOS 
  11. memory bank using LOAD"PROG.PRG",bank, and to run the routine you 
  12. have to access the address/data registers using AREG(), and 
  13. DREG(),(see top of source code!)
  14.      the routine only copies single planes, so if you want to 
  15. barrel scroll a 16 colour image you will need to use the routine 
  16. on each of the 4 planes, this is of course alot slower than 
  17. copying a single plane. for example if I want to take a screen in 
  18. bank 15 and barrel scroll it onto physical screen, I would use 
  19. the following code (assumming that the mcode routine is in bank 
  20. 1!).
  21.  
  22. AREG(1)=PHYSIC    
  23. AREG(0)=START(15)
  24. DREG(0)=0
  25. DREG(1)=16000
  26. CALL 1
  27.  
  28. This routine copies plane 1 to plane one, if I want to copy plane 
  29. 2 then I would add 2 to the source and dest address, so 
  30. AREG(0)=start(15)+2, and so on
  31.  
  32.  
  33. **************************************************************
  34. *ROUTINES BY EDDIE BRYAN OF THE HAPPENING BOIZ               *
  35. **************************************************************
  36.  
  37. *EDDIES BARREL SCROLLL ROUTINE -
  38. *A1-DESTINATION
  39. *A0 SOURCE
  40. *D0-SOURCE POS (160'S)
  41. *D1-DEST POS   (160'S)
  42.  
  43. BARREL_SCROLL   ADD.L   D1,A1                   
  44.                 ADD.L   D0,A0
  45.                 MOVE.L #ADDTAB,A2       
  46.                 MOVE.W #67,D0           
  47. CONLOOP         MOVE.W (A0),(A1)        
  48.                 MOVE.W 8(A0),8(A1)
  49.                 MOVE.W 16(A0),16(A1)
  50.                 MOVE.W 24(A0),24(A1)
  51.                 MOVE.W 32(A0),32(A1)
  52.                 MOVE.W 40(A0),40(A1)
  53.                 MOVE.W 48(A0),48(A1)
  54.                 MOVE.W 56(A0),56(A1)
  55.                 MOVE.W 64(A0),64(A1)
  56.                 MOVE.W 72(A0),72(A1)
  57.                 MOVE.W 80(A0),80(A1)
  58.                 MOVE.W 88(A0),88(A1)
  59.                 MOVE.W 96(A0),96(A1)
  60.                 MOVE.W 104(A0),104(A1)
  61.                 MOVE.W 112(A0),112(A1)
  62.                 MOVE.W 120(A0),120(A1)
  63.                 MOVE.W 128(A0),128(A1)
  64.                 MOVE.W 136(A0),136(A1)
  65.                 MOVE.W 144(A0),144(A1)
  66.                 MOVE.W 152(A0),152(A1)
  67.  
  68.  
  69.                 ADD.L #160,A1           
  70.                 MOVE.W (A2)+,D1         
  71.                 ADD.W D1,A0             
  72.                 DBF D0,CONLOOP
  73.                 RTS
  74.  
  75. ADDTAB          DC.W 800,640,480,320,320,320,320,160,320,160,320,160,160,160,0,160,160,0
  76.                 DC.W    160,160,0,160,160,0,160,0,160,0,160,0,160,0,160,0
  77.                 DC.W 0,160,0,160,0,160,0,160,0,160,0,160,160,0,160,160
  78.                 DC.W    0,160,160,0,160,160,160,320,160,320,160,320,320,320,480,320,640,800
  79.  
  80. Well thats it, I hope this simple routine has proved a great 
  81. read, and inspired you to produce mega cool demos etc.
  82.  
  83.                Eddie Bryan (THB, and TPS) 28 October 1991      
  84.  
  85.  
  86.  
  87.