home *** CD-ROM | disk | FTP | other *** search
-
- ; ADD THIS TO YOUR COPPERLIST!
- dc.l $01001200,$00920030,$009400d8,$008e2471,$0090f4dc,$01020000
- ; SCRN START---^^ ^^---SCRN END
- dc.l $01080008,$010a0008
- dc.l $01800000,$01820fff
- s_scrollbplane:
- dc.l $00e00000,$00e20000
-
- ;···········································
- ;· SCROLLROUTINE CODED BY CHUCKY OF SARGON ·
- ;· SOURCE CAN BE SPREADED! ·
- ;···········································
-
- s_scroller: ;Jump to this once every scan!
- bsr s_changespeed
- cmp.w #0,s_pause
- bne s_stannad
- move.w s_speed1,d7
- s_fart:
- bsr s_scroll
- dbf d7,s_fart
- bsr s_pixelscroll
- rts
-
- s_changespeed:
- move.w s_speed,d0
- move.w s_speed1,d1
- cmp.w d1,d0
- beq s_nochange
-
- add.w #1,s_delay
- cmp.w #4,s_delay
- bne s_nochange
- clr.w s_delay
-
- cmp.w d1,d0
- bgt s_speedover
- blt s_speedlower
- s_nochange:
- rts
-
- s_speedover:
- add.w #1,s_speed1
- rts
-
- s_speedlower:
- sub.w #1,s_speed1
- rts
-
- s_stannad:
- sub.w #1,s_pause
- rts
-
- s_scroll:
- add.w #1,s_pixel
- cmp.w #0,s_pixels
- beq s_scroller1
- sub.w #$1,s_pixels
- rts
-
- s_Space:
- move.b #$20,d0 ;Make so you can use text from editors like TxED,ED
- bra s_forts
-
- s_Scroller1:
- lea s_scrolltext(pc),a0
- move.l s_scrollpos,d0 ;Maximum length of a text is 4294967295 bytes!
- add.l d0,a0
- clr.l d0
- move.b (a0),d0
- add.l #1,s_scrollpos
- cmp.b #$0,d0
- beq s_wrap
- cmp.b #';',d0
- beq s_command
- cmp.b #$a,d0
- beq s_space
- s_forts:
- sub.b #$20,d0
- asl #1,d0 ;Mulu #2,d0
- lea s_teckenbredd(pc),a0
- add.w d0,a0
- move.w (a0),s_pixels
- lea s_charplus(pc),a0
- add.w d0,a0
- move.w (a0),s_plus
- bsr s_pixelscroll
- bsr s_charblit
- rts
-
- s_Command:
- move.b 1(a0),d0
- cmp.b #';',d0
- beq s_forts ;no command
-
- cmp.b #'P',d0
- beq s_spause
- cmp.b #'S',d0
- beq s_sspeed
- rts
-
- s_spause:
- bsr s_getnumber
- mulu #100,d0
- move.w d0,s_pause
- add.l #2,s_scrollpos
- rts
-
- s_sspeed:
- bsr s_getnumber
- move.w d0,s_speed
- add.l #2,s_scrollpos
- rts
-
- s_getnumber:
- move.b 2(a0),d0
- sub.b #'0',d0
- rts
-
- s_Wrap:
- clr.l s_scrollpos
- clr.w s_speed
- clr.w s_speed1
- bra s_scroller1
-
- vblt:
- move.w #$09f0,$dff040 ;USE D,A SATT MINTERM D=A
- clr.w $dff042 ;O=BLTCON1
- move.w #$ffff,$dff044
- move.w #$ffff,$dff046
- move.w #$8040,$dff096 ;SATT PA BLITTER DMA
- rts
-
- s_CharBlit:
- bsr vanta
- bsr vblt
- move.l #s_scrollplane+$30,d0
- move.w s_plus,d2
- move.l #$50000,d1 ;where the font is!
- add.w d2,d1
- move.w #0,d2 ;numbers of bitplanes minus one
- s_cplanes:
- bsr vanta
- move.l d1,$dff050 ;A
- move.l d0,$dff054 ;D
- move.w #0048,$dff066 ;MODULO D
- move.w #0036,$dff064 ;MODULO A
- move.w #%0000100000000010,$dff058 ;SATT STORLEK,STARTA BLT
- ; hhhhhhhhhhwwwwww
- add.w #1728,d0 ;add to next plane on scroll
- add.w #4000,d1 ;add to next plane on font
- dbf d2,s_cplanes
- rts
-
- s_PixelScroll:
- move.w s_Pixel,d1
- cmp.w #0,d1
- beq s_nopixel
- sub.w #1,d1
- bsr vanta
- bsr vblt
- move.w #$9f0,d0
- asl #8,d1
- asl #4,d1
- eor #$f000,d1
- add.w d1,d0
- move.w d0,$dff040 ;Shift RIGHT 15 pixels
- move.l #s_scrollplane,d0
- move.l #s_scrollplane+2,d1
- move.w #0,d2 ;numbers of bitplanes minus one!
- s_pplanes:
- bsr vanta
- move.l d1,$dff050 ;A
- move.l d0,$dff054 ;D
- move.w #0000,$dff066 ;MODULO D
- move.w #0000,$dff064 ;MODULO A
- move.w #%0000100000011011,$dff058 ;SATT STORLEK,STARTA BLT
- ; hhhhhhhhhhwwwwww
- add.w #1728,d0 ;add to the next plane (54 bytes per line)
- add.w #1728,d1 ;add to the next plane
- dbf d2,s_pplanes
- clr.w s_pixel
- s_nopixel:
- rts
-
- vanta: ;wait until the blitter is ready
- btst #14,$dff002
- bne vanta
- rts
-
- s_CharPlus: ;How much to add to the next char on the font piccy!
- dc.w 0,4,8,12,16,20,24,28,32,36
- dc.w 1280,1284,1288,1292,1296,1300,1304,1308,1312,1316
- dc.w 2560,2564,2568,2572,2576,2580,2584,2588,2592,2596
- dc.w 3840,3844,3848,3852,3856,3860,3864,3868,3872,3876
- dc.w 5120,5124,5128,5132,5136,5140,5144,5148,5152,5156
- dc.w 6400,6404,6408,6412,6416,6420,6424,6428,6432,6436
-
- s_plus: dc.w 0
- s_TeckenBredd: ;Width of chars (in pixels)
- ; " " ! " # $ % & ' ( )
- dc.w 31,31,31,31,31,31,31,31,31,31
- ; * + , - . / 0 1 2 3
- dc.w 31,31,31,31,31,31,31,31,31,31
- ; 4 5 6 7 8 9 : ; < =
- dc.w 31,31,31,31,31,31,31,31,31,31
- ; > ? @ A B C D E F G
- dc.w 31,31,31,31,31,31,31,31,31,31
- ; H I J K L M N O P Q
- dc.w 31,31,31,31,31,31,31,31,31,31
- ; R S T U V W X Y Z
- dc.w 31,31,31,31,31,31,31,31,31,31
-
- s_Scrollplane: blk 1728,0 ;NOTE: change the value if you have
- ;more then one bitplane!
- ;add 1728 bytes per bitplane!
-
- s_pause: dc.w 0
- s_Speed: dc.w 0
- s_Speed1: dc.w 0
- s_delay: dc.w 0
- s_scrollpos: dc.l 0 ;those lables are for the scroller!
- s_pixel: dc.w 0 ;so don't mix with anything here!
- s_pixels: dc.w 0
-
- s_scrolltext:
-
- ; SPEED=';S<SPEED>' PAUSE=';P<PAUSE>' ;=';;'
- ; so speed 2 looks like ;S2 pause 2= ;P2
-
- DC 'THIS;S6 IS A LITTLE SCROLL ;S0ROUTINE BY CHUCKY OF SARGON '
- DC 0 ;WRAP