14

I remember that horrible racket coming from the floppy disk when I first used it after started my CoCo, and that it was called the "Head Banger bug".

I remember that it was due to a quick-n-nasty bit of code by the original designers - but what was the story again?

I also remember that there was a "Head Banger bug fix" - but what was it?

13

I posted this question because I had those thoughts, and then spent ages going through multiple dead ends until I finally found it (my Google-fu is on the fritz). So that I don't have to go through that again...

According to an article by Marty Goodman in the July 1983 issue of Hot CoCo:

The Head-Banger Bug

You may have noticed that just after power up or after a cold start, when you ask the disk to load a file, the drive will almost always make a very nasty rattling noise before loading the file. By an oversight in the Disk Basic, the software "thinks" that the head is at track 0 at power up. Actually, the head is usually not at track 0, but is wherever it was when you shut down the system. Often this is track 17 (directory track).

Because of this, when the software tries to go to track 17 to search for the file you asked the disk to load, it "thinks" it is starting at track 0 and runs off into the inner edge of the drive. It does recover after banging itself against a mechanical stop, but this banging is not good for the drive.

And later on in the article:

You can get around the head-banger bug by typing "EXEC &HDCCG" [sic] after power up and cold starts. This resets the head to track 0.

Yes, it had the nonsense value of &HDCCG. The mistake was later corrected in the September 1983 issue of Hot CoCo, page 12 to &HD66C.

Disk Basic Unravelled says $D66C is DSKCON in the 1.0 version of the ROM. Presumably one would call $D75F in the 1.1 version of the ROM if the head-banger bug is even in that version.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.