diff options
Diffstat (limited to 'src/mame/includes/itech32.h')
-rw-r--r-- | src/mame/includes/itech32.h | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/src/mame/includes/itech32.h b/src/mame/includes/itech32.h index 964a0197edb..d782ede033e 100644 --- a/src/mame/includes/itech32.h +++ b/src/mame/includes/itech32.h @@ -194,7 +194,7 @@ protected: void draw_rle(u16 *base, u16 color); virtual void shiftreg_clear(u16 *base, u16 *zbase); void handle_video_command(); - void update_interrupts(int vint, int xint, int qint); + virtual void update_interrupts(int vint, int xint, int qint); void bloodstm_map(address_map &map); void itech020_map(address_map &map); void sound_020_map(address_map &map); @@ -265,4 +265,37 @@ protected: u8 m_tms_spinning[2]; }; +class shoottv_state : public itech32_state +{ +public: + shoottv_state(const machine_config &mconfig, device_type type, const char *tag) : + itech32_state(mconfig, type, tag), + m_buttons(*this, "P%u", 1U), + m_dips(*this, "DIPS"), + m_gun_x(*this, "GUNX%u", 1U), + m_gun_y(*this, "GUNY%u", 1U), + m_nvram_b(*this, "nvram_b", 0), + m_gun_timer(nullptr) + { } + + void shoottv(machine_config &config); + +private: + void driver_init() override; + void video_start() override; + + void update_interrupts(int vint, int xint, int qint) override; + + void shoottv_map(address_map &map); + + TIMER_CALLBACK_MEMBER(gun_interrupt); + + required_ioport_array<3> m_buttons; + required_ioport m_dips; + required_ioport_array<2> m_gun_x; + required_ioport_array<2> m_gun_y; + optional_shared_ptr<u16> m_nvram_b; + emu_timer *m_gun_timer; +}; + #endif // MAME_INCLUDES_ITECH32_H |