diff options
Diffstat (limited to 'src/devices/machine/wozfdc.cpp')
-rw-r--r-- | src/devices/machine/wozfdc.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/devices/machine/wozfdc.cpp b/src/devices/machine/wozfdc.cpp index 61f1150bee0..bee2f043e7e 100644 --- a/src/devices/machine/wozfdc.cpp +++ b/src/devices/machine/wozfdc.cpp @@ -13,6 +13,7 @@ #include "imagedev/floppy.h" #include "formats/ap2_dsk.h" +#include "formats/as_dsk.h" /*************************************************************************** PARAMETERS @@ -79,8 +80,8 @@ void wozfdc_device::device_start() { m_rom_p6 = machine().root_device().memregion(this->subtag(DISKII_P6_REGION).c_str())->base(); - timer = timer_alloc(0); - delay_timer = timer_alloc(1); + timer = timer_alloc(FUNC(wozfdc_device::generic_tick), this); + delay_timer = timer_alloc(FUNC(wozfdc_device::delayed_tick), this); save_item(NAME(last_6502_write)); save_item(NAME(mode_write)); @@ -178,12 +179,18 @@ void appleiii_fdc_device::device_reset() enable1 = 1; } -void wozfdc_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) +TIMER_CALLBACK_MEMBER(wozfdc_device::generic_tick) +{ + if(active) + lss_sync(); +} + +TIMER_CALLBACK_MEMBER(wozfdc_device::delayed_tick) { if(active) lss_sync(); - if(id == 1 && active == MODE_DELAY) { + if(active == MODE_DELAY) { if(floppy) floppy->mon_w(true); active = MODE_IDLE; @@ -217,7 +224,7 @@ void wozfdc_device::write(offs_t offset, uint8_t data) last_6502_write = data; } -WRITE8_MEMBER(wozfdc_device::set_phase) +void wozfdc_device::set_phase(uint8_t data) { if (floppy && active) floppy->seek_phase_w(data); |