From fdc8b4e936a53d483949bd534132d4f5ce37dc71 Mon Sep 17 00:00:00 2001 From: tomcw Date: Mon, 19 Sep 2022 10:49:16 +0100 Subject: [PATCH] Fix to DumpTrackWOZ() --- source/Disk.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/source/Disk.cpp b/source/Disk.cpp index 639079f0..d8260065 100644 --- a/source/Disk.cpp +++ b/source/Disk.cpp @@ -1429,7 +1429,6 @@ void Disk2InterfaceCard::DataLatchReadWOZ(WORD pc, WORD addr, UINT bitCellRemain { m_latchDelay = 7; m_shiftReg = 0; - #if LOG_DISK_NIBBLES_READ // May not actually be read by 6502 (eg. Prologue's CHKSUM 4&4 nibble pair), but still pass to the log's nibble reader m_formatTrack.DecodeLatchNibbleRead(m_floppyLatch); @@ -1641,7 +1640,7 @@ void Disk2InterfaceCard::DumpTrackWOZ(FloppyDisk floppy) // pass a copy of m_flo int nibbleStartBitOffset = -1; bool newLine = true; - BYTE lastBit = 0; + bool doneLastBit = false; while (1) { @@ -1658,10 +1657,9 @@ void Disk2InterfaceCard::DumpTrackWOZ(FloppyDisk floppy) // pass a copy of m_flo IncBitStream(floppy); if (startBitOffset == floppy.m_bitOffset) // done complete track? - { - lastBit = outputBit; + doneLastBit = true; + else if (doneLastBit) break; - } if (shiftReg & 0x80) { @@ -1723,7 +1721,6 @@ void Disk2InterfaceCard::DumpTrackWOZ(FloppyDisk floppy) // pass a copy of m_flo { LogOutput("%02X/Partial Nibble", shiftReg); } - LogOutput(" %d/Last bit", lastBit); // Output any remaining "read D5AAxx detected" if (nibbleCount % 32)