Stupid error messages

Started by hydrophilic, April 07, 2007, 12:49 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

hydrophilic

There are plenty of reasons not to like DOS / Windows, and now I have another: stupid error messages.  I wrote a program to format disks and save data on my 1571 in DOS/FAT format so I can xfer data with my PC the slow unreliable way :P

I've heard of programs for doing this such as Big Blue Reader and Little Red Reader.  I think I played with Little Red Reader using VICE a few years ago (another topic) but since the FAT format is so simple, I thought I'd reinvent the wheel just for experience.

Not suprisingly, my first attempt failed.  I'd put the disk in either of my two PCs having an 5+1/4 drive and would get disk read error messages.  I thought maybe those drives had bad heads since neither can format a disk, but using Norton's disk editor, I was able to read in sectors no problem.  Since I couldn't get either drive to format a disk, I had nothing to compare my disk with.

The following things appeared correctly in the boot sector: key signature (55 AA), media type (FC), format type (FAT12), sectors/track, #tracks, sectors/fat, #fats, etc.  I couldn't figure out the problem.  Whenever Windows/DOS would try to read the disk, there would be some head thrashing and then DISK READ ERROR.

I FINALLY figured out the problem and you know what it was?

No valid opcode in the first byte of the boot sector!:mad: :mad: :mad:

I stuck an $eb in the first byte and everything worked!  STUPID M$  The disk is absolutely not bootable but DOS/Windows report READ ERROR without the opcode byte.  For one thing, it shouldn't even check that unless you are actually booting the computer with the disk.  And for another, it is not a READ ERROR.  Maybe INVALID FORMAT but not a READ ERROR. :mad: :mad: :mad:

My format program gives you an option of making a half-baked / compatible disk.  With this format, tracks 18-35 are GCR with a normal CBM DOS format (BAM allocated tracks 1-17), while tracks 1-17 and 36-40 are MS/IBM DOS formated (with the FAT allocated clusters in the 18-35 area).

One annoying thing about my program is after accessing MFM sectors and closing the drive channels (3->buffer 0, 4->buffer 1, 9->command/15) the disk continues to rotate.  My fix is to issue DCLEAR which apparantly sends an initialize ('I:') to the drive.  Anyone have a better way to shut down the motor or maybe know why it keeps running in the first place?

Again this is for a 1571.  If anyone wants to donate a 1581, I'll write a 1581 version for ya :P