summaryrefslogtreecommitdiffstats
path: root/src/mame/drivers/ipc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/ipc.cpp')
-rw-r--r--src/mame/drivers/ipc.cpp69
1 files changed, 35 insertions, 34 deletions
diff --git a/src/mame/drivers/ipc.cpp b/src/mame/drivers/ipc.cpp
index 846aab5ac7e..339ce3e5a92 100644
--- a/src/mame/drivers/ipc.cpp
+++ b/src/mame/drivers/ipc.cpp
@@ -94,41 +94,42 @@ void ipc_state::machine_reset()
}
-MACHINE_CONFIG_START(ipc_state::ipc)
+void ipc_state::ipc(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu",I8085A, XTAL(19'660'800) / 4)
- MCFG_DEVICE_PROGRAM_MAP(ipc_mem)
- MCFG_DEVICE_IO_MAP(ipc_io)
-
- MCFG_DEVICE_ADD("pit", PIT8253, 0)
- MCFG_PIT8253_CLK0(XTAL(19'660'800) / 16)
- MCFG_PIT8253_CLK1(XTAL(19'660'800) / 16)
- MCFG_PIT8253_CLK2(XTAL(19'660'800) / 16)
- MCFG_PIT8253_OUT0_HANDLER(WRITELINE("uart1", i8251_device, write_txc))
- MCFG_DEVCB_CHAIN_OUTPUT(WRITELINE("uart1", i8251_device, write_rxc))
- MCFG_PIT8253_OUT1_HANDLER(WRITELINE("uart2", i8251_device, write_txc))
- MCFG_DEVCB_CHAIN_OUTPUT(WRITELINE("uart2", i8251_device, write_rxc))
-
- MCFG_DEVICE_ADD("uart1", I8251, 0) // 8 data bits, no parity, 1 stop bit, 9600 baud
- MCFG_I8251_TXD_HANDLER(WRITELINE("rs232a", rs232_port_device, write_txd))
- MCFG_I8251_DTR_HANDLER(WRITELINE("rs232a", rs232_port_device, write_dtr))
- MCFG_I8251_RTS_HANDLER(WRITELINE("rs232a", rs232_port_device, write_rts))
-
- MCFG_DEVICE_ADD("rs232a", RS232_PORT, default_rs232_devices, "terminal")
- MCFG_RS232_RXD_HANDLER(WRITELINE("uart1", i8251_device, write_rxd))
- MCFG_RS232_DSR_HANDLER(WRITELINE("uart1", i8251_device, write_dsr))
- MCFG_RS232_CTS_HANDLER(WRITELINE("uart1", i8251_device, write_cts))
-
- MCFG_DEVICE_ADD("uart2", I8251, 0) // 8 data bits, no parity, 2 stop bits, 2400 baud
- MCFG_I8251_TXD_HANDLER(WRITELINE("rs232b", rs232_port_device, write_txd))
- MCFG_I8251_DTR_HANDLER(WRITELINE("rs232b", rs232_port_device, write_dtr))
- MCFG_I8251_RTS_HANDLER(WRITELINE("rs232b", rs232_port_device, write_rts))
-
- MCFG_DEVICE_ADD("rs232b", RS232_PORT, default_rs232_devices, nullptr)
- MCFG_RS232_RXD_HANDLER(WRITELINE("uart2", i8251_device, write_rxd))
- MCFG_RS232_DSR_HANDLER(WRITELINE("uart2", i8251_device, write_dsr))
- MCFG_RS232_CTS_HANDLER(WRITELINE("uart2", i8251_device, write_cts))
-MACHINE_CONFIG_END
+ I8085A(config, m_maincpu, XTAL(19'660'800) / 4);
+ m_maincpu->set_addrmap(AS_PROGRAM, &ipc_state::ipc_mem);
+ m_maincpu->set_addrmap(AS_IO, &ipc_state::ipc_io);
+
+ pit8253_device &pit(PIT8253(config, "pit", 0));
+ pit.set_clk<0>(XTAL(19'660'800) / 16);
+ pit.set_clk<1>(XTAL(19'660'800) / 16);
+ pit.set_clk<2>(XTAL(19'660'800) / 16);
+ pit.out_handler<0>().set("uart1", FUNC(i8251_device::write_txc));
+ pit.out_handler<0>().append("uart1", FUNC(i8251_device::write_rxc));
+ pit.out_handler<1>().set("uart2", FUNC(i8251_device::write_txc));
+ pit.out_handler<1>().append("uart2", FUNC(i8251_device::write_rxc));
+
+ i8251_device &uart1(I8251(config, "uart1", 0)); // 8 data bits, no parity, 1 stop bit, 9600 baud
+ uart1.txd_handler().set("rs232a", FUNC(rs232_port_device::write_txd));
+ uart1.dtr_handler().set("rs232a", FUNC(rs232_port_device::write_dtr));
+ uart1.rts_handler().set("rs232a", FUNC(rs232_port_device::write_rts));
+
+ rs232_port_device &rs232a(RS232_PORT(config, "rs232a", default_rs232_devices, "terminal"));
+ rs232a.rxd_handler().set("uart1", FUNC(i8251_device::write_rxd));
+ rs232a.dsr_handler().set("uart1", FUNC(i8251_device::write_dsr));
+ rs232a.cts_handler().set("uart1", FUNC(i8251_device::write_cts));
+
+ i8251_device &uart2(I8251(config, "uart2", 0)); // 8 data bits, no parity, 2 stop bits, 2400 baud
+ uart2.txd_handler().set("rs232b", FUNC(rs232_port_device::write_txd));
+ uart2.dtr_handler().set("rs232b", FUNC(rs232_port_device::write_dtr));
+ uart2.rts_handler().set("rs232b", FUNC(rs232_port_device::write_rts));
+
+ rs232_port_device &rs232b(RS232_PORT(config, "rs232b", default_rs232_devices, nullptr));
+ rs232b.rxd_handler().set("uart2", FUNC(i8251_device::write_rxd));
+ rs232b.dsr_handler().set("uart2", FUNC(i8251_device::write_dsr));
+ rs232b.cts_handler().set("uart2", FUNC(i8251_device::write_cts));
+}
/* ROM definition */
ROM_START( ipb )