summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Robbbert <Robbbert@users.noreply.github.com>2017-09-21 18:14:14 +1000
committer Robbbert <Robbbert@users.noreply.github.com>2017-09-21 18:14:14 +1000
commit17ec36296a59e7d82f4e929674eb4c5d947e68c4 (patch)
tree83a27abe012aab1f95c367f7f7ad1e7814d0e4fe
parent4aac86588a75e55c8fb8559af99da17f3c890442 (diff)
(nw) remove trampolines by using previously unknown macro
-rw-r--r--src/mame/drivers/ipc.cpp19
-rw-r--r--src/mame/drivers/mice.cpp12
-rw-r--r--src/mame/drivers/microdec.cpp18
-rw-r--r--src/mame/drivers/okean240.cpp12
-rw-r--r--src/mame/drivers/pimps.cpp20
-rw-r--r--src/mame/drivers/seattlecmp.cpp14
-rw-r--r--src/mame/drivers/vector4.cpp25
7 files changed, 24 insertions, 96 deletions
diff --git a/src/mame/drivers/ipc.cpp b/src/mame/drivers/ipc.cpp
index bcc57a8f479..2e44bb4670a 100644
--- a/src/mame/drivers/ipc.cpp
+++ b/src/mame/drivers/ipc.cpp
@@ -52,17 +52,11 @@ public:
ipc_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
- , m_uart1(*this, "uart1")
- , m_uart2(*this, "uart2")
{ }
- DECLARE_WRITE_LINE_MEMBER(clock_tick);
-
private:
virtual void machine_reset() override;
required_device<cpu_device> m_maincpu;
- required_device<i8251_device> m_uart1;
- required_device<i8251_device> m_uart2;
};
@@ -91,14 +85,6 @@ void ipc_state::machine_reset()
m_maincpu->set_state_int(i8085a_cpu_device::I8085_PC, 0xE800);
}
-// source of baud frequency is not documented, so we invent a clock
-WRITE_LINE_MEMBER( ipc_state::clock_tick )
-{
- m_uart1->write_txc(state);
- m_uart1->write_rxc(state);
- m_uart2->write_txc(state);
- m_uart2->write_rxc(state);
-}
static MACHINE_CONFIG_START( ipc )
/* basic machine hardware */
@@ -108,7 +94,10 @@ static MACHINE_CONFIG_START( ipc )
/* video hardware */
MCFG_DEVICE_ADD("uart_clock", CLOCK, 153600)
- MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(ipc_state, clock_tick))
+ MCFG_CLOCK_SIGNAL_HANDLER(DEVWRITELINE("uart1", i8251_device, write_txc))
+ MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("uart1", i8251_device, write_rxc))
+ MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("uart2", i8251_device, write_txc))
+ MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("uart2", i8251_device, write_rxc))
MCFG_DEVICE_ADD("uart1", I8251, 0) // 8 data bits, no parity, 1 stop bit
MCFG_I8251_TXD_HANDLER(DEVWRITELINE("rs232a", rs232_port_device, write_txd))
diff --git a/src/mame/drivers/mice.cpp b/src/mame/drivers/mice.cpp
index d03c0959df4..63730f46a68 100644
--- a/src/mame/drivers/mice.cpp
+++ b/src/mame/drivers/mice.cpp
@@ -39,16 +39,13 @@ public:
mice_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
- , m_uart(*this, "uart")
{ }
DECLARE_READ8_MEMBER(rpt_pc_r);
- DECLARE_WRITE_LINE_MEMBER(clock_tick);
private:
virtual void machine_reset() override;
required_device<cpu_device> m_maincpu;
- required_device<i8251_device> m_uart;
};
@@ -83,12 +80,6 @@ READ8_MEMBER( mice_state::rpt_pc_r )
return 0xef; // select our default rs232 settings
}
-// source of baud frequency is not known, so we invent a clock
-WRITE_LINE_MEMBER( mice_state::clock_tick )
-{
- m_uart->write_txc(state);
- m_uart->write_rxc(state);
-}
static MACHINE_CONFIG_START( mice )
/* basic machine hardware */
@@ -98,7 +89,8 @@ static MACHINE_CONFIG_START( mice )
/* video hardware */
MCFG_DEVICE_ADD("uart_clock", CLOCK, 153600)
- MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(mice_state, clock_tick))
+ MCFG_CLOCK_SIGNAL_HANDLER(DEVWRITELINE("uart", i8251_device, write_txc))
+ MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("uart", i8251_device, write_rxc))
MCFG_DEVICE_ADD("uart", I8251, 0)
MCFG_I8251_TXD_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_txd))
diff --git a/src/mame/drivers/microdec.cpp b/src/mame/drivers/microdec.cpp
index 09ce564d016..dfb4536a1bd 100644
--- a/src/mame/drivers/microdec.cpp
+++ b/src/mame/drivers/microdec.cpp
@@ -41,14 +41,11 @@ public:
microdec_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
- , m_uart1(*this, "uart1")
- , m_uart2(*this, "uart2")
, m_fdc(*this, "fdc")
, m_floppy0(*this, "fdc:0")
, m_floppy(nullptr)
{ }
- DECLARE_WRITE_LINE_MEMBER(clock_tick);
DECLARE_READ8_MEMBER(portf5_r);
DECLARE_READ8_MEMBER(portf6_r);
DECLARE_WRITE8_MEMBER(portf6_w);
@@ -63,8 +60,6 @@ private:
virtual void machine_reset() override;
virtual void machine_start() override;
required_device<cpu_device> m_maincpu;
- required_device<i8251_device> m_uart1;
- required_device<i8251_device> m_uart2;
required_device<upd765a_device> m_fdc;
required_device<floppy_connector> m_floppy0;
floppy_image_device *m_floppy;
@@ -186,14 +181,6 @@ DRIVER_INIT_MEMBER( microdec_state, microdec )
membank("bankw0")->configure_entry(0, &main[0x1000]);
}
-WRITE_LINE_MEMBER( microdec_state::clock_tick )
-{
- m_uart1->write_txc(state);
- m_uart1->write_rxc(state);
- m_uart2->write_txc(state);
- m_uart2->write_rxc(state);
-}
-
static MACHINE_CONFIG_START( microdec )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu",Z80, XTAL_4MHz)
@@ -202,7 +189,10 @@ static MACHINE_CONFIG_START( microdec )
/* video hardware */
MCFG_DEVICE_ADD("uart_clock", CLOCK, 153600)
- MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(microdec_state, clock_tick))
+ MCFG_CLOCK_SIGNAL_HANDLER(DEVWRITELINE("uart1", i8251_device, write_txc))
+ MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("uart1", i8251_device, write_rxc))
+ MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("uart2", i8251_device, write_txc))
+ MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("uart2", i8251_device, write_rxc))
MCFG_DEVICE_ADD("uart1", I8251, 0)
MCFG_I8251_TXD_HANDLER(DEVWRITELINE("rs232a", rs232_port_device, write_txd))
diff --git a/src/mame/drivers/okean240.cpp b/src/mame/drivers/okean240.cpp
index fc61fa7e306..57f02940209 100644
--- a/src/mame/drivers/okean240.cpp
+++ b/src/mame/drivers/okean240.cpp
@@ -75,7 +75,6 @@ public:
, m_p_videoram(*this, "videoram")
, m_io_modifiers(*this, "MODIFIERS")
, m_maincpu(*this, "maincpu")
- , m_uart(*this, "uart")
{ }
DECLARE_WRITE_LINE_MEMBER(clock_tick);
@@ -104,7 +103,6 @@ private:
optional_ioport m_io_modifiers;
ioport_port *m_io_port[11];
required_device<cpu_device> m_maincpu;
- optional_device<i8251_device> m_uart;
};
// okean240 requires bit 4 to change
@@ -482,13 +480,6 @@ static GFXDECODE_START( okean240a )
GFXDECODE_ENTRY( "maincpu", 0xef63, okean240_charlayout, 0, 1 )
GFXDECODE_END
-// source of baud frequency is not documented, so we invent a clock
-WRITE_LINE_MEMBER( okean240_state::clock_tick )
-{
- m_uart->write_txc(state);
- m_uart->write_rxc(state);
-}
-
static MACHINE_CONFIG_START( okean240t )
/* basic machine hardware */
@@ -497,7 +488,8 @@ static MACHINE_CONFIG_START( okean240t )
MCFG_CPU_IO_MAP(okean240t_io)
MCFG_DEVICE_ADD("uart_clock", CLOCK, 153600)
- MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(okean240_state, clock_tick))
+ MCFG_CLOCK_SIGNAL_HANDLER(DEVWRITELINE("uart", i8251_device, write_txc))
+ MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("uart", i8251_device, write_rxc))
MCFG_DEVICE_ADD("uart", I8251, 0)
MCFG_I8251_TXD_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_txd))
diff --git a/src/mame/drivers/pimps.cpp b/src/mame/drivers/pimps.cpp
index d00c157f902..3476dacec8c 100644
--- a/src/mame/drivers/pimps.cpp
+++ b/src/mame/drivers/pimps.cpp
@@ -80,17 +80,11 @@ public:
pimps_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
- , m_uart1(*this, "uart1")
- , m_uart2(*this, "uart2")
{ }
- DECLARE_WRITE_LINE_MEMBER(clock_tick);
-
private:
virtual void machine_reset() override;
required_device<cpu_device> m_maincpu;
- required_device<i8251_device> m_uart1;
- required_device<i8251_device> m_uart2;
};
@@ -118,15 +112,6 @@ void pimps_state::machine_reset()
m_maincpu->set_pc(0xf000);
}
-// source of baud frequency is not documented, so we invent a clock
-WRITE_LINE_MEMBER( pimps_state::clock_tick )
-{
- m_uart1->write_txc(state);
- m_uart1->write_rxc(state);
- m_uart2->write_txc(state);
- m_uart2->write_rxc(state);
-}
-
// baud is not documented, we will use 9600
static DEVICE_INPUT_DEFAULTS_START( terminal ) // set up terminal to default to 9600, 7 bits, even parity
DEVICE_INPUT_DEFAULTS( "RS232_RXBAUD", 0xff, RS232_BAUD_9600 )
@@ -144,7 +129,10 @@ static MACHINE_CONFIG_START( pimps )
MCFG_CPU_IO_MAP(pimps_io)
MCFG_DEVICE_ADD("uart_clock", CLOCK, 153600)
- MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(pimps_state, clock_tick))
+ MCFG_CLOCK_SIGNAL_HANDLER(DEVWRITELINE("uart1", i8251_device, write_txc))
+ MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("uart1", i8251_device, write_rxc))
+ MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("uart2", i8251_device, write_txc))
+ MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("uart2", i8251_device, write_rxc))
MCFG_DEVICE_ADD("uart1", I8251, 0)
MCFG_I8251_TXD_HANDLER(DEVWRITELINE("rs232a", rs232_port_device, write_txd))
diff --git a/src/mame/drivers/seattlecmp.cpp b/src/mame/drivers/seattlecmp.cpp
index 911d8e0b545..da2ccd3506a 100644
--- a/src/mame/drivers/seattlecmp.cpp
+++ b/src/mame/drivers/seattlecmp.cpp
@@ -42,15 +42,11 @@ public:
seattle_comp_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
- , m_uart(*this, "uart")
{ }
- DECLARE_WRITE_LINE_MEMBER(clock_tick);
-
private:
virtual void machine_reset() override;
required_device<cpu_device> m_maincpu;
- required_device<i8251_device> m_uart;
};
@@ -82,13 +78,6 @@ void seattle_comp_state::machine_reset()
{
}
-// source of baud frequency is not documented, so we invent a clock
-WRITE_LINE_MEMBER( seattle_comp_state::clock_tick )
-{
- m_uart->write_txc(state);
- m_uart->write_rxc(state);
-}
-
// bit 7 needs to be stripped off, we do this by choosing 7 bits and even parity
static DEVICE_INPUT_DEFAULTS_START( terminal )
DEVICE_INPUT_DEFAULTS( "RS232_RXBAUD", 0xff, RS232_BAUD_9600 )
@@ -107,7 +96,8 @@ static MACHINE_CONFIG_START( seattle )
/* video hardware */
MCFG_DEVICE_ADD("uart_clock", CLOCK, 153600)
- MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(seattle_comp_state, clock_tick))
+ MCFG_CLOCK_SIGNAL_HANDLER(DEVWRITELINE("uart", i8251_device, write_txc))
+ MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("uart", i8251_device, write_rxc))
MCFG_DEVICE_ADD("uart", I8251, 0)
MCFG_I8251_TXD_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_txd))
diff --git a/src/mame/drivers/vector4.cpp b/src/mame/drivers/vector4.cpp
index 025b04e0683..c339841a865 100644
--- a/src/mame/drivers/vector4.cpp
+++ b/src/mame/drivers/vector4.cpp
@@ -21,19 +21,12 @@ public:
vector4_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
- , m_uart1(*this, "uart1")
- , m_uart2(*this, "uart2")
- , m_uart3(*this, "uart3")
{ }
- DECLARE_WRITE_LINE_MEMBER( clock_tick );
private:
virtual void machine_reset() override;
required_device<cpu_device> m_maincpu;
- required_device<i8251_device> m_uart1;
- required_device<i8251_device> m_uart2;
- required_device<i8251_device> m_uart3;
};
@@ -67,16 +60,6 @@ void vector4_state::machine_reset()
m_maincpu->set_state_int(Z80_PC, 0xe000);
}
-// source of baud frequency is not documented, so we invent a clock
-WRITE_LINE_MEMBER( vector4_state::clock_tick )
-{
- m_uart1->write_txc(state);
- m_uart1->write_rxc(state);
- m_uart2->write_txc(state);
- m_uart2->write_rxc(state);
- m_uart3->write_txc(state);
- m_uart3->write_rxc(state);
-}
static MACHINE_CONFIG_START( vector4 )
/* basic machine hardware */
@@ -86,7 +69,12 @@ static MACHINE_CONFIG_START( vector4 )
/* video hardware */
MCFG_DEVICE_ADD("uart_clock", CLOCK, 153600)
- MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(vector4_state, clock_tick))
+ MCFG_CLOCK_SIGNAL_HANDLER(DEVWRITELINE("uart1", i8251_device, write_txc))
+ MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("uart1", i8251_device, write_rxc))
+ MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("uart2", i8251_device, write_txc))
+ MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("uart2", i8251_device, write_rxc))
+ MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("uart3", i8251_device, write_txc))
+ MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("uart3", i8251_device, write_rxc))
MCFG_DEVICE_ADD("uart1", I8251, 0)
MCFG_I8251_TXD_HANDLER(DEVWRITELINE("rs232a", rs232_port_device, write_txd))
@@ -97,7 +85,6 @@ static MACHINE_CONFIG_START( vector4 )
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("uart1", i8251_device, write_rxd))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE("uart1", i8251_device, write_dsr))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE("uart1", i8251_device, write_cts))
- //MCFG_DEVICE_CARD_DEVICE_INPUT_DEFAULTS("terminal", terminal) // must be exactly here
MCFG_DEVICE_ADD("uart2", I8251, 0)
MCFG_I8251_TXD_HANDLER(DEVWRITELINE("rs232b", rs232_port_device, write_txd))