mirror of
https://github.com/holub/mame
synced 2025-06-27 06:39:03 +03:00
imagedev/floppy.cpp: Workaround for index timing regression
This commit is contained in:
parent
455603ee86
commit
cf510adc9d
@ -919,14 +919,14 @@ TIMER_CALLBACK_MEMBER(floppy_image_device::index_resync)
|
|||||||
// if hard-sectored floppy, has extra IDX pulses
|
// if hard-sectored floppy, has extra IDX pulses
|
||||||
if(image)
|
if(image)
|
||||||
image->find_index_hole(position, last_index, next_index);
|
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) {
|
if(new_idx) {
|
||||||
uint32_t index_up = last_index + 2000000;
|
uint32_t index_up = last_index + 2000000;
|
||||||
attotime index_up_time = attotime::from_double(index_up/angular_speed);
|
attotime index_up_time = attotime::from_double(index_up/angular_speed);
|
||||||
index_timer->adjust(index_up_time - delta);
|
index_timer->adjust(index_up_time - delta);
|
||||||
} else {
|
} 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);
|
index_timer->adjust(next_index_time - delta);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user