From d1a06324220be08885216de57d03018a4e77d05c Mon Sep 17 00:00:00 2001 From: AJR Date: Sun, 26 May 2019 18:42:16 -0400 Subject: z80netf: Fix error in keyboard configuration (was broken since 0.196) --- src/mame/drivers/z80ne.cpp | 37 ++++++++++++++++--------------------- src/mame/includes/z80ne.h | 1 + 2 files changed, 17 insertions(+), 21 deletions(-) diff --git a/src/mame/drivers/z80ne.cpp b/src/mame/drivers/z80ne.cpp index 1b08433a9d3..89e92492566 100644 --- a/src/mame/drivers/z80ne.cpp +++ b/src/mame/drivers/z80ne.cpp @@ -447,16 +447,8 @@ void z80ne_state::z80ne(machine_config &config) //SOFTWARE_LIST(config, "cass_list").set_original("z80ne_cass"); } -void z80ne_state::z80net(machine_config &config) +void z80ne_state::lx387(machine_config &config) { - z80ne(config); - - m_maincpu->set_addrmap(AS_PROGRAM, &z80ne_state::z80net_mem); - m_maincpu->set_addrmap(AS_IO, &z80ne_state::z80net_io); - - MCFG_MACHINE_START_OVERRIDE(z80ne_state, z80net ) - MCFG_MACHINE_RESET_OVERRIDE(z80ne_state, z80net ) - KR2376_ST(config, m_lx387_kr2376, 50000); m_lx387_kr2376->x<0>().set_ioport("X0"); m_lx387_kr2376->x<1>().set_ioport("X1"); @@ -468,6 +460,19 @@ void z80ne_state::z80net(machine_config &config) m_lx387_kr2376->x<7>().set_ioport("X7"); m_lx387_kr2376->shift().set(FUNC(z80ne_state::lx387_shift_r)); m_lx387_kr2376->control().set(FUNC(z80ne_state::lx387_control_r)); +} + +void z80ne_state::z80net(machine_config &config) +{ + z80ne(config); + + m_maincpu->set_addrmap(AS_PROGRAM, &z80ne_state::z80net_mem); + m_maincpu->set_addrmap(AS_IO, &z80ne_state::z80net_io); + + MCFG_MACHINE_START_OVERRIDE(z80ne_state, z80net ) + MCFG_MACHINE_RESET_OVERRIDE(z80ne_state, z80net ) + + lx387(config); /* video hardware */ SCREEN(config, "lx388", SCREEN_TYPE_RASTER); @@ -510,17 +515,7 @@ void z80ne_state::z80netb(machine_config &config) m_cassette2->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED); m_cassette2->set_interface("z80ne_cass"); - KR2376_ST(config, m_lx387_kr2376, 50000); - m_lx387_kr2376->x<0>().set_ioport("X0"); - m_lx387_kr2376->x<1>().set_ioport("X1"); - m_lx387_kr2376->x<2>().set_ioport("X2"); - m_lx387_kr2376->x<3>().set_ioport("X3"); - m_lx387_kr2376->x<4>().set_ioport("X4"); - m_lx387_kr2376->x<5>().set_ioport("X5"); - m_lx387_kr2376->x<6>().set_ioport("X6"); - m_lx387_kr2376->x<7>().set_ioport("X7"); - m_lx387_kr2376->shift().set(FUNC(z80ne_state::lx387_shift_r)); - m_lx387_kr2376->control().set(FUNC(z80ne_state::lx387_control_r)); + lx387(config); /* video hardware */ SCREEN(config, "lx388", SCREEN_TYPE_RASTER); @@ -563,7 +558,7 @@ void z80netf_state::z80netf(machine_config &config) m_cassette2->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED); m_cassette2->set_interface("z80ne_cass"); - KR2376_ST(config, m_lx387_kr2376, 50000); + lx387(config); /* video hardware */ SCREEN(config, "lx388", SCREEN_TYPE_RASTER); diff --git a/src/mame/includes/z80ne.h b/src/mame/includes/z80ne.h index 418fda1b6c5..2a640832a3d 100644 --- a/src/mame/includes/z80ne.h +++ b/src/mame/includes/z80ne.h @@ -92,6 +92,7 @@ public: { } + void lx387(machine_config &config); void z80net(machine_config &config); void z80ne(machine_config &config); void z80netb(machine_config &config); -- cgit v1.2.3