From a9c01535bd03b7109cdc381efff8c10d2a0dc7d5 Mon Sep 17 00:00:00 2001 From: Patrick Mackinlay Date: Tue, 4 Jun 2019 19:39:15 +0700 Subject: interpro_ioga: sapphire 60Hz interrupt (nw) --- src/mame/machine/interpro_ioga.cpp | 14 +++++++++++--- src/mame/machine/interpro_ioga.h | 6 ++++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/mame/machine/interpro_ioga.cpp b/src/mame/machine/interpro_ioga.cpp index 36f58f107c5..16b89a54e39 100644 --- a/src/mame/machine/interpro_ioga.cpp +++ b/src/mame/machine/interpro_ioga.cpp @@ -462,7 +462,7 @@ void interpro_ioga_device::irq(int state, u8 irq_vector) if (m_irq_state != state) { LOGIRQ(m_active_interrupt_number, "irq: %s interrupt type %d number %d\n", - state ? "asserting" : "clearing",m_active_interrupt_type, m_active_interrupt_number); + state ? "asserting" : "clearing", m_active_interrupt_type, m_active_interrupt_number); m_irq_state = state; m_out_irq_func(state); @@ -709,13 +709,14 @@ TIMER_CALLBACK_MEMBER(interpro_ioga_device::dma) if (dma_channel.control & DMA_CTRL_VIRTUAL) { const u32 ptde = m_memory->read_dword(dma_channel.virtual_address); - dma_channel.virtual_address += 4; // FIXME: ignore the page fault flag? dma_channel.real_address = ptde & ~0xfff; LOGDMA(dma_channel.channel, "dma: translated virtual 0x%08x real 0x%08x\n", dma_channel.virtual_address, dma_channel.real_address); + + dma_channel.virtual_address += 4; } } } @@ -886,13 +887,14 @@ void interpro_ioga_device::dma_w(address_space &space, offs_t offset, u32 data, if (data & DMA_CTRL_VIRTUAL) { const u32 ptde = m_memory->read_dword(dma_channel.virtual_address); - dma_channel.virtual_address += 4; // FIXME: ignore the page fault flag? dma_channel.real_address = (ptde & ~0xfff) | (dma_channel.real_address & 0xfff); LOGDMA(dma_channel.channel, "dma: translated virtual 0x%08x real 0x%08x\n", dma_channel.virtual_address, dma_channel.real_address); + + dma_channel.virtual_address += 4; } // (7.0272) if bus error flag is written, clear existing bus error (otherwise retain existing state) @@ -1068,6 +1070,12 @@ TIMER_CALLBACK_MEMBER(interpro_ioga_device::timer_60hz) set_int_line(IRQ_60HZ, CLEAR_LINE); } +TIMER_CALLBACK_MEMBER(sapphire_ioga_device::timer_60hz) +{ + set_int_line(IRQ_TIMER0, ASSERT_LINE); + set_int_line(IRQ_TIMER0, CLEAR_LINE); +} + READ32_MEMBER(interpro_ioga_device::timer1_r) { u32 result = m_timer1_count & TIMER1_COUNT; diff --git a/src/mame/machine/interpro_ioga.h b/src/mame/machine/interpro_ioga.h index 1589a105ae1..05f66ca980f 100644 --- a/src/mame/machine/interpro_ioga.h +++ b/src/mame/machine/interpro_ioga.h @@ -75,7 +75,7 @@ public: DECLARE_WRITE_LINE_MEMBER(ir7_w) { set_int_line(IRQ_7, state); } DECLARE_WRITE_LINE_MEMBER(ir8_w) { set_int_line(IRQ_CBUS3, state); } DECLARE_WRITE_LINE_MEMBER(ir9_w) { set_int_line(IRQ_RTC, state); } - DECLARE_WRITE_LINE_MEMBER(ir10_w) { set_int_line(IRQ_60HZ, state); } + //DECLARE_WRITE_LINE_MEMBER(ir10_w) { set_int_line(IRQ_60HZ, state); } DECLARE_WRITE_LINE_MEMBER(ir11_w) { set_int_line(IRQ_SERIAL, state); } DECLARE_WRITE_LINE_MEMBER(ir12_w) { set_int_line(IRQ_ETHERNET, state); } @@ -260,7 +260,7 @@ protected: TIMER_CALLBACK_MEMBER(serial_dma); TIMER_CALLBACK_MEMBER(timer0); TIMER_CALLBACK_MEMBER(timer1); - TIMER_CALLBACK_MEMBER(timer_60hz); + virtual TIMER_CALLBACK_MEMBER(timer_60hz); virtual TIMER_CALLBACK_MEMBER(eth_reset) = 0; @@ -465,6 +465,8 @@ public: virtual void map(address_map &map) override; + virtual TIMER_CALLBACK_MEMBER(timer_60hz) override; + DECLARE_WRITE16_MEMBER(eth_w); DECLARE_READ16_MEMBER(eth_r); -- cgit v1.2.3