]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Reading from non-existing drive didn't complete active disk DMA.
authorToni Wilen <twilen@winuae.net>
Thu, 17 Nov 2022 17:50:27 +0000 (19:50 +0200)
committerToni Wilen <twilen@winuae.net>
Thu, 17 Nov 2022 17:50:27 +0000 (19:50 +0200)
disk.cpp

index 13a4e878f92a234948508c55437492c0676928ba..fa1dfefd7ab0ae5546ad26c85d873cf2b1e8726c 100644 (file)
--- a/disk.cpp
+++ b/disk.cpp
@@ -4080,14 +4080,11 @@ static void wordsync_detected(bool startup)
 static void disk_doupdate_read_reallynothing(int floppybits, bool state)
 {
        bool done = false;
-       // Only because there is at least one demo that checks wrong bit
-       // and hangs unless DSKSYNC bit it set with zero DSKSYNC value...
-       if (INTREQR() & 0x1000)
-               return;
        while (floppybits >= get_floppy_speed()) {
                bool skipbit = false;
                word <<= 1;
                word |= (state ? 1 : 0);
+               doreaddma();
                // MSBSYNC
                if (adkcon & 0x200) {
                        if ((word & 0x0001) == 0 && bitoffset == 0) {
@@ -4103,7 +4100,9 @@ static void disk_doupdate_read_reallynothing(int floppybits, bool state)
                        dskbytr_val = word & 0xff;
                        dskbytr_val |= 0x8000;
                }
-               if (!done && !(adkcon & 0x200) && word == dsksync) {
+               // Only because there is at least one demo that checks wrong bit
+               // and hangs unless DSKSYNC bit it set with zero DSKSYNC value...
+               if (!(INTREQR() & 0x1000) && !done && !(adkcon & 0x200) && word == dsksync) {
                        INTREQ(0x8000 | 0x1000);
                        done = true;
                }