summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/wd7600.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine/wd7600.cpp')
-rw-r--r--src/devices/machine/wd7600.cpp24
1 files changed, 10 insertions, 14 deletions
diff --git a/src/devices/machine/wd7600.cpp b/src/devices/machine/wd7600.cpp
index 94357423580..419042631e0 100644
--- a/src/devices/machine/wd7600.cpp
+++ b/src/devices/machine/wd7600.cpp
@@ -21,7 +21,8 @@
DEFINE_DEVICE_TYPE(WD7600, wd7600_device, "wd7600", "Western Digital WD7600 chipset")
-MACHINE_CONFIG_START(wd7600_device::device_add_mconfig)
+void wd7600_device::device_add_mconfig(machine_config & config)
+{
AM9517A(config, m_dma1, 0);
m_dma1->out_hreq_callback().set(m_dma2, FUNC(am9517a_device::dreq0_w));
m_dma1->out_eop_callback().set(FUNC(wd7600_device::dma1_eop_w));
@@ -75,7 +76,7 @@ MACHINE_CONFIG_START(wd7600_device::device_add_mconfig)
DS12885(config, m_rtc);
m_rtc->irq_callback().set(m_pic2, FUNC(pic8259_device::ir0_w));
m_rtc->set_century_index(0x32);
-MACHINE_CONFIG_END
+}
wd7600_device::wd7600_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
@@ -97,7 +98,9 @@ wd7600_device::wd7600_device(const machine_config &mconfig, const char *tag, dev
m_rtc(*this, "rtc"),
m_cpu(*this, finder_base::DUMMY_TAG),
m_keybc(*this, finder_base::DUMMY_TAG),
+ m_ram(*this, finder_base::DUMMY_TAG),
m_bios(*this, finder_base::DUMMY_TAG),
+ m_isa(*this, finder_base::DUMMY_TAG),
m_portb(0x0f),
m_iochck(1),
m_nmi_mask(1),
@@ -114,10 +117,8 @@ wd7600_device::wd7600_device(const machine_config &mconfig, const char *tag, dev
void wd7600_device::device_start()
{
- ram_device *ram_dev = machine().device<ram_device>(RAM_TAG);
-
// make sure the ram device is already running
- if (!ram_dev->started())
+ if (!m_ram->started())
throw device_missing_dependencies();
// resolve callbacks
@@ -134,18 +135,13 @@ void wd7600_device::device_start()
m_space = &m_cpu->space(AS_PROGRAM);
m_space_io = &m_cpu->space(AS_IO);
- m_isa = machine().root_device().memregion(m_isatag)->base();
-
- m_ram = ram_dev->pointer();
- uint32_t ram_size = ram_dev->size();
-
// install base memory
- m_space->install_ram(0x000000, 0x09ffff, m_ram);
- m_space->install_ram(0x0d0000, 0x0effff, m_ram + 0xd0000);
+ m_space->install_ram(0x000000, 0x09ffff, m_ram->pointer());
+ m_space->install_ram(0x0d0000, 0x0effff, m_ram->pointer() + 0xd0000);
// install extended memory
- if (ram_size > 0x100000)
- m_space->install_ram(0x100000, ram_size - 1, m_ram + 0x100000);
+ if (m_ram->size() > 0x100000)
+ m_space->install_ram(0x100000, m_ram->size() - 1, m_ram->pointer() + 0x100000);
// install video BIOS (we should use the VGA BIOS at the beginning of the system BIOS ROM, but that gives a
// blank display (but still runs))