From cf510adc9d34b4ad9a065f3d5bfbcf17115ea06f Mon Sep 17 00:00:00 2001 From: AJR Date: Mon, 2 Oct 2023 07:36:46 -0400 Subject: [PATCH] imagedev/floppy.cpp: Workaround for index timing regression --- src/devices/imagedev/floppy.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/devices/imagedev/floppy.cpp b/src/devices/imagedev/floppy.cpp index 4b124cbbb89..7e33efa5ccb 100644 --- a/src/devices/imagedev/floppy.cpp +++ b/src/devices/imagedev/floppy.cpp @@ -919,14 +919,14 @@ TIMER_CALLBACK_MEMBER(floppy_image_device::index_resync) // if hard-sectored floppy, has extra IDX pulses if(image) image->find_index_hole(position, last_index, next_index); - int new_idx = position - last_index < 2000000; + bool new_idx = position - last_index < 2000000; if(new_idx) { uint32_t index_up = last_index + 2000000; attotime index_up_time = attotime::from_double(index_up/angular_speed); index_timer->adjust(index_up_time - delta); } else { - attotime next_index_time = attotime::from_double(next_index/angular_speed); + attotime next_index_time = next_index >= 200000000 ? rev_time : attotime::from_double(next_index/angular_speed); index_timer->adjust(next_index_time - delta); }