summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/machine/decopincpu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/machine/decopincpu.cpp')
-rw-r--r--src/mame/machine/decopincpu.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/mame/machine/decopincpu.cpp b/src/mame/machine/decopincpu.cpp
index 57b6f9342c8..1357dfb2b1f 100644
--- a/src/mame/machine/decopincpu.cpp
+++ b/src/mame/machine/decopincpu.cpp
@@ -199,10 +199,11 @@ WRITE8_MEMBER( decocpu_type1_device::solenoid2_w )
// todo
}
-MACHINE_CONFIG_START(decocpu_type1_device::device_add_mconfig)
+void decocpu_type1_device::device_add_mconfig(machine_config &config)
+{
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", M6808, XTAL(4'000'000))
- MCFG_DEVICE_PROGRAM_MAP(decocpu1_map)
+ M6808(config, m_cpu, XTAL(4'000'000));
+ m_cpu->set_addrmap(AS_PROGRAM, &decocpu_type1_device::decocpu1_map);
/* Devices */
PIA6821(config, m_pia21, 0); // 5F - PIA at 0x2100
@@ -245,7 +246,7 @@ MACHINE_CONFIG_START(decocpu_type1_device::device_add_mconfig)
m_pia34->irqb_handler().set(FUNC(decocpu_type1_device::cpu_pia_irq));
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1);
-MACHINE_CONFIG_END
+}
ioport_constructor decocpu_type1_device::device_input_ports() const
{
@@ -265,6 +266,7 @@ decocpu_type1_device::decocpu_type1_device(const machine_config &mconfig, device
m_pia2c(*this, "pia2c"),
m_pia30(*this, "pia30"),
m_pia34(*this, "pia34"),
+ m_rom(*this, finder_base::DUMMY_TAG),
m_read_display(*this),
m_write_display(*this),
m_read_dmdstatus(*this),
@@ -277,8 +279,6 @@ decocpu_type1_device::decocpu_type1_device(const machine_config &mconfig, device
void decocpu_type1_device::device_start()
{
- uint8_t* ROM = memregion(m_cputag)->base();
-
// resolve callbacks
m_read_display.resolve_safe(0);
m_write_display.resolve_safe();
@@ -293,7 +293,7 @@ void decocpu_type1_device::device_start()
m_irq_timer->adjust(attotime::from_ticks(S11_IRQ_CYCLES,E_CLOCK),1);
m_irq_active = false;
- m_cpu->space(AS_PROGRAM).install_rom(0x4000,0xffff,ROM+0x4000);
+ m_cpu->space(AS_PROGRAM).install_rom(0x4000,0xffff,&m_rom[0x4000]);
}
decocpu_type2_device::decocpu_type2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
@@ -304,13 +304,13 @@ decocpu_type2_device::decocpu_type2_device(const machine_config &mconfig, device
: decocpu_type1_device(mconfig, type, tag, owner, clock)
{}
-MACHINE_CONFIG_START(decocpu_type2_device::device_add_mconfig)
+void decocpu_type2_device::device_add_mconfig(machine_config &config)
+{
decocpu_type1_device::device_add_mconfig(config);
/* basic machine hardware */
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(decocpu2_map)
-MACHINE_CONFIG_END
+ m_cpu->set_addrmap(AS_PROGRAM, &decocpu_type2_device::decocpu2_map);
+}
void decocpu_type2_device::device_start()
{