summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author Robbbert <Robbbert@users.noreply.github.com>2018-08-11 15:00:07 +1000
committer Robbbert <Robbbert@users.noreply.github.com>2018-08-11 15:00:07 +1000
commitdf86b817d2cbc8aa2664d553c00850dc5eaa169c (patch)
tree6d4d7175be5a1b7bf1440515247d8bfeae4323eb /src
parent2151ab67335991ff8b53e5305aab2ab6fc797f4a (diff)
(nw) terminal tidy-up
Diffstat (limited to 'src')
-rw-r--r--src/mame/drivers/basic52.cpp16
-rw-r--r--src/mame/drivers/besta.cpp26
-rw-r--r--src/mame/drivers/chaos.cpp2
-rw-r--r--src/mame/drivers/cxhumax.cpp2
-rw-r--r--src/mame/drivers/czk80.cpp3
-rw-r--r--src/mame/drivers/d6809.cpp2
-rw-r--r--src/mame/drivers/dm7000.cpp2
-rw-r--r--src/mame/drivers/dms86.cpp6
-rw-r--r--src/mame/drivers/dual68.cpp2
-rw-r--r--src/mame/drivers/evmbug.cpp2
-rw-r--r--src/mame/drivers/gimix.cpp1
-rw-r--r--src/mame/drivers/hp9k.cpp3
-rw-r--r--src/mame/drivers/imds.cpp14
-rw-r--r--src/mame/drivers/imsai.cpp2
-rw-r--r--src/mame/drivers/iris3130.cpp2
-rw-r--r--src/mame/drivers/isbc.cpp1
-rw-r--r--src/mame/drivers/konamim2.cpp2
-rw-r--r--src/mame/drivers/lft.cpp2
-rw-r--r--src/mame/drivers/microkit.cpp2
-rw-r--r--src/mame/drivers/ms9540.cpp2
-rw-r--r--src/mame/drivers/onyx.cpp1
-rw-r--r--src/mame/drivers/pdp11.cpp12
-rw-r--r--src/mame/drivers/pes.cpp2
-rw-r--r--src/mame/drivers/r9751.cpp5
-rw-r--r--src/mame/drivers/ravens.cpp2
-rw-r--r--src/mame/drivers/rvoice.cpp14
-rw-r--r--src/mame/drivers/sacstate.cpp2
-rw-r--r--src/mame/drivers/sbc6510.cpp2
-rw-r--r--src/mame/drivers/ts802.cpp2
-rw-r--r--src/mame/drivers/ts816.cpp2
-rw-r--r--src/mame/drivers/vax11.cpp12
-rw-r--r--src/mame/drivers/vegas.cpp3
-rw-r--r--src/mame/drivers/votrpss.cpp2
-rw-r--r--src/mame/drivers/zexall.cpp19
-rw-r--r--src/mame/includes/cxhumax.h3
-rw-r--r--src/mame/includes/dm7000.h7
-rw-r--r--src/mame/includes/pes.h3
-rw-r--r--src/mame/includes/swtpc09.h2
-rw-r--r--src/mame/machine/swtpc09.cpp1
39 files changed, 82 insertions, 108 deletions
diff --git a/src/mame/drivers/basic52.cpp b/src/mame/drivers/basic52.cpp
index e59d091d435..9d04b0cb9b1 100644
--- a/src/mame/drivers/basic52.cpp
+++ b/src/mame/drivers/basic52.cpp
@@ -44,19 +44,21 @@ public:
basic52_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
+ , m_terminal(*this, "terminal")
{ }
+ void basic52(machine_config &config);
+ void basic31(machine_config &config);
+
+protected:
void kbd_put(u8 data);
DECLARE_READ8_MEMBER(unk_r);
DECLARE_READ8_MEMBER(from_term);
-
- void basic52(machine_config &config);
- void basic31(machine_config &config);
void basic52_io(address_map &map);
void basic52_mem(address_map &map);
-private:
uint8_t m_term_data;
required_device<mcs51_cpu_device> m_maincpu;
+ required_device<generic_terminal_device> m_terminal;
};
@@ -109,11 +111,11 @@ MACHINE_CONFIG_START(basic52_state::basic31)
MCFG_DEVICE_PROGRAM_MAP(basic52_mem)
MCFG_DEVICE_IO_MAP(basic52_io)
MCFG_MCS51_PORT_P3_IN_CB(READ8(*this, basic52_state, unk_r))
- MCFG_MCS51_SERIAL_TX_CB(WRITE8("terminal", generic_terminal_device, write))
+ MCFG_MCS51_SERIAL_TX_CB(WRITE8(m_terminal, generic_terminal_device, write))
MCFG_MCS51_SERIAL_RX_CB(READ8(*this, basic52_state, from_term))
/* video hardware */
- MCFG_DEVICE_ADD("terminal", GENERIC_TERMINAL, 0)
+ MCFG_DEVICE_ADD(m_terminal, GENERIC_TERMINAL, 0)
MCFG_GENERIC_TERMINAL_KEYBOARD_CB(PUT(basic52_state, kbd_put))
MCFG_DEVICE_ADD("ppi8255", I8255, 0)
@@ -126,7 +128,7 @@ MACHINE_CONFIG_START(basic52_state::basic52)
MCFG_DEVICE_PROGRAM_MAP(basic52_mem)
MCFG_DEVICE_IO_MAP(basic52_io)
MCFG_MCS51_PORT_P3_IN_CB(READ8(*this, basic52_state, unk_r))
- MCFG_MCS51_SERIAL_TX_CB(WRITE8("terminal", generic_terminal_device, write))
+ MCFG_MCS51_SERIAL_TX_CB(WRITE8(m_terminal, generic_terminal_device, write))
MCFG_MCS51_SERIAL_RX_CB(READ8(*this, basic52_state, from_term))
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/besta.cpp b/src/mame/drivers/besta.cpp
index cf8c9213551..7748a3ed023 100644
--- a/src/mame/drivers/besta.cpp
+++ b/src/mame/drivers/besta.cpp
@@ -25,28 +25,26 @@
} \
} while (0)
-#define TERMINAL_TAG "terminal"
class besta_state : public driver_device
{
public:
besta_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_maincpu(*this, "maincpu"),
- m_pit1 (*this, "pit1"),
- m_pit2 (*this, "pit2"),
- m_terminal(*this, TERMINAL_TAG),
- m_p_ram(*this, "p_ram")
- {
- }
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, "maincpu")
+ , m_pit1 (*this, "pit1")
+ , m_pit2 (*this, "pit2")
+ , m_terminal(*this, "terminal")
+ , m_p_ram(*this, "p_ram")
+ { }
+
+ void besta(machine_config &config);
+protected:
+ void besta_mem(address_map &map);
DECLARE_READ8_MEMBER( mpcc_reg_r );
DECLARE_WRITE8_MEMBER( mpcc_reg_w );
void kbd_put(u8 data);
-
- void besta(machine_config &config);
- void besta_mem(address_map &map);
-protected:
virtual void machine_reset() override;
uint8_t m_term_data;
@@ -145,7 +143,7 @@ MACHINE_CONFIG_START(besta_state::besta)
MCFG_DEVICE_ADD ("pit2", PIT68230, 16670000 / 2) // XXX verify clock
- MCFG_DEVICE_ADD(TERMINAL_TAG, GENERIC_TERMINAL, 0)
+ MCFG_DEVICE_ADD(m_terminal, GENERIC_TERMINAL, 0)
MCFG_GENERIC_TERMINAL_KEYBOARD_CB(PUT(besta_state, kbd_put))
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/chaos.cpp b/src/mame/drivers/chaos.cpp
index 13d3e84cb96..ea6596c4de3 100644
--- a/src/mame/drivers/chaos.cpp
+++ b/src/mame/drivers/chaos.cpp
@@ -156,7 +156,7 @@ MACHINE_CONFIG_START(chaos_state::chaos)
MCFG_DEVICE_DATA_MAP(data_map)
/* video hardware */
- MCFG_DEVICE_ADD("terminal", GENERIC_TERMINAL, 0)
+ MCFG_DEVICE_ADD(m_terminal, GENERIC_TERMINAL, 0)
MCFG_GENERIC_TERMINAL_KEYBOARD_CB(PUT(chaos_state, kbd_put))
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/cxhumax.cpp b/src/mame/drivers/cxhumax.cpp
index 61cf57dd5ad..c76d565ca51 100644
--- a/src/mame/drivers/cxhumax.cpp
+++ b/src/mame/drivers/cxhumax.cpp
@@ -1074,7 +1074,7 @@ MACHINE_CONFIG_START(cxhumax_state::cxhumax)
MCFG_PALETTE_ADD_MONOCHROME("palette")
- MCFG_DEVICE_ADD(TERMINAL_TAG, GENERIC_TERMINAL, 0)
+ MCFG_DEVICE_ADD(m_terminal, GENERIC_TERMINAL, 0)
MACHINE_CONFIG_END
ROM_START( hxhdci2k )
diff --git a/src/mame/drivers/czk80.cpp b/src/mame/drivers/czk80.cpp
index f884ea71b8e..cc6e327c275 100644
--- a/src/mame/drivers/czk80.cpp
+++ b/src/mame/drivers/czk80.cpp
@@ -49,7 +49,6 @@ I/O ports: These ranges are what is guessed
#include "machine/z80ctc.h"
#include "machine/terminal.h"
-#define TERMINAL_TAG "terminal"
class czk80_state : public driver_device
{
@@ -201,7 +200,7 @@ MACHINE_CONFIG_START(czk80_state::czk80)
MCFG_Z80_DAISY_CHAIN(daisy_chain)
MCFG_MACHINE_RESET_OVERRIDE(czk80_state, czk80)
- MCFG_DEVICE_ADD("terminal", GENERIC_TERMINAL, 0)
+ MCFG_DEVICE_ADD(m_terminal, GENERIC_TERMINAL, 0)
MCFG_GENERIC_TERMINAL_KEYBOARD_CB(PUT(czk80_state, kbd_put))
MCFG_UPD765A_ADD("fdc", false, true)
MCFG_FLOPPY_DRIVE_ADD("fdc:0", czk80_floppies, "525dd", floppy_image_device::default_floppy_formats)
diff --git a/src/mame/drivers/d6809.cpp b/src/mame/drivers/d6809.cpp
index 9dffe813196..603a46bbfa9 100644
--- a/src/mame/drivers/d6809.cpp
+++ b/src/mame/drivers/d6809.cpp
@@ -197,7 +197,7 @@ MACHINE_CONFIG_START(d6809_state::d6809)
MCFG_DEVICE_ADD("acia2", MOS6551, XTAL(14'745'600) / 8) // uses Q clock
/* video hardware */
- MCFG_DEVICE_ADD("terminal", GENERIC_TERMINAL, 0)
+ MCFG_DEVICE_ADD(m_terminal, GENERIC_TERMINAL, 0)
MCFG_GENERIC_TERMINAL_KEYBOARD_CB(PUT(d6809_state, kbd_put))
// Floppy
diff --git a/src/mame/drivers/dm7000.cpp b/src/mame/drivers/dm7000.cpp
index bd58833201c..6e3b874ba26 100644
--- a/src/mame/drivers/dm7000.cpp
+++ b/src/mame/drivers/dm7000.cpp
@@ -317,7 +317,7 @@ MACHINE_CONFIG_START(dm7000_state::dm7000)
MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1)
MCFG_SCREEN_UPDATE_DRIVER(dm7000_state, screen_update_dm7000)
- MCFG_DEVICE_ADD(TERMINAL_TAG, GENERIC_TERMINAL, 0)
+ MCFG_DEVICE_ADD(m_terminal, GENERIC_TERMINAL, 0)
MCFG_GENERIC_TERMINAL_KEYBOARD_CB(PUT(dm7000_state, kbd_put))
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/dms86.cpp b/src/mame/drivers/dms86.cpp
index 20127eb5637..521dd2a01b4 100644
--- a/src/mame/drivers/dms86.cpp
+++ b/src/mame/drivers/dms86.cpp
@@ -44,6 +44,7 @@ public:
dms86_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
+ , m_terminal(*this, "terminal")
, m_sio(*this, "sio%u", 1U)
, m_ctc(*this, "ctc")
{ }
@@ -65,6 +66,7 @@ private:
u8 m_term_data;
virtual void machine_reset() override;
required_device<cpu_device> m_maincpu;
+ required_device<generic_terminal_device> m_terminal;
required_device_array<z80sio_device, 2> m_sio;
required_device<z80ctc_device> m_ctc;
};
@@ -114,7 +116,7 @@ void dms86_state::io_map(address_map &map)
map(0x90, 0x97).rw("sio2", FUNC(z80sio_device::ba_cd_r), FUNC(z80sio_device::ba_cd_w)).umask16(0x00ff);
map(0x9A, 0x9B).r(FUNC(dms86_state::port9a_r)); // parallel SASI port
map(0x9c, 0x9d).r(FUNC(dms86_state::port9c_r));
- map(0x9c, 0x9c).w("terminal", FUNC(generic_terminal_device::write));
+ map(0x9c, 0x9c).w(m_terminal, FUNC(generic_terminal_device::write));
}
/* Input ports */
@@ -168,7 +170,7 @@ MACHINE_CONFIG_START(dms86_state::dms86)
rs232.dcd_handler().set(m_sio[0], FUNC(z80sio_device::dcdb_w)); // HiNet / Monitor switch
rs232.cts_handler().set(m_sio[0], FUNC(z80sio_device::ctsb_w)).invert();
- MCFG_DEVICE_ADD("terminal", GENERIC_TERMINAL, 0)
+ MCFG_DEVICE_ADD(m_terminal, GENERIC_TERMINAL, 0)
MCFG_GENERIC_TERMINAL_KEYBOARD_CB(PUT(dms86_state, kbd_put))
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/dual68.cpp b/src/mame/drivers/dual68.cpp
index 6c26462299e..9e36f91b2de 100644
--- a/src/mame/drivers/dual68.cpp
+++ b/src/mame/drivers/dual68.cpp
@@ -107,7 +107,7 @@ MACHINE_CONFIG_START(dual68_state::dual68)
MCFG_DEVICE_IO_MAP(sio4_io)
/* video hardware */
- MCFG_DEVICE_ADD("terminal", GENERIC_TERMINAL, 0)
+ MCFG_DEVICE_ADD(m_terminal, GENERIC_TERMINAL, 0)
MCFG_GENERIC_TERMINAL_KEYBOARD_CB(PUT(dual68_state, kbd_put))
MCFG_DEVICE_ADD("uart1", I8251, 0)
diff --git a/src/mame/drivers/evmbug.cpp b/src/mame/drivers/evmbug.cpp
index d2f91e1c182..9389a80cd44 100644
--- a/src/mame/drivers/evmbug.cpp
+++ b/src/mame/drivers/evmbug.cpp
@@ -121,7 +121,7 @@ MACHINE_CONFIG_START(evmbug_state::evmbug)
MCFG_TMS99xx_ADD("maincpu", TMS9995, XTAL(12'000'000), mem_map, io_map )
/* video hardware */
- MCFG_DEVICE_ADD("terminal", GENERIC_TERMINAL, 0)
+ MCFG_DEVICE_ADD(m_terminal, GENERIC_TERMINAL, 0)
MCFG_GENERIC_TERMINAL_KEYBOARD_CB(PUT(evmbug_state, kbd_put))
//MCFG_DEVICE_ADD("uart1", TMS9902, XTAL(12'000'000) / 4)
diff --git a/src/mame/drivers/gimix.cpp b/src/mame/drivers/gimix.cpp
index d5ae61ca7df..7860f9d8c68 100644
--- a/src/mame/drivers/gimix.cpp
+++ b/src/mame/drivers/gimix.cpp
@@ -30,7 +30,6 @@
#include "bus/rs232/rs232.h"
#include "machine/clock.h"
#include "machine/wd_fdc.h"
-#include "machine/terminal.h"
#include "machine/bankdev.h"
#include "machine/ram.h"
#include "machine/timer.h"
diff --git a/src/mame/drivers/hp9k.cpp b/src/mame/drivers/hp9k.cpp
index 6847f2d5d1f..8e1380b0f70 100644
--- a/src/mame/drivers/hp9k.cpp
+++ b/src/mame/drivers/hp9k.cpp
@@ -40,7 +40,6 @@ TODO: boot tests fail
#include "emu.h"
#include "cpu/m68000/m68000.h"
#include "video/mc6845.h"
-#include "machine/terminal.h"
//#include "machine/ins8250.h"
#include "emupal.h"
#include "screen.h"
@@ -116,7 +115,6 @@ public:
hp9k_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
- //m_terminal(*this, TERMINAL_TAG),
m_6845(*this, "mc6845"),
m_gfxdecode(*this, "gfxdecode")
{
@@ -143,7 +141,6 @@ private:
uint8_t kbdBit;
required_device<cpu_device> m_maincpu;
- //required_device<> m_terminal;
required_device<mc6845_device> m_6845;
uint8_t m_videoram[0x4000];
diff --git a/src/mame/drivers/imds.cpp b/src/mame/drivers/imds.cpp
index 1a21ad5b6fc..2471878bcd9 100644
--- a/src/mame/drivers/imds.cpp
+++ b/src/mame/drivers/imds.cpp
@@ -21,17 +21,15 @@ real hardware.
#include "cpu/i8085/i8085.h"
#include "machine/terminal.h"
-#define TERMINAL_TAG "terminal"
class imds_state : public driver_device
{
public:
- imds_state(const machine_config &mconfig, device_type type, const char *tag) :
- driver_device(mconfig, type, tag),
- m_maincpu(*this, "maincpu"),
- m_terminal(*this, TERMINAL_TAG)
- {
- }
+ imds_state(const machine_config &mconfig, device_type type, const char *tag)
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, "maincpu")
+ , m_terminal(*this, "terminal")
+ { }
void imds(machine_config &config);
@@ -105,7 +103,7 @@ MACHINE_CONFIG_START(imds_state::imds)
// MCFG_INS8250_ADD( "ins8250", imds_com_interface )
/* video hardware */
- MCFG_DEVICE_ADD(TERMINAL_TAG, GENERIC_TERMINAL, 0)
+ MCFG_DEVICE_ADD(m_terminal, GENERIC_TERMINAL, 0)
MCFG_GENERIC_TERMINAL_KEYBOARD_CB(PUT(imds_state, kbd_put))
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/imsai.cpp b/src/mame/drivers/imsai.cpp
index c9b545b112f..d58b9ec0166 100644
--- a/src/mame/drivers/imsai.cpp
+++ b/src/mame/drivers/imsai.cpp
@@ -114,7 +114,7 @@ MACHINE_CONFIG_START(imsai_state::imsai)
MCFG_DEVICE_IO_MAP(imsai_io)
/* video hardware */
- MCFG_DEVICE_ADD("terminal", GENERIC_TERMINAL, 0)
+ MCFG_DEVICE_ADD(m_terminal, GENERIC_TERMINAL, 0)
MCFG_GENERIC_TERMINAL_KEYBOARD_CB(PUT(imsai_state, kbd_put))
/* Devices */
diff --git a/src/mame/drivers/iris3130.cpp b/src/mame/drivers/iris3130.cpp
index b397d02ef32..4caa22bd9de 100644
--- a/src/mame/drivers/iris3130.cpp
+++ b/src/mame/drivers/iris3130.cpp
@@ -43,9 +43,7 @@
#include "cpu/m68000/m68000.h"
#include "machine/mc146818.h" /* TOD clock */
#include "machine/mc68681.h" /* DUART0, DUART1 */
-#include "machine/terminal.h"
-#define TERMINAL_TAG "terminal"
class sgi_ip2_state : public driver_device
{
diff --git a/src/mame/drivers/isbc.cpp b/src/mame/drivers/isbc.cpp
index 79076eb4cb5..b20a9f0566b 100644
--- a/src/mame/drivers/isbc.cpp
+++ b/src/mame/drivers/isbc.cpp
@@ -21,7 +21,6 @@ able to deal with 256byte sectors so fails to load the irmx 512byte sector image
#include "cpu/i86/i86.h"
#include "cpu/i86/i286.h"
#include "machine/74259.h"
-#include "machine/terminal.h"
#include "machine/pic8259.h"
#include "machine/pit8253.h"
#include "machine/i8255.h"
diff --git a/src/mame/drivers/konamim2.cpp b/src/mame/drivers/konamim2.cpp
index 8cd8a3345b2..a71952341b7 100644
--- a/src/mame/drivers/konamim2.cpp
+++ b/src/mame/drivers/konamim2.cpp
@@ -1316,7 +1316,7 @@ MACHINE_CONFIG_START(konamim2_state::m2)
MCFG_DEVICE_PROGRAM_MAP(m2_main_s)
// TODO: declaring as second screen causes palette confusion (wants to use palette from the other screen?)
- MCFG_DEVICE_ADD("terminal", GENERIC_TERMINAL, 0)
+ MCFG_DEVICE_ADD(m_terminal, GENERIC_TERMINAL, 0)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/lft.cpp b/src/mame/drivers/lft.cpp
index b59c8b09ed3..72b210a940c 100644
--- a/src/mame/drivers/lft.cpp
+++ b/src/mame/drivers/lft.cpp
@@ -97,7 +97,7 @@ MACHINE_CONFIG_START(lft_state::lft)
MCFG_DEVICE_IO_MAP(lft_io)
/* video hardware */
- MCFG_DEVICE_ADD("terminal", GENERIC_TERMINAL, 0)
+ MCFG_DEVICE_ADD(m_terminal, GENERIC_TERMINAL, 0)
MCFG_GENERIC_TERMINAL_KEYBOARD_CB(PUT(lft_state, kbd_put))
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/microkit.cpp b/src/mame/drivers/microkit.cpp
index a9ce30f7c92..80811ee68dc 100644
--- a/src/mame/drivers/microkit.cpp
+++ b/src/mame/drivers/microkit.cpp
@@ -132,7 +132,7 @@ MACHINE_CONFIG_START(microkit_state::microkit)
MCFG_DEVICE_ADD("rs232", RS232_PORT, default_rs232_devices, "keyboard")
MCFG_RS232_RXD_HANDLER(INPUTLINE("maincpu", COSMAC_INPUT_LINE_EF4))
MCFG_SLOT_OPTION_DEVICE_INPUT_DEFAULTS("keyboard", serial_keyb)
- MCFG_DEVICE_ADD("terminal", GENERIC_TERMINAL, 0)
+ MCFG_DEVICE_ADD(m_terminal, GENERIC_TERMINAL, 0)
MACHINE_CONFIG_END
ROM_START( microkit )
diff --git a/src/mame/drivers/ms9540.cpp b/src/mame/drivers/ms9540.cpp
index 8646eaa4900..8463f146b2b 100644
--- a/src/mame/drivers/ms9540.cpp
+++ b/src/mame/drivers/ms9540.cpp
@@ -84,7 +84,7 @@ MACHINE_CONFIG_START(ms9540_state::ms9540)
MCFG_DEVICE_PROGRAM_MAP(mem_map)
/* video hardware */
- MCFG_DEVICE_ADD("terminal", GENERIC_TERMINAL, 0)
+ MCFG_DEVICE_ADD(m_terminal, GENERIC_TERMINAL, 0)
MCFG_GENERIC_TERMINAL_KEYBOARD_CB(PUT(ms9540_state, kbd_put))
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/onyx.cpp b/src/mame/drivers/onyx.cpp
index 6be6a56b0e3..0ed4c876a53 100644
--- a/src/mame/drivers/onyx.cpp
+++ b/src/mame/drivers/onyx.cpp
@@ -43,7 +43,6 @@ To Do:
#include "machine/z80pio.h"
#include "machine/z80sio.h"
//#include "machine/z80dma.h"
-#include "machine/terminal.h"
class onyx_state : public driver_device
{
diff --git a/src/mame/drivers/pdp11.cpp b/src/mame/drivers/pdp11.cpp
index eafd2ac61c8..edb38b941cf 100644
--- a/src/mame/drivers/pdp11.cpp
+++ b/src/mame/drivers/pdp11.cpp
@@ -93,17 +93,15 @@
#include "machine/terminal.h"
#include "machine/rx01.h"
-#define TERMINAL_TAG "terminal"
class pdp11_state : public driver_device
{
public:
pdp11_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_maincpu(*this, "maincpu"),
- m_terminal(*this, TERMINAL_TAG)
- {
- }
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, "maincpu")
+ , m_terminal(*this, "terminal")
+ { }
void pdp11ub2(machine_config &config);
void pdp11(machine_config &config);
@@ -363,7 +361,7 @@ MACHINE_CONFIG_START(pdp11_state::pdp11)
/* video hardware */
- MCFG_DEVICE_ADD(TERMINAL_TAG, GENERIC_TERMINAL, 0)
+ MCFG_DEVICE_ADD(m_terminal, GENERIC_TERMINAL, 0)
MCFG_GENERIC_TERMINAL_KEYBOARD_CB(PUT(pdp11_state, kbd_put))
MCFG_RX01_ADD("rx01")
diff --git a/src/mame/drivers/pes.cpp b/src/mame/drivers/pes.cpp
index fd120caa62b..92b4744cbc5 100644
--- a/src/mame/drivers/pes.cpp
+++ b/src/mame/drivers/pes.cpp
@@ -260,7 +260,7 @@ MACHINE_CONFIG_START(pes_state::pes)
MCFG_DEVICE_ADD("tms5220", TMS5220C, 720000) /* 720Khz clock, 10khz output */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
- MCFG_DEVICE_ADD(TERMINAL_TAG, GENERIC_TERMINAL, 0)
+ MCFG_DEVICE_ADD(m_terminal, GENERIC_TERMINAL, 0)
MCFG_GENERIC_TERMINAL_KEYBOARD_CB(PUT(pes_state, pes_kbd_input))
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/r9751.cpp b/src/mame/drivers/r9751.cpp
index c533dbf4deb..856e00297b8 100644
--- a/src/mame/drivers/r9751.cpp
+++ b/src/mame/drivers/r9751.cpp
@@ -61,7 +61,6 @@
#include <queue>
-#define TERMINAL_TAG "terminal"
/* Log defines */
#define TRACE_FDC 0
@@ -92,7 +91,7 @@ public:
m_pdc(*this, "pdc"),
m_smioc(*this, "smioc"),
m_wd33c93(*this, "wd33c93"),
- m_terminal(*this, TERMINAL_TAG),
+ m_terminal(*this, "terminal"),
m_main_ram(*this, "main_ram")
{
}
@@ -650,7 +649,7 @@ MACHINE_CONFIG_START(r9751_state::r9751)
MCFG_QUANTUM_TIME(attotime::from_hz(60))
/* video hardware */
- MCFG_DEVICE_ADD(TERMINAL_TAG, GENERIC_TERMINAL, 0)
+ MCFG_DEVICE_ADD(m_terminal, GENERIC_TERMINAL, 0)
MCFG_GENERIC_TERMINAL_KEYBOARD_CB(PUT(r9751_state, kbd_put))
/* i/o hardware */
diff --git a/src/mame/drivers/ravens.cpp b/src/mame/drivers/ravens.cpp
index 62fd50f840f..ce65e70c338 100644
--- a/src/mame/drivers/ravens.cpp
+++ b/src/mame/drivers/ravens.cpp
@@ -369,7 +369,7 @@ MACHINE_CONFIG_START(ravens_state::ravens2)
MCFG_MACHINE_RESET_OVERRIDE(ravens_state, ravens2)
/* video hardware */
- MCFG_DEVICE_ADD("terminal", GENERIC_TERMINAL, 0)
+ MCFG_DEVICE_ADD(m_terminal, GENERIC_TERMINAL, 0)
MCFG_GENERIC_TERMINAL_KEYBOARD_CB(PUT(ravens_state, kbd_put))
/* quickload */
diff --git a/src/mame/drivers/rvoice.cpp b/src/mame/drivers/rvoice.cpp
index 6f7fcab89a7..351ebde9d69 100644
--- a/src/mame/drivers/rvoice.cpp
+++ b/src/mame/drivers/rvoice.cpp
@@ -16,10 +16,6 @@
//#include "dectalk.lh" // hack to avoid screenless system crash
#include "machine/terminal.h"
-/* Defines */
-
-#define TERMINAL_TAG "terminal"
-
/* Components */
struct hd63701y0_t
@@ -77,8 +73,10 @@ class rvoice_state : public driver_device
{
public:
rvoice_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag) ,
- m_maincpu(*this, "maincpu") { }
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, "maincpu")
+ , m_terminal(*this, "terminal")
+ { }
void rvoicepc(machine_config &config);
@@ -92,6 +90,7 @@ private:
virtual void machine_reset() override;
void null_kbd_put(u8 data);
required_device<cpu_device> m_maincpu;
+ required_device<generic_terminal_device> m_terminal;
void hd63701_main_io(address_map &map);
void hd63701_main_mem(address_map &map);
};
@@ -382,10 +381,9 @@ MACHINE_CONFIG_START(rvoice_state::rvoicepc)
MCFG_MOS6551_XTAL(XTAL(1'843'200))
/* video hardware */
- //config.set_default_layout(layout_dectalk); // hack to avoid screenless system crash
/* sound hardware */
- MCFG_DEVICE_ADD(TERMINAL_TAG, GENERIC_TERMINAL, 0)
+ MCFG_DEVICE_ADD(m_terminal, GENERIC_TERMINAL, 0)
MCFG_GENERIC_TERMINAL_KEYBOARD_CB(PUT(rvoice_state, null_kbd_put))
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/sacstate.cpp b/src/mame/drivers/sacstate.cpp
index f69cda3a6c7..9dbd5828b98 100644
--- a/src/mame/drivers/sacstate.cpp
+++ b/src/mame/drivers/sacstate.cpp
@@ -141,7 +141,7 @@ MACHINE_CONFIG_START(sacstate_state::sacstate)
MCFG_DEVICE_IO_MAP(sacstate_io)
/* video hardware */
- MCFG_DEVICE_ADD("terminal", GENERIC_TERMINAL, 0)
+ MCFG_DEVICE_ADD(m_terminal, GENERIC_TERMINAL, 0)
MCFG_GENERIC_TERMINAL_KEYBOARD_CB(PUT(sacstate_state, kbd_put))
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/sbc6510.cpp b/src/mame/drivers/sbc6510.cpp
index 8ccaa329136..922006d8a63 100644
--- a/src/mame/drivers/sbc6510.cpp
+++ b/src/mame/drivers/sbc6510.cpp
@@ -292,7 +292,7 @@ MACHINE_CONFIG_START(sbc6510_state::sbc6510)
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_sbc6510)
/* video hardware */
- MCFG_DEVICE_ADD("terminal", GENERIC_TERMINAL, 0)
+ MCFG_DEVICE_ADD(m_terminal, GENERIC_TERMINAL, 0)
/* sound hardware */
SPEAKER(config, "mono").front_center();
diff --git a/src/mame/drivers/ts802.cpp b/src/mame/drivers/ts802.cpp
index 99efcb84488..8eca9a44c79 100644
--- a/src/mame/drivers/ts802.cpp
+++ b/src/mame/drivers/ts802.cpp
@@ -197,7 +197,7 @@ MACHINE_CONFIG_START(ts802_state::ts802)
MCFG_MACHINE_RESET_OVERRIDE(ts802_state, ts802)
/* Devices */
- MCFG_DEVICE_ADD("terminal", GENERIC_TERMINAL, 0)
+ MCFG_DEVICE_ADD(m_terminal, GENERIC_TERMINAL, 0)
MCFG_GENERIC_TERMINAL_KEYBOARD_CB(PUT(ts802_state, kbd_put))
MCFG_DEVICE_ADD("dma", Z80DMA, 16_MHz_XTAL / 4)
diff --git a/src/mame/drivers/ts816.cpp b/src/mame/drivers/ts816.cpp
index db45c706b00..759b8e5b9a4 100644
--- a/src/mame/drivers/ts816.cpp
+++ b/src/mame/drivers/ts816.cpp
@@ -271,7 +271,7 @@ MACHINE_CONFIG_START(ts816_state::ts816)
MCFG_Z80_DAISY_CHAIN(daisy_chain)
/* video hardware */
- MCFG_DEVICE_ADD("terminal", GENERIC_TERMINAL, 0)
+ MCFG_DEVICE_ADD(m_terminal, GENERIC_TERMINAL, 0)
MCFG_GENERIC_TERMINAL_KEYBOARD_CB(PUT(ts816_state, kbd_put))
//MCFG_DEVICE_ADD("sio0", Z80SIO, XTAL(16'000'000) / 4)
diff --git a/src/mame/drivers/vax11.cpp b/src/mame/drivers/vax11.cpp
index 1b93b0a8b5b..dd1ee92bde7 100644
--- a/src/mame/drivers/vax11.cpp
+++ b/src/mame/drivers/vax11.cpp
@@ -70,17 +70,15 @@
#include "machine/terminal.h"
#include "machine/rx01.h"
-#define TERMINAL_TAG "terminal"
class vax11_state : public driver_device
{
public:
vax11_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_maincpu(*this, "maincpu"),
- m_terminal(*this, TERMINAL_TAG)
- {
- }
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, "maincpu")
+ , m_terminal(*this, "terminal")
+ { }
void vax11(machine_config &config);
@@ -149,7 +147,7 @@ MACHINE_CONFIG_START(vax11_state::vax11)
MCFG_DEVICE_PROGRAM_MAP(vax11_mem)
/* video hardware */
- MCFG_DEVICE_ADD(TERMINAL_TAG, GENERIC_TERMINAL, 0)
+ MCFG_DEVICE_ADD(m_terminal, GENERIC_TERMINAL, 0)
MCFG_GENERIC_TERMINAL_KEYBOARD_CB(PUT(vax11_state, kbd_put))
MCFG_RX01_ADD("rx01")
diff --git a/src/mame/drivers/vegas.cpp b/src/mame/drivers/vegas.cpp
index 9536fd91425..06d8c39e83c 100644
--- a/src/mame/drivers/vegas.cpp
+++ b/src/mame/drivers/vegas.cpp
@@ -291,7 +291,6 @@
#include "screen.h"
#include "machine/ins8250.h"
#include "bus/rs232/rs232.h"
-#include "machine/terminal.h"
#include "sf2049.lh"
@@ -325,7 +324,6 @@ public:
m_ethernet(*this, "ethernet"),
m_dcs(*this, "dcs"),
m_ioasic(*this, "ioasic"),
- m_uart0(*this, "uart0"),
m_uart1(*this, "uart1"),
m_uart2(*this, "uart2"),
m_io_analog(*this, "AN.%u", 0U),
@@ -386,7 +384,6 @@ private:
required_device<smc91c94_device> m_ethernet;
required_device<dcs_audio_device> m_dcs;
required_device<midway_ioasic_device> m_ioasic;
- optional_device<generic_terminal_device> m_uart0;
optional_device<ns16550_device> m_uart1;
optional_device<ns16550_device> m_uart2;
optional_ioport_array<8> m_io_analog;
diff --git a/src/mame/drivers/votrpss.cpp b/src/mame/drivers/votrpss.cpp
index 74820808cf8..8ea03ea7a6d 100644
--- a/src/mame/drivers/votrpss.cpp
+++ b/src/mame/drivers/votrpss.cpp
@@ -263,7 +263,7 @@ MACHINE_CONFIG_START(votrpss_state::votrpss)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
/* Devices */
- MCFG_DEVICE_ADD("terminal", GENERIC_TERMINAL, 0)
+ MCFG_DEVICE_ADD(m_terminal, GENERIC_TERMINAL, 0)
MCFG_GENERIC_TERMINAL_KEYBOARD_CB(PUT(votrpss_state, kbd_put))
MCFG_DEVICE_ADD("uart", I8251, 0)
diff --git a/src/mame/drivers/zexall.cpp b/src/mame/drivers/zexall.cpp
index 4a0912b1984..40d49c73bc3 100644
--- a/src/mame/drivers/zexall.cpp
+++ b/src/mame/drivers/zexall.cpp
@@ -32,12 +32,11 @@ class zexall_state : public driver_device
{
public:
zexall_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_maincpu(*this, "maincpu"),
- m_terminal(*this, "terminal"),
- m_main_ram(*this, "main_ram")
- {
- }
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, "maincpu")
+ , m_terminal(*this, "terminal")
+ , m_main_ram(*this, "main_ram")
+ { }
void zexall(machine_config &config);
@@ -49,7 +48,7 @@ private:
DECLARE_WRITE8_MEMBER( output_req_w );
DECLARE_WRITE8_MEMBER( output_data_w );
- void z80_mem(address_map &map);
+ void mem_map(address_map &map);
required_device<cpu_device> m_maincpu;
required_device<generic_terminal_device> m_terminal;
@@ -138,7 +137,7 @@ WRITE8_MEMBER( zexall_state::output_data_w )
Address Maps
******************************************************************************/
-void zexall_state::z80_mem(address_map &map)
+void zexall_state::mem_map(address_map &map)
{
map(0x0000, 0xffff).ram().share("main_ram");
map(0xfffd, 0xfffd).rw(FUNC(zexall_state::output_ack_r), FUNC(zexall_state::output_ack_w));
@@ -162,10 +161,10 @@ INPUT_PORTS_END
MACHINE_CONFIG_START(zexall_state::zexall)
/* basic machine hardware */
MCFG_DEVICE_ADD("maincpu", Z80, XTAL(3'579'545))
- MCFG_DEVICE_PROGRAM_MAP(z80_mem)
+ MCFG_DEVICE_PROGRAM_MAP(mem_map)
/* video hardware */
- MCFG_DEVICE_ADD("terminal", GENERIC_TERMINAL, 0)
+ MCFG_DEVICE_ADD(m_terminal, GENERIC_TERMINAL, 0)
MACHINE_CONFIG_END
diff --git a/src/mame/includes/cxhumax.h b/src/mame/includes/cxhumax.h
index bd8a4048e6d..65ea92f0c55 100644
--- a/src/mame/includes/cxhumax.h
+++ b/src/mame/includes/cxhumax.h
@@ -27,7 +27,6 @@ struct cx_timer_regs_t
uint32_t timer_irq;
};
-#define TERMINAL_TAG "terminal"
class cxhumax_state : public driver_device
{
@@ -37,7 +36,7 @@ public:
m_maincpu(*this, "maincpu"),
m_flash(*this, "flash"),
m_ram(*this, "ram"),
- m_terminal(*this, TERMINAL_TAG),
+ m_terminal(*this, "terminal"),
m_i2cmem(*this, "eeprom")
{
}
diff --git a/src/mame/includes/dm7000.h b/src/mame/includes/dm7000.h
index 05918895d8e..34e92ef5c35 100644
--- a/src/mame/includes/dm7000.h
+++ b/src/mame/includes/dm7000.h
@@ -8,15 +8,14 @@
#include "cpu/powerpc/ppc.h"
#include "machine/terminal.h"
-#define TERMINAL_TAG "terminal"
class dm7000_state : public driver_device
{
public:
dm7000_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_maincpu(*this, "maincpu"),
- m_terminal(*this, TERMINAL_TAG)
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, "maincpu")
+ , m_terminal(*this, "terminal")
{
}
diff --git a/src/mame/includes/pes.h b/src/mame/includes/pes.h
index 9b910812da8..f9f06ee7ccc 100644
--- a/src/mame/includes/pes.h
+++ b/src/mame/includes/pes.h
@@ -15,7 +15,6 @@
#include "sound/tms5220.h"
#include "cpu/mcs51/mcs51.h"
-#define TERMINAL_TAG "terminal"
class pes_state : public driver_device
{
@@ -23,7 +22,7 @@ public:
pes_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
- m_terminal(*this, TERMINAL_TAG),
+ m_terminal(*this, "terminal"),
m_speech(*this, "tms5220")
{
}
diff --git a/src/mame/includes/swtpc09.h b/src/mame/includes/swtpc09.h
index 53cad20497b..d8c310dfe2c 100644
--- a/src/mame/includes/swtpc09.h
+++ b/src/mame/includes/swtpc09.h
@@ -19,7 +19,6 @@
#include "machine/6821pia.h"
#include "machine/6850acia.h"
#include "machine/6522via.h"
-#include "machine/terminal.h"
#include "imagedev/harddriv.h"
#include "machine/idectrl.h"
#include "machine/bankdev.h"
@@ -137,7 +136,6 @@ private:
required_shared_ptr<uint8_t> m_dat;
required_device<address_map_bank_device> m_bankdev;
- uint8_t m_term_data; // terminal keyboard value
uint8_t m_pia_counter; // this is the counter on pia porta
uint8_t m_fdc_dma_address_reg; // dmf2 or dmf3 dma extended address reg
uint8_t m_system_type; // flag to indicate hw and rom combination
diff --git a/src/mame/machine/swtpc09.cpp b/src/mame/machine/swtpc09.cpp
index 54ca190f915..64ddd7703aa 100644
--- a/src/mame/machine/swtpc09.cpp
+++ b/src/mame/machine/swtpc09.cpp
@@ -656,7 +656,6 @@ WRITE8_MEMBER( swtpc09_state::m6844_w )
void swtpc09_state::machine_start()
{
m_pia_counter = 0; // init ptm/pia counter to 0
- m_term_data = 0; // terminal keyboard input
m_fdc_status = 0; // for floppy controller
m_interrupt = 0;
m_active_interrupt = false;