From 1f3e83e08b9f0628e654cad9ef8b03bd0661da30 Mon Sep 17 00:00:00 2001 From: "R. Belmont" Date: Thu, 2 Oct 2014 13:49:36 +0000 Subject: [PATCH] (MESS) concept: can boot 5.25" disks on fdc02 now. [crazyc] --- src/emu/bus/a2bus/corvfdc02.c | 12 ++++++++++-- src/emu/bus/a2bus/corvfdc02.h | 2 ++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/emu/bus/a2bus/corvfdc02.c b/src/emu/bus/a2bus/corvfdc02.c index 87c8e6d3500..44a27718ec5 100644 --- a/src/emu/bus/a2bus/corvfdc02.c +++ b/src/emu/bus/a2bus/corvfdc02.c @@ -112,6 +112,8 @@ void a2bus_corvfdc02_device::device_start() astring tempstring; m_rom = device().machine().root_device().memregion(this->subtag(tempstring, FDC02_ROM_REGION))->base(); + m_timer = timer_alloc(0); + save_item(NAME(m_fdc_local_status)); save_item(NAME(m_fdc_local_command)); save_item(NAME(m_bufptr)); @@ -124,6 +126,13 @@ void a2bus_corvfdc02_device::device_reset() m_fdc_local_command = 0; m_curfloppy = NULL; m_in_drq = false; + m_timer->adjust(attotime::never); +} + +void a2bus_corvfdc02_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) +{ + m_fdc->tc_w(true); + m_fdc->tc_w(false); } /*------------------------------------------------- @@ -274,8 +283,7 @@ WRITE_LINE_MEMBER(a2bus_corvfdc02_device::drq_w) if (!m_bufptr) { - m_fdc->tc_w(true); - m_fdc->tc_w(false); + m_timer->adjust(attotime::zero); } m_bufptr--; diff --git a/src/emu/bus/a2bus/corvfdc02.h b/src/emu/bus/a2bus/corvfdc02.h index 2aa375fdf46..83c3a4c4ed9 100644 --- a/src/emu/bus/a2bus/corvfdc02.h +++ b/src/emu/bus/a2bus/corvfdc02.h @@ -39,6 +39,7 @@ public: protected: virtual void device_start(); virtual void device_reset(); + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); // overrides of standard a2bus slot functions virtual UINT8 read_c0nx(address_space &space, UINT8 offset); @@ -58,6 +59,7 @@ private: UINT8 m_buffer[2048]; // 1x6116 SRAM floppy_image_device *m_curfloppy; bool m_in_drq; + emu_timer *m_timer; }; // device type definition