diff options
Diffstat (limited to 'src/mame/includes/magmax.h')
-rw-r--r-- | src/mame/includes/magmax.h | 44 |
1 files changed, 28 insertions, 16 deletions
diff --git a/src/mame/includes/magmax.h b/src/mame/includes/magmax.h index 5ed8624ba17..1e0b3315729 100644 --- a/src/mame/includes/magmax.h +++ b/src/mame/includes/magmax.h @@ -2,6 +2,7 @@ // copyright-holders:Takahiro Nogi #include "screen.h" #include "machine/gen_latch.h" +#include "sound/ay8910.h" class magmax_state : public driver_device { @@ -13,18 +14,36 @@ public: m_vreg(*this, "vreg"), m_scroll_x(*this, "scroll_x"), m_scroll_y(*this, "scroll_y"), + m_rom18B(*this, "user1"), m_maincpu(*this, "maincpu"), m_audiocpu(*this, "audiocpu"), + m_ay(*this, "ay%u", 0U), m_soundlatch(*this, "soundlatch"), m_gfxdecode(*this, "gfxdecode"), m_screen(*this, "screen"), m_palette(*this, "palette") { } + void magmax(machine_config &config); + +protected: + virtual void machine_start() override; + virtual void machine_reset() override; + virtual void video_start() override; + +private: required_shared_ptr<uint16_t> m_videoram; required_shared_ptr<uint16_t> m_spriteram; required_shared_ptr<uint16_t> m_vreg; required_shared_ptr<uint16_t> m_scroll_x; required_shared_ptr<uint16_t> m_scroll_y; + required_region_ptr<uint8_t> m_rom18B; + required_device<cpu_device> m_maincpu; + required_device<cpu_device> m_audiocpu; + required_device_array<ay8910_device, 3> m_ay; + required_device<generic_latch_8_device> m_soundlatch; + required_device<gfxdecode_device> m_gfxdecode; + required_device<screen_device> m_screen; + required_device<palette_device> m_palette; uint8_t m_sound_latch; uint8_t m_LS74_clr; @@ -34,25 +53,18 @@ public: int m_flipscreen; std::unique_ptr<uint32_t[]> m_prom_tab; bitmap_ind16 m_bitmap; + DECLARE_WRITE16_MEMBER(cpu_irq_ack_w); - DECLARE_READ8_MEMBER(magmax_sound_r); - DECLARE_WRITE16_MEMBER(magmax_vreg_w); + DECLARE_READ8_MEMBER(sound_r); + DECLARE_WRITE16_MEMBER(vreg_w); DECLARE_WRITE8_MEMBER(ay8910_portB_0_w); DECLARE_WRITE8_MEMBER(ay8910_portA_0_w); - virtual void machine_start() override; - virtual void machine_reset() override; - virtual void video_start() override; + DECLARE_PALETTE_INIT(magmax); - uint32_t screen_update_magmax(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); TIMER_CALLBACK_MEMBER(scanline_callback); - required_device<cpu_device> m_maincpu; - required_device<cpu_device> m_audiocpu; - required_device<generic_latch_8_device> m_soundlatch; - required_device<gfxdecode_device> m_gfxdecode; - required_device<screen_device> m_screen; - required_device<palette_device> m_palette; - void magmax(machine_config &config); - void magmax_map(address_map &map); - void magmax_sound_io_map(address_map &map); - void magmax_sound_map(address_map &map); + + void main_map(address_map &map); + void sound_io_map(address_map &map); + void sound_map(address_map &map); }; |