[Coco] Re: Disk Basic and 512 byte block floppies.
John Collyer
johncollyer at zoominternet.net
Tue Jan 20 17:34:16 EST 2004
If you want to write a floppy disk driver for Win XP you could add to the
three specific areas below the coco values needed to support real coco
disks.
The floppy disk driver sample from Microsoft driver development kit.
The file flo_data.h located in the directory contains the locations needed.
"C:\WINDDK\src\storage\fdc\flpydisk\flo_data.h"
If you add the right values then the flpydisk sample could become the
default
floppy driver for Win XP. Get it tested by Microsoft and they will provide
you with a key. I think that the standard floppy driver will then
read/write
coco floppies correctly if the right values are added to the file flo_data.h
With the added support you should be able to access the real coco diskettes.
You could add an array and enum to the types all the known coco types you
want supported.
Portions from flo_data.h:
typedef enum _DRIVE_MEDIA_TYPE {
Drive360Media160, // 5.25" 360k drive; 160k
media
//
// For each drive/media combination, define important constants.
//
typedef struct _DRIVE_MEDIA_CONSTANTS {
MEDIA_TYPE MediaType;
UCHAR StepRateHeadUnloadTime;
UCHAR HeadLoadTime;
UCHAR MotorOffTime;
UCHAR SectorLengthCode;
USHORT BytesPerSector;
UCHAR SectorsPerTrack;
UCHAR ReadWriteGapLength;
UCHAR FormatGapLength;
UCHAR FormatFillCharacter;
UCHAR HeadSettleTime;
USHORT MotorSettleTimeRead;
USHORT MotorSettleTimeWrite;
UCHAR MaximumTrack;
UCHAR CylinderShift;
UCHAR DataTransferRate;
UCHAR NumberOfHeads;
UCHAR DataLength;
UCHAR MediaByte;
UCHAR SkewDelta;
} DRIVE_MEDIA_CONSTANTS, *PDRIVE_MEDIA_CONSTANTS;
//
// The following values were gleaned from many different sources, which
// often disagreed with each other. Where numbers were in conflict, I
// chose the more conservative or most-often-selected value.
//
DRIVE_MEDIA_CONSTANTS
_DriveMediaConstants[_NUMBER_OF_DRIVE_MEDIA_COMBINATIONS_] =
{
{ F5_160_512, 0xdf, 0x2, 0x25, 0x2, 0x200, 0x08, 0x2a, 0x50, 0xf6,
0xf, 1000, 1000, 0x27, 0, 0x2, 0x1, 0xff, 0xfe, 0 },
{ F5_180_512, 0xdf, 0x2, 0x25, 0x2, 0x200, 0x09, 0x2a, 0x50, 0xf6,
0xf, 1000, 1000, 0x27, 0, 0x2, 0x1, 0xff, 0xfc, 0 },
...
...
...
{ F3_1Pt44_512, 0xd1, 0x2, 0x25, 0x2, 0x200, 0x12, 0x1b, 0x65, 0xf6,
0xf, 500, 1000, 0x4f, 0, 0x0, 0x2, 0xff, 0xf0, 3 },
{ F3_2Pt88_512, 0xa1, 0x2, 0x25, 0x2, 0x200, 0x24, 0x38, 0x53, 0xf6,
0xf, 500, 1000, 0x4f, 0, 0x3, 0x2, 0xff, 0xf0, 6 }
};
John Collyer
More information about the Coco
mailing list