Videogamecollector123 Posted March 12, 2013 Share Posted March 12, 2013 (edited) I'm a new commodore 64 owner and just acquired a 1541 drive. While it does load disks fine, I figured that it could use an alignment after it's years of service and I only have access to an oscilloscope at my school. I've got a test/demo disk and I'm a 1541 maintenance manual. So I've been trying to input a program that the manual says will move the head to track 16 and keep the motor running, but every time I've tried it I get a syntax error on line 20. Anyone know what I might be doing wrong? 10 OPEN 15,8,15,"U+":OPEN 2,8,2,"#":OPEN 8,8,8,"#" 20 PRINT #15,"B-P:";8;0:PRINT #15,"UA:";2;0;16;1 30 FOR X=1 TO 9:READ Y 40 PRINT #8,Y; 50 NEXT X 60 PRINT #15,"M-E"+CHR$(0)+CHR$(5) 70 STOP 80 DATA 173,0,28,9,4,141,0,28,96 Edited March 12, 2013 by Videogamecollector123 Quote Link to comment https://forums.atariage.com/topic/209974-aligning-a-1541-drive-with-an-oscilloscope/ Share on other sites More sharing options...
GadgetUK Posted March 13, 2013 Share Posted March 13, 2013 The only thing I can see that looks possibly strange about line 20 is there are 4 numeric parameters at the of the 2nd print statement and not 2 like the first print statement, but that might be correct. The best way to approach this kind of problem is type line 10 in, and run it. Then type line 20 in and run it, if it errors then and refers to line 20 its definitely line 20. Then I would experiment with the parameter (and find info on print from C64 basic online), perhaps removing the last 2 digits from the 2nd print, or try adding 2 more to the first print. Quote Link to comment https://forums.atariage.com/topic/209974-aligning-a-1541-drive-with-an-oscilloscope/#findComment-2714542 Share on other sites More sharing options...
GadgetUK Posted March 13, 2013 Share Posted March 13, 2013 See this:- http://www.c64-wiki.com/index.php/PRINT Maybe you are missing some spaces or something. Quote Link to comment https://forums.atariage.com/topic/209974-aligning-a-1541-drive-with-an-oscilloscope/#findComment-2714546 Share on other sites More sharing options...
Videogamecollector123 Posted March 13, 2013 Author Share Posted March 13, 2013 (edited) I'm still working on it, but I still don't get why it won't work. I've got the test disk with these programs on it http://www.everythin...hp?download.328, does anyone know if I can use one of them to keep the motor running continuously? Edited March 13, 2013 by Videogamecollector123 Quote Link to comment https://forums.atariage.com/topic/209974-aligning-a-1541-drive-with-an-oscilloscope/#findComment-2714588 Share on other sites More sharing options...
Videogamecollector123 Posted March 13, 2013 Author Share Posted March 13, 2013 Here's how I have the program entered IMGP3414 by Atari1977, on Flickr Quote Link to comment https://forums.atariage.com/topic/209974-aligning-a-1541-drive-with-an-oscilloscope/#findComment-2714640 Share on other sites More sharing options...
GadgetUK Posted March 13, 2013 Share Posted March 13, 2013 There is something wrong with line 20 syntax. Perhaps the # characters are wrong, or the semi colons or something. I tried messing last night on C64 app on my phone and got the same error. I will take a look later when ive got more time. Let us know if you get it working. Quote Link to comment https://forums.atariage.com/topic/209974-aligning-a-1541-drive-with-an-oscilloscope/#findComment-2714777 Share on other sites More sharing options...
Videogamecollector123 Posted March 13, 2013 Author Share Posted March 13, 2013 (edited) Thanks for taking a look, here's the code as the manual puts it. untitled by Atari1977, on Flickr Here's the manual it's from, 2 by Atari1977, on Flickr While it's a Vic-1541 on the cover, I was told that this applies to the regular 1541 as well Edited March 13, 2013 by Videogamecollector123 Quote Link to comment https://forums.atariage.com/topic/209974-aligning-a-1541-drive-with-an-oscilloscope/#findComment-2714827 Share on other sites More sharing options...
Videogamecollector123 Posted March 13, 2013 Author Share Posted March 13, 2013 (edited) My science teacher actually figured it out, apparently he's got a bit of programming experience. He got it working by taking the spaces out. So instead of "PRINT #15", it's "PRINT#15". Kinda of weird when the manual clearly has spaces printed in it. Edited March 13, 2013 by Videogamecollector123 Quote Link to comment https://forums.atariage.com/topic/209974-aligning-a-1541-drive-with-an-oscilloscope/#findComment-2715171 Share on other sites More sharing options...
Videogamecollector123 Posted March 14, 2013 Author Share Posted March 14, 2013 Another issue I need to resolve. The instructions I have say to connect the osciliscope to the output of UF4. The problem is I don't know which pin that is. Does anyone know what pin I should connect it to, or if that is the correct chip? Quote Link to comment https://forums.atariage.com/topic/209974-aligning-a-1541-drive-with-an-oscilloscope/#findComment-2715856 Share on other sites More sharing options...
GadgetUK Posted March 14, 2013 Share Posted March 14, 2013 Is it an LM592? Here's the pinout if it is. Pins 7 and 8, looks like a dual channel op amp. Quote Link to comment https://forums.atariage.com/topic/209974-aligning-a-1541-drive-with-an-oscilloscope/#findComment-2715889 Share on other sites More sharing options...
GadgetUK Posted March 15, 2013 Share Posted March 15, 2013 (edited) http://www.google.co.uk/imgres?hl=en&sa=X&biw=1573&bih=747&tbm=isch&tbnid=8N-04BId7-q4yM:&imgrefurl=http://www.dz863.com/datasheet-814219963-LM592_Differential-Video-Amplifier/&docid=x3y3_d7ibabCxM&imgurl=http://pinout-circuits-images.dz863.com/40/LM592.jpg&w=548&h=440&ei=PKNDUdOmB-ie0QXd84HIAg&zoom=1&ved=0CFMQrQMwAQ&iact=hc&vpx=87&vpy=108&dur=1032&hovh=201&hovw=251&tx=86&ty=81&page=1&tbnh=136&tbnw=170&start=0&ndsp=35 http://www.google.co...start=0&ndsp=35 Edited March 15, 2013 by GadgetUK Quote Link to comment https://forums.atariage.com/topic/209974-aligning-a-1541-drive-with-an-oscilloscope/#findComment-2716506 Share on other sites More sharing options...
mfonseca Posted December 8, 2013 Share Posted December 8, 2013 (edited) The SYNTAX ERROR refers to PRINT #15 which should be PRINT# 15 or more properly (and cost effective in RAM terms) PRINT#15 with no spaces between the PRINT and #. PRINT (for printing on screen) and PRINT# (for printing to files other than the default text console) are different BASIC tokens, therefore if you type PRINT #filenumber, the # will appear as an unexpected character to the BASIC parser and give you an error. Typing PRINT# filenumber instead, will use the file #filenumber to perform the output operation (in your case, send the disk command for head positioning). Hope that helps, M Edited December 8, 2013 by mfonseca 1 Quote Link to comment https://forums.atariage.com/topic/209974-aligning-a-1541-drive-with-an-oscilloscope/#findComment-2881362 Share on other sites More sharing options...
JimDrew Posted December 12, 2013 Share Posted December 12, 2013 That is correct. You can never have a space character between PRINT and #. PRINT #15 is bad, PRINT#15 is good. Quote Link to comment https://forums.atariage.com/topic/209974-aligning-a-1541-drive-with-an-oscilloscope/#findComment-2884085 Share on other sites More sharing options...
carlsson Posted December 12, 2013 Share Posted December 12, 2013 Probably some editor at the publishing company wanted to tidy up the listings and added spaces where they should not be. For that matter, it could be noted that Commodore BASIC has both PRINT, PRINT#, INPUT, INPUT#, GET and GET#, which work in pairs. Also, although not technically required in this case, it can be a good practise to CLOSE each channel after they've been used, ideally in the opposite order of them being opened. I suppose the maintenance guide aimed at experts who might make their own improvements instead of newbies who would follow the instructions literally to every space and comma. It's not the worst example I've encountered, I have seen (3rd party) usage/programming guides boldly state that BASIC supports LPRINT, LLIST and PLOT, commands you'd find in other dialects but usually not in factory default Commodore BASIC, at least not V2.0. Quote Link to comment https://forums.atariage.com/topic/209974-aligning-a-1541-drive-with-an-oscilloscope/#findComment-2884146 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.