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 >
Wrap
Text File
|
1987-04-22
|
3KB
|
87 lines
Not another article by Eddie, yes it is,first of all I must
thank Leon for taking control of this mega disc magazine, so I
have more time to do my other stuff, cheers.
below all this bullshit is the 68000 source code for a mega
fast barrel scroll for STOS, this is alot better than the one that was
on a previous issue of Disc Maggie, mainly because it doesn't use
the crappy STOS basic scroll and copy commands.Don't worry if you
don't have DEVPAC 2, I have included the assembled code in the
STOS folder called BARREL.PRG.
To use the routine you need to load the file into a STOS
memory bank using LOAD"PROG.PRG",bank, and to run the routine you
have to access the address/data registers using AREG(), and
DREG(),(see top of source code!)
the routine only copies single planes, so if you want to
barrel scroll a 16 colour image you will need to use the routine
on each of the 4 planes, this is of course alot slower than
copying a single plane. for example if I want to take a screen in
bank 15 and barrel scroll it onto physical screen, I would use
the following code (assumming that the mcode routine is in bank
1!).
AREG(1)=PHYSIC
AREG(0)=START(15)
DREG(0)=0
DREG(1)=16000
CALL 1
This routine copies plane 1 to plane one, if I want to copy plane
2 then I would add 2 to the source and dest address, so
AREG(0)=start(15)+2, and so on
**************************************************************
*ROUTINES BY EDDIE BRYAN OF THE HAPPENING BOIZ *
**************************************************************
*EDDIES BARREL SCROLLL ROUTINE -
*A1-DESTINATION
*A0 SOURCE
*D0-SOURCE POS (160'S)
*D1-DEST POS (160'S)
BARREL_SCROLL ADD.L D1,A1
ADD.L D0,A0
MOVE.L #ADDTAB,A2
MOVE.W #67,D0
CONLOOP MOVE.W (A0),(A1)
MOVE.W 8(A0),8(A1)
MOVE.W 16(A0),16(A1)
MOVE.W 24(A0),24(A1)
MOVE.W 32(A0),32(A1)
MOVE.W 40(A0),40(A1)
MOVE.W 48(A0),48(A1)
MOVE.W 56(A0),56(A1)
MOVE.W 64(A0),64(A1)
MOVE.W 72(A0),72(A1)
MOVE.W 80(A0),80(A1)
MOVE.W 88(A0),88(A1)
MOVE.W 96(A0),96(A1)
MOVE.W 104(A0),104(A1)
MOVE.W 112(A0),112(A1)
MOVE.W 120(A0),120(A1)
MOVE.W 128(A0),128(A1)
MOVE.W 136(A0),136(A1)
MOVE.W 144(A0),144(A1)
MOVE.W 152(A0),152(A1)
ADD.L #160,A1
MOVE.W (A2)+,D1
ADD.W D1,A0
DBF D0,CONLOOP
RTS
ADDTAB DC.W 800,640,480,320,320,320,320,160,320,160,320,160,160,160,0,160,160,0
DC.W 160,160,0,160,160,0,160,0,160,0,160,0,160,0,160,0
DC.W 0,160,0,160,0,160,0,160,0,160,0,160,160,0,160,160
DC.W 0,160,160,0,160,160,160,320,160,320,160,320,320,320,480,320,640,800
Well thats it, I hope this simple routine has proved a great
read, and inspired you to produce mega cool demos etc.
Eddie Bryan (THB, and TPS) 28 October 1991