diff options
Diffstat (limited to 'src/mame/includes/superqix.h')
-rw-r--r-- | src/mame/includes/superqix.h | 61 |
1 files changed, 36 insertions, 25 deletions
diff --git a/src/mame/includes/superqix.h b/src/mame/includes/superqix.h index 54198e65958..5eccd818fc8 100644 --- a/src/mame/includes/superqix.h +++ b/src/mame/includes/superqix.h @@ -5,6 +5,8 @@ #pragma once +#include "cpu/mcs51/mcs51.h" +#include "cpu/m6805/m68705.h" #include "sound/ay8910.h" #include "sound/samples.h" #include "emupal.h" @@ -15,6 +17,7 @@ public: superqix_state_base(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_maincpu(*this,"maincpu") + , m_mcu(*this, "mcu") , m_spriteram(*this, "spriteram") , m_videoram(*this, "videoram") , m_bitmapram(*this, "bitmapram") @@ -22,7 +25,6 @@ public: , m_gfxdecode(*this, "gfxdecode") , m_palette(*this, "palette") , m_ay1(*this, "ay1") - , m_mcu(*this, "mcu") { } void init_perestro(); @@ -31,8 +33,11 @@ public: void init_pbillian(); void init_hotsmash(); + TILE_GET_INFO_MEMBER(sqix_get_bg_tile_info); + protected: required_device<cpu_device> m_maincpu; + optional_device<cpu_device> m_mcu; required_shared_ptr<uint8_t> m_spriteram; required_shared_ptr<uint8_t> m_videoram; optional_shared_ptr<uint8_t> m_bitmapram; @@ -40,13 +45,12 @@ protected: required_device<gfxdecode_device> m_gfxdecode; required_device<palette_device> m_palette; required_device<ay8910_device> m_ay1; - optional_device<cpu_device> m_mcu; // commmon 68705/8751/HLE - uint8_t m_fromMCU; // byte latch for 68705/8751->z80 comms - uint8_t m_fromZ80; // byte latch for z80->68705/8751 comms - bool m_Z80HasWritten; // z80 has written to latch flag - bool m_MCUHasWritten; // 68705/8751 has written to latch flag + uint8_t m_from_mcu; // byte latch for 68705/8751->z80 comms + uint8_t m_from_z80; // byte latch for z80->68705/8751 comms + bool m_z80_has_written; // z80 has written to latch flag + bool m_mcu_has_written; // 68705/8751 has written to latch flag //general machine stuff bool m_invert_coin_lockout; @@ -64,7 +68,6 @@ protected: DECLARE_WRITE8_MEMBER(superqix_bitmapram2_w); DECLARE_WRITE8_MEMBER(superqix_0410_w); - TILE_GET_INFO_MEMBER(sqix_get_bg_tile_info); DECLARE_VIDEO_START(superqix); DECLARE_PALETTE_DECODER(BBGGRRII); uint32_t screen_update_superqix(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); @@ -92,8 +95,12 @@ public: DECLARE_CUSTOM_INPUT_MEMBER(fromz80_semaphore_input_r); DECLARE_CUSTOM_INPUT_MEMBER(frommcu_semaphore_input_r); +protected: + virtual void machine_start() override; + virtual void video_start() override; + private: - required_device<ay8910_device> m_ay2; + required_device<ay8910_device> m_ay2; // 8031 and/or 8751 MCU related uint8_t m_bl_port1; @@ -143,8 +150,8 @@ public: , m_samples(*this, "samples") , m_samples_region(*this, "samples") , m_samplebuf() - , m_portB_out(0xff) - , m_portC_out(0xff) + , m_portb_out(0xff) + , m_portc_out(0xff) , m_dial_oldpos{ 0, 0 } , m_dial_sign{ 0, 0 } { @@ -154,12 +161,16 @@ public: DECLARE_CUSTOM_INPUT_MEMBER(pbillian_semaphore_input_r); +protected: + virtual void machine_start() override; + virtual void video_start() override; + private: - DECLARE_READ8_MEMBER(hotsmash_68705_portA_r); - DECLARE_WRITE8_MEMBER(hotsmash_68705_portB_w); - DECLARE_WRITE8_MEMBER(hotsmash_68705_portC_w); - DECLARE_WRITE8_MEMBER(hotsmash_Z80_mcu_w); - DECLARE_READ8_MEMBER(hotsmash_Z80_mcu_r); + DECLARE_READ8_MEMBER(hotsmash_68705_porta_r); + DECLARE_WRITE8_MEMBER(hotsmash_68705_portb_w); + DECLARE_WRITE8_MEMBER(hotsmash_68705_portc_w); + DECLARE_WRITE8_MEMBER(hotsmash_z80_mcu_w); + DECLARE_READ8_MEMBER(hotsmash_z80_mcu_r); DECLARE_WRITE8_MEMBER(pbillian_sample_trigger_w); DECLARE_WRITE8_MEMBER(pbillian_0410_w); @@ -183,19 +194,19 @@ private: void pbillian_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); - required_ioport_array<2> m_dsw; - required_ioport_array<2> m_dials; - optional_ioport_array<2> m_plungers; - optional_ioport_array<2> m_launchbtns; - optional_device<samples_device> m_samples; - optional_region_ptr<u8> m_samples_region; + required_ioport_array<2> m_dsw; + required_ioport_array<2> m_dials; + optional_ioport_array<2> m_plungers; + optional_ioport_array<2> m_launchbtns; + optional_device<samples_device> m_samples; + optional_region_ptr<u8> m_samples_region; - std::unique_ptr<s16[]> m_samplebuf; + std::unique_ptr<s16[]> m_samplebuf; // 68705 related - u8 m_portA_in; - u8 m_portB_out; - u8 m_portC_out; + u8 m_porta_in; + u8 m_portb_out; + u8 m_portc_out; // spinner quadrature stuff int m_dial_oldpos[2]; |