From 3739dfd2b66f9feaabfcad744339fdb4cd632be2 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sat, 23 May 2015 14:13:07 +0300 Subject: [PATCH] WORDSYNC all zeros check tweak. --- disk.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/disk.cpp b/disk.cpp index f2680be4..6855bebe 100644 --- a/disk.cpp +++ b/disk.cpp @@ -3427,13 +3427,14 @@ static void disk_doupdate_read_nothing (int floppybits) } } -static void wordsync_detected(void) +static void wordsync_detected(bool startup) { dsksync_cycles = get_cycles() + WORDSYNC_TIME * CYCLE_UNIT; if (dskdmaen != DSKDMA_OFF) { if (disk_debug_logging && dma_enable == 0) write_log(_T("Sync match %04x\n"), dsksync); - dma_enable = 1; + if (!startup) + dma_enable = 1; INTREQ(0x8000 | 0x1000); } if (adkcon & 0x400) { @@ -3517,7 +3518,7 @@ static void disk_doupdate_read (drive * drv, int floppybits) dskbytr_val |= 0x8000; } if (word == dsksync) - wordsync_detected(); + wordsync_detected(false); bitoffset++; bitoffset &= 15; floppybits -= drv->trackspeed; @@ -3605,7 +3606,7 @@ static void DISK_start (void) } dma_enable = (adkcon & 0x400) ? 0 : 1; if (word == dsksync) - wordsync_detected(); + wordsync_detected(true); } static int linecounter; -- 2.47.3