summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarley Travis <harleytravis123@outlook.com>2026-06-22 02:10:42 -0500
committerHarley Travis <harleytravis123@outlook.com>2026-06-22 02:10:42 -0500
commit0c200b792090cda95e3fd17ba4de334227b5755b (patch)
treea4f569049a0582850846439c5f859da686d3d1a0
parent88f61e315e77e4b427d2479f603fd59e27e1f2be (diff)
downloadtempleos-floppy-driver-0c200b792090cda95e3fd17ba4de334227b5755b.tar.gz
Add patches to enable the FDC IRQ on startup
-rw-r--r--Kernel/Patches/IntInit2FDC.HC5
-rw-r--r--Kernel/Patches/IntsInitFDC.HC19
2 files changed, 24 insertions, 0 deletions
diff --git a/Kernel/Patches/IntInit2FDC.HC b/Kernel/Patches/IntInit2FDC.HC
new file mode 100644
index 0000000..0046fb0
--- /dev/null
+++ b/Kernel/Patches/IntInit2FDC.HC
@@ -0,0 +1,5 @@
+// PATCH: Make IntInit2() set up the IDT to handle FDC IRQ's
+// FILE: ::/Kernel/KInts.HC
+// TO INSTALL: #include this file after the line that sets the wake int handler.
+
+IntEntrySet(I_FDC,&IRQ_FDC); \ No newline at end of file
diff --git a/Kernel/Patches/IntsInitFDC.HC b/Kernel/Patches/IntsInitFDC.HC
new file mode 100644
index 0000000..5cd3254
--- /dev/null
+++ b/Kernel/Patches/IntsInitFDC.HC
@@ -0,0 +1,19 @@
+// PATCH: Make IntsInit() unmask IRQ6
+// FILE: ::/Kernel/KInts.HC
+// TO INSTALL: Comment out the original fun.
+// THEN: #include this file after it.
+
+U0 IntsInit()
+{//Init 8259
+ OutU8(0x20,0x11); //IW1
+ OutU8(0xA0,0x11); //IW1
+ OutU8(0x21,0x20); //IW2
+ OutU8(0xA1,0x28); //IW2
+ OutU8(0x21,0x04); //IW3
+ OutU8(0xA1,0x02); //IW3
+ OutU8(0x21,0x0D); //IW4
+ OutU8(0xA1,0x09); //IW4
+ //Mask all but IRQ0 (timer), IRQ2 Cascade, and IRQ6 (floppy).
+ OutU8(0x21,0xFA);
+ OutU8(0xA1,0xFF);
+} \ No newline at end of file