From: Toni Wilen Date: Tue, 26 Dec 2023 17:10:20 +0000 (+0200) Subject: Fix zero length disk dma not finishing when dsksync is detected. X-Git-Tag: 5200~124 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=e11ead6c5cf1488a871803c25c78a1a8b363d72e;p=francis%2Fwinuae.git Fix zero length disk dma not finishing when dsksync is detected. --- 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)) {