Copy Link
Add to Bookmark
Report

Atari: The Twist Scroll

atari's profile picture
Published in 
atari
 · 4 years ago

  
**************************************************************
* THE TWIST SCROLL *
* CODING JANUARY 1989 BY MANIKIN *
* OF THE LOST BOYS *
* *
* TO CONTACT US: 22 OXFORD RD *
* TEDDINGTON ALL CORRESPONDENCE *
* MIDDX WELCOMED ABOUT SOURCE*
* TW11 OPZ PROGRAMMING ETC *
* ENGLAND WE WILL ATTEMPT TO *
* ANSWER ALL LETTERS. *
**************************************************************

clr.l -(sp) SET SUPERVISOR
move.w #$20,-(sp)
trap #1
add.l #6,sp
move.l d0,oldssp
dc.w $a00a LOSE MOUSE
move.l #$00000777,$ff8240 SET A FEW COLORS
move.l #$04440777,$ff8244
BSR MAKEFONTS MAKE UP THE FONTS
MOVE.W #2,-(SP) GET PHYSBASE
TRAP #14
ADD.L #2,SP
MOVE.L D0,SCREEN
MOVE.L D0,SAVESCREEN
MOVE.L #TEXT,-(SP) CLEAR THE SCREEN
MOVE.W #9,-(SP)
TRAP #1
ADD.L #6,SP

****************************
* THE MAIN LOOP *
****************************

VBLOOP TST.W SWITCH WHICH SCREEN DISPLAY
BNE.S TIME
MOVE.L #$78000,SCREEN1 SCREEN1= PHYSBASE
MOVE.L #$70000,SCREEN SCREEN= LOGBASE
MOVE.W #1,SWITCH CHANGE FOR NEXT TIME
BRA.S TIME2
TIME MOVE.L #$70000,SCREEN1 SCREEN= PHYSBASE
MOVE.L #$78000,SCREEN SCREEN1=PHYSBASE
MOVE.W #0,SWITCH CHANGE FOR NEXT TIME
TIME2 MOVE.W #-1,-(SP) SET SCREENS USING XBIOS 5
MOVE.L SCREEN1,-(SP) PHYS
MOVE.L SCREEN,-(SP) LOG
MOVE.W #5,-(SP)
TRAP #14
ADD.L #12,SP
MOVE.W #2,-(SP) ANY KEYS WAITING
MOVE.W #1,-(SP)
TRAP #13
ADDQ.L #4,SP
TST D0 TEST FOR KEY
BNE TWISTEND YES THEN EXIT THE TWIST SCROLL
MOVE.W #37,-(SP) WAIT FOR VBL
TRAP #14
ADD.L #2,-(SP)
ADD.L #8640,FONTTYPE TAKE THE NEXT FONT

CMP.L #FONTEND,FONTTYPE IS IT PAST THE LAST FONT?
BNE.S CONT IF NO THEN CONTINUE
MOVE.L #FONT1,FONTTYPE ELSE RESET FONT POINTER TO FIRST FONT
ADD.L #1,SCROLLPOINT ADVANCE SCROLLINE BY 1 CHARACTER
MOVE.L SCROLLPOINT,A6 GET SCROLL
CLR.L D6
MOVE.B (A6)+,D6
CMP.B #$FF,21(a6) TEST FOR END OF SCROLLINE
BNE.S CONT NO THEN CONTINUE
MOVE.L #SCROLLINE,SCROLLPOINT ELSE RESTART SCROLL

********************************************************
*WELL THIS IS THE ACTUAL SCROLLINE. EACH CHARACTER IS *
*IS PUT ON THE SCREEN BY ITS OWN LITTLE ROUTINE. *
*WHICH PUTS ITS CHARACTER TO A PARTICULAR POINT IN THE *
*BUFFER. THE FIRST PART OFF THE CHARACTER IS ADDED TO *
*THE SCREEN WHILE THE SECOND PART IS MOVED STRAIGHT TO *
*THE SCREEN. IE FIRST WORD ADDED SECOND WORD MOVED *
*THIS IS DONE (IN GENERAL) FOR THE FIRST 29 LINES BUT *
*AS EACH CHARACTER IS 8 LINES LOWER THAN THE LAST THE *
*LAST 8 LINES WOULD BE ADDED TO THEM SELVES AS THE *
*PREVIOUS CHARACTER WOULD NOT HAVE CLEARED THE SCREEN *
*WITH ITS OWN CHARACTER. IF YOU CAN UNDERSTAND *
*THIS BIT THEN YOU HAVE THE KEY TO THE TWIST SCROLL. *
* TAKE YOUR TIME IT WILL ALL BECOME CLEAR. *
* THE SCROLL WAS WORKED OUT VERY CAREFULLY ORIGIANLLY *
*SO THAT WHERE A CHARACTER EXTENDS OVER THE BOTTOM OF *
*THE BUFFER IT IS DRAWN OVER AT THE TOP. THIS IS DONE *
*IN THE DBF LOOPS SO YOU'LL HAVE TO STUDY THEM *
*CAREFULLY TO SEE WHERE. *
********************************************************

CONT MOVE.L SCROLLPOINT,A6 GET SCROLL POINTER
MOVE.L FONTTYPE,A0 GET FONTTYPE
CLR.L D6
MOVE.B (A6)+,D6 GET CHARACTER
SUB.B #32,D6
MULU #144,D6 GET OFFSET FOR THIS CHARACTER IN FONT
ADD.L D6,A0
MOVE.L SCREEN,A1
add.l #32,a0
MOVE.W #28,D0 DO 29 LINES
FONTYDRAW add.l #2,a0 THIS IS THE FIRST CHARACTER
move.w (a0)+,(a1) SO ONLY THE SECOND HALF IS DRAWN
ADD.L #160,A1 ON THE SCREEN.
DBF D0,FONTYDRAW

MOVE.L FONTTYPE,A0 AS ABOVE
CLR.L D6
MOVE.B (A6)+,D6
SUB.B #32,D6
MULU #144,D6
ADD.L D6,A0
MOVE.L SCREEN,A1
MOVE.W #28,D0 DO 29 LINES
FONTYDRAW1c MOVE.W (A0)+,D5
ADD.W D5,(A1) ADD TO SCREEN
move.w (a0)+,8(a1) MOVE TO SCREEN
ADD.L #160,A1
DBF D0,FONTYDRAW1c
move.w #7,d0 DO ANOTHER 8 LINES
FONTYDRAW1d MOVE.W (A0)+,(a1) MOVE TO SCREEN
move.w (a0)+,8(a1) ADD TO SCREEN
ADD.L #160,A1
DBF D0,FONTYDRAW1d

***********************************************
*CONSTRUCTION OF BUFFER CONTINUES AS ABOVE *
*WITH APPROPRIATE OFFSETS ETC *
***********************************************

MOVE.W #28,D0
MOVE.L FONTTYPE,A0
CLR.L D6
MOVE.B (A6)+,D6
SUB.B #32,D6
MULU #144,D6
ADD.L D6,A0
MOVE.L SCREEN,A1
add.l #1288,a1
FONTYDRAW1 MOVE.W (A0)+,D5
ADD.W D5,(A1)
move.w (a0)+,8(a1)
ADD.L #160,A1
DBF D0,FONTYDRAW1
move.w #7,d0
FONTYDRAW1b MOVE.W (A0)+,(a1)
move.w (a0)+,8(a1)
ADD.L #160,A1
DBF D0,FONTYDRAW1b
MOVE.W #28,D0
MOVE.L FONTTYPE,A0
CLR.L D6
MOVE.B (A6)+,D6
SUB.B #32,D6
MULU #144,D6
ADD.L D6,A0
MOVE.L SCREEN,A1
add.l #2576,a1
FONTYDRAW2 MOVE.W (A0)+,D5
ADD.W D5,(A1)
move.w (a0)+,8(a1)
ADD.L #160,A1
DBF D0,FONTYDRAW2
move.w #7,d0
FONTYDRAW2b MOVE.W (A0)+,(a1)
move.w (a0)+,8(a1)
ADD.L #160,A1
DBF D0,FONTYDRAW2b

MOVE.W #28,D0
MOVE.L FONTTYPE,A0
CLR.L D6
MOVE.B (A6)+,D6
SUB.B #32,D6
MULU #144,D6
ADD.L D6,A0
MOVE.L SCREEN,A1
add.l #3864,a1
FONTYDRAW3 MOVE.W (A0)+,D5
ADD.W D5,(A1)
move.w (a0)+,8(a1)
ADD.L #160,A1
DBF D0,FONTYDRAW3
move.w #7,d0
FONTYDRAW3b MOVE.W (A0)+,(a1)
move.w (a0)+,8(a1)
ADD.L #160,A1
DBF D0,FONTYDRAW3b
MOVE.W #28,D0
MOVE.L FONTTYPE,A0
CLR.L D6
MOVE.B (A6)+,D6
SUB.B #32,D6
MULU #144,D6
ADD.L D6,A0
MOVE.L SCREEN,A1
add.l #5152,a1
FONTYDRAW4 MOVE.W (A0)+,D5
ADD.W D5,(A1)
move.w (a0)+,8(a1)
ADD.L #160,A1
DBF D0,FONTYDRAW4
move.w #7,d0
FONTYDRAW4b MOVE.W (A0)+,(a1)
move.w (a0)+,8(a1)
ADD.L #160,A1
DBF D0,FONTYDRAW4b
MOVE.W #28,D0
MOVE.L FONTTYPE,A0
CLR.L D6
MOVE.B (A6)+,D6
SUB.B #32,D6
MULU #144,D6
ADD.L D6,A0
MOVE.L SCREEN,A1
add.l #6440,a1
FONTYDRAW5 MOVE.W (A0)+,D5
ADD.W D5,(A1)
move.w (a0)+,8(a1)
ADD.L #160,A1
DBF D0,FONTYDRAW5
move.w #7,d0
FONTYDRAW5b MOVE.W (A0)+,(a1)
move.w (a0)+,8(a1)
ADD.L #160,A1
DBF D0,FONTYDRAW5b
MOVE.W #28,D0
MOVE.L FONTTYPE,A0
CLR.L D6
MOVE.B (A6)+,D6
SUB.B #32,D6
MULU #144,D6
ADD.L D6,A0
MOVE.L SCREEN,A1
add.l #7728,a1
FONTYDRAW6 MOVE.W (A0)+,D5
ADD.W D5,(A1)
move.w (a0)+,8(a1)
ADD.L #160,A1
DBF D0,FONTYDRAW6
move.w #2,d0
FONTYDRAW6b MOVE.W (A0)+,(a1)
move.w (a0)+,8(a1)
ADD.L #160,A1
DBF D0,FONTYDRAW6b
move.w #4,d0
FONTYDRAW6c MOVE.W (A0)+,-12800(a1)
move.w (a0)+,-12792(a1)
ADD.L #160,A1
DBF D0,FONTYDRAW6c
MOVE.W #23,D0
MOVE.L FONTTYPE,A0
CLR.L D6
MOVE.B (A6)+,D6
SUB.B #32,D6
MULU #144,D6
ADD.L D6,A0
MOVE.L SCREEN,A1
add.l #9016,a1
FONTYDRAW7 MOVE.W (A0)+,D5
ADD.W D5,(A1)
move.w (a0)+,8(a1)
ADD.L #160,A1
DBF D0,FONTYDRAW7
move.w #4,d0
FONTYDRAW7c MOVE.W (A0)+,D5
ADD.W D5,-12800(A1)
move.w (a0)+,-12792(a1)
ADD.L #160,A1
DBF D0,FONTYDRAW7c
move.w #7,d0
FONTYDRAW7b MOVE.W (A0)+,-12800(a1)
move.w (a0)+,-12792(a1)
ADD.L #160,A1
DBF D0,FONTYDRAW7b
MOVE.W #15,D0
MOVE.L FONTTYPE,A0
CLR.L D6
MOVE.B (A6)+,D6
SUB.B #32,D6
MULU #144,D6
ADD.L D6,A0
MOVE.L SCREEN,A1
add.l #10304,a1
FONTYDRAW8c MOVE.W (A0)+,D5
ADD.W D5,(A1)
move.w (a0)+,8(a1)
ADD.L #160,A1
DBF D0,FONTYDRAW8c
move.w #12,d0
FONTYDRAW8 MOVE.W (A0)+,D5
ADD.W D5,-12800(A1)
move.w (a0)+,-12792(a1)
ADD.L #160,A1
DBF D0,FONTYDRAW8
move.w #7,d0
FONTYDRAW8b MOVE.W (A0)+,-12800(a1)
move.w (a0)+,-12792(a1)
ADD.L #160,A1
DBF D0,FONTYDRAW8b
MOVE.W #7,D0
MOVE.L FONTTYPE,A0
CLR.L D6
MOVE.B (A6)+,D6
SUB.B #32,D6
MULU #144,D6
ADD.L D6,A0
MOVE.L SCREEN,A1
add.l #11592,a1
FONTYDRAW9 MOVE.W (A0)+,D5
ADD.W D5,(A1)
move.w (a0)+,8(a1)
ADD.L #160,A1
DBF D0,FONTYDRAW9
move.w #20,d0
FONTYDRAW9b MOVE.W (A0)+,D5
add.W D5,-12800(a1)
move.w (a0)+,-12792(a1)
ADD.L #160,A1
DBF D0,FONTYDRAW9b
move.w #7,d0
FONTYDRAW9C MOVE.W (A0)+,-12800(a1)
move.w (a0)+,-12792(a1)
ADD.L #160,A1
DBF D0,FONTYDRAW9C
MOVE.W #28,D0
MOVE.L FONTTYPE,A0
CLR.L D6
MOVE.B (A6)+,D6
SUB.B #32,D6
MULU #144,D6
ADD.L D6,A0
MOVE.L SCREEN,A1
add.l #80,a1
FONTYDRAW10 MOVE.W (A0)+,D5
ADD.W D5,(A1)
move.w (a0)+,8(a1)
ADD.L #160,A1
DBF D0,FONTYDRAW10
move.w #7,d0
FONTYDRAW10C MOVE.W (A0)+,(A1)
move.w (a0)+,8(a1)
ADD.L #160,A1
DBF D0,FONTYDRAW10C
MOVE.W #28,D0
MOVE.L FONTTYPE,A0
CLR.L D6
MOVE.B (A6)+,D6
SUB.B #32,D6
MULU #144,D6
ADD.L D6,A0
MOVE.L SCREEN,A1
add.l #1368,a1
FONTYDRAW11 MOVE.W (A0)+,D5
ADD.W D5,(A1)
move.w (a0)+,8(a1)
ADD.L #160,A1
DBF D0,FONTYDRAW11
move.w #7,d0
FONTYDRAW11b MOVE.W (A0)+,(a1)
move.w (a0)+,8(a1)
ADD.L #160,A1
DBF D0,FONTYDRAW11b
MOVE.W #28,D0
MOVE.L FONTTYPE,A0
CLR.L D6
MOVE.B (A6)+,D6
SUB.B #32,D6
MULU #144,D6
ADD.L D6,A0
MOVE.L SCREEN,A1
add.l #2656,a1
FONTYDRAW12 MOVE.W (A0)+,D5
ADD.W D5,(A1)
move.w (a0)+,8(a1)
ADD.L #160,A1
DBF D0,FONTYDRAW12
move.w #7,d0
FONTYDRAW12b MOVE.W (A0)+,(a1)
move.w (a0)+,8(a1)
ADD.L #160,A1
DBF D0,FONTYDRAW12b
MOVE.W #28,D0
MOVE.L FONTTYPE,A0
CLR.L D6
MOVE.B (A6)+,D6
SUB.B #32,D6
MULU #144,D6
ADD.L D6,A0
MOVE.L SCREEN,A1
add.l #3944,a1
FONTYDRAW13 MOVE.W (A0)+,D5
ADD.W D5,(A1)
move.w (a0)+,8(a1)
ADD.L #160,A1
DBF D0,FONTYDRAW13
move.w #7,d0
FONTYDRAW13b MOVE.W (A0)+,(a1)
move.w (a0)+,8(a1)
ADD.L #160,A1
DBF D0,FONTYDRAW13b
MOVE.W #28,D0
MOVE.L FONTTYPE,A0
CLR.L D6
MOVE.B (A6)+,D6
SUB.B #32,D6
MULU #144,D6
ADD.L D6,A0
MOVE.L SCREEN,A1
add.l #5232,a1
FONTYDRAW14 MOVE.W (A0)+,D5
ADD.W D5,(A1)
move.w (a0)+,8(a1)
ADD.L #160,A1
DBF D0,FONTYDRAW14
move.w #7,d0
FONTYDRAW14b MOVE.W (A0)+,(a1)
move.w (a0)+,8(a1)
ADD.L #160,A1
DBF D0,FONTYDRAW14b
MOVE.W #28,D0
MOVE.L FONTTYPE,A0
CLR.L D6
MOVE.B (A6)+,D6
SUB.B #32,D6
MULU #144,D6
ADD.L D6,A0
MOVE.L SCREEN,A1
add.l #6520,a1
FONTYDRAW15 MOVE.W (A0)+,D5
ADD.W D5,(A1)
move.w (a0)+,8(a1)
ADD.L #160,A1
DBF D0,FONTYDRAW15
move.w #7,d0
FONTYDRAW15b MOVE.W (A0)+,(a1)
move.w (a0)+,8(a1)
ADD.L #160,A1
DBF D0,FONTYDRAW15b
MOVE.W #28,D0
MOVE.L FONTTYPE,A0
CLR.L D6
MOVE.B (A6)+,D6
SUB.B #32,D6
MULU #144,D6
ADD.L D6,A0
MOVE.L SCREEN,A1
add.l #7808,a1
FONTYDRAW16 MOVE.W (A0)+,D5
ADD.W D5,(A1)
move.w (a0)+,8(a1)
ADD.L #160,A1
DBF D0,FONTYDRAW16
move.w #2,d0
FONTYDRAW16b MOVE.W (A0)+,(a1)
move.w (a0)+,8(a1)
ADD.L #160,A1
DBF D0,FONTYDRAW16b
move.w #4,d0
FONTYDRAW16c MOVE.W (A0)+,-12800(a1)
move.w (a0)+,-12792(a1)
ADD.L #160,A1
DBF D0,FONTYDRAW16c
MOVE.W #23,D0
MOVE.L FONTTYPE,A0
CLR.L D6
MOVE.B (A6)+,D6
SUB.B #32,D6
MULU #144,D6
ADD.L D6,A0
MOVE.L SCREEN,A1
add.l #9096,a1
FONTYDRAW17 MOVE.W (A0)+,D5
ADD.W D5,(A1)
move.w (a0)+,8(a1)
ADD.L #160,A1
DBF D0,FONTYDRAW17
move.w #4,d0
FONTYDRAW17c MOVE.W (A0)+,D5
ADD.W D5,-12800(A1)
move.w (a0)+,-12792(a1)
ADD.L #160,A1
DBF D0,FONTYDRAW17c
move.w #7,d0
FONTYDRAW17b MOVE.W (A0)+,-12800(a1)
move.w (a0)+,-12792(a1)
ADD.L #160,A1
DBF D0,FONTYDRAW17b
MOVE.W #15,D0
MOVE.L FONTTYPE,A0
CLR.L D6
MOVE.B (A6)+,D6
SUB.B #32,D6
MULU #144,D6
ADD.L D6,A0
MOVE.L SCREEN,A1
add.l #10384,a1
FONTYDRAW18 MOVE.W (A0)+,D5
ADD.W D5,(A1)
move.w (a0)+,8(a1)
ADD.L #160,A1
DBF D0,FONTYDRAW18
move.w #12,d0
FONTYDRAW18c MOVE.W (A0)+,D5
ADD.W D5,-12800(A1)
move.w (a0)+,-12792(a1)
ADD.L #160,A1
DBF D0,FONTYDRAW18c
move.w #7,d0
FONTYDRAW18b MOVE.W (A0)+,-12800(a1)
move.w (a0)+,-12792(a1)
ADD.L #160,A1
DBF D0,FONTYDRAW18b

MOVE.W #7,D0 THE LAST CHARACTER IS ADDED
MOVE.L FONTTYPE,A0 ONLY TO THE FIRST WORD
CLR.L D6 THE SECOND IS DISCARDED.
MOVE.B (A6)+,D6
SUB.B #32,D6
MULU #144,D6
ADD.L D6,A0
MOVE.L SCREEN,A1
add.l #11672,a1
FONTYDRAW19 MOVE.W (A0)+,D5
ADD.W D5,(A1)
add.l #2,a0
ADD.L #160,A1
DBF D0,FONTYDRAW19
move.w #20,d0
FONTYDRAW19c MOVE.W (A0)+,D5
ADD.W D5,-12800(A1)
add.l #2,a0
ADD.L #160,A1
DBF D0,FONTYDRAW19c
move.w #7,d0
FONTYDRAW19b MOVE.W (A0)+,-12800(a1)
add.l #2,a0
ADD.L #160,A1
DBF D0,FONTYDRAW19b
BSR CONSTRUCT
BRA VBLOOP
*******************************************
*NOW THIS IS WHERE THE SCROLL IS ACTUALLY *
*CONSTRUCTED. THIS IS DONE BY COPYING THE *
*THE BUFFER TO THE SCREEN ONCE THE RIGHT *
*WAY UP IN PLANE 1 THEN UPSIDE DOWN AND *
*IN PLANE 2 TO THE SCREEN. A TABLE TELLS *
*THE ROUTINE HOW MANY TIMES TO DISPLAY *
*EACH LINE OF THE BUFFER. BY MISSING OR *
*OR DISPLAYING SOME LINES TWICE IT IS EASY*
*TO GIVE THE APPEARANCE OF WRAPPING THE *
*SCROLL AROUND A BAR. *
*******************************************

CONSTRUCT MOVE.L SCREEN,A1
MOVE.L A1,A0
ADD.L #16000,A1 START SCROLL 100 LINES DOWN SCREEN
MOVE.L A1,A3
ADD.L #10722,A3 START THE UPSIDE DOWN BIT FURTHER DOWN AND IN PLANE2
MOVE.L #ADDTAB,A2 THE ADDTABLE (FOR CONTROLLING THE DRAWING OF SCROLL)
MOVE.W #67,D0 DO 68 LINES
CONLOOP MOVE.W (A0),(A1) COPY BUFFER TO SCREEN
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)
MOVE.W (A0),(A3) MOVE BUFFER TO PLANE 2
MOVE.W 8(A0),8(A3)
MOVE.W 16(A0),16(A3)
MOVE.W 24(A0),24(A3)
MOVE.W 32(A0),32(A3)
MOVE.W 40(A0),40(A3)
MOVE.W 48(A0),48(A3)
MOVE.W 56(A0),56(A3)
MOVE.W 64(A0),64(A3)
MOVE.W 72(A0),72(A3)
MOVE.W 80(A0),80(A3)
MOVE.W 88(A0),88(A3)
MOVE.W 96(A0),96(A3)
MOVE.W 104(A0),104(A3)
MOVE.W 112(A0),112(A3)
MOVE.W 120(A0),120(A3)
MOVE.W 128(A0),128(A3)
MOVE.W 136(A0),136(A3)
MOVE.W 144(A0),144(A3)
MOVE.W 152(A0),152(A3)

ADD.L #160,A1 ADD ONE LINE TO FIRST POINTER
SUB.L #160,A3 SUB ONE LINE FROM SECOND POINTER
MOVE.W (A2)+,D1 TAKE VALUE FROM ADD TABLE FOR HOW
ADD.W D1,A0 MANY LINES TO ADVANCE THROUGH BUFFER
DBF D0,CONLOOP
RTS
****************************************
*THE EXIT ROUTINE. IF YOU'VE FINISHED *
*GAWPING AT OUR AMAZING SCROLL THEN YOU*
*ARE FREE TO LEAVE!!!!!!!!!!!!!!!!!!!! *
****************************************

TWISTEND
MOVE.L #$7770000,$FF8240 RESET SOME COLORS
MOVE.L #$0,$FF8244
MOVE.L oldssp,-(SP) BACK TO USER MODE
MOVE.W #$20,-(SP)
TRAP #1
ADD.L #6,SP
MOVE.W #-1,-(SP) RESET SCREEN POINTER
MOVE.L SAVESCREEN,-(SP)
MOVE.L SAVESCREEN,-(SP)
MOVE.W #5,-(SP)
TRAP #14
ADD.L #12,SP
CLR.W -(SP) GOOD BYE CRUEL WORLD!!!
TRAP #1 AAAARRGHHHHHHH!!!!!!!

************************************
*THE TABLE FOR WRAPPING THE SCROLL *
*AROUND THE IMAGINARY BAR. NUMBERS *
*CORRESPOND TO NUMBERS OF BYTES IN *
*THE BUFFER, 160= 1 LINE,320= 2LINE*
************************************

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
oldssp dc.l 0
SAVESCREEN DC.L 0
FONTTYPE DC.L FONT1
SCREEN1 DC.L 0 THE TWO SCREENS
SCREEN DC.L 0
SWITCH DC.W 0
SCROLLPOINT DC.L SCROLLINE POINTER TO SCROLLINE
TEXT DC.B $1B,$45,0,0 TEXT FOR CLEARING SCREEN

************************************
*THESE ROUTINES ARE FOR MAKING THE *
*SPECIAL FONTS WHICH THIS SCROLL *
*USES TO MAKE THE DIAGONAL SCROLL *
*EACH COPY OF THE ORIGINAL FONT IS *
*SHIFTED LEFT BY 2 PIXELS AND *
*MOVED UP BY ONE FROM THE PREVIOUS*
*THUS WHEN ALL 8 COPIES ARE ANIMATED*
*THEY APPEAR TO MOVE DIAGONALLY *
************************************

MAKEFONTS
LEA MAINFONT,A0 TAKE ORIGINAL FONT
LEA FONT1,A1 FIRST COPY
MOVE.W #32,D0 START 8 LINES IN TO CHAR
move.w #0,d4 SHIFT LEFT BY 1 PIXEL
BSR MOVEFONT
LEA MAINFONT,A0 TAKE ORIGINAL FONT
LEA FONT2,A1 SECOND COPY
MOVE.W #28,D0 START 7 LINES IN TO CHAR
move.w #2,d4 SHIFT LEFT BY 3 PIXELS
BSR MOVEFONT
LEA MAINFONT,A0 TAKE ORIGINAL FONT
LEA FONT3,A1 THIRD COPY
MOVE.W #24,D0 START 6 LINE S IN TO CHAR
move.w #4,d4 SHIFT LEFT BY 5 PIXELS
BSR MOVEFONT
LEA MAINFONT,A0 ETC
LEA FONT4,A1
MOVE.W #20,D0 ETC
move.w #6,d4
BSR MOVEFONT
LEA MAINFONT,A0
LEA FONT5,A1
MOVE.W #16,D0
move.w #8,d4
BSR MOVEFONT
LEA MAINFONT,A0
LEA FONT6,A1
MOVE.W #12,D0
move.w #10,d4
BSR MOVEFONT
LEA MAINFONT,A0
LEA FONT7,A1
MOVE.W #8,D0
move.w #12,d4
BSR MOVEFONT
LEA MAINFONT,A0 TAKE ORIGINAL FONT
LEA FONT8,A1 EIGTH COPY
MOVE.W #4,D0 START ON 2ND LINE
move.w #14,d4 SHIFT LEFT BY 15 PIXELS
BSR MOVEFONT
RTS
MOVEFONT MOVE.W #59,D1 60 CHARACTERS
COPYFONT MOVE.L A1,A2 FIRST MOVE FONT TO COPY
ADD.w D0,A2 ADD LINE OFFSET
MOVE.W #35,D3 36 LINES HIGH
MOVE.L A2,A3
COPYFONT2 CLR.W (A2)+ BLANK 1 WORD
MOVE.W (A0)+,(A2)+ MOVE FONT TO 2ND WORD
DBF D3,COPYFONT2 LOOP
MOVE.W D4,D5 MOVE AMOUNT TO SHIFT TO D5
COPYFONT3
MOVE.L A3,A4
MOVE.W #35,D3 NOW SHIFT FONT OVER (36 LINES)
COPYFONT4 LSL.W 2(A4) SHIFT 1ST WORD
ROXL.W (A4) 2ND WORD TAKING SHIFTED BIT FROM FIRST
ADD.L #4,A4
DBF D3,COPYFONT4
DBF D5,COPYFONT3
ADD.L #144,A1
DBF D1,COPYFONT
RTS

*******************************************
*WELL THIS IS WHER YOU CAN TYPE ALL THAT *
*SPONTANEOUS BULLSHIT THAT COMES TO THE *
*MINDS OF SCROLLINE WRITERS... *
*SCROLL IS TERMINATED BY $FF BUT THER MUST*
*BE 20 ODD BLANK CHARACTERS AFTER THIS *
*SO THAT SPURIOUS DATA IS NOT DISPLAYED *
*******************************************

SCROLLINE dc.b " "
DC.B " HI THERE, MANIKIN OF THE LOST BOYS HERE ON THE TWIST SCROLL. THE LOST BOYS ARE AN ESTABLISHED DEMO CREW FROM"
DC.B " ENGLAND AND THIS SCROLL IS FROM OUR NEWEST DEMO ON THE ST, THE DEFINITIVE DEMO. COPIES AVAILABLE FROM THE BEST"
DC.B " PD LIBRARIES OR FROM THE ADDRESS IN THIS SOURCE CODE. FOR THE PRICE OF 5 POUNDS, COMPLETE SOURCE CODE FOR THE DEF"
DC.B " DEMO ALSO AVAILABLE FOR 25 POUNDS AGAIN FROM THIS ADDRESS. "
DC.B " ",$ff
EVEN

********************************************
*THE FONT IS MADE UP OFF 1 PLANE CHARACTERS*
*WHICH ARE 36 LINES HIGH AND 1 WORD WIDE *
*THE BOTTOM 8 LINES MUST BE BLANK TO ALLOW *
*FOR THE SPECIAL FORMAT OF CHARACTERS!! *
*TO MAKE A FONT DRAW ASERIES OF CHARACTERS *
*15 PIXELS WIDE (1 BLANK FOR SPACE BETWEEN *
*LETTERS) AND 28 LINES HIGH. YOU COULD DRAW*
*THEM WITH A SLANT LIKE I DID TO IMPROVE *
*THE DIAGONAL EFFECT. *
********************************************

MAINFONT INCBIN "TWIST.DAT"

********************************************
*THE INCBIN INSTRUCTION IS USED BY GENST *
*TO INCLUDE A BINARY FILE INTO AN ASSEMBLED*
*FILE. IF THE ASSEMBLER YOU USE DOES NOT *
*HAVE THIS INSTRUCTION THEN EITHER CONVERT *
*THE TWIST.DAT FILE INTO DC.W STATEMENTS OR*
*ADD AN ADDITIONAL PIECE OF CODE TO LOAD *
*THE FILE TO THIS PIECE OF THE PROGRAM. *
********************************************

FONT1
FONT2 EQU FONT1+8640
FONT3 EQU FONT2+8640
FONT4 EQU FONT3+8640
FONT5 EQU FONT4+8640
FONT6 EQU FONT5+8640
FONT7 EQU FONT6+8640
FONT8 EQU FONT7+8640
FONTEND EQU FONT8+8640

← previous
next →
loading
sending ...
New to Neperos ? Sign Up for free
download Neperos App from Google Play
install Neperos as PWA

Let's discover also

Recent Articles

Recent Comments

Neperos cookies
This website uses cookies to store your preferences and improve the service. Cookies authorization will allow me and / or my partners to process personal data such as browsing behaviour.

By pressing OK you agree to the Terms of Service and acknowledge the Privacy Policy

By pressing REJECT you will be able to continue to use Neperos (like read articles or write comments) but some important cookies will not be set. This may affect certain features and functions of the platform.
OK
REJECT