home *** CD-ROM | disk | FTP | other *** search
- 10 rem *** 136colors demo ***
- 20 rem copyright 1992 - compute publications intl ltd - all rights reserved
- 30 rem ......................
- 40 poke53281,0:poke53280,0:poke53269,0
- 45 ifpeek(52720)=49then90
- 50 printchr$(147)"please wait..."
- 60 iff=0thenf=1:load"136colors",8,1
- 70 iff=1thenf=2:load"136spr",8,1
- 80 sys52600
- 90 printchr$(147):poke198,0
- 100 poke52882,150:poke52884,174:poke52886,198:poke52888,1
- 110 poke52883,100:poke52885,100:poke52887,100:poke52889,1
- 120 poke52894,200:poke52895,202:poke52896,204
- 130 poke52890,13:poke52891,13:poke52892,13
- 135 ifpeek(52896)<>0then135
- 136 poke53269,255
- 140 forl=13to1step-1
- 150 poke52890,l:poke52891,l:poke52892,l
- 160 forw=1to10:nextw
- 170 nextl
- 180 print"";
- 190 dimcl(13,1)
- 200 forl=1to13
- 210 readcl(l,0),cl(l,1)
- 220 nextl
- 230 data 1,13,24,32,43,51,52,57,58,64,65,71,72,77,82,86,88,93,96,102,103,111
- 240 data 112,118,128,134
- 250 c=int(rnd(1)*13)+1:d=1
- 260 lo=cl(c,0)
- 270 poke52890,lo:poke52891,lo:poke52892,lo
- 280 lo=lo+d
- 285 ifpeek(198)>0anden=1thenpoke198,0:goto400
- 290 gosub2000
- 300 iflo=cl(c,1)thend=-1:goto270
- 310 iflo<cl(c,0)then250
- 320 goto270
- 330 data "colors*"
- 340 data "\12"
- 350 data "copyright 1992 - compute pubs intl ltd*"
- 360 data "\12345678"
- 370 data "*"
- 380 data "press any key to continue_"
- 400 poke53269,0
- 410 printchr$(147)
- 420 poke52882,0:poke52883,75:poke52894,206:poke52890,129
- 430 poke53269,3
- 440 forx=0to174step2:poke52882,x:nextx
- 450 en=0:sn$="":print""
- 460 c=int(rnd(1)*136)+1
- 470 poke52890,c
- 480 forw=1to30
- 490 gosub2000
- 500 ifpeek(198)>0anden=1thenpoke198,0:goto700
- 510 nextw
- 520 goto460
- 530 data "in addition to being able to produce*"
- 540 data "136 colors, this program can also*"
- 550 data "create 4 high resolution (1 pixel res-*"
- 560 data "olution) sprites, each with 4 colors.*"
- 570 data "of those 4 colors, 1 color is capable*"
- 580 data "of 136 colors. the other 3 colors are*"
- 590 data "restricted to the 16 colors of the*"
- 600 data "commodore 64. each high resolution*"
- 610 data "sprite is created from two sprites.*"
- 620 data "included with the program is an editor*"
- 630 data "to produce these 4 high resolution*"
- 640 data "sprites. there are also two interrupt*"
- 650 data "routines included to ease the usage*"
- 660 data "of 136 colors and hi-res sprites.*"
- 670 data "*"
- 680 data "press any key to continue_"
- 700 poke53269,0:printchr$(147)
- 710 poke52882,138:poke52884,162:poke52886,186:poke52888,210
- 720 poke52883,75:poke52885,75:poke52887,75:poke52889,75
- 730 poke52894,208:poke52895,208:poke52896,208:poke52897,208
- 740 poke52890,1:poke52891,2:poke52892,3:poke52893,4
- 745 ifpeek(52897)<>0then745
- 750 poke53269,255
- 754 print"";:en=0:sn$=""
- 755 gosub2000
- 756 ifen=0thengoto755
- 760 print"";tab(15);"^"
- 770 print"";tab(12);"color"
- 780 dimc(3):c(0)=1:c(1)=2:c(2)=3:c(3)=4:d=0
- 790 fors=0to3
- 800 poke52890+s,c(s)
- 810 nexts
- 815 print"";tab(17);" "
- 816 print"[145]";tab(17);c(0)
- 820 geta$:ifa$=""then820
- 830 ifa$="j"thend=-1
- 840 ifa$="k"thend=1
- 850 forlr=0to3
- 860 c(lr)=c(lr)+d
- 870 ifc(lr)>136thenc(lr)=1
- 880 ifc(lr)<1thenc(lr)=136
- 890 nextlr:d=0
- 900 ifa$="e"then1020
- 910 goto790
- 920 data "now, you may observe the 136 colors*"
- 930 data "yourself by scrolling to the left by*"
- 940 data "pressing 'j' and scrolling to the right*"
- 950 data "by pressing 'k'. to end, press 'e'.*"
- 960 data "you will notice that the colors are*"
- 970 data "organized into several groups. i have*"
- 980 data "arranged each group from brightest to*"
- 990 data "darkest. each sprite has its own color*"
- 1000 data "address in which to poke its color*"
- 1010 data "number._"
- 1020 printchr$(147):poke53269,0
- 1030 poke53281,6:poke53280,14:poke646,14
- 1040 end
- 2000 ifen=1then2075
- 2010 ifsn$<>""then2045
- 2020 readsn$
- 2030 ifleft$(sn$,1)="\"then2080
- 2040 l=len(sn$):ch=0:printtab((41-l)/2);
- 2045 ch=ch+1
- 2050 ifmid$(sn$,ch,1)="*"thensn$="":print:goto2075
- 2060 ifmid$(sn$,ch,1)="_"thenen=1:goto2075
- 2070 printmid$(sn$,ch,1);
- 2075 return
- 2080 r=len(sn$)-1
- 2090 forrt=1tor:print:nextrt
- 2100 sn$="":goto2075
-