summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2017-05-23 18:51:12 +1000
committer Vas Crabb <vas@vastheman.com>2017-05-23 18:51:12 +1000
commit57d1c36ead24a1eb2e359cfd6ff38f5c96795975 (patch)
tree4189cf458bdd994890004f6dc6df479c190e5b08
parentaaed83a91fc8d88e083730a5d97361950fce5c10 (diff)
change some more device_mconfig_additions to device_add_mconfig (nw)
-rw-r--r--src/devices/bus/a2bus/mouse.cpp35
-rw-r--r--src/devices/bus/a2bus/mouse.h24
-rw-r--r--src/devices/bus/amiga/keyboard/a1200.cpp24
-rw-r--r--src/devices/bus/amiga/keyboard/a1200.h4
-rw-r--r--src/devices/bus/amiga/keyboard/a500.cpp13
-rw-r--r--src/devices/bus/amiga/keyboard/a500.h2
6 files changed, 43 insertions, 59 deletions
diff --git a/src/devices/bus/a2bus/mouse.cpp b/src/devices/bus/a2bus/mouse.cpp
index 144c032ac3f..b456851c9b2 100644
--- a/src/devices/bus/a2bus/mouse.cpp
+++ b/src/devices/bus/a2bus/mouse.cpp
@@ -85,21 +85,6 @@
DEFINE_DEVICE_TYPE(A2BUS_MOUSE, a2bus_mouse_device, "a2mouse", "Apple II Mouse Card")
-static MACHINE_CONFIG_START( mouse )
- MCFG_CPU_ADD(MOUSE_MCU_TAG, M68705P3, 2043600)
- MCFG_M68705_PORTA_R_CB(READ8(a2bus_mouse_device, mcu_port_a_r))
- MCFG_M68705_PORTB_R_CB(READ8(a2bus_mouse_device, mcu_port_b_r))
- MCFG_M68705_PORTA_W_CB(WRITE8(a2bus_mouse_device, mcu_port_a_w))
- MCFG_M68705_PORTB_W_CB(WRITE8(a2bus_mouse_device, mcu_port_b_w))
- MCFG_M68705_PORTC_W_CB(WRITE8(a2bus_mouse_device, mcu_port_c_w))
-
- MCFG_DEVICE_ADD(MOUSE_PIA_TAG, PIA6821, 1021800)
- MCFG_PIA_WRITEPA_HANDLER(WRITE8(a2bus_mouse_device, pia_out_a))
- MCFG_PIA_WRITEPB_HANDLER(WRITE8(a2bus_mouse_device, pia_out_b))
- MCFG_PIA_IRQA_HANDLER(WRITELINE(a2bus_mouse_device, pia_irqa_w))
- MCFG_PIA_IRQB_HANDLER(WRITELINE(a2bus_mouse_device, pia_irqb_w))
-MACHINE_CONFIG_END
-
ROM_START( mouse )
ROM_REGION(0x800, MOUSE_ROM_REGION, 0)
ROM_LOAD( "341-0270-c.4b", 0x000000, 0x000800, CRC(0bcd1e8e) SHA1(3a9d881a8a8d30f55b9719aceebbcf717f829d6f) )
@@ -138,14 +123,24 @@ ioport_constructor a2bus_mouse_device::device_input_ports() const
}
/*-------------------------------------------------
- machine_config_additions - device-specific
+ device_add_mconfig - device-specific
machine configurations
-------------------------------------------------*/
-machine_config_constructor a2bus_mouse_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME(mouse);
-}
+MACHINE_CONFIG_MEMBER(a2bus_mouse_device::device_add_mconfig)
+ MCFG_CPU_ADD(MOUSE_MCU_TAG, M68705P3, 2043600)
+ MCFG_M68705_PORTA_R_CB(READ8(a2bus_mouse_device, mcu_port_a_r))
+ MCFG_M68705_PORTB_R_CB(READ8(a2bus_mouse_device, mcu_port_b_r))
+ MCFG_M68705_PORTA_W_CB(WRITE8(a2bus_mouse_device, mcu_port_a_w))
+ MCFG_M68705_PORTB_W_CB(WRITE8(a2bus_mouse_device, mcu_port_b_w))
+ MCFG_M68705_PORTC_W_CB(WRITE8(a2bus_mouse_device, mcu_port_c_w))
+
+ MCFG_DEVICE_ADD(MOUSE_PIA_TAG, PIA6821, 1021800)
+ MCFG_PIA_WRITEPA_HANDLER(WRITE8(a2bus_mouse_device, pia_out_a))
+ MCFG_PIA_WRITEPB_HANDLER(WRITE8(a2bus_mouse_device, pia_out_b))
+ MCFG_PIA_IRQA_HANDLER(WRITELINE(a2bus_mouse_device, pia_irqa_w))
+ MCFG_PIA_IRQB_HANDLER(WRITELINE(a2bus_mouse_device, pia_irqb_w))
+MACHINE_CONFIG_END
/*-------------------------------------------------
rom_region - device-specific ROM region
diff --git a/src/devices/bus/a2bus/mouse.h b/src/devices/bus/a2bus/mouse.h
index b20513bc4d0..4b72a81a988 100644
--- a/src/devices/bus/a2bus/mouse.h
+++ b/src/devices/bus/a2bus/mouse.h
@@ -30,24 +30,13 @@ public:
a2bus_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// optional information overrides
- virtual machine_config_constructor device_mconfig_additions() const override;
virtual const tiny_rom_entry *device_rom_region() const override;
virtual ioport_constructor device_input_ports() const override;
- DECLARE_WRITE8_MEMBER(pia_out_a);
- DECLARE_WRITE8_MEMBER(pia_out_b);
- DECLARE_WRITE_LINE_MEMBER(pia_irqa_w);
- DECLARE_WRITE_LINE_MEMBER(pia_irqb_w);
-
- DECLARE_READ8_MEMBER(mcu_port_a_r);
- DECLARE_READ8_MEMBER(mcu_port_b_r);
- DECLARE_WRITE8_MEMBER(mcu_port_a_w);
- DECLARE_WRITE8_MEMBER(mcu_port_b_w);
- DECLARE_WRITE8_MEMBER(mcu_port_c_w);
-
protected:
a2bus_mouse_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
+ virtual void device_add_mconfig(machine_config &config) override;
virtual void device_start() override;
virtual void device_reset() override;
@@ -56,6 +45,17 @@ protected:
virtual void write_c0nx(address_space &space, uint8_t offset, uint8_t data) override;
virtual uint8_t read_cnxx(address_space &space, uint8_t offset) override;
+ DECLARE_WRITE8_MEMBER(pia_out_a);
+ DECLARE_WRITE8_MEMBER(pia_out_b);
+ DECLARE_WRITE_LINE_MEMBER(pia_irqa_w);
+ DECLARE_WRITE_LINE_MEMBER(pia_irqb_w);
+
+ DECLARE_READ8_MEMBER(mcu_port_a_r);
+ DECLARE_READ8_MEMBER(mcu_port_b_r);
+ DECLARE_WRITE8_MEMBER(mcu_port_a_w);
+ DECLARE_WRITE8_MEMBER(mcu_port_b_w);
+ DECLARE_WRITE8_MEMBER(mcu_port_c_w);
+
required_device<pia6821_device> m_pia;
required_device<m68705p_device> m_mcu;
required_ioport m_mouseb;
diff --git a/src/devices/bus/amiga/keyboard/a1200.cpp b/src/devices/bus/amiga/keyboard/a1200.cpp
index 3255a6bd577..08452206082 100644
--- a/src/devices/bus/amiga/keyboard/a1200.cpp
+++ b/src/devices/bus/amiga/keyboard/a1200.cpp
@@ -49,17 +49,6 @@ INPUT_PORTS_START(a1200_us_keyboard)
INPUT_PORTS_END
-MACHINE_CONFIG_START(a1200kbd_revB)
- MCFG_CPU_ADD("mpu", M68HC705C8A, XTAL_3MHz)
- MCFG_M68HC05_PORTB_R_CB(READ8(a1200_kbd_device, mpu_portb_r));
- MCFG_M68HC05_PORTD_R_CB(IOPORT("MOD"));
- MCFG_M68HC05_PORTA_W_CB(WRITE8(a1200_kbd_device, mpu_porta_w));
- MCFG_M68HC05_PORTB_W_CB(WRITE8(a1200_kbd_device, mpu_portb_w));
- MCFG_M68HC05_PORTC_W_CB(WRITE8(a1200_kbd_device, mpu_portc_w));
- MCFG_M68HC05_TCMP_CB(WRITELINE(a1200_kbd_device, mpu_tcmp));
-MACHINE_CONFIG_END
-
-
ROM_START(a1200kbd_revB)
ROM_REGION(0x2000, "mpu", 0)
ROM_LOAD("DFA_Rev_B_A1200_HC705.bin", 0x0000, 0x2000, CRC(2a77eec4) SHA1(301ec6a69404457d912c89e3fc54095eda9f0e93))
@@ -137,10 +126,15 @@ WRITE_LINE_MEMBER(a1200_kbd_device::mpu_tcmp)
m_host->krst_w(state);
}
-machine_config_constructor a1200_kbd_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME(a1200kbd_revB);
-}
+MACHINE_CONFIG_MEMBER(a1200_kbd_device::device_add_mconfig)
+ MCFG_CPU_ADD("mpu", M68HC705C8A, XTAL_3MHz)
+ MCFG_M68HC05_PORTB_R_CB(READ8(a1200_kbd_device, mpu_portb_r));
+ MCFG_M68HC05_PORTD_R_CB(IOPORT("MOD"));
+ MCFG_M68HC05_PORTA_W_CB(WRITE8(a1200_kbd_device, mpu_porta_w));
+ MCFG_M68HC05_PORTB_W_CB(WRITE8(a1200_kbd_device, mpu_portb_w));
+ MCFG_M68HC05_PORTC_W_CB(WRITE8(a1200_kbd_device, mpu_portc_w));
+ MCFG_M68HC05_TCMP_CB(WRITELINE(a1200_kbd_device, mpu_tcmp));
+MACHINE_CONFIG_END
const tiny_rom_entry *a1200_kbd_device::device_rom_region() const
{
diff --git a/src/devices/bus/amiga/keyboard/a1200.h b/src/devices/bus/amiga/keyboard/a1200.h
index 3927657174d..0dedcc11de8 100644
--- a/src/devices/bus/amiga/keyboard/a1200.h
+++ b/src/devices/bus/amiga/keyboard/a1200.h
@@ -31,6 +31,7 @@ public:
// from host
virtual DECLARE_WRITE_LINE_MEMBER(kdat_w) override;
+protected:
// MPU I/O
DECLARE_READ8_MEMBER(mpu_portb_r);
DECLARE_WRITE8_MEMBER(mpu_porta_w);
@@ -38,9 +39,8 @@ public:
DECLARE_WRITE8_MEMBER(mpu_portc_w);
DECLARE_WRITE_LINE_MEMBER(mpu_tcmp);
-protected:
virtual const tiny_rom_entry *device_rom_region() const override;
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
virtual ioport_constructor device_input_ports() const override;
virtual void device_start() override;
diff --git a/src/devices/bus/amiga/keyboard/a500.cpp b/src/devices/bus/amiga/keyboard/a500.cpp
index 3a495157cc7..312c48b2d14 100644
--- a/src/devices/bus/amiga/keyboard/a500.cpp
+++ b/src/devices/bus/amiga/keyboard/a500.cpp
@@ -58,11 +58,6 @@ ADDRESS_MAP_START( mpu6500_map, AS_PROGRAM, 8, a500_kbd_device )
AM_RANGE(0x800, 0xfff) AM_ROM AM_REGION("ic1", 0)
ADDRESS_MAP_END
-MACHINE_CONFIG_START( kbd_pcb )
- MCFG_CPU_ADD("ic1", M6502, XTAL_3MHz / 2)
- MCFG_CPU_PROGRAM_MAP(mpu6500_map)
-MACHINE_CONFIG_END
-
//-------------------------------------------------
// rom_region - device-specific ROM region
//-------------------------------------------------
@@ -141,10 +136,10 @@ INPUT_PORTS_END
} // anonymous namespace
-machine_config_constructor a500_kbd_device::device_mconfig_additions() const
-{
- return MACHINE_CONFIG_NAME(kbd_pcb);
-}
+MACHINE_CONFIG_MEMBER(a500_kbd_device::device_add_mconfig)
+ MCFG_CPU_ADD("ic1", M6502, XTAL_3MHz / 2)
+ MCFG_CPU_PROGRAM_MAP(mpu6500_map)
+MACHINE_CONFIG_END
const tiny_rom_entry *a500_kbd_device::device_rom_region() const
{
diff --git a/src/devices/bus/amiga/keyboard/a500.h b/src/devices/bus/amiga/keyboard/a500.h
index 3d1a0fb47c9..1bf20a072ef 100644
--- a/src/devices/bus/amiga/keyboard/a500.h
+++ b/src/devices/bus/amiga/keyboard/a500.h
@@ -76,7 +76,7 @@ protected:
// device-level overrides
virtual const tiny_rom_entry *device_rom_region() const override;
- virtual machine_config_constructor device_mconfig_additions() const override;
+ virtual void device_add_mconfig(machine_config &config) override;
virtual void device_start() override;
virtual void device_reset() override;
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;