From 97752f06ff45d208c97e3702902c20fec0bc0df4 Mon Sep 17 00:00:00 2001 From: Christopher Mosher Date: Sun, 30 Dec 2018 00:15:52 -0500 Subject: [PATCH] always set track lengths --- src/diskcontroller.cpp | 4 ++-- src/wozfile.cpp | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/diskcontroller.cpp b/src/diskcontroller.cpp index fa8c6af..b7fdfff 100644 --- a/src/diskcontroller.cpp +++ b/src/diskcontroller.cpp @@ -125,8 +125,8 @@ void DiskController::stepLss() { if (cmd & 8u) { if (cmd & 3u) { if (this->write) { - const bool one = (seq&0x80u) != (this->prev_seq&0x80u); - this->prev_seq = seq; + const bool one = (this->seq&0x80u) != (this->prev_seq&0x80u); + this->prev_seq = this->seq; this->currentDrive->writeBit(one); } } diff --git a/src/wozfile.cpp b/src/wozfile.cpp index e2bc3db..caea0f3 100644 --- a/src/wozfile.cpp +++ b/src/wozfile.cpp @@ -411,6 +411,8 @@ void WozFile::unload() { delete [] this->trk[i]; this->trk[i] = 0; } + this->trk_bits[i] = 0; + this->trk_byts[i] = 0; } }