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 >
Commodore BASIC  |  2022-10-26  |  3KB  |  130 lines

  1. 1000 ! fld line bounce
  2. 1010 ! by andy partridge
  3. 1020 ! credit me if you use it-or else!
  4. 1030 !
  5. 1040 !
  6. 1050 *=49152
  7. 1060 !
  8. 1070 lda #1
  9. 1080 sta $d021
  10. 1090 sta 646
  11. 1100 jsr $e544  !<clear screen
  12. 1110 ldx #0     !<clear ram to avoid
  13. 1120 stx $3fff  ! garbage in fld'd area
  14. 1130 !
  15. 1140 lda #<text !<display text on
  16. 1150 ldy #>text ! the screen
  17. 1160 jsr $ab1e
  18. 1170 !
  19. 1180 sei
  20. 1190 lda #$7f
  21. 1200 sta $dc0d ! set interupts
  22. 1210 lda $dc0d
  23. 1220 lda #<irq
  24. 1230 sta $314
  25. 1240 lda #>irq
  26. 1250 sta $315
  27. 1260 lda #1
  28. 1270 sta $d01a
  29. 1280 lda $d011
  30. 1290 and #$7f
  31. 1300 sta $d011
  32. 1310 lda #$32  ! <- alter this raster
  33. 1320 sta $d012 ! trigger number for
  34. 1330 lda #1    ! postition of bounce
  35. 1340 sta $d019
  36. 1350 cli
  37. 1360 rts
  38. 1370 !
  39. 1380 irq !
  40. 1390 !
  41. 1400 ldx #$4 ! wait a little bit !
  42. 1410 hh dex  ! (remove this and the
  43. 1420 bne hh  ! top line flickers on/off)
  44. 1430 !
  45. 1440 ldx pos1 ! get no. of lines to fld
  46. 1450 !
  47. 1460 d1 lda $d012  !<get current line
  48. 1470 t1 cmp $d012  !<still there?
  49. 1480 beq t1        ! if yes,wait
  50. 1490 and #$07      !<if not,fld line
  51. 1500 ora #$10      ! down.why it works?
  52. 1510 sta $d011     ! who knows!
  53. 1520 dex           !<finished?
  54. 1530 bne d1        ! if not,continue!
  55. 1540 !
  56. 1550 ldy #0
  57. 1560 ju ldx dtab,y
  58. 1570 l2 dex
  59. 1580 bne l2
  60. 1590 lda ctab,y    !<this part just
  61. 1600 sta $d020     ! displays the green
  62. 1610 sta $d021     ! bar under the text.
  63. 1620 iny           ! (like program 1)
  64. 1630 cpy #19
  65. 1640 bne ju
  66. 1650 !
  67. 1660 ldx pos2
  68. 1670 !
  69. 1680 dp1 lda $d012 ! and do the fld
  70. 1690 tp1 cmp $d012 ! again below to
  71. 1700 beq tp1       ! compensate for the
  72. 1710 and #$07      !<top one...
  73. 1720 ora #$10      ! otherwise the
  74. 1730 sta $d011     ! whole screen would
  75. 1740 dex           ! go up and down!
  76. 1750 bne dp1       ! try deleting this!
  77. 1760 !
  78. 1770 lda #$01
  79. 1780 sta $d019
  80. 1790 lda #$1b      !<reset $d011 after
  81. 1800 sta $d011     ! our fiderling !
  82. 1810 jsr bounce    !<calculate bounce
  83. 1820 jmp $ea31     !<and finish!
  84. 1830 !
  85. 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!
  86. 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!
  87. 1860 !
  88. 1870 bounce !
  89. 1880 !
  90. 1890 hup inc posc
  91. 1900 ldx posc
  92. 1910 cpx #123     !<routine that reads
  93. 1920 bne no95     ! the values from the
  94. 1930 lda #255     ! sinus table for the
  95. 1940 sta posc     ! fld routine.
  96. 1950 jmp hup
  97. 1960 no95 lda sinus,x
  98. 1970 sec
  99. 1980 adc #5
  100. 1990 sta pos1
  101. 2000 lda #85
  102. 2010 sbc pos1
  103. 2020 sta pos2
  104. 2030 rts
  105. 2040 !
  106. 2050 pos1 brk
  107. 2060 pos2 brk
  108. 2070 posc brk
  109. 2080 !
  110. 2090 sinus !
  111. 2100 byt $1e,$1c,$1b,$19,$18,$16,$15,$13,$12,$10,$0f,$0e,$0d,$0b,$0a,$09
  112. 2110 byt $08,$07,$06,$05,$04,$03,$03,$02,$02,$01,$01,$00,$00,$00,$00,$00
  113. 2120 byt $00,$00,$00,$00,$00,$01,$01,$02,$02,$03,$04,$04,$05,$06,$07,$08
  114. 2130 byt $09,$0a,$0c,$0d,$0e,$0f,$11,$12,$13,$15,$16,$18,$19,$1b,$1c,$1e
  115. 2140 byt $1f,$21,$22,$24,$25,$27,$28,$29,$2b,$2c,$2d,$2f,$30,$31,$32,$33
  116. 2150 byt $34,$35,$36,$37,$38,$38,$39,$3a,$3a,$3a,$3b,$3b,$3b,$3b,$3b,$3b
  117. 2160 byt $3b,$3b,$3b,$3a,$3a,$39,$39,$38,$37,$36,$36,$35,$34,$33,$32,$30
  118. 2170 byt $2f,$2e,$2d,$2b,$2a,$29,$27,$26,$24,$23,$21,$20,$1f
  119. 2180 !
  120. 2190 !   ^  table of values for bounce
  121. 2200 !   !  (calculated in basic)
  122. 2210 !
  123. 2220 text !
  124. 2230 byt " dreams beyond the young understanding! "
  125. 2240 byt "(c) andy partridge  (the word magician!)",0
  126. 2250 !
  127. 2260 !   ^  the text printed on the
  128. 2270 !   !  screen...
  129. 2280 !
  130.