// license:BSD-3-Clause // copyright-holders:Bryan McPhail, David Graves #include "machine/eepromser.h" #include "video/tc0480scp.h" struct gb_tempsprite { int gfx; int code,color; int flipx,flipy; int x,y; int zoomx,zoomy; int primask; }; class gunbustr_state : public driver_device { public: enum { TIMER_GUNBUSTR_INTERRUPT5 }; gunbustr_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this,"maincpu"), m_tc0480scp(*this, "tc0480scp"), m_ram(*this,"ram"), m_spriteram(*this,"spriteram"), m_eeprom(*this, "eeprom"), m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette") { m_coin_lockout = true; } required_device m_maincpu; required_device m_tc0480scp; required_shared_ptr m_ram; required_shared_ptr m_spriteram; required_device m_eeprom; required_device m_gfxdecode; required_device m_palette; bool m_coin_lockout; UINT16 m_coin_word; std::unique_ptr m_spritelist; UINT32 m_mem[2]; DECLARE_WRITE32_MEMBER(gunbustr_input_w); DECLARE_WRITE32_MEMBER(motor_control_w); DECLARE_READ32_MEMBER(gunbustr_gun_r); DECLARE_WRITE32_MEMBER(gunbustr_gun_w); DECLARE_READ32_MEMBER(main_cycle_r); DECLARE_CUSTOM_INPUT_MEMBER(coin_word_r); DECLARE_DRIVER_INIT(gunbustrj); DECLARE_DRIVER_INIT(gunbustr); virtual void video_start() override; UINT32 screen_update_gunbustr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); INTERRUPT_GEN_MEMBER(gunbustr_interrupt); void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap,const rectangle &cliprect,const int *primasks,int x_offs,int y_offs); protected: virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; };