From 774a2fa951c8dd80293c178a1fd7f0bc95f51c9f Mon Sep 17 00:00:00 2001 From: OBattler Date: Sat, 9 Aug 2025 14:40:27 +0200 Subject: [PATCH] FDC: Do not attempt to raise the IRQ if it is disabled. --- src/floppy/fdc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/floppy/fdc.c b/src/floppy/fdc.c index 28e3b150f..9d68365d2 100644 --- a/src/floppy/fdc.c +++ b/src/floppy/fdc.c @@ -341,7 +341,8 @@ fdc_int(fdc_t *fdc, int set_fintr) ienable = !!(fdc->dor & 8); if (ienable) { - picint(1 << fdc->irq); + if (fdc->irq != 0xff) + picint(1 << fdc->irq); if (set_fintr) fdc->fintr = 1; @@ -358,7 +359,7 @@ fdc_watchdog_poll(void *priv) if (fdc->watchdog_count) timer_advance_u64(&fdc->watchdog_timer, 1000 * TIMER_USEC); else { - if (fdc->dor & 0x20) + if ((fdc->dor & 0x20) && (fdc->irq != 0xff)) picint(1 << fdc->irq); } }