diff --git a/Machines/Commodore/1540/C1540.cpp b/Machines/Commodore/1540/C1540.cpp index ef207a8ff..d4a45dff7 100644 --- a/Machines/Commodore/1540/C1540.cpp +++ b/Machines/Commodore/1540/C1540.cpp @@ -14,7 +14,7 @@ using namespace Commodore::C1540; Machine::Machine() : _shift_register(0), - Storage::DiskDrive(1000000, 16, 300) + Storage::DiskDrive(1000000, 4, 300) { // create a serial port and a VIA to run it _serialPortVIA.reset(new SerialPortVIA); diff --git a/Storage/Disk/DigitalPhaseLockedLoop.cpp b/Storage/Disk/DigitalPhaseLockedLoop.cpp index 999e17b2d..d397ffaef 100644 --- a/Storage/Disk/DigitalPhaseLockedLoop.cpp +++ b/Storage/Disk/DigitalPhaseLockedLoop.cpp @@ -27,9 +27,10 @@ DigitalPhaseLockedLoop::DigitalPhaseLockedLoop(int clocks_per_bit, int tolerance void DigitalPhaseLockedLoop::run_for_cycles(int number_of_cycles) { _phase += number_of_cycles; - int windows_crossed = _phase / _window_length; - if(windows_crossed) + if(_phase >= _window_length) { + int windows_crossed = _phase / _window_length; + // check whether this triggers any 0s, if anybody cares if(_delegate) {