summaryrefslogtreecommitdiffstats
path: root/src/mame/machine/x820kb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/machine/x820kb.cpp')
-rw-r--r--src/mame/machine/x820kb.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/mame/machine/x820kb.cpp b/src/mame/machine/x820kb.cpp
index 6ff49b781e3..22f9f9d6823 100644
--- a/src/mame/machine/x820kb.cpp
+++ b/src/mame/machine/x820kb.cpp
@@ -57,7 +57,7 @@ Notes:
// DEVICE DEFINITIONS
//**************************************************************************
-const device_type XEROX_820_KEYBOARD = device_creator<xerox_820_keyboard_t>;
+DEFINE_DEVICE_TYPE(XEROX_820_KEYBOARD, xerox_820_keyboard_device, "x820kb", "Xerox 820 Keyboard")
//-------------------------------------------------
@@ -74,7 +74,7 @@ ROM_END
// rom_region - device-specific ROM region
//-------------------------------------------------
-const tiny_rom_entry *xerox_820_keyboard_t::device_rom_region() const
+const tiny_rom_entry *xerox_820_keyboard_device::device_rom_region() const
{
return ROM_NAME( xerox_820_keyboard );
}
@@ -86,12 +86,12 @@ const tiny_rom_entry *xerox_820_keyboard_t::device_rom_region() const
static MACHINE_CONFIG_FRAGMENT( xerox_820_keyboard )
MCFG_CPU_ADD(I8748_TAG, I8048, XTAL_6MHz)
- MCFG_MCS48_PORT_P1_IN_CB(READ8(xerox_820_keyboard_t, kb_p1_r))
- MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(xerox_820_keyboard_t, kb_p1_w))
- MCFG_MCS48_PORT_P2_IN_CB(READ8(xerox_820_keyboard_t, kb_p2_r))
- MCFG_MCS48_PORT_T0_IN_CB(READLINE(xerox_820_keyboard_t, kb_t0_r))
- MCFG_MCS48_PORT_T1_IN_CB(READLINE(xerox_820_keyboard_t, kb_t1_r))
- MCFG_MCS48_PORT_BUS_OUT_CB(WRITE8(xerox_820_keyboard_t, kb_bus_w))
+ MCFG_MCS48_PORT_P1_IN_CB(READ8(xerox_820_keyboard_device, kb_p1_r))
+ MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(xerox_820_keyboard_device, kb_p1_w))
+ MCFG_MCS48_PORT_P2_IN_CB(READ8(xerox_820_keyboard_device, kb_p2_r))
+ MCFG_MCS48_PORT_T0_IN_CB(READLINE(xerox_820_keyboard_device, kb_t0_r))
+ MCFG_MCS48_PORT_T1_IN_CB(READLINE(xerox_820_keyboard_device, kb_t1_r))
+ MCFG_MCS48_PORT_BUS_OUT_CB(WRITE8(xerox_820_keyboard_device, kb_bus_w))
MACHINE_CONFIG_END
@@ -100,7 +100,7 @@ MACHINE_CONFIG_END
// machine configurations
//-------------------------------------------------
-machine_config_constructor xerox_820_keyboard_t::device_mconfig_additions() const
+machine_config_constructor xerox_820_keyboard_device::device_mconfig_additions() const
{
return MACHINE_CONFIG_NAME( xerox_820_keyboard );
}
@@ -235,7 +235,7 @@ INPUT_PORTS_END
// input_ports - device-specific input ports
//-------------------------------------------------
-ioport_constructor xerox_820_keyboard_t::device_input_ports() const
+ioport_constructor xerox_820_keyboard_device::device_input_ports() const
{
return INPUT_PORTS_NAME( xerox_820_keyboard );
}
@@ -247,11 +247,11 @@ ioport_constructor xerox_820_keyboard_t::device_input_ports() const
//**************************************************************************
//-------------------------------------------------
-// xerox_820_keyboard_t - constructor
+// xerox_820_keyboard_device - constructor
//-------------------------------------------------
-xerox_820_keyboard_t::xerox_820_keyboard_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
- device_t(mconfig, XEROX_820_KEYBOARD, "Xerox 820 Keyboard", tag, owner, clock, "x820kb", __FILE__),
+xerox_820_keyboard_device::xerox_820_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ device_t(mconfig, XEROX_820_KEYBOARD, tag, owner, clock),
m_maincpu(*this, I8748_TAG),
m_y(*this, "Y%u", 0),
m_kbstb_cb(*this),
@@ -265,7 +265,7 @@ xerox_820_keyboard_t::xerox_820_keyboard_t(const machine_config &mconfig, const
// device_start - device-specific startup
//-------------------------------------------------
-void xerox_820_keyboard_t::device_start()
+void xerox_820_keyboard_device::device_start()
{
// state saving
save_item(NAME(m_p1));
@@ -277,12 +277,12 @@ void xerox_820_keyboard_t::device_start()
// device_reset - device-specific reset
//-------------------------------------------------
-void xerox_820_keyboard_t::device_reset()
+void xerox_820_keyboard_device::device_reset()
{
m_kbstb_cb.resolve_safe();
}
-void xerox_820_keyboard_t::device_reset_after_children()
+void xerox_820_keyboard_device::device_reset_after_children()
{
m_maincpu->set_input_line(MCS48_INPUT_IRQ, ASSERT_LINE);
}
@@ -292,7 +292,7 @@ void xerox_820_keyboard_t::device_reset_after_children()
// kb_p1_r -
//-------------------------------------------------
-READ8_MEMBER( xerox_820_keyboard_t::kb_p1_r )
+READ8_MEMBER( xerox_820_keyboard_device::kb_p1_r )
{
return m_p1; // TODO: move to mcs48.c
}
@@ -302,7 +302,7 @@ READ8_MEMBER( xerox_820_keyboard_t::kb_p1_r )
// kb_p1_w -
//-------------------------------------------------
-WRITE8_MEMBER( xerox_820_keyboard_t::kb_p1_w )
+WRITE8_MEMBER( xerox_820_keyboard_device::kb_p1_w )
{
/*
@@ -329,7 +329,7 @@ WRITE8_MEMBER( xerox_820_keyboard_t::kb_p1_w )
// kb_p2_r -
//-------------------------------------------------
-READ8_MEMBER( xerox_820_keyboard_t::kb_p2_r )
+READ8_MEMBER( xerox_820_keyboard_device::kb_p2_r )
{
return m_y[m_p1 & 0x0f]->read();
}
@@ -339,7 +339,7 @@ READ8_MEMBER( xerox_820_keyboard_t::kb_p2_r )
// kb_t0_r -
//-------------------------------------------------
-READ_LINE_MEMBER( xerox_820_keyboard_t::kb_t0_r )
+READ_LINE_MEMBER( xerox_820_keyboard_device::kb_t0_r )
{
uint8_t data = 1;
@@ -357,7 +357,7 @@ READ_LINE_MEMBER( xerox_820_keyboard_t::kb_t0_r )
// kb_t1_r -
//-------------------------------------------------
-READ_LINE_MEMBER( xerox_820_keyboard_t::kb_t1_r )
+READ_LINE_MEMBER( xerox_820_keyboard_device::kb_t1_r )
{
return 1; // ??? if 0, toggle P17
}
@@ -367,7 +367,7 @@ READ_LINE_MEMBER( xerox_820_keyboard_t::kb_t1_r )
// kb_bus_w -
//-------------------------------------------------
-WRITE8_MEMBER( xerox_820_keyboard_t::kb_bus_w )
+WRITE8_MEMBER( xerox_820_keyboard_device::kb_bus_w )
{
m_bus = data;
}