diff options
| author | Harley Travis <harleytravis123@outlook.com> | 2026-06-27 11:59:57 -0500 |
|---|---|---|
| committer | Harley Travis <harleytravis123@outlook.com> | 2026-06-27 11:59:57 -0500 |
| commit | e09e93fdb3ba8895be3a5a2764d48bd31d404275 (patch) | |
| tree | d685657dc8f9170683c7279b0ce66fbfe5b2b916 /Kernel/BlkDev/DskFDC.HC | |
| parent | 9105ddf464ee7843bbabcebae41d75be5bd5dd80 (diff) | |
| download | templeos-floppy-driver-e09e93fdb3ba8895be3a5a2764d48bd31d404275.tar.gz | |
Update FDCInit
FDCInit was patched to use 64-bit variables, and to turn the motor on when performing the recalibration step.
Diffstat (limited to 'Kernel/BlkDev/DskFDC.HC')
| -rw-r--r-- | Kernel/BlkDev/DskFDC.HC | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Kernel/BlkDev/DskFDC.HC b/Kernel/BlkDev/DskFDC.HC index 9587737..39aca31 100644 --- a/Kernel/BlkDev/DskFDC.HC +++ b/Kernel/BlkDev/DskFDC.HC @@ -204,7 +204,7 @@ Bool FDCInit(CBlkDev *bd) { // Recalibrate the drive and (on the first drive) initialize the FDC - U8 ver,st0,pcn; + U64 ver,st0,pcn; Bool unlock=BlkDevLock(bd),okay=FALSE; // If this drv is unit 0, do initialization @@ -221,6 +221,7 @@ Bool FDCInit(CBlkDev *bd) recalibrate: // Recalibrate this drive + FDCMotor(bd,ON); fdc_int_semaphore=FALSE; FDCSendByte(bd,FDC_RECALIBRATE); FDCSendByte(bd,bd->unit); // Drive number @@ -239,6 +240,8 @@ Bool FDCInit(CBlkDev *bd) // in which case we will do another recalibration if (!(st0&0x20)) goto recalibrate; + FDCMotor(bd,OFF); + bd->max_blk=(bd->cyls*bd->heads*bd->spt)-1; if (unlock) BlkDevUnlock(bd); |
