summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes/tandy2k.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/includes/tandy2k.h')
-rw-r--r--src/mame/includes/tandy2k.h31
1 files changed, 30 insertions, 1 deletions
diff --git a/src/mame/includes/tandy2k.h b/src/mame/includes/tandy2k.h
index 22fe23caa02..9515335bf06 100644
--- a/src/mame/includes/tandy2k.h
+++ b/src/mame/includes/tandy2k.h
@@ -100,7 +100,10 @@ public:
m_centronics_fault(0),
m_centronics_select(0),
m_centronics_perror(0),
- m_centronics_busy(0)
+ m_centronics_busy(0),
+ m_buttons(*this, "MOUSEBTN"),
+ m_x_axis(*this, "MOUSEX"),
+ m_y_axis(*this, "MOUSEY")
{
for (auto & elem : m_busdmarq)
{
@@ -110,6 +113,7 @@ public:
void tandy2k_hd(machine_config &config);
void tandy2k(machine_config &config);
+ DECLARE_INPUT_CHANGED_MEMBER(input_changed);
private:
required_device<i80186_cpu_device> m_maincpu;
@@ -138,7 +142,9 @@ private:
required_device<pc_keyboard_device> m_pc_keyboard; // temporary until the tandy keyboard has a rom dump
virtual void machine_start() override;
+ virtual void machine_reset() override;
virtual void device_reset_after_children() override;
+ virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
@@ -176,6 +182,8 @@ private:
DECLARE_WRITE8_MEMBER( drb_attr_w );
DECLARE_WRITE_LINE_MEMBER( kbdclk_w );
DECLARE_WRITE_LINE_MEMBER( kbddat_w );
+ DECLARE_READ8_MEMBER( clkmouse_r );
+ DECLARE_WRITE8_MEMBER( clkmouse_w );
DECLARE_READ8_MEMBER( irq_callback );
DECLARE_WRITE_LINE_MEMBER( fdc_drq_w );
DECLARE_WRITE_LINE_MEMBER( fdc_hdl_w );
@@ -240,11 +248,32 @@ private:
int m_centronics_perror;
int m_centronics_busy;
+ enum
+ {
+ MO_IRQ = 1,
+ BT_IRQ = 2
+ };
+
+ enum
+ {
+ MOUS_TIMER,
+ MCU_DELAY
+ };
+
+ uint8_t m_clkmouse_cmd[8];
+ int m_clkmouse_cnt;
+ uint8_t m_clkmouse_irq;
+ uint16_t m_mouse_x, m_mouse_y;
+ emu_timer *m_mouse_timer;
+ emu_timer *m_mcu_delay;
+
void tandy2k_hd_io(address_map &map);
void tandy2k_io(address_map &map);
void tandy2k_mem(address_map &map);
void vpac_mem(address_map &map);
void vrambank_mem(address_map &map);
+
+ required_ioport m_buttons, m_x_axis, m_y_axis;
};
#endif // MAME_INCLUDES_TANDY2K_H