disk.h 554 B

1234567891011121314151617
  1. /* Disk layer: read sectors via direct FDC + ISA DMA in protected mode. */
  2. #ifndef DISK_H
  3. #define DISK_H
  4. /* Select the floppy drive (0 or 1) used by subsequent disk_read_sectors calls.
  5. * Resets FDC state so the next read re-initialises for the new drive. */
  6. void disk_set_drive(unsigned int drive);
  7. /* Return currently selected drive number. */
  8. unsigned int disk_get_drive(void);
  9. /* Read count sectors starting at lba into buf.
  10. * Returns 0 on success, -1 on error. */
  11. int disk_read_sectors(unsigned int lba, void *buf, unsigned int count);
  12. #endif