home *** CD-ROM | disk | FTP | other *** search
- 0 l=l+1:ifl=1thenload"multiplexor",8,1
- 1 fort=0to179:poke1024+t,peek(7090+t):next
- 10 sys49316
- 20 poke53280,0:poke53281,15
- 30 poke53248+27,255
- 31 poke53248+28,255:poke53248+37,4:poke53248+38,6
- 40 c=20:fort=0to31:poke50240+t,1:poke50272+t,255:next
- 50 ford=0to3:c=87:fort=0to7:poke50176+k,c:c=c+24:poke50208+k,62+d*50:k=k+1
- 60 nextt,d
- 65 fort=0to31:poke50304+t,0:next
- 70 sys49920
- 71 goto20010
- 90 fort=0to31:d=d+.1:poke50208+t,peek(50208+t)+sin(d)*10:next:sys49920:return
- 100 print"[147] the control register is very difficult to follow so watch carefully"
- 101 d=0:gosub90:y=9:x=2:gosub102:goto190
- 102 print" the control register is very difficult to follow so watch carefully"
- 110 print"the control register is a mixture of"
- 120 print"msb,sprite data priority,multicolor-"
- 130 print"selection,sprite expand x and y and is set out as follows:"
- 140 print" [176][192][178][192][178][192][178][192][178][192][178][192][178][192][178][192][174] [221] [221] [221] [221] [221] [221] [221] [221] [221]"
- 150 print" [173][192][177][192][177][192][177][192][177][192][177][192][177][192][177][192][189]"
- 170 print" 1 6 3 1 8 4 2 1 2 4 2 6"
- 180 print" 8"
- 181 poke1024+y*40+x,160
- 182 return
- 190 print"if bit 128 is set to one this means thatthe sprite will appear in the";
- 200 print" msb area"
- 220 y$="":printy$;"press space to continue";:gosub50000
- 230 goto260
- 240 fort=15to24:printleft$(y$,t);" ";:next
- 245 print"";
- 250 return
- 260 gosub240:x=x+2:gosub102
- 270 print"if bit 64 is set then the sprite will beexpanded in the x direction"
- 280 gosub50000
- 290 gosub240:x=x+2:gosub102
- 300 print"if bit 32 is set then the sprite will beexpanded in the y direction"
- 310 gosub50000:gosub240:x=x+2:gosub102
- 320 print"if bit 16 is set then the sprite will bebehind the screen data"
- 330 gosub50000:gosub240:x=x+2:gosub102
- 340 print"if bit 8 is set then the sprite will bein multicolour mode"
- 350 gosub50000:gosub240:x=x+2:gosub102
- 360 print"if bit 4 is set then the sprite will beset to on"
- 365 gosub50000:gosub240:x=x+2:gosub102
- 366 print"bit 2 is not used"
- 367 gosub50000:gosub240:x=x+2:gosub102
- 368 print"bit 1 is not used"
- 369 gosub50000:print"[147]"
- 370 return
- 400 print"these registers are the raster positions";:gosub90
- 410 print"for the next block of eight sprites"
- 420 print"if $c0a0 or 49312 was poked with a $40 or 64"
- 430 print" then the actual raster position would"
- 440 print"be $30 or 48 because i have to subtract $10 or 16 so i can display";
- 450 print" the data"
- 460 print" this can be done with all four registers"
- 470 gosub50000:print"[147]"
- 480 return
- 20010 print"[147][151] ";
- 20020 print"[152] ";
- 20030 print"[155] ";
- 20040 print"[146] the operating instructions for the ";
- 20041 print"amazing multiplexor written by balhazar";
- 20050 print"[155] ";
- 20060 print"[152] @ ";
- 20070 print"[151] ";
- 20080 print"[144] ";
- 20160 print" to use this multiplexor is very simple"
- 20170 print"it is like useing an expanded video chip";
- 20180 print"but a few rules must be followed"
- 20190 print"1...no more than eight (8) sprites must be in the same horizontal ";
- 20200 print"strip or they will flicker!"
- 20210 print"2...the irq at $0314 and $0315 must not be changed"
- 20220 print" press any key to continue ";
- 20221 fort=0to63:poke255*64+t,216:next
- 20230 gosub50000
- 20240 print""
- 20241 print"do you want decimal or hex numbers?(d/h)"
- 20242 get a$:ifa$="d"then30000
- 20243 ifa$<>"h"then20242
- 20250 print"[151]the locations to used by the multiplexor"
- 20260 print" $c000-$cfff are used by the program"
- 20270 print" $c400-$c41f are the 'x' positions of each sprite"
- 20280 print" $c420-$c43f are the 'y' positions of each sprite"
- 20290 print" $c440-$c45f are the colours for each sprite"
- 20300 print" $c460-$c47f are the whats for each sprite"
- 20310 print" (simalar to $07f8-$07ff)"
- 20320 print" $c480-$c49f is the control register"
- 20340 print" to update the sprites sys $c300"
- 20350 print" this plots their new positions into memory"
- 20351 print" to start the multiplexor sys$c0a4"
- 20360 goto40000
- 30000 :
- 30250 print"[151]the locations to used by the multiplexor"
- 30260 print" 49152-53247 are used by the program"
- 30270 print" 50176-50207 are the 'x' positions of each sprite"
- 30280 print" 50208-50239 are the 'y' positions of each sprite"
- 30290 print" 50240-50303 are the colours for each sprite"
- 30300 print" 50272-50303 are the whats for each sprite"
- 30310 print" (simalar to 2040-2047)"
- 30320 print" 50304-50335 is the control register"
- 30340 print" to update the sprites sys 49920"
- 30350 print" this plots their new positions into memory"
- 30360 print" to start the multiplexor sys 49316"
- 40000 print" press any key to continue ";
- 40010 gosub50000:gosub100
- 40011 print" $c0a0-$c0a3 or 49312-49315 a nought means miss out that line"
- 40012 gosub400
- 40013 print" numbers can be directly poked into the $c000 or 49152 onwards area"
- 40014 print" eg. poke 49152,90 (xpos)
- 40015 [153]" eg. poke 49174,90 (ypos)
- 40016 print" would print a sprite 90 down and 90 across if $c0a0-$c0a3 are set"
- 40018 print" press any key to continue ";
- 40019 gosub50000
- 40020 print"[147]the name for the routine is 'multiplexor'"
- 40021 print"this is for the routine you have bought"
- 40022 print"load it in using load"+chr$(34)+"multiplexor"+chr$(34)+",8,1"
- 40028 print" press any key to continue ";
- 40029 gosub50000
- 40100 print" press any key to load the menu"
- 40120 gosub50000
- 40130 poke53248+21,0
- 40131 poke53280,2
- 40132 open15,8,15,"i0:":close15:goto40133
- 40133 rem
- 40134 s$="menu":load"rtu",8,1
- 50000 reada:ifa=-1thenrestore:goto50000
- 50005 ford=0to51:next
- 50010 poke53248+28,a:geta$:ifa$=""then50000
- 50020 return
- 50030 data 255,1,2,4,8,16,32,64,128,3,6,12,24,48,96,192,96,48,24,12,6,3,128
- 50040 data 64,32,16,8,4,2,1,255,0,255,0,255,0,255,0,255,0,-1
- 60000 rem
-