diff options
Diffstat (limited to 'src/devices/machine/swim2.h')
-rw-r--r-- | src/devices/machine/swim2.h | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/src/devices/machine/swim2.h b/src/devices/machine/swim2.h index dc729fe533e..bbb9e0116cd 100644 --- a/src/devices/machine/swim2.h +++ b/src/devices/machine/swim2.h @@ -30,16 +30,39 @@ public: virtual void set_floppy(floppy_image_device *floppy) override; virtual floppy_image_device *get_floppy() const override; + virtual void sync() override; + protected: virtual void device_start() override; virtual void device_reset() override; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; private: + enum { + M_MARK = 0x100, + M_CRC = 0x200, + M_CRC0 = 0x400 + }; + floppy_image_device *m_floppy; u8 m_param[4]; - u8 m_mode, m_setup, m_param_idx; - + u8 m_mode, m_setup, m_error, m_param_idx, m_fifo_pos, m_tss_sr, m_tss_output, m_current_bit; + u16 m_fifo[2], m_sr; + u16 m_crc; + u32 m_half_cycles_before_change; + + u64 m_last_sync; + u64 m_flux_write_start; + std::array<u64, 36> m_flux_write; + u32 m_flux_write_count; + + u64 time_to_cycles(const attotime &tm) const; + attotime cycles_to_time(u64 cycles) const; + + void fifo_clear(); + bool fifo_push(u16 data); + u16 fifo_pop(); + void flush_write(u64 when = 0); void show_mode() const; }; |