diff options
Diffstat (limited to 'src/mame/includes/superqix.h')
-rw-r--r-- | src/mame/includes/superqix.h | 61 |
1 files changed, 31 insertions, 30 deletions
diff --git a/src/mame/includes/superqix.h b/src/mame/includes/superqix.h index c397bfec48d..d47ecc0708a 100644 --- a/src/mame/includes/superqix.h +++ b/src/mame/includes/superqix.h @@ -14,7 +14,8 @@ public: m_bitmapram(*this, "bitmapram"), m_bitmapram2(*this, "bitmapram2"), m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette") { } + m_palette(*this, "palette"), + m_mcu(*this, "mcu") { } required_device<cpu_device> m_maincpu; required_shared_ptr<uint8_t> m_spriteram; @@ -23,13 +24,7 @@ public: optional_shared_ptr<uint8_t> m_bitmapram2; required_device<gfxdecode_device> m_gfxdecode; required_device<palette_device> m_palette; - - // MCU HLE and/or 8751 related - uint8_t m_port1; // HLE-related for superqix - uint8_t m_port2; // HLE-related for superqix - uint8_t m_port3; // HLE-related for superqix - uint8_t m_port3_latch; // HLE-related for superqix - uint8_t m_fromZ80pending; // HLE-related for superqix, to add a delay to z80->mcu comms + optional_device<cpu_device> m_mcu; // commmon 68705/8751/HLE uint8_t m_fromMCU; // byte latch for 68705/8751->z80 comms @@ -47,36 +42,20 @@ public: std::unique_ptr<bitmap_ind16> m_fg_bitmap[2]; tilemap_t *m_bg_tilemap; - - DECLARE_WRITE8_MEMBER(bootleg_mcu_p1_w); - DECLARE_WRITE8_MEMBER(mcu_p3_w); - DECLARE_READ8_MEMBER(bootleg_mcu_p3_r); - DECLARE_READ8_MEMBER(sqix_system_status_r); - DECLARE_WRITE8_MEMBER(sqixu_mcu_p2_w); - DECLARE_READ8_MEMBER(sqixu_mcu_p3_r); DECLARE_READ8_MEMBER(nmi_ack_r); - DECLARE_WRITE8_MEMBER(bootleg_flipscreen_w); - DECLARE_CUSTOM_INPUT_MEMBER(superqix_semaphore_input_r); DECLARE_WRITE8_MEMBER(superqix_videoram_w); DECLARE_WRITE8_MEMBER(superqix_bitmapram_w); DECLARE_WRITE8_MEMBER(superqix_bitmapram2_w); DECLARE_WRITE8_MEMBER(superqix_0410_w); - DECLARE_READ8_MEMBER(sqix_from_mcu_r); - //DECLARE_READ8_MEMBER(superqix_ay1_a_r); - DECLARE_READ8_MEMBER(in4_mcu_r); //DECLARE_READ8_MEMBER(superqix_ay1_b_r); - DECLARE_WRITE8_MEMBER(sqix_z80_mcu_w); - DECLARE_READ8_MEMBER(bootleg_in0_r); DECLARE_DRIVER_INIT(perestro); DECLARE_DRIVER_INIT(sqix); DECLARE_DRIVER_INIT(sqixr0); DECLARE_DRIVER_INIT(pbillian); DECLARE_DRIVER_INIT(hotsmash); TILE_GET_INFO_MEMBER(sqix_get_bg_tile_info); - DECLARE_MACHINE_START(superqix); DECLARE_VIDEO_START(superqix); DECLARE_PALETTE_DECODER(BBGGRRII); uint32_t screen_update_superqix(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(sqix_timer_irq); void superqix_draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect); protected: @@ -89,16 +68,38 @@ class superqix_state : public superqix_state_base public: superqix_state(const machine_config &mconfig, device_type type, const char *tag) : superqix_state_base(mconfig, type, tag) - , m_mcu(*this,"mcu") { } - DECLARE_READ8_MEMBER(mcu_acknowledge_r); + // 8031 and/or 8751 MCU related + uint8_t m_bl_port1; + uint8_t m_bl_fake_port2; + uint8_t m_port2_raw; + + DECLARE_READ8_MEMBER(z80_semaphore_assert_r); + DECLARE_WRITE8_MEMBER(bootleg_mcu_port1_w); + DECLARE_WRITE8_MEMBER(mcu_port2_w); + DECLARE_WRITE8_MEMBER(mcu_port3_w); + DECLARE_READ8_MEMBER(mcu_port3_r); + DECLARE_READ8_MEMBER(bootleg_mcu_port3_r); + DECLARE_READ8_MEMBER(z80_ay2_iob_r); + DECLARE_WRITE8_MEMBER(z80_ay2_iob_w); + DECLARE_WRITE8_MEMBER(bootleg_flipscreen_w); + DECLARE_CUSTOM_INPUT_MEMBER(fromz80_semaphore_input_r); + DECLARE_CUSTOM_INPUT_MEMBER(frommcu_semaphore_input_r); + DECLARE_READ8_MEMBER(bootleg_in0_r); + INTERRUPT_GEN_MEMBER(sqix_timer_irq); + DECLARE_MACHINE_START(superqix); + DECLARE_MACHINE_RESET(superqix); protected: - TIMER_CALLBACK_MEMBER(mcu_acknowledge_callback); + virtual void machine_init_common() override; - optional_device<cpu_device> m_mcu; + TIMER_CALLBACK_MEMBER(z80_semaphore_assert_cb); + TIMER_CALLBACK_MEMBER(mcu_port2_w_cb); + TIMER_CALLBACK_MEMBER(mcu_port3_w_cb); + TIMER_CALLBACK_MEMBER(z80_ay2_iob_w_cb); + TIMER_CALLBACK_MEMBER(bootleg_mcu_port1_w_cb); }; @@ -111,7 +112,6 @@ public: , m_dials(*this, "DIAL%u", 1) , m_plungers(*this, "PLUNGER%u", 1) , m_launchbtns(*this, "LAUNCH%u", 1) - , m_mcu(*this, "mcu") , m_samples(*this, "samples") , m_samples_region(*this, "samples") , m_samplebuf() @@ -122,6 +122,7 @@ public: { } + 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); @@ -153,13 +154,13 @@ protected: required_ioport_array<2> m_dials; optional_ioport_array<2> m_plungers; optional_ioport_array<2> m_launchbtns; - optional_device<m68705p_device> m_mcu; optional_device<samples_device> m_samples; optional_region_ptr<u8> m_samples_region; std::unique_ptr<s16[]> m_samplebuf; // 68705 related + u8 m_portA_in; u8 m_portB_out; u8 m_portC_out; |