diff options
author | 2019-03-26 11:13:37 +1100 | |
---|---|---|
committer | 2019-03-26 11:13:37 +1100 | |
commit | 97b67170277437131adf6ed4d60139c172529e4f (patch) | |
tree | 7a5cbf608f191075f1612b1af15832c206a3fe2d /src/devices/machine/genpc.cpp | |
parent | b380514764cf857469bae61c11143a19f79a74c5 (diff) |
(nw) Clean up the mess on master
This effectively reverts b380514764cf857469bae61c11143a19f79a74c5 and
c24473ddff715ecec2e258a6eb38960cf8c8e98e, restoring the state at
598cd5227223c3b04ca31f0dbc1981256d9ea3ff.
Before pushing, please check that what you're about to push is sane.
Check your local commit log and ensure there isn't anything out-of-place
before pushing to mainline. When things like this happen, it wastes
everyone's time. I really don't need this in a week when real work⢠is
busting my balls and I'm behind where I want to be with preparing for
MAME release.
Diffstat (limited to 'src/devices/machine/genpc.cpp')
-rw-r--r-- | src/devices/machine/genpc.cpp | 60 |
1 files changed, 37 insertions, 23 deletions
diff --git a/src/devices/machine/genpc.cpp b/src/devices/machine/genpc.cpp index 269c1915bb0..e626bf96b30 100644 --- a/src/devices/machine/genpc.cpp +++ b/src/devices/machine/genpc.cpp @@ -135,6 +135,8 @@ WRITE_LINE_MEMBER( ibm5160_mb_device::pc_dma8237_out_eop ) void ibm5160_mb_device::pc_select_dma_channel(int channel, bool state) { + m_isabus->dack_line_w(channel, state); + if(!state) { m_dma_channel = channel; if(m_cur_eop) @@ -393,8 +395,16 @@ WRITE8_MEMBER( ibm5160_mb_device::pc_ppi_portb_w ) WRITE8_MEMBER( ibm5160_mb_device::nmi_enable_w ) { m_nmi_enabled = BIT(data,7); - m_isabus->set_nmi_state(m_nmi_enabled); + if (!m_nmi_enabled) + m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); +} + +WRITE_LINE_MEMBER( ibm5160_mb_device::iochck_w ) +{ + if (m_nmi_enabled && !state) + m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); } + //************************************************************************** // GLOBAL VARIABLES //************************************************************************** @@ -410,8 +420,9 @@ DEFINE_DEVICE_TYPE(IBM5160_MOTHERBOARD, ibm5160_mb_device, "ibm5160_mb", "IBM 51 // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_START(ibm5160_mb_device::device_add_mconfig) - PIT8253(config, m_pit8253, 0); +void ibm5160_mb_device::device_add_mconfig(machine_config &config) +{ + PIT8253(config, m_pit8253); m_pit8253->set_clk<0>(XTAL(14'318'181)/12.0); // heartbeat IRQ m_pit8253->out_handler<0>().set(m_pic8259, FUNC(pic8259_device::ir0_w)); m_pit8253->set_clk<1>(XTAL(14'318'181)/12.0); // DRAM refresh @@ -436,7 +447,7 @@ MACHINE_CONFIG_START(ibm5160_mb_device::device_add_mconfig) m_dma8237->out_dack_callback<2>().set(FUNC(ibm5160_mb_device::pc_dack2_w)); m_dma8237->out_dack_callback<3>().set(FUNC(ibm5160_mb_device::pc_dack3_w)); - PIC8259(config, m_pic8259, 0); + PIC8259(config, m_pic8259); m_pic8259->out_int_callback().set(FUNC(ibm5160_mb_device::pic_int_w)); I8255A(config, m_ppi8255, 0); @@ -445,7 +456,8 @@ MACHINE_CONFIG_START(ibm5160_mb_device::device_add_mconfig) m_ppi8255->in_pc_callback().set(FUNC(ibm5160_mb_device::pc_ppi_portc_r)); ISA8(config, m_isabus, 0); - m_isabus->set_cputag(":maincpu"); + m_isabus->set_memspace(":maincpu", AS_PROGRAM); + m_isabus->set_iospace(":maincpu", AS_IO); m_isabus->irq2_callback().set(m_pic8259, FUNC(pic8259_device::ir2_w)); m_isabus->irq3_callback().set(m_pic8259, FUNC(pic8259_device::ir3_w)); m_isabus->irq4_callback().set(m_pic8259, FUNC(pic8259_device::ir4_w)); @@ -455,15 +467,16 @@ MACHINE_CONFIG_START(ibm5160_mb_device::device_add_mconfig) m_isabus->drq1_callback().set(m_dma8237, FUNC(am9517a_device::dreq1_w)); m_isabus->drq2_callback().set(m_dma8237, FUNC(am9517a_device::dreq2_w)); m_isabus->drq3_callback().set(m_dma8237, FUNC(am9517a_device::dreq3_w)); + m_isabus->iochck_callback().set(FUNC(ibm5160_mb_device::iochck_w)); - MCFG_DEVICE_ADD("pc_kbdc", PC_KBDC, 0) - MCFG_PC_KBDC_OUT_CLOCK_CB(WRITELINE(*this, ibm5160_mb_device, keyboard_clock_w)) - MCFG_PC_KBDC_OUT_DATA_CB(WRITELINE(*this, ibm5160_mb_device, keyboard_data_w)) + PC_KBDC(config, m_pc_kbdc, 0); + m_pc_kbdc->out_clock_cb().set(FUNC(ibm5160_mb_device::keyboard_clock_w)); + m_pc_kbdc->out_data_cb().set(FUNC(ibm5160_mb_device::keyboard_data_w)); /* sound hardware */ SPEAKER(config, "mono").front_center(); SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 1.00); -MACHINE_CONFIG_END +} static INPUT_PORTS_START( ibm5160_mb ) @@ -595,18 +608,18 @@ DEFINE_DEVICE_TYPE(IBM5150_MOTHERBOARD, ibm5150_mb_device, "ibm5150_mb", "IBM 51 // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_START(ibm5150_mb_device::device_add_mconfig) +void ibm5150_mb_device::device_add_mconfig(machine_config &config) +{ ibm5160_mb_device::device_add_mconfig(config); - MCFG_DEVICE_MODIFY("pc_kbdc") - MCFG_PC_KBDC_OUT_CLOCK_CB(WRITELINE(*this, ibm5150_mb_device, keyboard_clock_w)) + subdevice<pc_kbdc_device>("pc_kbdc")->out_clock_cb().set(FUNC(ibm5150_mb_device::keyboard_clock_w)); m_ppi8255->out_pb_callback().set(FUNC(ibm5150_mb_device::pc_ppi_portb_w)); m_ppi8255->in_pc_callback().set(FUNC(ibm5150_mb_device::pc_ppi_portc_r)); - MCFG_CASSETTE_ADD( "cassette" ) - MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED) -MACHINE_CONFIG_END + CASSETTE(config, m_cassette); + m_cassette->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED); +} //************************************************************************** // LIVE DEVICE @@ -772,15 +785,15 @@ DEFINE_DEVICE_TYPE(EC1841_MOTHERBOARD, ec1841_mb_device, "ec1841_mb", "EC-1840 m // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_START(ec1841_mb_device::device_add_mconfig) +void ec1841_mb_device::device_add_mconfig(machine_config &config) +{ ibm5160_mb_device::device_add_mconfig(config); m_ppi8255->out_pb_callback().set(FUNC(ec1841_mb_device::pc_ppi_portb_w)); m_ppi8255->in_pc_callback().set(FUNC(ec1841_mb_device::pc_ppi_portc_r)); - MCFG_DEVICE_MODIFY("pc_kbdc") - MCFG_PC_KBDC_OUT_CLOCK_CB(WRITELINE(*this, ec1841_mb_device, keyboard_clock_w)) -MACHINE_CONFIG_END + subdevice<pc_kbdc_device>("pc_kbdc")->out_clock_cb().set(FUNC(ec1841_mb_device::keyboard_clock_w)); +} static INPUT_PORTS_START( ec1841_mb ) PORT_START("DSW0") /* SA1 */ @@ -898,12 +911,13 @@ pc_noppi_mb_device::pc_noppi_mb_device(const machine_config &mconfig, device_typ // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_START(pc_noppi_mb_device::device_add_mconfig) +void pc_noppi_mb_device::device_add_mconfig(machine_config &config) +{ ibm5160_mb_device::device_add_mconfig(config); - MCFG_DEVICE_REMOVE("pc_kbdc") - MCFG_DEVICE_REMOVE("ppi8255") -MACHINE_CONFIG_END + config.device_remove("pc_kbdc"); + config.device_remove("ppi8255"); +} static INPUT_PORTS_START( pc_noppi_mb ) INPUT_PORTS_END |