home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Commodore Disk User Volume 3 #1
/
Commodore_Disk_User_Vol.3_1_1989_-.d64
/
rasters3
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
3KB
|
130 lines
1000 ! fld line bounce
1010 ! by andy partridge
1020 ! credit me if you use it-or else!
1030 !
1040 !
1050 *=49152
1060 !
1070 lda #1
1080 sta $d021
1090 sta 646
1100 jsr $e544 !<clear screen
1110 ldx #0 !<clear ram to avoid
1120 stx $3fff ! garbage in fld'd area
1130 !
1140 lda #<text !<display text on
1150 ldy #>text ! the screen
1160 jsr $ab1e
1170 !
1180 sei
1190 lda #$7f
1200 sta $dc0d ! set interupts
1210 lda $dc0d
1220 lda #<irq
1230 sta $314
1240 lda #>irq
1250 sta $315
1260 lda #1
1270 sta $d01a
1280 lda $d011
1290 and #$7f
1300 sta $d011
1310 lda #$32 ! <- alter this raster
1320 sta $d012 ! trigger number for
1330 lda #1 ! postition of bounce
1340 sta $d019
1350 cli
1360 rts
1370 !
1380 irq !
1390 !
1400 ldx #$4 ! wait a little bit !
1410 hh dex ! (remove this and the
1420 bne hh ! top line flickers on/off)
1430 !
1440 ldx pos1 ! get no. of lines to fld
1450 !
1460 d1 lda $d012 !<get current line
1470 t1 cmp $d012 !<still there?
1480 beq t1 ! if yes,wait
1490 and #$07 !<if not,fld line
1500 ora #$10 ! down.why it works?
1510 sta $d011 ! who knows!
1520 dex !<finished?
1530 bne d1 ! if not,continue!
1540 !
1550 ldy #0
1560 ju ldx dtab,y
1570 l2 dex
1580 bne l2
1590 lda ctab,y !<this part just
1600 sta $d020 ! displays the green
1610 sta $d021 ! bar under the text.
1620 iny ! (like program 1)
1630 cpy #19
1640 bne ju
1650 !
1660 ldx pos2
1670 !
1680 dp1 lda $d012 ! and do the fld
1690 tp1 cmp $d012 ! again below to
1700 beq tp1 ! compensate for the
1710 and #$07 !<top one...
1720 ora #$10 ! otherwise the
1730 sta $d011 ! whole screen would
1740 dex ! go up and down!
1750 bne dp1 ! try deleting this!
1760 !
1770 lda #$01
1780 sta $d019
1790 lda #$1b !<reset $d011 after
1800 sta $d011 ! our fiderling !
1810 jsr bounce !<calculate bounce
1820 jmp $ea31 !<and finish!
1830 !
1840 dtab byt 8,8,8,8,8,8,8,1,8,8,8,8,8,8,8,1,8,8,8 !<delays for middle bit!
1850 ctab byt 9,5,13,0,0,0,0,9,5,5,9,0,0,0,0,13,5,9,0 !<colours for middle bit!
1860 !
1870 bounce !
1880 !
1890 hup inc posc
1900 ldx posc
1910 cpx #123 !<routine that reads
1920 bne no95 ! the values from the
1930 lda #255 ! sinus table for the
1940 sta posc ! fld routine.
1950 jmp hup
1960 no95 lda sinus,x
1970 sec
1980 adc #5
1990 sta pos1
2000 lda #85
2010 sbc pos1
2020 sta pos2
2030 rts
2040 !
2050 pos1 brk
2060 pos2 brk
2070 posc brk
2080 !
2090 sinus !
2100 byt $1e,$1c,$1b,$19,$18,$16,$15,$13,$12,$10,$0f,$0e,$0d,$0b,$0a,$09
2110 byt $08,$07,$06,$05,$04,$03,$03,$02,$02,$01,$01,$00,$00,$00,$00,$00
2120 byt $00,$00,$00,$00,$00,$01,$01,$02,$02,$03,$04,$04,$05,$06,$07,$08
2130 byt $09,$0a,$0c,$0d,$0e,$0f,$11,$12,$13,$15,$16,$18,$19,$1b,$1c,$1e
2140 byt $1f,$21,$22,$24,$25,$27,$28,$29,$2b,$2c,$2d,$2f,$30,$31,$32,$33
2150 byt $34,$35,$36,$37,$38,$38,$39,$3a,$3a,$3a,$3b,$3b,$3b,$3b,$3b,$3b
2160 byt $3b,$3b,$3b,$3a,$3a,$39,$39,$38,$37,$36,$36,$35,$34,$33,$32,$30
2170 byt $2f,$2e,$2d,$2b,$2a,$29,$27,$26,$24,$23,$21,$20,$1f
2180 !
2190 ! ^ table of values for bounce
2200 ! ! (calculated in basic)
2210 !
2220 text !
2230 byt " dreams beyond the young understanding! "
2240 byt "(c) andy partridge (the word magician!)",0
2250 !
2260 ! ^ the text printed on the
2270 ! ! screen...
2280 !