Files
ClassicOS/kernel/floppy.h
Gregory Bowne 8abc33c70b Create floppy.h
floppy driver that works with the fat12 implementation
2025-12-19 15:29:08 -08:00

20 lines
396 B
C

#ifndef FLOPPY_H
#define FLOPPY_H
#include <stdint.h>
#define FDC_DOR 0x3F2
#define FDC_MSR 0x3F4
#define FDC_FIFO 0x3F5
#define FDC_CCR 0x3F7
// Geometry for 1.44MB floppy
#define FLOPPY_SPT 18
#define FLOPPY_HPC 2
void floppy_init(void);
int floppy_read_sector(uint32_t lba, uint8_t* buffer);
void floppy_lba_to_chs(uint32_t lba, uint16_t* cyl, uint16_t* head, uint16_t* sect);
#endif