home *** CD-ROM | disk | FTP | other *** search
- 10 vs$="970127.a": rem 1541 alps drive checkout, needs c64 computer
- 20 rem save $801-3000, binary $2e00-$3000:speed@2e00,led@2ec0,dwnld@2f00
- 30 :
- 40 rem to load into pet: poke41,8:poke8*256,0:new-then load pgm
- 50 rem save binary (2a00-3000) to disk and reload when finished modifying
- 60 rem final save must be from monitor 0801 to 3000
- 70 :
- 80 print"[147]":ie=2*4096+15*256:rem dwnlodr @$2f00
- 90 poke53280,1:poke53281,1:printchr$(28):printchr$(142):remgrey,red,caps
- 100 o0$=chr$(0):o1$=chr$(1):o3$=chr$(3):t6$=chr$(16):t7$=chr$(17):ff$=chr$(255)
- 110 nc=4:ch$(1)="@":ch$(2)="y":ch$(3)="n":ch$(4)="r":ch$(5)=" "
- 120 ch=08:fl$="failed":ps$="passed"
- 130 ll$="[164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164]"
- 140 mq=0:s=0:gosub610:printtab(7)" *** menu ***"
- 150 printtab(7)"1 - led test"
- 160 printtab(7)"2 - write protect test"
- 170 printtab(7)"3 - stepper motor test"
- 180 printtab(7)"4 - motor speed test"
- 190 printtab(7)"5 - alignment test"
- 200 printtab(7)"6 - stop limit test"
- 210 printtab(7)"7 - read / write test"
- 220 printtab(7)"8 - alter system address:";ch
- 230 printtab(7)"9 - ends program."
- 240 print" space for all tests [146]"
- 250 printtab(7)"your selection?"
- 260 geta$:ifa$=""then260
- 270 ifa$=" "thengosub2460:goto300
- 280 s=val(a$):mq=1:ifs<1 or s>9 then 260
- 290 gosub2460:on s goto 300,310,320,330,340,350,360,2450,390
- 300 s=1:gosub970:rem led
- 310 s=2:gosub1230:rem wr prot
- 320 s=3:gosub680:rem hd step
- 330 s=4:gosub1410:rem mtr speed
- 340 s=5:gosub1620:rem align
- 350 s=6:gosub1920:rem limit
- 360 s=7:goto2330:rem read/wrt
- 370 print"[147]end of drive test":fori=1to700:next:run
- 380 run
- 390 end
- 400 geta$:ifa$<>""then400
- 410 geta$:ifa$=""then410
- 420 ifin=0thenii=0:goto450
- 430 ifa$<>ch$(in)then410
- 440 in=0:return
- 450 ii=ii+1:ifii>ncthen410
- 460 if ch$(ii)<>a$then450
- 470 return
- 480 print"do not insert a disk for this step.":return
- 490 print"insert an "fd$" disk for this step.":return
- 500 print" press 'space' when ready":in=5:goto 400
- 510 gosub520:goto400
- 520 printleft$(ll$,len(ou$))
- 530 print""ou$"":return
- 540 tk=1:jb=12:rem bump
- 550 print#15,"m-w"chr$(tj)chr$(hj)chr$(2)chr$(tk)o0$
- 560 print#15,"m-w"chr$(lj)chr$(hj)o1$chr$(jb*16+dr)
- 570 print#15,"m-r"chr$(lj)chr$(hj):get#15,d$:d=asc(d$+o0$):ifd>127then570
- 580 ifjb=12thenfori=1to2500:next
- 590 return
- 600 print""ou$:return
- 610 print tab(10)"[147] 1541 alps drive check & alignment"
- 620 print tab(10)"program "vs$:print
- 630 if s thenprint"step"s"[146]";
- 640 return
- 650 print"press space to continue, 'r' to repeat"
- 660 nc=5:gosub400:oniigoto380,660,660
- 670 nc=4:ii=ii-4:return
- 680 gosub610:rem head stepper test
- 690 hf=0:print"drive"dr"head stepper test":gosub480
- 700 print" press 'space' when ready":in=5:gosub400
- 710 gosub540:print"[147]the stepper pulley must now be"
- 720 print"positioned for a clearance of from"
- 730 print"0.25 to 0.40 mm (0.010 to 0.020 in)"
- 740 print"between the pulley stop and the step of"
- 750 print"the pulley."
- 760 ou$="is the clearance correct? (y/n)":gosub510
- 770 oniigoto380,780,910,710
- 780 print"the head should move to the inside"
- 790 tk=35:jb=11:gosub550
- 800 ou$="did the head move to the inside? (y/n)"
- 810 gosub510
- 820 oniigoto380,830,910,810
- 830 print"the head should move to the outside"
- 840 tk=1:jb=11:gosub550
- 850 ou$="did the head move to outside? (y/n)"
- 860 gosub510
- 870 oniigoto380,880,910,860
- 880 print"the head should move smoothly"
- 890 forj=1to3:tk=35:jb=11:gosub550:tk=1:gosub550:next
- 900 ou$="did head move smoothly? (y/n)":gosub510:oniigoto380,920,910
- 910 hf=1
- 920 ov$=" head stepper test"
- 930 ou$=ps$+ov$:ifhfthenou$=fl$+ov$
- 940 gosub600:gosub650:ifiiandmqthen370
- 950 ifiithenreturn
- 960 goto710
- 970 gosub610:rem led test
- 980 lf=0:print"drive"dr"led test":gosub480
- 990 gosub2270:rem led pgm @$2ec0 to $3c0 (move$2e00+to$300+)
- 1000 ou$="is led off ? (y/n)"
- 1010 gosub510:oniigoto380,1020,1170,1010
- 1020 ou$="is led on ? (y/n)":gosub520
- 1030 print#15,"m-w"chr$(197)o3$chr$(1)chr$(169):rem lda # to $3c5
- 1040 print#15,"m-e"chr$(192)o3$:rem exec $3c0
- 1050 geta$:ifa$<>"y"anda$<>"n"then1040
- 1060 ifa$="y"then1080
- 1070 ifa$="n"then1170
- 1080 print"the led should blink"
- 1090 fori=1to4
- 1100 t=ti
- 1110 print#15,"m-e"chr$(192)o3$:rem exec $3c0
- 1120 ifti-t<3 then1110
- 1130 t=ti
- 1140 ifti-t<20then1140
- 1150 next:ou$="did the led blink ? (y/n)"
- 1160 gosub510:oniigoto380,1180,1170,1160
- 1170 lf=1
- 1180 ov$=" led test":ou$=ps$+ov$
- 1190 iflfthenou$=fl$+ov$
- 1200 gosub600:gosub650:ifiiandmqthen370
- 1210 ifiithenreturn
- 1220 goto970
- 1230 gosub610:remwp sw
- 1240 print"write protect switch adjustment:"
- 1250 gosub2270:rem led pgm @$2ec0 to $3c0 (move$2e00+to$300+)
- 1260 print"with no disc in drive, the led should"
- 1270 print"be off. with a disk inserted halfway,"
- 1280 print"the led should be on. adjust switch"
- 1290 print"to get the proper response."
- 1300 ou$=" press space when done ":gosub520
- 1310 print#15,"m-e"chr$(192)o3$:rem exec $3c0
- 1320 geta$:ifa$<>" "then1310
- 1330 ou$="does led show correctly? (y/n)":gosub510
- 1340 ov$=" write-protect[160]switch test"
- 1350 oniigoto380,1370,1360,1230
- 1360 ou$=fl$+ov$:goto 1380
- 1370 ou$=ps$+ov$
- 1380 gosub520:gosub650:ifiiandmqthen370
- 1390 ifiithen return
- 1400 goto1230
- 1410 gosub610:in=0:print"motor speed adjustment"
- 1420 gosub2270:remspd @$2e00 to $300
- 1430 gosub490:gosub540:gosub500
- 1440 print"[145][145][145] doing speed check on drive"
- 1450 print"adjust speed deviation to 0 ms"
- 1460 print"press 'space' when speed adjusted"
- 1470 print#15,"m-w"chr$(5)o3$o1$chr$(11):rem wr md
- 1480 tk=tv:jb=14:gosub550:rem start
- 1490 fori=1to4:print#15,"m-r"chr$(6+i)o3$:get#15,b$:sv(i)=asc(b$+o0$):next
- 1500 ifsv(3)=0orsv(4)=0then1610
- 1510 sa=(256*sv(4)+sv(2)+2-2000):sb=(256*sv(3)+sv(1)+2-2000)
- 1520 sd=int((sa+sb)/20+.5):sp=abs(sd)
- 1530 print"[145]speed deviation is "sd "[157] ms "
- 1540 iffp=0andsp<1thenprint"speed ok as is":goto1580
- 1550 fp=1:geta$:ifa$=" "thenprint"[147]":goto1580
- 1560 ifsp>5then1470
- 1570 print#15,"m-w"chr$(5)o3$o1$chr$(78):goto1480:rem rd mode
- 1580 gosub540:gosub650:ifiiandmqthen370
- 1590 ifiithenreturn
- 1600 goto1410
- 1610 print"test failed--check disk":fori=1to1000:next:goto1410
- 1620 gosub610:print"head alignment"
- 1630 print"put alignment disk 970016-01 in drive"
- 1640 print"put scope probes on pins 7 and 8 of"
- 1650 print"uf3 (short board) or uh7 (long board)"
- 1660 print"differentally added at 50 mv/cm."
- 1670 print"trigger at pin 9 of uc2 (long board)"
- 1680 print"or pin 37 of uc1 (short board)."
- 1690 print"set sweep speed at 20ms per cm."
- 1700 gosub540:gosub500
- 1710 jb=11:print"[147]the drive is now on track 17."
- 1720 print"for checking purposes, the lobe sizes"
- 1730 print"must be within 30% of each other."
- 1740 print"for alignment, adjust the stepper such"
- 1750 print"that the lobe sizes are within 15% of":print"each other."
- 1760 print"typing 'h' will offstep the head for"
- 1770 print"hysterisis check."
- 1780 print"when the lobes reappear check for equal"
- 1790 print"lobe size. if lobe sizes are unequal"
- 1800 print"adjust to split the difference."
- 1810 print"type 'b' to restore the drive."
- 1820 print"press 'space' when done."
- 1830 geta$:if a$=""thentk=17:gosub550:goto1830
- 1840 if a$="h"thenhy=1-hy:goto1880
- 1850 if a$=" "then1900
- 1860 if a$="b"thengosub540:jb=11:goto1830
- 1870 goto1830
- 1880 ifhythentk=20:gosub550:goto1830
- 1890 tk=14:gosub550:goto1830
- 1900 ifmqthen370
- 1910 return
- 1920 gosub610:rem stop adj
- 1930 geta$:ifa$<>""then1930
- 1940 cf=0:print"stepper limit stop check":gosub480:gosub500
- 1950 gosub540:tk=1:jb=11
- 1960 print"[147]there should be a clearance of from"
- 1970 print"0.25 to 0.40 mm (0.010 to 0.020 in)"
- 1980 print"between the stop and the step on the":print"pulley."
- 1990 print"watch the pulley and press the 's' key."
- 2000 print"the pulley must rotate clockwise"
- 2010 print"against the stop. if the pulley does"
- 2020 print"not rotate or rotates counterclockwise"
- 2030 print"then the stop is not set correctly."
- 2040 geta$:if a$<>"s"thengosub550:goto2040
- 2050 print#15,"m-w"chr$(74)o0$o1$ff$
- 2060 print#15,"m-w"chr$(32)o0$o1$chr$(64)
- 2070 ou$="did correct movement occur? (y/n/r)":gosub520
- 2080 geta$:ifa$<>"y"anda$<>"n"anda$<>"r"thengosub550:goto2080
- 2090 print"[147]":ifa$="r"then1950
- 2100 ifa$="n"then2210
- 2110 print"second test of stop limit adjustment"
- 2120 print"watch the pulley and press the 's' key."
- 2130 print"the pulley must not move. if it does,"
- 2140 print"then the stop is not set correctly."
- 2150 geta$:if a$<>"s"thengosub550:goto2150
- 2160 print#15,"m-w"chr$(74)o0$o1$ff$
- 2170 print#15,"m-w"chr$(32)o0$o1$chr$(64):gosub520
- 2180 geta$:ifa$<>"y"anda$<>"n"anda$<>"r"thengosub550:goto2180
- 2190 print"[147]":ifa$="r"then1950
- 2200 ifa$="y"then2220
- 2210 cf=1
- 2220 ov$=" stop limit adjustment":ou$=ps$:ifcfthenou$=fl$
- 2230 ou$=ou$+ov$:gosub600
- 2240 gosub650:gosub540:ifiiandmqthen370
- 2250 ifiithen return
- 2260 goto1920
- 2270 rem downloader
- 2280 pokeie+3,0:pokeie+4,46:rem $2e00
- 2290 pokeie+5,0:pokeie+6,3:pokeie+7,1:rem1pg to $300
- 2300 pokeie+8,ch:sysie
- 2310 ifstthenprint"download failed":end
- 2320 return
- 2330 gosub610:print"write/read tests":gosub490:gosub500
- 2340 print"[147]newing test ";
- 2350 print#15,"n0:f15":gosub2440:ifathenprint:print"failed "b$:goto2420
- 2360 printb$
- 2370 open7,ch,7,"#":restore:print"write/read tests"
- 2380 readtr:iftr=-1then2420
- 2390 print#15,"u2";7;dr;tr;1
- 2400 print"write/read on track"tr;:gosub2440:ifa thenprint"";
- 2410 printb$:goto2380
- 2420 close7:gosub650:ifiithen370
- 2430 goto2330
- 2440 input#15,a,b$:return
- 2450 input"[147]system address 8[157][157][157]";ch:goto140
- 2460 sy=0:close15:open15,ch,15:fd$="f15"
- 2470 print#15,"m-r"ff$ff$:get#15,a$:a=asc(a$+o0$)
- 2480 print#15,"m-r"chr$(254)ff$:get#15,b$:b=asc(b$+o0$)
- 2490 ifa=254andb=103thensy=15:tv=36:bf=3:lj=0:hj=0:tj=6:return
- 2500 print"system not identifiable"
- 2510 print"return code for $fffe and $ffff is:"b,a:end
- 2520 data 1,5,10,15,20,25,30,35,-1:rem r/w trks
-