From 5576588c2d4d6bc09fde0b32d0e072884ee46e0d Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Tue, 5 Dec 2023 22:02:41 -0500 Subject: [PATCH] Fix drive enables, go back to FF for non-existent ports. --- Machines/PCCompatible/PCCompatible.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Machines/PCCompatible/PCCompatible.cpp b/Machines/PCCompatible/PCCompatible.cpp index 5b046cf8b..007ef0693 100644 --- a/Machines/PCCompatible/PCCompatible.cpp +++ b/Machines/PCCompatible/PCCompatible.cpp @@ -63,7 +63,7 @@ class FloppyController { FloppyController(PIC &pic, DMA &dma, int drive_count) : pic_(pic), dma_(dma) { // Default: one floppy drive only. for(int c = 0; c < 4; c++) { - drives_[0].exists = drive_count >= c; + drives_[c].exists = drive_count > c; } } @@ -795,7 +795,7 @@ class IO { // Ignore serial port accesses. break; } - return 0; + return 0xff; } private: