From 9336ffe216415a3dd4f6bbadb2d36f0c4d1049c5 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sat, 9 Oct 2021 08:01:02 -0700 Subject: [PATCH] Take a stab at index-hole sync. --- Machines/Amiga/Chipset.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Machines/Amiga/Chipset.cpp b/Machines/Amiga/Chipset.cpp index c0d6573e4..dc39ea46c 100644 --- a/Machines/Amiga/Chipset.cpp +++ b/Machines/Amiga/Chipset.cpp @@ -930,6 +930,7 @@ bool Chipset::DiskDMA::advance() { if(!write_) { // TODO: run an actual PLL, collect actual disk data. if(length_ && buffer_read_ != buffer_write_) { + printf("Deposited %04x\n", buffer_[buffer_read_ & 3]); ram_[pointer_[0] & ram_mask_] = buffer_[buffer_read_ & 3]; ++pointer_[0]; --length_; @@ -1103,6 +1104,9 @@ void Chipset::DiskController::process_index_hole() { // TODO: rectify once drives do an actual index pulse, with length. cia_.set_flag_input(true); cia_.set_flag_input(false); + + // Resync word output. Experimental!! + bit_count_ = 0; } void Chipset::DiskController::set_mtr_sel_side_dir_step(uint8_t value) {