Go to the source code of this file.
Data Structures | |||||||
struct | floppy_struct | ||||||
Floppy geometry structures. More... | |||||||
Defines | |||||||
#define | FDC_SECTORS 18 | ||||||
Sectors per track. | |||||||
#define | FDC_HEADS 2 | ||||||
Heads per track. | |||||||
#define | FDC_TRACKS 80 | ||||||
Tracks per disk. | |||||||
#define | FDC_SECTOR_SIZE 512 | ||||||
Bytes per sector. | |||||||
#define | FDC_TIME_MOTOR_SPINUP 500 | ||||||
FDC motor spin-up time (msec). | |||||||
#define | FDC_TIME_MOTOR_OFF 3000 | ||||||
FDC timeout to turn the motor off (msec). | |||||||
#define | FDC_DOR 0x3F2 | ||||||
Digital Output Register. | |||||||
#define | FDC_MSR 0x3F4 | ||||||
Main Status Register (read). | |||||||
#define | FDC_DSR 0x3F4 | ||||||
Data Rate Select Register (write). | |||||||
#define | FDC_DATA 0x3F5 | ||||||
Data Register. | |||||||
#define | FDC_DIR 0x3F7 | ||||||
Digital Input Register. | |||||||
#define | FDC_CCR 0x3F7 | ||||||
Configuration Control Register. | |||||||
#define | CMD_SPECIFY 0x03 | ||||||
Specify. | |||||||
#define | CMD_WRITE 0xC5 | ||||||
Write. | |||||||
#define | CMD_READ 0xE6 | ||||||
Read. | |||||||
#define | CMD_RECAL 0x07 | ||||||
Recalibrate. | |||||||
#define | CMD_SENSEI 0x08 | ||||||
Send a "sense interrupt status". | |||||||
#define | CMD_FORMAT 0x4D | ||||||
Format a track. | |||||||
#define | CMD_SEEK 0x0F | ||||||
Seek a track. | |||||||
#define | CMD_VERSION 0x10 | ||||||
Get the controller version. | |||||||
#define | MSR_BUSY 0x10 | ||||||
The controller is busy. | |||||||
Typedefs | |||||||
typedef floppy_struct | floppy_struct | ||||||
Floppy geometry structures. | |||||||
Functions | |||||||
void | floppy_handler () | ||||||
This is the floppy interrupt handler routine. It is invoked every time that a floppy operation successfully completes. | |||||||
void | floppy_thread () | ||||||
This is a routine called from clock_thread() at every clock tick to perform the floppy motor kill countdown and to control the floppy timeouts. | |||||||
bool | init_floppy () | ||||||
Initialize the floppy driver. | |||||||
void | fdc_motor_on () | ||||||
Turn the floppy motor on. | |||||||
void | fdc_motor_off () | ||||||
Starts the FDC motor kill countdown. | |||||||
void | fdc_recalibrate () | ||||||
Recalibrate the floppy drive. | |||||||
bool | fdc_seek (int track) | ||||||
Seek a track.
| |||||||
bool | fdc_read (int block, byte *buffer, uint32_t count) | ||||||
Read some contiguous blocks from the floppy disk.
| |||||||
bool | fdc_write (int block, byte *buffer, uint32_t count) | ||||||
Write some contiguous blocks to the floppy disk.
| |||||||
bool | fdc_is_changed () | ||||||
Check if the floppy disk was changed. |
Definition in file floppy.h.
|
Format a track.
|
|
Read.
|
|
Recalibrate.
|
|
Seek a track.
|
|
Send a "sense interrupt status".
|
|
Specify.
|
|
Get the controller version.
|
|
Write.
|
|
Configuration Control Register.
|
|
Data Register.
|
|
Digital Input Register.
|
|
Digital Output Register.
|
|
Data Rate Select Register (write).
|
|
Heads per track.
|
|
Main Status Register (read).
|
|
Bytes per sector.
|
|
Sectors per track.
|
|
FDC timeout to turn the motor off (msec).
|
|
FDC motor spin-up time (msec).
|
|
Tracks per disk.
|
|
The controller is busy.
|
|
Floppy geometry structures.
|