From 5099c7484548ea9e44d129824c2d43eb0a494c52 Mon Sep 17 00:00:00 2001 From: Olivier Galibert Date: Sat, 21 Feb 2015 18:21:23 +0100 Subject: [PATCH] wozfdc: Reduce the flux inversion pulse duration to the minimum [Peter Ferrie, O. Galibert] --- src/emu/machine/wozfdc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/emu/machine/wozfdc.c b/src/emu/machine/wozfdc.c index 25e549462a4..14cb788cd4b 100644 --- a/src/emu/machine/wozfdc.c +++ b/src/emu/machine/wozfdc.c @@ -431,7 +431,6 @@ void wozfdc_device::lss_predict(attotime limit) bool write_line_active = cur_lss.write_line_active; attotime next_flux = floppy ? floppy->get_next_transition(cur_lss.tm - attotime::from_usec(1)) : attotime::never; - attotime next_flux_down = next_flux != attotime::never ? next_flux + attotime::from_usec(1) : attotime::never; if(limit == attotime::never) limit = machine().time() + attotime::from_usec(50); @@ -439,7 +438,7 @@ void wozfdc_device::lss_predict(attotime limit) UINT64 cycles = cur_lss.cycles; UINT64 cycles_limit = time_to_cycles(limit); UINT64 cycles_next_flux = next_flux != attotime::never ? time_to_cycles(next_flux) : UINT64(-1); - UINT64 cycles_next_flux_down = next_flux_down != attotime::never ? time_to_cycles(next_flux_down) : UINT64(-1); + UINT64 cycles_next_flux_down = cycles_next_flux != UINT64(-1) ? cycles_next_flux+1 : UINT64(-1); UINT8 address = cur_lss.address; UINT8 data_reg = cur_lss.data_reg; @@ -499,9 +498,8 @@ void wozfdc_device::lss_predict(attotime limit) else if(cycles == cycles_next_flux_down) { address |= 0x10; next_flux = floppy ? floppy->get_next_transition(cycles_to_time(cycles)) : attotime::never; - next_flux_down = next_flux != attotime::never ? next_flux + attotime::from_usec(1) : attotime::never; cycles_next_flux = next_flux != attotime::never ? time_to_cycles(next_flux) : UINT64(-1); - cycles_next_flux_down = next_flux_down != attotime::never ? time_to_cycles(next_flux_down) : UINT64(-1); + cycles_next_flux_down = cycles_next_flux != UINT64(-1) ? cycles_next_flux+1 : UINT64(-1); } }