summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/mc6852.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine/mc6852.h')
-rw-r--r--src/devices/machine/mc6852.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/devices/machine/mc6852.h b/src/devices/machine/mc6852.h
index 6fb6cc512c7..c7d0a3a6cbf 100644
--- a/src/devices/machine/mc6852.h
+++ b/src/devices/machine/mc6852.h
@@ -41,12 +41,16 @@ class mc6852_device : public device_t,
public device_serial_interface
{
public:
+ static constexpr flags_type emulation_flags() { return flags::SAVE_UNSUPPORTED; }
+
// construction/destruction
mc6852_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
void set_rx_clock(int clock) { m_rx_clock = clock; }
void set_tx_clock(int clock) { m_tx_clock = clock; }
+ void set_tx_pull_mode(bool tx_pull_mode) { m_tx_pull_mode = tx_pull_mode; }
+
auto tx_data_callback() { return m_write_tx_data.bind(); }
auto irq_callback() { return m_write_irq.bind(); }
auto sm_dtr_callback() { return m_write_sm_dtr.bind(); }
@@ -71,8 +75,8 @@ public:
protected:
// device-level overrides
- virtual void device_start() override;
- virtual void device_reset() override;
+ virtual void device_start() override ATTR_COLD;
+ virtual void device_reset() override ATTR_COLD;
// device_serial_interface overrides
virtual void tra_callback() override;
@@ -120,7 +124,8 @@ private:
C2_1_2_BYTE = 0x04,
C2_PC_MASK = 0x03,
C2_PC2 = 0x02,
- C2_PC1 = 0x01
+ C2_PC1 = 0x01,
+ C2_WS_SHIFT = 3
};
enum
@@ -147,6 +152,13 @@ private:
std::queue<uint8_t> m_rx_fifo;
std::queue<uint8_t> m_tx_fifo;
+ // If m_tx_pull_mode is true, get_tx_byte() must be called to retrieve
+ // the next byte to transmit, and the actual transmission must be
+ // carried out by some external mechanism.
+ bool m_tx_pull_mode;
+
+ bool m_tx_active;
+
int m_rx_clock;
int m_tx_clock;
int m_cts; // clear to send