diff options
Diffstat (limited to 'include/floppy.h')
-rw-r--r-- | include/floppy.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/include/floppy.h b/include/floppy.h new file mode 100644 index 0000000..8d526ef --- /dev/null +++ b/include/floppy.h @@ -0,0 +1,30 @@ +#define PORT_FLOPPY_DOR 0x03F2 +#define PORT_FLOPPY_TAPE_DRIVE 0x03F3 +#define PORT_FLOPPY_SELECT_DATA_RATE 0x03F4 +#define PORT_FLOPPY_STATUS 0x03F4 +#define PORT_FLOPPY_COMMAND_DATA 0x03F5 +#define PORT_FLOPPY_DIR 0x03F7 + +#define FLOPPY_STATE_IDLE 0 +#define FLOPPY_STATE_RECALIBRATE 1 +#define FLOPPY_STATE_SEEK 2 +#define FLOPPY_STATE_READ 3 + + +struct floppy_request { + unsigned char command; + unsigned char drive; + unsigned char cylinder; + unsigned char head; + unsigned char sector; + unsigned char sector_count; + void *buffer; +}; + + +static unsigned char floppy_drive_types[6][8] = {"none", "360 KB", "1.2 MB", "720 KB", "1.44 MB", "2.88 MB"}; + + +void init_floppy(); +int read_floppy_sectors(unsigned char drive, unsigned char cylinder, unsigned char head, unsigned char sector, unsigned char sector_count); +void floppy_IRQ(); |