From 5c1cd605a1ad2b5428576078bf812f4d9b65f4b7 Mon Sep 17 00:00:00 2001 From: Harley Travis Date: Fri, 29 May 2026 16:58:12 -0500 Subject: Update KFloppy.HC I fixed the read and write functions so that they correctly check the status of the controller before performing the write (hopefully). --- Kernel/KFloppy.HC | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Kernel/KFloppy.HC') diff --git a/Kernel/KFloppy.HC b/Kernel/KFloppy.HC index 16b6bd3..059e821 100644 --- a/Kernel/KFloppy.HC +++ b/Kernel/KFloppy.HC @@ -95,7 +95,7 @@ U0 FDCSendCmd(U16 base, U8 cmd) U64 i; for (i = 0; i < 600; i++) { Sleep(10); - if (0x80 & InU8(base + FDC_MSR_DSR)) { + if (InU8(base + FDC_MSR_DSR) >> 6 == 2) { OutU8(base + FDC_DATA, cmd); Sleep(1); return; @@ -112,7 +112,7 @@ U8 FDCReadData(U16 base) U64 i; for (i=0;i<600;i++) { Sleep(10); - if (0x80 & InU8(base + FDC_MSR_DSR)) { + if (InU8(base + FDC_MSR_DSR) >> 6 == 3) { return InU8(base + FDC_DATA); } } -- cgit v1.2.3