diff options
Diffstat (limited to 'src/devices/machine/gt64xxx.cpp')
-rw-r--r-- | src/devices/machine/gt64xxx.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/devices/machine/gt64xxx.cpp b/src/devices/machine/gt64xxx.cpp index fedd1127f81..e33d2f9dfb6 100644 --- a/src/devices/machine/gt64xxx.cpp +++ b/src/devices/machine/gt64xxx.cpp @@ -24,7 +24,7 @@ * *************************************/ -#define TIMER_PERIOD attotime::from_hz(m_clock) +#define TIMER_PERIOD attotime::from_hz(clock()) #define PCI_BUS_CLOCK 33000000 // Number of dma words to transfer at a time, real hardware configurable between 8-32 #define DMA_BURST_SIZE 32 @@ -161,12 +161,12 @@ void gt64xxx_device::cpu_map(address_map &map) } gt64xxx_device::gt64xxx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : pci_host_device(mconfig, GT64XXX, tag, owner, clock), - m_be(0), m_autoconfig(0), m_irq_num(-1), - m_mem_config("memory_space", ENDIANNESS_LITTLE, 32, 32), - m_io_config("io_space", ENDIANNESS_LITTLE, 32, 32), - m_romRegion(*this, "rom"), - m_updateRegion(*this, "update") + : pci_host_device(mconfig, GT64XXX, tag, owner, clock) + , m_cpu(*this, finder_base::DUMMY_TAG), m_be(0), m_autoconfig(0), m_irq_num(-1) + , m_mem_config("memory_space", ENDIANNESS_LITTLE, 32, 32) + , m_io_config("io_space", ENDIANNESS_LITTLE, 32, 32) + , m_romRegion(*this, "rom") + , m_updateRegion(*this, "update") { for (int csIndex = 0; csIndex < 4; csIndex++) { m_cs_devices[csIndex] = nullptr; @@ -191,7 +191,6 @@ device_memory_interface::space_config_vector gt64xxx_device::memory_space_config void gt64xxx_device::device_start() { pci_host_device::device_start(); - m_cpu = machine().device<mips3_device>(cpu_tag); m_cpu_space = &m_cpu->space(AS_PCI_CONFIG); memory_space = &space(AS_PCI_MEM); io_space = &space(AS_PCI_IO); @@ -637,7 +636,7 @@ READ32_MEMBER (gt64xxx_device::cpu_if_r) result = timer->count; if (timer->active) { - uint32_t elapsed = (timer->timer->elapsed() * m_clock).as_double(); + uint32_t elapsed = (timer->timer->elapsed() * clock()).as_double(); result = (result > elapsed) ? (result - elapsed) : 0; } @@ -780,7 +779,7 @@ WRITE32_MEMBER(gt64xxx_device::cpu_if_w) } else if (timer->active && !(data & mask)) { - uint32_t elapsed = (timer->timer->elapsed() * m_clock).as_double(); + uint32_t elapsed = (timer->timer->elapsed() * clock()).as_double(); timer->active = 0; timer->count = (timer->count > elapsed) ? (timer->count - elapsed) : 0; timer->timer->adjust(attotime::never, which); |