summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes/galaxian.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/includes/galaxian.h')
-rw-r--r--src/mame/includes/galaxian.h35
1 files changed, 26 insertions, 9 deletions
diff --git a/src/mame/includes/galaxian.h b/src/mame/includes/galaxian.h
index c21573a4123..d8a0a9bf26e 100644
--- a/src/mame/includes/galaxian.h
+++ b/src/mame/includes/galaxian.h
@@ -100,10 +100,9 @@ public:
DECLARE_WRITE8_MEMBER(scramble_background_green_w);
DECLARE_WRITE8_MEMBER(scramble_background_blue_w);
DECLARE_WRITE8_MEMBER(galaxian_gfxbank_w);
- DECLARE_CUSTOM_INPUT_MEMBER(gmgalax_port_r);
- DECLARE_CUSTOM_INPUT_MEMBER(azurian_port_r);
- DECLARE_CUSTOM_INPUT_MEMBER(kingball_muxbit_r);
- DECLARE_CUSTOM_INPUT_MEMBER(kingball_noise_r);
+ template <int N> DECLARE_READ_LINE_MEMBER(azurian_port_r);
+ DECLARE_READ_LINE_MEMBER(kingball_muxbit_r);
+ DECLARE_READ_LINE_MEMBER(kingball_noise_r);
DECLARE_CUSTOM_INPUT_MEMBER(moonwar_dial_r);
DECLARE_WRITE8_MEMBER(irq_enable_w);
DECLARE_WRITE8_MEMBER(start_lamp_w);
@@ -117,7 +116,7 @@ public:
DECLARE_WRITE8_MEMBER(theend_ppi8255_w);
DECLARE_WRITE8_MEMBER(theend_protection_w);
DECLARE_READ8_MEMBER(theend_protection_r);
- DECLARE_CUSTOM_INPUT_MEMBER(theend_protection_alt_r);
+ template <int N> DECLARE_READ_LINE_MEMBER(theend_protection_alt_r);
DECLARE_WRITE8_MEMBER(explorer_sound_control_w);
DECLARE_READ8_MEMBER(sfx_sample_io_r);
DECLARE_WRITE8_MEMBER(sfx_sample_io_w);
@@ -159,7 +158,6 @@ public:
DECLARE_WRITE8_MEMBER(froggeram_ppi8255_w);
DECLARE_WRITE8_MEMBER(artic_gfxbank_w);
DECLARE_READ8_MEMBER(tenspot_dsw_read);
- DECLARE_INPUT_CHANGED_MEMBER(gmgalax_game_changed);
DECLARE_WRITE8_MEMBER(konami_sound_control_w);
DECLARE_READ8_MEMBER(konami_sound_timer_r);
DECLARE_WRITE8_MEMBER(konami_portc_0_w);
@@ -181,7 +179,6 @@ public:
void init_galaxian();
void init_nolock();
void init_azurian();
- void init_gmgalax();
void init_pisces();
void init_batman2();
void init_frogg();
@@ -315,7 +312,6 @@ public:
void pacmanbl(machine_config &config);
void quaak(machine_config &config);
void galaxian(machine_config &config);
- void gmgalax(machine_config &config);
void tenspot(machine_config &config);
void froggers(machine_config &config);
void froggervd(machine_config &config);
@@ -442,7 +438,6 @@ protected:
int m_numspritegens;
int m_counter_74ls161[2];
int m_direction[2];
- uint8_t m_gmgalax_selected_game;
uint8_t m_zigzag_ay8910_latch;
uint8_t m_kingball_speech_dip;
uint8_t m_kingball_sound;
@@ -490,4 +485,26 @@ protected:
void videight_map(address_map &map);
};
+class gmgalax_state : public galaxian_state
+{
+public:
+ gmgalax_state(const machine_config &mconfig, device_type type, const char *tag)
+ : galaxian_state(mconfig, type, tag)
+ , m_glin(*this, "GLIN%u", 0U)
+ , m_gmin(*this, "GMIN%u", 0U)
+ { }
+
+ void gmgalax(machine_config &config);
+
+ DECLARE_INPUT_CHANGED_MEMBER(game_changed);
+ template <int N> DECLARE_CUSTOM_INPUT_MEMBER(port_r);
+
+ void init_gmgalax();
+
+private:
+ uint8_t m_selected_game;
+ required_ioport_array<3> m_glin;
+ required_ioport_array<3> m_gmin;
+};
+
#endif // MAME_INCLUDES_GALAXIAN_H