From e11ead6c5cf1488a871803c25c78a1a8b363d72e Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Tue, 26 Dec 2023 19:10:20 +0200 Subject: [PATCH] Fix zero length disk dma not finishing when dsksync is detected. --- disk.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/disk.cpp b/disk.cpp index b0519d16..20e05314 100644 --- a/disk.cpp +++ b/disk.cpp @@ -4276,7 +4276,12 @@ static void wordsync_detected(bool startup) if (dskdmaen != DSKDMA_OFF) { int prev_dma_enabled = dma_enable; if (!startup) { - dma_enable = 1; + if (!dma_enable) { + dma_enable = 1; + if (dsklength == 0) { + disk_dmafinished(); + } + } } if (disk_debug_logging) { int pos = -1; @@ -4801,7 +4806,7 @@ static void DSKLEN_2(uae_u16 v, int hpos) return; } dskdmaen = DSKDMA_READ; - DISK_start (); + DISK_start(); weirddma = dsklength < 544 * 11 * 2; } if (!(v & 0x8000)) { -- 2.47.3