trunk/src/emu/bus/a2bus/corvfdc02.c
r32496 | r32497 | |
112 | 112 | astring tempstring; |
113 | 113 | m_rom = device().machine().root_device().memregion(this->subtag(tempstring, FDC02_ROM_REGION))->base(); |
114 | 114 | |
| 115 | m_timer = timer_alloc(0); |
| 116 | |
115 | 117 | save_item(NAME(m_fdc_local_status)); |
116 | 118 | save_item(NAME(m_fdc_local_command)); |
117 | 119 | save_item(NAME(m_bufptr)); |
r32496 | r32497 | |
124 | 126 | m_fdc_local_command = 0; |
125 | 127 | m_curfloppy = NULL; |
126 | 128 | m_in_drq = false; |
| 129 | m_timer->adjust(attotime::never); |
127 | 130 | } |
128 | 131 | |
| 132 | void a2bus_corvfdc02_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) |
| 133 | { |
| 134 | m_fdc->tc_w(true); |
| 135 | m_fdc->tc_w(false); |
| 136 | } |
| 137 | |
129 | 138 | /*------------------------------------------------- |
130 | 139 | read_c0nx - called for reads from this card's c0nx space |
131 | 140 | -------------------------------------------------*/ |
r32496 | r32497 | |
274 | 283 | |
275 | 284 | if (!m_bufptr) |
276 | 285 | { |
277 | | m_fdc->tc_w(true); |
278 | | m_fdc->tc_w(false); |
| 286 | m_timer->adjust(attotime::zero); |
279 | 287 | } |
280 | 288 | |
281 | 289 | m_bufptr--; |
trunk/src/emu/bus/a2bus/corvfdc02.h
r32496 | r32497 | |
39 | 39 | protected: |
40 | 40 | virtual void device_start(); |
41 | 41 | virtual void device_reset(); |
| 42 | virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); |
42 | 43 | |
43 | 44 | // overrides of standard a2bus slot functions |
44 | 45 | virtual UINT8 read_c0nx(address_space &space, UINT8 offset); |
r32496 | r32497 | |
58 | 59 | UINT8 m_buffer[2048]; // 1x6116 SRAM |
59 | 60 | floppy_image_device *m_curfloppy; |
60 | 61 | bool m_in_drq; |
| 62 | emu_timer *m_timer; |
61 | 63 | }; |
62 | 64 | |
63 | 65 | // device type definition |