summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarley Travis <harleytravis123@outlook.com>2026-06-07 21:06:46 -0500
committerHarley Travis <harleytravis123@outlook.com>2026-06-07 21:06:46 -0500
commitd1a3cbbf5eaa8c0e63c7d6ac402bd4be182102a9 (patch)
treea283f032533a7a5e74bc8f70050ae75d02458129
parentf7a9082e4277f8f50a4278e37734c8aab0a24f93 (diff)
downloadtempleos-floppy-driver-d1a3cbbf5eaa8c0e63c7d6ac402bd4be182102a9.tar.gz
Update DskFDC.HC
I realized that the logic that determined the sector size value sent to the controller would not work properly on larger sector size, so I redid it.
-rw-r--r--Kernel/BlkDev/DskFDC.HC4
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/BlkDev/DskFDC.HC b/Kernel/BlkDev/DskFDC.HC
index e9b0bdd..08dc470 100644
--- a/Kernel/BlkDev/DskFDC.HC
+++ b/Kernel/BlkDev/DskFDC.HC
@@ -233,7 +233,7 @@ U8 FDCWriteData(CBlkDev *bd,U8 cyl,Bool head,U8 start,U8 end)
FDCSendByte(bd,cyl);
FDCSendByte(bd,head);
FDCSendByte(bd,start);
- FDCSendByte(bd,bd->blk_size>>8);
+ FDCSendByte(bd,Bsf(bd->blk_size>>7));
FDCSendByte(bd,end);
FDCSendByte(bd,bd->gpl1);
FDCSendByte(bd,255);
@@ -265,7 +265,7 @@ U8 FDCReadData(CBlkDev *bd,U8 cyl,Bool head,U8 start,U8 end)
FDCSendByte(bd,cyl);
FDCSendByte(bd,head);
FDCSendByte(bd,start); // sector is ignored
- FDCSendByte(bd,bd->blk_size>>8);
+ FDCSendByte(bd,Bsf(bd->blk_size>>7));
FDCSendByte(bd,end);
FDCSendByte(bd,bd->gpl1);
FDCSendByte(bd,255);