mirror of
https://github.com/holub/mame
synced 2025-04-25 09:50:04 +03:00
astrocde:cpp: Split up base class a little; add output finder for tenpindx (nw)
This commit is contained in:
parent
635ae06227
commit
453c8fde2c
@ -167,7 +167,7 @@ WRITE8_MEMBER(astrocde_state::protected_ram_w)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
WRITE8_MEMBER(astrocde_state::seawolf2_sound_1_w)// Port 40
|
||||
WRITE8_MEMBER(seawolf2_state::sound_1_w)// Port 40
|
||||
{
|
||||
uint8_t rising_bits = data & ~m_port_1_last;
|
||||
m_port_1_last = data;
|
||||
@ -181,7 +181,7 @@ WRITE8_MEMBER(astrocde_state::seawolf2_sound_1_w)// Port 40
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(astrocde_state::seawolf2_sound_2_w)// Port 41
|
||||
WRITE8_MEMBER(seawolf2_state::sound_2_w)// Port 41
|
||||
{
|
||||
uint8_t rising_bits = data & ~m_port_2_last;
|
||||
m_port_2_last = data;
|
||||
@ -245,19 +245,19 @@ WRITE_LINE_MEMBER(astrocde_state::sparkle_w)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
CUSTOM_INPUT_MEMBER(astrocde_state::ebases_trackball_r)
|
||||
CUSTOM_INPUT_MEMBER(ebases_state::trackball_r)
|
||||
{
|
||||
return m_trackball[m_input_select]->read();
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(astrocde_state::ebases_trackball_select_w)
|
||||
WRITE8_MEMBER(ebases_state::trackball_select_w)
|
||||
{
|
||||
m_input_select = data & 3;
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(astrocde_state::ebases_coin_w)
|
||||
WRITE8_MEMBER(ebases_state::coin_w)
|
||||
{
|
||||
machine().bookkeeping().coin_counter_w(0, data & 1);
|
||||
}
|
||||
@ -291,18 +291,18 @@ WRITE8_MEMBER(astrocde_state::demndrgn_banksw_w)
|
||||
m_bank8000->set_entry(bank);
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER(astrocde_state::demndrgn_input_select_w)
|
||||
WRITE_LINE_MEMBER(demndrgn_state::input_select_w)
|
||||
{
|
||||
m_input_select = state;
|
||||
}
|
||||
|
||||
CUSTOM_INPUT_MEMBER(astrocde_state::demndragn_joystick_r)
|
||||
CUSTOM_INPUT_MEMBER(demndrgn_state::joystick_r)
|
||||
{
|
||||
return m_joystick[m_input_select]->read();
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(astrocde_state::demndrgn_sound_w)
|
||||
WRITE8_MEMBER(demndrgn_state::sound_w)
|
||||
{
|
||||
logerror("Trigger sound sample 0x%02x\n",data);
|
||||
}
|
||||
@ -341,49 +341,49 @@ WRITE8_MEMBER(astrocde_state::profpac_banksw_w)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
WRITE8_MEMBER(astrocde_state::tenpindx_lamp_w)
|
||||
WRITE8_MEMBER(tenpindx_state::lamp_w)
|
||||
{
|
||||
/* lamps */
|
||||
if (offset == 0)
|
||||
{
|
||||
output().set_lamp_value(0, (data >> 2) & 1);
|
||||
output().set_lamp_value(1, (data >> 3) & 1);
|
||||
output().set_lamp_value(2, (data >> 4) & 1);
|
||||
output().set_lamp_value(3, (data >> 5) & 1);
|
||||
output().set_lamp_value(4, (data >> 6) & 1);
|
||||
output().set_lamp_value(5, (data >> 7) & 1);
|
||||
m_lamps[0] = BIT(data, 2);
|
||||
m_lamps[1] = BIT(data, 3);
|
||||
m_lamps[2] = BIT(data, 4);
|
||||
m_lamps[3] = BIT(data, 5);
|
||||
m_lamps[4] = BIT(data, 6);
|
||||
m_lamps[5] = BIT(data, 7);
|
||||
}
|
||||
else
|
||||
{
|
||||
output().set_lamp_value(6, (data >> 0) & 1);
|
||||
output().set_lamp_value(7, (data >> 1) & 1);
|
||||
output().set_lamp_value(8, (data >> 2) & 1);
|
||||
output().set_lamp_value(9, (data >> 3) & 1);
|
||||
m_lamps[6] = BIT(data, 0);
|
||||
m_lamps[7] = BIT(data, 1);
|
||||
m_lamps[8] = BIT(data, 2);
|
||||
m_lamps[9] = BIT(data, 3);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(astrocde_state::tenpindx_counter_w)
|
||||
WRITE8_MEMBER(tenpindx_state::counter_w)
|
||||
{
|
||||
machine().bookkeeping().coin_counter_w(0, (data >> 0) & 1);
|
||||
machine().bookkeeping().coin_counter_w(0, BIT(data, 0));
|
||||
if (data & 0xfc) osd_printf_debug("tenpindx_counter_w = %02X\n", data);
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(astrocde_state::tenpindx_lights_w)
|
||||
WRITE8_MEMBER(tenpindx_state::lights_w)
|
||||
{
|
||||
/* "flashlights" */
|
||||
int which = data >> 4;
|
||||
|
||||
output().set_lamp_value(10, (which == 1));
|
||||
output().set_lamp_value(11, (which == 2));
|
||||
output().set_lamp_value(12, (which == 3));
|
||||
output().set_lamp_value(13, (which == 4));
|
||||
output().set_lamp_value(14, (which == 5));
|
||||
output().set_lamp_value(15, (which == 6));
|
||||
output().set_lamp_value(16, (which == 7));
|
||||
output().set_lamp_value(17, (which == 8));
|
||||
output().set_lamp_value(18, (which == 9));
|
||||
m_lamps[10] = (which == 1);
|
||||
m_lamps[11] = (which == 2);
|
||||
m_lamps[12] = (which == 3);
|
||||
m_lamps[13] = (which == 4);
|
||||
m_lamps[14] = (which == 5);
|
||||
m_lamps[15] = (which == 6);
|
||||
m_lamps[16] = (which == 7);
|
||||
m_lamps[17] = (which == 8);
|
||||
m_lamps[18] = (which == 9);
|
||||
}
|
||||
|
||||
|
||||
@ -423,7 +423,7 @@ void astrocde_state::seawolf2_map(address_map &map)
|
||||
}
|
||||
|
||||
|
||||
void astrocde_state::ebases_map(address_map &map)
|
||||
void ebases_state::ebases_map(address_map &map)
|
||||
{
|
||||
map(0x0000, 0x3fff).rom();
|
||||
map(0x0000, 0x3fff).w(this, FUNC(astrocde_state::astrocade_funcgen_w));
|
||||
@ -500,7 +500,7 @@ void astrocde_state::profpac_bank4000_map(address_map &map)
|
||||
}
|
||||
|
||||
|
||||
void astrocde_state::tenpin_sub_map(address_map &map)
|
||||
void tenpindx_state::sub_map(address_map &map)
|
||||
{
|
||||
map(0x0000, 0x3fff).rom();
|
||||
map(0x8000, 0x87ff).ram();
|
||||
@ -524,7 +524,7 @@ void astrocde_state::port_map(address_map &map)
|
||||
}
|
||||
|
||||
|
||||
void astrocde_state::port_map_discrete(address_map &map)
|
||||
void seawolf2_state::port_map_discrete(address_map &map)
|
||||
{
|
||||
map.global_mask(0xff);
|
||||
map(0x00, 0x0f).rw(this, FUNC(astrocde_state::video_register_r), FUNC(astrocde_state::video_register_w));
|
||||
@ -533,18 +533,18 @@ void astrocde_state::port_map_discrete(address_map &map)
|
||||
map(0x12, 0x12).portr("P3HANDLE");
|
||||
map(0x13, 0x13).portr("P4HANDLE");
|
||||
map(0x19, 0x19).w(this, FUNC(astrocde_state::expand_register_w));
|
||||
map(0x40, 0x40).mirror(0x18).w(this, FUNC(astrocde_state::seawolf2_sound_1_w));
|
||||
map(0x41, 0x41).mirror(0x18).w(this, FUNC(astrocde_state::seawolf2_sound_2_w));
|
||||
map(0x40, 0x40).mirror(0x18).w(this, FUNC(seawolf2_state::sound_1_w));
|
||||
map(0x41, 0x41).mirror(0x18).w(this, FUNC(seawolf2_state::sound_2_w));
|
||||
map(0x42, 0x42).mirror(0x18).w("lamplatch2", FUNC(output_latch_device::write));
|
||||
map(0x43, 0x43).mirror(0x18).w("lamplatch1", FUNC(output_latch_device::write));
|
||||
}
|
||||
|
||||
|
||||
void astrocde_state::port_map_ebases(address_map &map)
|
||||
void ebases_state::port_map_ebases(address_map &map)
|
||||
{
|
||||
port_map(map);
|
||||
map(0x0020, 0x0020).mirror(0xff07).w(this, FUNC(astrocde_state::ebases_coin_w));
|
||||
map(0x0028, 0x0028).mirror(0xff07).w(this, FUNC(astrocde_state::ebases_trackball_select_w));
|
||||
map(0x0020, 0x0020).mirror(0xff07).w(this, FUNC(ebases_state::coin_w));
|
||||
map(0x0028, 0x0028).mirror(0xff07).w(this, FUNC(ebases_state::trackball_select_w));
|
||||
}
|
||||
|
||||
|
||||
@ -586,15 +586,15 @@ void astrocde_state::port_map_16col_pattern_nosound(address_map &map)
|
||||
}
|
||||
|
||||
|
||||
void astrocde_state::port_map_16col_pattern_demndrgn(address_map &map)
|
||||
void demndrgn_state::port_map_16col_pattern_demndrgn(address_map &map)
|
||||
{
|
||||
port_map_16col_pattern_nosound(map);
|
||||
map(0x0010, 0x001f).select(0xff00).r("astrocade1", FUNC(astrocade_io_device::read));
|
||||
map(0x0097, 0x0097).mirror(0xff00).w(this, FUNC(astrocde_state::demndrgn_sound_w));
|
||||
map(0x0097, 0x0097).mirror(0xff00).w(this, FUNC(demndrgn_state::sound_w));
|
||||
}
|
||||
|
||||
|
||||
void astrocde_state::port_map_16col_pattern_tenpindx(address_map &map)
|
||||
void tenpindx_state::port_map_16col_pattern_tenpindx(address_map &map)
|
||||
{
|
||||
port_map_16col_pattern_nosound(map);
|
||||
map(0x0060, 0x0060).mirror(0xff00).portr("P60");
|
||||
@ -602,14 +602,14 @@ void astrocde_state::port_map_16col_pattern_tenpindx(address_map &map)
|
||||
map(0x0062, 0x0062).mirror(0xff00).portr("P62");
|
||||
map(0x0063, 0x0063).mirror(0xff00).portr("P63");
|
||||
map(0x0064, 0x0064).mirror(0xff00).portr("P64");
|
||||
map(0x0065, 0x0066).mirror(0xff00).w(this, FUNC(astrocde_state::tenpindx_lamp_w));
|
||||
map(0x0067, 0x0067).mirror(0xff00).w(this, FUNC(astrocde_state::tenpindx_counter_w));
|
||||
map(0x0068, 0x0068).mirror(0xff00).w(this, FUNC(astrocde_state::tenpindx_lights_w));
|
||||
map(0x0065, 0x0066).mirror(0xff00).w(this, FUNC(tenpindx_state::lamp_w));
|
||||
map(0x0067, 0x0067).mirror(0xff00).w(this, FUNC(tenpindx_state::counter_w));
|
||||
map(0x0068, 0x0068).mirror(0xff00).w(this, FUNC(tenpindx_state::lights_w));
|
||||
map(0x0097, 0x0097).mirror(0xff00).w(m_soundlatch, FUNC(generic_latch_8_device::write));
|
||||
}
|
||||
|
||||
|
||||
void astrocde_state::tenpin_sub_io_map(address_map &map)
|
||||
void tenpindx_state::sub_io_map(address_map &map)
|
||||
{
|
||||
map.global_mask(0xff);
|
||||
map(0x90, 0x93).rw("ctc", FUNC(z80ctc_device::read), FUNC(z80ctc_device::write));
|
||||
@ -721,7 +721,7 @@ static INPUT_PORTS_START( ebases )
|
||||
PORT_DIPUNUSED_DIPLOC( 0x80, 0x00, "S1:8" )
|
||||
|
||||
PORT_START("P4HANDLE")
|
||||
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrocde_state, ebases_trackball_r, nullptr)
|
||||
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ebases_state, trackball_r, nullptr)
|
||||
|
||||
PORT_START("TRACKX1")
|
||||
PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_RESET
|
||||
@ -1053,7 +1053,7 @@ static INPUT_PORTS_START( demndrgn )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
|
||||
PORT_START("P2HANDLE")
|
||||
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrocde_state,demndragn_joystick_r, nullptr)
|
||||
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, demndrgn_state, joystick_r, nullptr)
|
||||
|
||||
PORT_START("P3HANDLE")
|
||||
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
@ -1258,7 +1258,7 @@ MACHINE_CONFIG_END
|
||||
*
|
||||
*************************************/
|
||||
|
||||
MACHINE_CONFIG_START(astrocde_state::seawolf2)
|
||||
MACHINE_CONFIG_START(seawolf2_state::seawolf2)
|
||||
astrocade_base(config);
|
||||
|
||||
/* basic machine hardware */
|
||||
@ -1304,7 +1304,7 @@ MACHINE_CONFIG_START(astrocde_state::seawolf2)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
MACHINE_CONFIG_START(astrocde_state::ebases)
|
||||
MACHINE_CONFIG_START(ebases_state::ebases)
|
||||
astrocade_base(config);
|
||||
astrocade_mono_sound(config);
|
||||
|
||||
@ -1488,7 +1488,7 @@ MACHINE_CONFIG_START(astrocde_state::profpac)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
MACHINE_CONFIG_START(astrocde_state::demndrgn)
|
||||
MACHINE_CONFIG_START(demndrgn_state::demndrgn)
|
||||
astrocade_16color_base(config);
|
||||
astrocade_mono_sound(config); // used only for I/O
|
||||
|
||||
@ -1502,7 +1502,7 @@ MACHINE_CONFIG_START(astrocde_state::demndrgn)
|
||||
MCFG_OUTPUT_LATCH_BIT1_HANDLER(WRITELINE(*this, astrocde_state, coin_counter_w<1>))
|
||||
MCFG_OUTPUT_LATCH_BIT2_HANDLER(OUTPUT("led0"))
|
||||
MCFG_OUTPUT_LATCH_BIT3_HANDLER(OUTPUT("led1"))
|
||||
MCFG_OUTPUT_LATCH_BIT4_HANDLER(WRITELINE(*this, astrocde_state, demndrgn_input_select_w))
|
||||
MCFG_OUTPUT_LATCH_BIT4_HANDLER(WRITELINE(*this, demndrgn_state, input_select_w))
|
||||
|
||||
MCFG_DEVICE_MODIFY("astrocade1")
|
||||
MCFG_ASTROCADE_IO_SO4_STROBE_CB(WRITE8("outlatch", output_latch_device, write))
|
||||
@ -1511,7 +1511,7 @@ MACHINE_CONFIG_START(astrocde_state::demndrgn)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
MACHINE_CONFIG_START(astrocde_state::tenpindx)
|
||||
MACHINE_CONFIG_START(tenpindx_state::tenpindx)
|
||||
astrocade_16color_base(config);
|
||||
|
||||
/* basic machine hardware */
|
||||
@ -1521,8 +1521,8 @@ MACHINE_CONFIG_START(astrocde_state::tenpindx)
|
||||
|
||||
MCFG_DEVICE_ADD("sub", Z80, ASTROCADE_CLOCK/4) /* real clock unknown */
|
||||
MCFG_Z80_DAISY_CHAIN(tenpin_daisy_chain)
|
||||
MCFG_DEVICE_PROGRAM_MAP(tenpin_sub_map)
|
||||
MCFG_DEVICE_IO_MAP(tenpin_sub_io_map)
|
||||
MCFG_DEVICE_PROGRAM_MAP(sub_map)
|
||||
MCFG_DEVICE_IO_MAP(sub_io_map)
|
||||
|
||||
MCFG_DEVICE_ADD("ctc", Z80CTC, ASTROCADE_CLOCK/4 /* same as "sub" */)
|
||||
MCFG_Z80CTC_INTR_CB(INPUTLINE("sub", INPUT_LINE_IRQ0))
|
||||
@ -1836,10 +1836,10 @@ void astrocde_state::init_tenpindx()
|
||||
*************************************/
|
||||
|
||||
/* 90002 CPU board + 90700 game board + 91312 "characterization card" */
|
||||
GAMEL( 1978, seawolf2, 0, seawolf2, seawolf2, astrocde_state, init_seawolf2, ROT0, "Dave Nutting Associates / Midway", "Sea Wolf II", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_seawolf2 )
|
||||
GAMEL( 1978, seawolf2, 0, seawolf2, seawolf2, seawolf2_state, init_seawolf2, ROT0, "Dave Nutting Associates / Midway", "Sea Wolf II", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_seawolf2 )
|
||||
|
||||
/* 91354 CPU board + 90700 game board + 91356 RAM board */
|
||||
GAMEL( 1980, ebases, 0, ebases, ebases, astrocde_state, init_ebases, ROT0, "Dave Nutting Associates / Midway", "Extra Bases", MACHINE_SUPPORTS_SAVE, layout_spacezap )
|
||||
GAMEL( 1980, ebases, 0, ebases, ebases, ebases_state, init_ebases, ROT0, "Dave Nutting Associates / Midway", "Extra Bases", MACHINE_SUPPORTS_SAVE, layout_spacezap )
|
||||
|
||||
/* 91354 CPU board + 90706 game board + 91356 RAM board + 91355 pattern board */
|
||||
GAMEL( 1980, spacezap, 0, spacezap, spacezap, astrocde_state, init_spacezap, ROT0, "Midway", "Space Zap", MACHINE_SUPPORTS_SAVE, layout_spacezap )
|
||||
@ -1860,5 +1860,5 @@ GAME( 1981, robby, 0, robby, robby, astrocde_state, init_robby,
|
||||
GAME( 1983, profpac, 0, profpac, profpac, astrocde_state, init_profpac, ROT0, "Dave Nutting Associates / Bally Midway", "Professor Pac-Man", MACHINE_SUPPORTS_SAVE )
|
||||
|
||||
/* 91465 CPU board + 91699 game board + 91466 RAM board + 91488 pattern board + 91467 memory board */
|
||||
GAME( 1982, demndrgn, 0, demndrgn, demndrgn, astrocde_state, init_demndrgn, ROT0, "Dave Nutting Associates / Bally Midway", "Demons & Dragons (prototype)", MACHINE_IS_INCOMPLETE | MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
|
||||
GAMEL( 1983, tenpindx, 0, tenpindx, tenpindx, astrocde_state, init_tenpindx, ROT0, "Dave Nutting Associates / Bally Midway", "Ten Pin Deluxe", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE | MACHINE_MECHANICAL, layout_tenpindx )
|
||||
GAME( 1982, demndrgn, 0, demndrgn, demndrgn, demndrgn_state, init_demndrgn, ROT0, "Dave Nutting Associates / Bally Midway", "Demons & Dragons (prototype)", MACHINE_IS_INCOMPLETE | MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
|
||||
GAMEL( 1983, tenpindx, 0, tenpindx, tenpindx, tenpindx_state, init_tenpindx, ROT0, "Dave Nutting Associates / Bally Midway", "Ten Pin Deluxe", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE | MACHINE_MECHANICAL, layout_tenpindx )
|
||||
|
@ -34,7 +34,6 @@ public:
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_subcpu(*this, "sub"),
|
||||
m_samples(*this, "samples"),
|
||||
m_votrax(*this, "votrax"),
|
||||
m_astrocade_sound1(*this, "astrocade1"),
|
||||
m_videoram(*this, "videoram"),
|
||||
@ -44,14 +43,11 @@ public:
|
||||
m_bank4000(*this, "bank4000"),
|
||||
m_bank8000(*this, "bank8000"),
|
||||
m_handle(*this, "P%uHANDLE", 1U),
|
||||
m_trackball(*this, { { "TRACKX2", "TRACKY2", "TRACKX1", "TRACKY1" } }),
|
||||
m_joystick(*this, { { "MOVEX", "MOVEY" } }),
|
||||
m_interrupt_scanline(0xff)
|
||||
{ }
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
optional_device<cpu_device> m_subcpu;
|
||||
optional_device<samples_device> m_samples;
|
||||
optional_device<votrax_sc01_device> m_votrax;
|
||||
optional_device<astrocade_io_device> m_astrocade_sound1;
|
||||
optional_shared_ptr<uint8_t> m_videoram;
|
||||
@ -61,8 +57,6 @@ public:
|
||||
optional_device<address_map_bank_device> m_bank4000;
|
||||
optional_memory_bank m_bank8000;
|
||||
optional_ioport_array<4> m_handle;
|
||||
optional_ioport_array<4> m_trackball;
|
||||
optional_ioport_array<2> m_joystick;
|
||||
|
||||
uint8_t m_video_config;
|
||||
uint8_t m_sparkle[4];
|
||||
@ -70,8 +64,6 @@ public:
|
||||
char *m_totalword_ptr;
|
||||
char m_oldword[256];
|
||||
int m_plural;
|
||||
uint8_t m_port_1_last;
|
||||
uint8_t m_port_2_last;
|
||||
uint8_t m_ram_write_enable;
|
||||
uint8_t m_input_select;
|
||||
std::unique_ptr<uint8_t[]> m_sparklestar;
|
||||
@ -114,21 +106,12 @@ public:
|
||||
DECLARE_WRITE8_MEMBER(protected_ram_enable_w);
|
||||
DECLARE_READ8_MEMBER(protected_ram_r);
|
||||
DECLARE_WRITE8_MEMBER(protected_ram_w);
|
||||
DECLARE_WRITE8_MEMBER(seawolf2_sound_1_w);
|
||||
DECLARE_WRITE8_MEMBER(seawolf2_sound_2_w);
|
||||
DECLARE_WRITE8_MEMBER(ebases_trackball_select_w);
|
||||
DECLARE_WRITE8_MEMBER(ebases_coin_w);
|
||||
DECLARE_READ8_MEMBER(input_mux_r);
|
||||
template<int Coin> DECLARE_WRITE_LINE_MEMBER(coin_counter_w);
|
||||
template<int Bit> DECLARE_WRITE_LINE_MEMBER(sparkle_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(gorf_sound_switch_w);
|
||||
DECLARE_WRITE8_MEMBER(profpac_banksw_w);
|
||||
DECLARE_WRITE8_MEMBER(demndrgn_banksw_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(demndrgn_input_select_w);
|
||||
DECLARE_WRITE8_MEMBER(demndrgn_sound_w);
|
||||
DECLARE_WRITE8_MEMBER(tenpindx_lamp_w);
|
||||
DECLARE_WRITE8_MEMBER(tenpindx_counter_w);
|
||||
DECLARE_WRITE8_MEMBER(tenpindx_lights_w);
|
||||
DECLARE_READ8_MEMBER(video_register_r);
|
||||
DECLARE_WRITE8_MEMBER(video_register_w);
|
||||
DECLARE_WRITE8_MEMBER(astrocade_funcgen_w);
|
||||
@ -139,8 +122,6 @@ public:
|
||||
DECLARE_WRITE8_MEMBER(profpac_screenram_ctrl_w);
|
||||
DECLARE_READ8_MEMBER(profpac_videoram_r);
|
||||
DECLARE_WRITE8_MEMBER(profpac_videoram_w);
|
||||
DECLARE_CUSTOM_INPUT_MEMBER(ebases_trackball_r);
|
||||
DECLARE_CUSTOM_INPUT_MEMBER(demndragn_joystick_r);
|
||||
DECLARE_INPUT_CHANGED_MEMBER(spacezap_monitor);
|
||||
void init_profpac();
|
||||
void init_spacezap();
|
||||
@ -177,23 +158,14 @@ public:
|
||||
void astrocade_stereo_sound(machine_config &config);
|
||||
void spacezap(machine_config &config);
|
||||
void gorf(machine_config &config);
|
||||
void seawolf2(machine_config &config);
|
||||
void profpac(machine_config &config);
|
||||
void robby(machine_config &config);
|
||||
void ebases(machine_config &config);
|
||||
void wow(machine_config &config);
|
||||
void tenpindx(machine_config &config);
|
||||
void demndrgn(machine_config &config);
|
||||
void bank4000_map(address_map &map);
|
||||
void demndrgn_map(address_map &map);
|
||||
void ebases_map(address_map &map);
|
||||
void port_map(address_map &map);
|
||||
void port_map_discrete(address_map &map);
|
||||
void port_map_ebases(address_map &map);
|
||||
void port_map_16col_pattern(address_map &map);
|
||||
void port_map_16col_pattern_nosound(address_map &map);
|
||||
void port_map_16col_pattern_demndrgn(address_map &map);
|
||||
void port_map_16col_pattern_tenpindx(address_map &map);
|
||||
void port_map_mono_pattern(address_map &map);
|
||||
void port_map_stereo_pattern(address_map &map);
|
||||
void profpac_bank4000_map(address_map &map);
|
||||
@ -201,9 +173,91 @@ public:
|
||||
void robby_map(address_map &map);
|
||||
void seawolf2_map(address_map &map);
|
||||
void spacezap_map(address_map &map);
|
||||
void tenpin_sub_io_map(address_map &map);
|
||||
void tenpin_sub_map(address_map &map);
|
||||
void wow_map(address_map &map);
|
||||
protected:
|
||||
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
|
||||
};
|
||||
|
||||
class seawolf2_state : public astrocde_state
|
||||
{
|
||||
public:
|
||||
seawolf2_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: astrocde_state(mconfig, type, tag)
|
||||
, m_samples(*this, "samples")
|
||||
{ }
|
||||
|
||||
void seawolf2(machine_config &config);
|
||||
private:
|
||||
DECLARE_WRITE8_MEMBER(sound_1_w);
|
||||
DECLARE_WRITE8_MEMBER(sound_2_w);
|
||||
|
||||
void port_map_discrete(address_map &map);
|
||||
|
||||
virtual void machine_start() override;
|
||||
|
||||
required_device<samples_device> m_samples;
|
||||
uint8_t m_port_1_last;
|
||||
uint8_t m_port_2_last;
|
||||
};
|
||||
|
||||
class ebases_state : public astrocde_state
|
||||
{
|
||||
public:
|
||||
ebases_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: astrocde_state(mconfig, type, tag)
|
||||
, m_trackball(*this, {"TRACKX2", "TRACKY2", "TRACKX1", "TRACKY1"})
|
||||
{ }
|
||||
|
||||
void ebases(machine_config &config);
|
||||
DECLARE_CUSTOM_INPUT_MEMBER(trackball_r);
|
||||
private:
|
||||
DECLARE_WRITE8_MEMBER(trackball_select_w);
|
||||
DECLARE_WRITE8_MEMBER(coin_w);
|
||||
|
||||
void ebases_map(address_map &map);
|
||||
void port_map_ebases(address_map &map);
|
||||
|
||||
required_ioport_array<4> m_trackball;
|
||||
};
|
||||
|
||||
class demndrgn_state : public astrocde_state
|
||||
{
|
||||
public:
|
||||
demndrgn_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: astrocde_state(mconfig, type, tag)
|
||||
, m_joystick(*this, {"MOVEX", "MOVEY"})
|
||||
{ }
|
||||
|
||||
void demndrgn(machine_config &config);
|
||||
DECLARE_CUSTOM_INPUT_MEMBER(joystick_r);
|
||||
private:
|
||||
DECLARE_WRITE_LINE_MEMBER(input_select_w);
|
||||
DECLARE_WRITE8_MEMBER(sound_w);
|
||||
|
||||
void port_map_16col_pattern_demndrgn(address_map &map);
|
||||
|
||||
required_ioport_array<2> m_joystick;
|
||||
};
|
||||
|
||||
class tenpindx_state : public astrocde_state
|
||||
{
|
||||
public:
|
||||
tenpindx_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: astrocde_state(mconfig, type, tag)
|
||||
, m_lamps(*this, "lamp%0", 0U)
|
||||
{ }
|
||||
|
||||
void tenpindx(machine_config &config);
|
||||
private:
|
||||
DECLARE_WRITE8_MEMBER(lamp_w);
|
||||
DECLARE_WRITE8_MEMBER(counter_w);
|
||||
DECLARE_WRITE8_MEMBER(lights_w);
|
||||
|
||||
virtual void machine_start() override;
|
||||
|
||||
void port_map_16col_pattern_tenpindx(address_map &map);
|
||||
void sub_io_map(address_map &map);
|
||||
void sub_map(address_map &map);
|
||||
|
||||
output_finder<19> m_lamps;
|
||||
};
|
||||
|
@ -20,14 +20,27 @@
|
||||
|
||||
void astrocde_state::machine_start()
|
||||
{
|
||||
save_item(NAME(m_port_1_last));
|
||||
save_item(NAME(m_port_2_last));
|
||||
save_item(NAME(m_ram_write_enable));
|
||||
save_item(NAME(m_input_select));
|
||||
}
|
||||
|
||||
void seawolf2_state::machine_start()
|
||||
{
|
||||
astrocde_state::machine_start();
|
||||
|
||||
save_item(NAME(m_port_1_last));
|
||||
save_item(NAME(m_port_2_last));
|
||||
|
||||
m_port_1_last = m_port_2_last = 0xff;
|
||||
}
|
||||
|
||||
void tenpindx_state::machine_start()
|
||||
{
|
||||
astrocde_state::machine_start();
|
||||
|
||||
m_lamps.resolve();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
|
Loading…
Reference in New Issue
Block a user