Help with Apple /// format disk error #21

17 posts / 0 new
Last post
Offline
Last seen: 1 week 6 days ago
Joined: Dec 21 2013 - 20:49
Posts: 113
Help with Apple /// format disk error #21

I am trying to fix an external Disk /// drive that gives a "Format error #21. Internal program error." Message when I try to format a diskette. When I format the diskette using the internal disk drive, the disk completes formatting with no errors. I've looked through my Apple /// manuals and did a Google search, but cannot find what this error means. I've cleaned the head on this disk drive, have cleaned the head mechanism rails with isopropyl alcohol, and have replaced the ICs on the Disk /// Analog Card from a known working Disk II drive. Appreciate any help/information on this error and suggested fixes. 

MacFly's picture
Offline
Last seen: 2 hours 57 min ago
Joined: Nov 7 2019 - 13:49
Posts: 483
Have you checked/recalibrated

Have you checked/recalibrated the drive speed? Use "Locksmith" (in Apple ][ emulation mode) to show if and how far the drive speed is off and then use the trimmer on the drive's motor control board to adjust.

Formatting is most sensitive to incorrect drive speeds. Reading and writing is somewhat tolerant and slightly adapts to the current disk (since the drive needs to accept disks which were formatted with different drives). But formatting uses a tighter check.

I don't remember the exact error code, but if you say that reading/writing works, but not formatting, then that's the most likely cause.

retro-tinker's picture
Offline
Last seen: 1 day 6 hours ago
Joined: Jun 7 2023 - 15:41
Posts: 77
Drive speed

Not saying your drive speed isn't off - but a few months ago I was getting this error message "Device dependent error #33; See manufacturer's documentation" when my external drive was far enough off that it wouldn't format a disk. Same symptoms however, read and write worked fine. Is it a coincidence that (decimal) 33 is (hex) 21?

If you can't get Locksmith to work, there is a phone app that turns your camera into a strobe ("Video Tachometer" on an iPhone). The flywheel on my drive had a strobe disk glued to it. I set the phone app to 300 rpm  and I could literally see when it was tuned.  A simple Basic program that calls "catalog" in a loop will keep the disk spinning.

I think I also used an old apple2 service program called "disk alignment aid". Seemed easier to use than Locksmith.

Offline
Last seen: 1 week 6 days ago
Joined: Dec 21 2013 - 20:49
Posts: 113
I don't have a Locksmith disk

I don't have a Locksmith disk so I used my MECC Computer Inspector disk that has a disk drive speed checker. First, I checked the internal disk drive that formats disks fine and reads and writes disks just fine. This drive RPM measured 287 or 288. The speed checker program stated that "the recommended speed is 299. However speeds of 296 to 302 should give satisfactory results."  Next, I checked the external drive that gives error when formatting a disk. This drive RPM measured 295 or 296. I find it interesting that the "good" internal  drive is measuring low and the "problem" external drive is measuring closer to the recommended speed of 299. Should I adjust the external drive speed to be 287 or 288?

Offline
Last seen: 1 month 3 weeks ago
Joined: Jul 5 2018 - 09:44
Posts: 2587
No, that probably won't help

No, that probably won't help and if anything may make things worse.

retro-tinker's picture
Offline
Last seen: 1 day 6 hours ago
Joined: Jun 7 2023 - 15:41
Posts: 77
Why not?

Personally, I think that would be a good experiment. If changing the external drive speed to match the internal drive's doesn't help, you can always set it back to the first number you read. (Obviously, I wouldn't mess with the internal drive.)

MacFly's picture
Offline
Last seen: 2 hours 57 min ago
Joined: Nov 7 2019 - 13:49
Posts: 483
I didn't know the "MECC

I didn't know the "MECC Computer Inspector" disk, but I just tried it. It shows exactly "300rpm" for two of my drives, which I had adjusted with Locksmith.

But I would try both rpms with your problem drive: try setting it to the correct speed of 300rpm (or 299...) and see if it helps. Otherwise, you can try the slower RPM of your "good" drive, but I wouldn't have much hope. It's weird that your good drive is so far off and still works.

Is the bad drive otherwise reading and indeed writing disks - so it's really just a format issue?

Offline
Last seen: 1 week 6 days ago
Joined: Dec 21 2013 - 20:49
Posts: 113
The external drive has

The external drive has problems writing and reading Apple Pascal /// source files. This occurs with Pascal /// ver 1.0 and 1.1. I have not tried later versions of Apple /// Pascal. That's when I first noticed a problem with the external drive. The funny thing is that with Apple /// Business Basic the external drive writes and reads Basic source files just fine-- no issues. I decided to try to format a disk with the external drive and this gives the error in my first post. I switched to the internal drive and it formatted the disk with no issue. I will try adjusting the drive speed as suggested in the reply posts this weekend and see what happens. 

Offline
Last seen: 1 week 6 days ago
Joined: Dec 21 2013 - 20:49
Posts: 113
After a few tries....no luck

I adjusted the Disk III drive to 299 RPM and was able to format a disk successfully. Good. I next tried to write a Pascal source file to the external drive using Apple /// Pascal 1.1 and got the same file error as before. I listed the files on the disk in the external drive and the files were listed (minus the Pascal source file) and a "Directory is damaged" note was added to the list. I reformatted the disk and tried the save the Pascal source file to the external drive and got the same result as before. I, next, adjusted the disk speed to 287 RPM and was able to format a disk just fine. But when I tried to save the Pascal source code file to the external drive the save failed again and the disk directory was damaged. I re-adjusted the disk speed back to 299 RPM and verified that I can still write/load Apple /// Business Basic files to the external disk drive just fine. Later, I replaced the 74LS74 and 74 LS32 chips on the Disk /// analog control card and tried the same disk format (good) and write Pascal /// source code to external disk (bad). Just to check the 26pin cable I connected my FloppyEmu (FE) with Disk /// to Disk II connector adapter and was not able to format a blank disk on the FE, but using a formatted blank disk image was able to copy a Pascal /// disk 3 volume to the FE formatted blank disk image. I was also able to write/load a Pascal /// source code file to the FE disk just fine so my 26pin cable must be good. While I researching some Apple /// Disk /// information, I found that a Disk II drive mechanism (Shugart 390) could be used with an Disk /// analog card with the Apple ///. I tried this with a known good Disk II drive and could not get my Apple /// system utilities disk to "find"/recognize the external drive -- kept getting "Volume not found" error when I tried to list the files. So...is it possible to use a Disk II Shugart 360 drive with an Apple /// analog card? The Disk /// drive mechanism is marked Shugart 390 and the 4 pin connector and black multipin edge connector look exactly the same. 

Offline
Last seen: 3 hours 28 min ago
Joined: Feb 27 2021 - 18:59
Posts: 601
modifications?

My notes say that the Disk II (A2M0003) can be used with Apple III or III+ "with modified analog card".

I don't know the nature of the modifications.

MacFly's picture
Offline
Last seen: 2 hours 57 min ago
Joined: Nov 7 2019 - 13:49
Posts: 483
In order to format disks on
  • In order to format disks on FloppyEmu you have to use the .WOZ or .NIB disk image format. Formatting always fails with errors when attempting to format a disk in .dsk/.po format or similar. And you need newer firmware for FloppyEmu. Just as a heads up. You probably already knew that...
  • Disks formatted with incorrect speed (which happened to still work) may not be readable and especially writable with a drive running at the correct speed. You probably also knew that though.
  • Early SOS versions sometimes (incorrectly) show a warning about damaged directories when listing directory contents. I had noticed this with SOS System Utilities (and SOS 1.1). The same volumes then won't trigger any warnings when using SOS 1.2/1.3. I haven't noticed issues with reading/writing files though. Just the occasional (incorrect) warning when listing files with early SOS. And this issue didn't just affect floppies, but also hard drives. So it's a file system issue that was fixed with newer SOS versions.
  • Apple /// Pascal doesn't have its own file system - unlike Apple II (UCSD) Pascal. It's using SOS to access disks. And it's therefore also using the same disk format. So, it shouldn't be a matter of using "Business Basic" vs "Apple /// Pascal". It's a question of "which SOS version" is it using (and which physical disk is being used). The SOS version is briefly visible in the initial "spalsh screen" :) when the disk is loading.
  • Can you successfully write files to the Pascal disk when running Business Basic? And does writing files from Pascal also fail, when you write to the Business Basic disk? That is a simple test to show whether the issue depends on a differing SOS version - or still on a difference with the (physical) disk. Again, the file system is the same, so you can store Basic files on a "Pascal disk" or vice versa. The Apple /// was quite progressive in finally providing a unified file system used by all applications...
  • Which adapter exactly are you using to connect FloppyEmu to your Apple ///?  This type , or a simple "strip the top 6 ribbon-wires" kind of adapter? The latter will cause disk access errors whenever the Apple /// quickly switches between the internal and external drive - which Pascal does a lot.
Offline
Last seen: 1 week 6 days ago
Joined: Dec 21 2013 - 20:49
Posts: 113
Thanks for all the info

I did not know that the Floppy Emu (FE)  needed a .nib or .woz disk image to execute a format.

I was not sure that disks formatted with incorrect speed whould not be writable with a drive running at the correct speed. With all the disk formatting, file writing and file reading tests I have done over the last few days I believe that I have formatted a disk on a incorrect speed drive and written files to it on the external drive that is the correct speed -- but I did not write all these specific steps down to verify this so I could be wrong.

My System Utilities disk is running SOS 1.3 and I have been formatting all my diskettes using this System Utilities disk. My Apple /// Pascal ver 1.1 boot disk is a SOS 1.3 disk so the problem that I have been dealing with is not related to a difference is SOS versions. 

My System Utilities disk  is running SOS 1.3. My Apple /// Pascal ver 1,.1 disk is running SOS 1.3. My Apple /// Business Basic disk is running SOS 1.1.

I cannot successfully write files to the Pascal disk (in the external drive) when running Business Basic (booted from internal drive). I can format a disk in the external drive with the System Utilities disk with SOS 1.3 booted in the external drive. I restarted the computer with Business Basic with SOS 1.1 in the internal drive and I can read/write files to the newly formatted disk in the external drive.  I was also able to boot Apple /// Pascal 1.1 with SOS 1.3 in the internal drive and write/read a source file to that same newly formatted disk in the external drive. This was surprising to me, but what was different about this newly formatted disk is that there was only one file (the Business Basic file) prior to writing the Pascal source file -- that made only 2 files on this disk. The disk that was giving me the write errors was a disk that had six Pascal system files (SYSTEM.ASSMBLER, SYSTEM.COMPILER, etc) and 90 blocks free. So I was thinking I have a solution to using my external disk with Apple /// Pascal. But when I saved the Pascal source file to another Pascal system disk (with SYSTEM.EDITOR, SYSTEM.FILER, etc) and made it the SYSTEM.WRK.FILE and tried to Compile. I got a no file .D1/SYSTEM.COMPILER error. I do not understand why I got this error. The SYSTEM.COMPILER file is on the disk in the external drive (.D2). I was disappointed. I thought I had a way forward to run/use Apple /// Pascal on my Apple /// computer with external drive.

Finally, the adapter that I use to connect the Floppy Emu to my Apple /// is one that is shown in the link "This type".

 

 

MacFly's picture
Offline
Last seen: 2 hours 57 min ago
Joined: Nov 7 2019 - 13:49
Posts: 483
Apple /// Pascal doesn't

Apple /// Pascal doesn't search all drives when looking for the system files. It uses a fixed path (normally ".D1"). But this path can be changed.

There is a utility "PMOVE" for configuration. It is described in this manual, see section "How to make a rigid disk your system disk". It was normally meant to make a Pascal boot disk which expects all system files on a harddrive (.profile). But you can use any drive name. So you can set the system drive to ".D2". Normally this wouldn't make much sense - since D1 and D2 should be identical. But if you wanted to try the workaround, it should work.

Offline
Last seen: 1 week 6 days ago
Joined: Dec 21 2013 - 20:49
Posts: 113
One earlier statement not quite right

I was re-reading my last post and I noticed an error in one of my statements about formatting a disk and saving a Business Basic file. The statement should have been this:

"I cannot successfully write files to the Pascal disk (in the external drive) when running Business Basic (booted from internal drive). I can format a disk in the external drive with the System Utilities disk with SOS 1.3 booted in the internal drive. I restarted the computer with Business Basic with SOS 1.1 in the internal drive and I can read/write files to the newly formatted disk in the external drive. "

 

I was thinking about the suggestion on how to use PMOVE to use .D2 drive as the system drive. Not sure how this would work. I can't fit all the necessary files for the Editor, Filer and Compiler, etc onto one diskette. I have used my Profile drive to run Apple/// Pascal and moved the Editor, Filer and Compiler, etc to the Profile disk as it has lots of space. This works just fine. Sometimes I prefer not to use the Profile drive and would like the option to run Apple/// Pascal using just the internal and external Disk/// drives. 

MacFly's picture
Offline
Last seen: 2 hours 57 min ago
Joined: Nov 7 2019 - 13:49
Posts: 483
pmove
old_hitech wrote:

I was thinking about the suggestion on how to use PMOVE to use .D2 drive as the system drive. Not sure how this would work. I can't fit all the necessary files for the Editor, Filer and Compiler, etc onto one diskette.

My idea was not to move any files. What "PMOVE" really only does is changing the search paths on the boot disk. It directly patches the SOS.INTERP on the boot disk and replaces all paths (for the Pascal compiler, the editor, ...), replacing ".D1" with the given new path (usually the path to your "rigid disk").

Yes, normally you would change the path to the Profile, and copy all Pascal system files to the Profile - so you never have to change disks again. But my idea was to use this utility to change the search paths to ".D2" - and keep using the original Pascal disks in D2. It should then load all system programs from ".D2". And hopefully it will still ask you to swap disks, whenever that's necessary. Just that you would need to swap disks in ".D2" then.

I haven't tested this. It might work. Maybe worth a try.

 

I'm otherwise a bit unsure what the bottom line of your external drive analysis now was: the external drive works for writing  - but only when the disk is (almost) empty - no matter which environment? So you can probably only write to the inner tracks, but writing higher track numbers fails?

Offline
Last seen: 1 week 6 days ago
Joined: Dec 21 2013 - 20:49
Posts: 113
Yes, I would summarize my

Yes, I would summarize my issue with my external drive as you have stated: the external drive works for writing  - but only when the disk is (almost) empty - no matter which environment (SOS - 1.3 or SOS 1.1). It can probably only write to the inner tracks, but writing higher track numbers fails. 

I went and made a copy of my Pascal 1.1 disk that had six Pascal system files (SYSTEM.ASSMBLER, SYSTEM.COMPILER, etc) and 90 blocks free onto to my FloppyEmu (FE) using blank, formatted Apple /// disk image. I renamed the disk volume /NEWPASCAL3. The FE is connected as the external disk drive. 

I booted my Pascal 1.1 disk in the internal disk drive and edited a new source file and saved it onto the FE external drive with no problems. I was able to make that source file the SYSTEM.WORK.FILE that is saved on the disk in the internal drive. I then successfully compiled the SYSTEM.WORK.FILE using the compiler (SYSTEM.COMPILER) file that is on the FE as the external drive. Everything worked fine with the FE as the external drive. I think there really is something electrically wrong with my Disk/// drive. I’m now in the market for a working Disk /// drive.

MacFly's picture
Offline
Last seen: 2 hours 57 min ago
Joined: Nov 7 2019 - 13:49
Posts: 483
old_hitech wrote:I think
old_hitech wrote:

I think there really is something electrically wrong with my Disk/// drive.

Since the issue seems related to low vs high track numbers, my suspicion would be more in the direction of something mechanical. The drive electronics don't really care about the position of the head. It's always doing the exactly same - amplifying the write signal, and converting the analog read signal to a digital output - no matter in what position the stepper motor is.

Assuming it's not just a case of bad disks, I wonder if there is some kind of misalignment. Like the head assembly not moving parallel to the disk, so its distance to the disk increases when it moves to the higher track numbers. Or the groove in the plastic disc being worn out (the disc which moves the head assembly). But I never had such issues. In any case, a new drive is probably a good idea. You could also use this to swap components and narrow it down.

Log in or register to post comments