• Please review our updated Terms and Rules here

1541 and 1541-II disk troubles

alank2

Veteran Member
Joined
Aug 3, 2016
Messages
2,264
Location
USA
The 1541 powers up, the C64 can talk to it, at first couldn't read any of the existing disks that came with the system, but they are quite old. I opened it up, removed the metal shield, and carefully cleaned the head with some iso alcohol. I ended up using one of my low density disks and the first format made it about 6 tracks and failed. I tried again and it made it 30 tracks and failed. I tried it again and it formatted okay. I saved a 1 line basic program to it and was able to do a directory on it. I then put another disk in and was able to read the directory off of it for the first time. A few minutes later I was trying to read the directory off the disk I freshly formatted, and now it can't read it again. Any tips on what to try? Voltage measures like 4.89V on one of the ICs. Should I pull and re-seat all the IC's in a socket? What else should I check or look at?

The 1541-II has a problem with its power switch. It was very hard to flip, and when it does it feels like it will sometimes power the 12V but not the 5V. Voltages out of the power supply seem close enough to 12V and 5V. I cleaned the head on this one as well. I probably need to start by replacing the switch first, but when it _is_ working, the drive also can't read any disks. It moves the head around, it chatters, and so on.

I was hoping with 2 drives that at least one would work well! So far I have higher hopes for the 1541.
 
Sounds like you need a head alignment for the Drive. Those 1541's banged the head a lot to locate where they were.
That caused the drive to get out of alignment. I used to use a Cardinal Alignment floppy to get the head aligned
properly. But those floppy's are long out of date. The best thing you can do is get some Red Locktite and
put a drop on the shaft that I've marked in red in the Photo. Let it dry, and then align the floppy. Somewhere I
have a basic program that allows you to do that. I've sent it to a couple other guys here in the VCF. While
I haven't tried it, it's better than nothing.

Let me do a bit of digging and search my sent emails. In the mean time send me a PM with your Email address
and request C-64 Alignment Basic Program.


Larry


7.jpg
 
There may be a typo or two that I've missed, but I've been through the code more than twice.
You will know when you try to execute it in basic.

Code:
*******************
PROGRAM: ALIGN 1541
*******************
0 REM 1541 USER'S GUIDE SECTION 12.5
1 REM  COPYRIGHT: G. NEUFELD, 1984
2 :
3 REM  CHECK ALIGNMENT AND/OR RE-ALIGN A 1541
4 :
100 PRINT"{CLR}{DOWN}   1541 ALIGNMENT"
110 PRINT"{DOWN 2}INSERT STANDARD DISK"
120 PRINT"{DOWN 2}PRESS {RVS}RETURN{ROFF} WHEN READY"
130 :
140 REM  MACHINE CODE ROUTINE TO READ A HEADER
150 REM  RESIDES AT $0300 (BUFFER #0)
160 :
170 DATA 169,48:    :REM LDA #$30
180 DATA 133,69:    :REM STA $45
190 DATA 169,00:    :REM LDA #$00
200 DATA 133,63:    :REM STA $3F
210 DATA 76,177,243 :REM JMP $F3B1
220 :
230 D$(0)="00":D$(1)="01":D$(2)="10":D$(3)="11"
240 SID = 54272
250 DIM FD$(16)
260 FD$(0)="                         "
270 FD$(1)="CLEAN READ OF TRACK      "
280 FD$(2)="CLOSE TO HALFWAY POINT   "
290 FD$(3)="EXACTLY HALFWAY BETWEEN  "
300 FD$(9)="CLOSE TO HALFWAY POINT   "
310 T=18:N1$="?":N2$="?":TR=255
320 GET A$:IF A$<>CHR$(13) GOTO 320
330 :
340 OPEN 15,8,15,"I"
350 PRINT"{CLR}"
360 :
370 REM READ THE DISK CONTROLLER PORT
380 :
390 PRINT#15,"M-R"CHR$(0)CHR$(28)
400 GET#15,A$:IF A$=""THEN A$=CHR$(0)
410 A=ASC(A$)
420 CV=3 AND A
430 A=(159ANDA)OR(96+32*((T>17)+(T>24)+(T>30)))
440 PRINT#15,"M-W"CHR$(0)CHR$(28)CHR$(1)CHR$(A OR 4)
450 :
460 REM DISPLAY VALUES
470 :
480 PRINT"{HOME}{DOWN}   ALIGN THE 1541 DRIVE"
490 PRINT"{DOWN}TRACK # FROM STEPPER:"T"{LEFT}    "
500 PRINT"{DOWN}HEAD POSITION:"FD$(E)
510 T$=STR$(TR):S$=STR$(SE):IF E<>1 THEN T$="??":N1$="?":N2$="?":S$="??"
520 PRINT"{DOWN}TRACK # AS READ:  "RIGHT$(T$,2)
530 PRINT"SECTOR # AS READ: "RIGHT$(S$,2)
540 PRINT"ID OF TRACK READ: "N1$;N2$
550 PRINT"{DOWN 2}COMMANDS:"
560 PRINT"{DOWN}  F1 = MOVE HEAD OUT (LOWER TRACK #)"
570 PRINT"  F3 = MOVE HEAD IN (HIGHER TRACK #)"
580 PRINT"  F7 = TERMINATE PROGRAM"
590 PRINT"   I = INITIALIZE (TO TRACK 18)"
600 GET A$:A=ASC(A$+CHR$(0))
610 IF A=136 GOTO 800
620 IF A=133 AND T>1 THEN C=-1:GOTO 690
630 IF A=134 AND T<35 THEN C=1:GOTO 690
640 IF A=73 THEN PRINT#15,"I":T=18:E=0:A=214:G0T0420
650 GOTO 890
660 :
670 REM MOVE HEAD ONE HALF-TRACK IN OR OUT
680 :
690 CV=(CV + C)AND3
700 T=T+C*.5:IFT<1 THENT=1
710 IFT>36THENT=36
720 B=A AND 252
730 C=B+CV
740 PRINT#15,"M-W"CHR$(0)CHR$(28)CHR$(1)CHR$(C)
750 E=0
760 GOTO 390
770 :
780 REM TERMINATE PROGRAM (DRIVE OFF)
790 :
800 PRINT#15,"M-W"CHR$(0)CHR$(28)CHR$(1)CHR$(240)
810 FOR I=SID TO SID+23:POKE I,0:NEXT
820 FOR K=1TO10:GETA$:NEXT
830 CLOSE 15:END
840 :
850 REM ATTEMPT TO READ ANY HEADER
860 :
870 REM READ & SEND MACHINE CODE ROUTINE
880 :
890 RESTORE:C$=""
900 FOR K=1 TO 11:READ X:C$=C$+CHR$(X):NEXT
910 PRINT#15,"M-W"CHR$(0)CHR$(3)CHR$(11)C$
920 :
930 REM PUT JMP JOB IN THE JOB QUEUE
940 :
950 PRINT#15,"M-W"CHR$(0)CHR$(0)CHR$(1)CHR$(208)
960 :
970 REM WAIT FOR JOB TO FINISH
980 :
990 PRINT#15,"M-R"CHR$(0)CHR$(0)
1000 GET#15,E$:E=ASC(E$+CHR$(0))
1010 IF E>127 GOTO 680
1020 :
1030 REM "E" IS FDC ERROR CODE RETURNED
1040 IF E=3 THEN HZ=1000:GOSUB 1190
1050 IF E=2 OR E=9 THEN HZ=1500:GOSUB 1190
1060 IF E<>1 GOTO 390
1070 :
1080 REM CLEAN READ SO DIG OUT ID, TRAK & SECT
1090 :
1100 PRINT#15,"M-R"CHR$(22)CHR$(0)CHR$(4)
1110 GET#15,N1$
1120 GET#15,N2$
1130 GET#15,X$:TR=ASC(X$+CHR$(0))
1140 GET#15,X$:SE=ASC(X$+CHR$(0))
1150 GOTO 390
1160 :
1170 REM BLEEP IF NO SYNC
1180 :
1190 FOR I=SID TO SID+23:POKE I,0:NEXT
1200 POKE SID+5,9
1210 POKE SID+6,9
1220 POKE SID+24,15
1230 POKE SID+1,E+20
1240 POKE SID,177
1250 POKE SID+4,17:FOR I=1TO50:NEXT
1260 REM POKE SID+24,0
1270 RETURN
1280 POKE A1,85:POKE S1,150:POKE W1,65
1290 REM FOR K=1 TO 1000:NEXT
1300 RETURN

Good Luck.

If you find a type let me know and I'll update my file(s).

Note: Of the many C-64 1541's I aligned after adding the Red Locktite ever came back for alignment
problems or other service. That's a pretty good case history.

Check out this site:
Zimmers.Net by Bo Zimmerman

It appears to be down now, but keep trying it.


Larry
 
Last edited:
Check out:

Zimmers.Net by Bo Zimmerman


One other thing you might find interesting is about the Commodore 6502 MOS IC's. I've replaced
a 6502 in the 1541 Drive with an off the shelf 6502. Bu, I did add a 1.2K PULLUP resistor to
the CPU Clock Pin. It worked just fine.

I used a Ghostbusters Floppy as my test load after finishing the alignment. If Ghostbbusters
loaded and executed, it was a good alignment and a good drive.

Larry
 
Last edited:
The Epyx Vorpal Toolkit disk can also do this. I wrote a BASIC program for alignment as well but it's a little more thorough in that it forces the head from track 1 to 35 with bumps. Here's Torquemada 1541.

Code:
10 print"{r}torquemada 1541{R}"
20 print"this program will mobilize your disk"
30 print"head to its maximum extents using the"
40 print"fdc bump and seek jobs and an alignment"
50 print"master disk you insert. this may help"
55 print"cure sticky heads or alignment errors."
60 print
70 print"{r}warning!!!{R} this program should not be"
80 print"used on functional drives, as it may"
90 print"put them --out-- of alignment! you use"
100 print"this program at your own risk!!!"
110 print
120 print"copyright 2002 cameron kaiser":print"this is at your own risk-ware"
130 input"press return";w$
140 input"{q}device number";dv:ifdv<8ordv>11thenprint"bad device -- bye":end
150 print"checking for device":open15,dv,15:close15:ifst=0goto170
160 print"{r}device"dv"does not appear to exist":end
170 print"checking device signature":open15,dv,15,"ui":input##15,en,em$:close15
180 ifen<>73thenprint"{r}unexpected response code"en"from drive":end
190 dt$=right$(em$,4):ifdt$="1541"goto250
200 ifdt$="1571"goto230
210 a$="not a 1541 or 1571!":b$="this may not work!":gosub5000:ifexthenend
220 goto250
230 a$="this is a 1571!":b$="1571 drives rarely go out of alignment!":gosub5000
240 ifexthenend
250 print"{q}drive and firmware seem operational"
260 print"insert {r}write-protected{R} alignment"
270 print"master into device"dv:poke198,.
280 input"press return when ready";a$
290 open15,dv,15:print##15,"m-r"chr$(0)chr$(28):get#15,a$:a=asc(a$+chr$(0))
300 close15:a=aand16:ifa=0goto320
310 a$="sensor error!":b$="no disk or not write protected!":gosub5000
311 ifexthenend
320 rem *** main loop starts here ***
321 open15,dv,15,"m-w"+chr$(106)+chr$(0)+chr$(1)+chr$(193):input##15,en:close15
322 ifen<>0thenprint"{r}error"en"when changing revcnt":print"check drive ram":end
325 open15,dv,15,"i0":input##15,en,em$,et,es:close15
330 ifen<>0goto342
340 a$="valid track 18 read!":b$="bam seems to be readable now!":gosub5000
341 ifex=1thenprint"{q}resetting ... ";:open15,dv,15,"u:":close15:print"bye":end
342 open15,dv,15,"m-w"+chr$(106)+chr$(0)+chr$(1)+chr$(0):input##15,en:close15
344 ifen<>0thenprint"{r}error"en"when changing revcnt":print"check drive ram":end
345 print"{q}hold space to cancel drive operation"
349 print"{r}doing bump'n'seek ...{]}";
350 open15,dv,15:fory=1to4:printy;
360 t=35:s=0:j=176:gosub5500:ife<>1thenprint"{r}fdc error"e"on seek track 35"
370 t=1:s=0:j=192:gosub5500:ife<>1thenprint"{r}fdc error"e"on bump"
380 t=1:s=0:j=176:gosub5500:ife<>1thenprint"{r}fdc error"e"on seek track 1"
390 ifpeek(198)<>0thenprint:y=999
400 next:close15:print:ify>998thena$="user cancelled!":gosub5000:ifex=1goto341
410 goto320
4999 end
5000 ex=0:print"{r}warning!!!{R} "a$:ifb$<>""thenprintb$:b$=""
5010 poke198,.:input"continue anyway (y/n)";a$:a$=left$(a$,1):ifa$<>"y"thenex=1
5020 return
5500 cy=0
5510 print##15,"m-w"chr$(6)chr$(0)chr$(2)chr$(t)chr$(s)
5520 print##15,"m-w"chr$(0)chr$(0)chr$(1)chr$(j)
5530 cy=cy+1:print##15,"m-r"chr$(0)chr$(0):get#15,a$:e=asc(a$+chr$(0))
5540 ifcy>500thenprint"{r}timeout on fdc job":return
5550 ife>127goto5530
5560 return
 
My inbox is cleared if anyone tried to send me a PM.

I've got the 1541-II somewhat working.

I couldn't get the head clean with a q-tip/isopropyl so I had to use an ever so light bit of magic erase on it.

It seems some disks I have might be bad and put a lot of junk on the head, so I need to somehow identify which are good and which are bad.
 
I got the program entered Larry and it seems to be working well. What is the point of the half step?

I think the 1541-ii is mostly working - I've been able to save the program to the disk I formatted a number of times.
 
Alan,
Sorry, I have no clue what the half step does. I just worked on problem ones or dead ones.
I wasn't a user of any kind. I could get Ghostbusters to run for a bit to test loading.

Larry
 
The half-step check is probably there for certain copy protection schemes that record "fat tracks." These tend to be more sensitive to alignment problems. Ghostbusters is a good test for this, actually, because Activision XEMAG is one of those.
 
The 1541-II reports the half step nearly all of the time as "halfway", I think its alignment is good. On track is always the right track. I used an existing master disk made by commodore to test with.

The 1541 isn't as well aligned, it is always on track with the track # being reported correctly, but if I go to 15.5 for example, it may still show track 15 or it may sometimes say halfway. It isn't as consistent as the 1541-II which is almost always saying halfway.

I think I have both drives working now, I unplugged and reseated all the IC's on the 1541 and cleaned its head as well - same thing took some magic eraser to get all the junk off of it.
 
Hi,

many times, it is not only the head that is dirty and preventing read, write or stops the format process
in the middle. It is also the disk, that is dirty. And thus, dirty disk will also make the head dirty again
just after using it a couple of times.

There are many videos on youtube to show you how to clean your disks as well. Just found a clever way
to do it from this video:

https://youtu.be/Ci5tG0MxH8I

Cleaned disks will in many case make non readable disk work very well.
 
Back
Top