diff options
| author | Harley Travis <harleytravis123@outlook.com> | 2026-06-30 14:53:16 -0500 |
|---|---|---|
| committer | Harley Travis <harleytravis123@outlook.com> | 2026-06-30 14:53:16 -0500 |
| commit | 914fa30e4065afa842d44a0e6eae390d161b9372 (patch) | |
| tree | 483b29b9acfafe3c34b378c033dbc5f5fceb68f0 | |
| parent | 8815bd280431d5ae286c5ebd16508c931f386cdd (diff) | |
| download | templeos-floppy-driver-914fa30e4065afa842d44a0e6eae390d161b9372.tar.gz | |
Place reset before version check
Turns out my PC leaves the FDC in a reset state after POST, causing the version check to time out. Thus, it is necessary to reset the controller beforehand.
| -rw-r--r-- | Kernel/BlkDev/DskFDC.HC | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Kernel/BlkDev/DskFDC.HC b/Kernel/BlkDev/DskFDC.HC index acf3b0d..43a7c3b 100644 --- a/Kernel/BlkDev/DskFDC.HC +++ b/Kernel/BlkDev/DskFDC.HC @@ -209,14 +209,16 @@ Bool FDCInit(CBlkDev *bd) // If this drv is unit 0, do initialization if (!bd->unit) { + // The controller may still be in reset, so we will do a full reset before + // performing the version check + FDCReset(bd); + // Check if the controller is 82077AA-compatible FDCSendByte(bd,FDC_VERSION); ver=FDCReadByte(bd); if (ver==0x90) okay=TRUE; - - FDCReset(bd); } recalibrate: |
