diff options
Diffstat (limited to 'src/devices/machine/mb89374.cpp')
-rw-r--r-- | src/devices/machine/mb89374.cpp | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/src/devices/machine/mb89374.cpp b/src/devices/machine/mb89374.cpp index 561d0bf34df..a2dacb9c47b 100644 --- a/src/devices/machine/mb89374.cpp +++ b/src/devices/machine/mb89374.cpp @@ -99,12 +99,12 @@ enum // mb89374_device - constructor //------------------------------------------------- -mb89374_device::mb89374_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock ) - : device_t(mconfig, MB89374, tag, owner, clock), +mb89374_device::mb89374_device( const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock ) : + device_t(mconfig, MB89374, tag, owner, clock), device_execute_interface(mconfig, *this), m_icount(0), m_out_irq_cb(*this), - m_out_po_cb{ { *this }, { *this }, { *this }, { *this } } + m_out_po_cb(*this) { // prepare localhost "filename" m_localhost[0] = 0; @@ -131,11 +131,6 @@ void mb89374_device::device_start() // set our instruction counter set_icountptr(m_icount); - // resolve callbacks - m_out_irq_cb.resolve_safe(); - for(auto &cb : m_out_po_cb) - cb.resolve_safe(); - // state saving save_item(NAME(m_irq)); save_item(NAME(m_po)); @@ -270,7 +265,7 @@ void mb89374_device::execute_run() // read - handler for register reading //------------------------------------------------- -READ8_MEMBER(mb89374_device::read) +uint8_t mb89374_device::read(offs_t offset) { uint8_t data = 0xff; switch (offset & 0x1f) @@ -307,7 +302,7 @@ READ8_MEMBER(mb89374_device::read) // write - handler for register writing //------------------------------------------------- -WRITE8_MEMBER(mb89374_device::write) +void mb89374_device::write(offs_t offset, uint8_t data) { switch (offset & 0x1f) { @@ -327,6 +322,7 @@ WRITE8_MEMBER(mb89374_device::write) case REGISTER_RXIER: m_rxier = data; + break; case REGISTER_TXSR: m_txsr = data | TXSR_MASK; @@ -366,7 +362,7 @@ WRITE8_MEMBER(mb89374_device::write) // pi0_w - handler for RxCI#/PI0 //------------------------------------------------- -WRITE_LINE_MEMBER(mb89374_device::pi0_w) +void mb89374_device::pi0_w(int state) { m_pi[0] = state; } @@ -376,7 +372,7 @@ WRITE_LINE_MEMBER(mb89374_device::pi0_w) // pi1_w - handler for TxCI#/PI1 //------------------------------------------------- -WRITE_LINE_MEMBER(mb89374_device::pi1_w) +void mb89374_device::pi1_w(int state) { m_pi[1] = state; } @@ -386,7 +382,7 @@ WRITE_LINE_MEMBER(mb89374_device::pi1_w) // pi2_w - handler for TxDACK#/PI2 //------------------------------------------------- -WRITE_LINE_MEMBER(mb89374_device::pi2_w) +void mb89374_device::pi2_w(int state) { m_pi[2] = state; } @@ -396,7 +392,7 @@ WRITE_LINE_MEMBER(mb89374_device::pi2_w) // pi3_w - handler for RxDACK#/PI3 //------------------------------------------------- -WRITE_LINE_MEMBER(mb89374_device::pi3_w) +void mb89374_device::pi3_w(int state) { m_pi[3] = state; } @@ -406,7 +402,7 @@ WRITE_LINE_MEMBER(mb89374_device::pi3_w) // ci_w - handler for TxLAST#/CI# //------------------------------------------------- -WRITE_LINE_MEMBER(mb89374_device::ci_w) +void mb89374_device::ci_w(int state) { m_ci = state; if (m_ci == 1 && m_pi[2] == 0) @@ -421,7 +417,7 @@ WRITE_LINE_MEMBER(mb89374_device::ci_w) // read - handler for dma reading (rx buffer) //------------------------------------------------- -READ8_MEMBER(mb89374_device::dma_r) +uint8_t mb89374_device::dma_r() { uint8_t data = rxRead(); if (m_rx_offset == m_rx_length) @@ -434,7 +430,7 @@ READ8_MEMBER(mb89374_device::dma_r) // write - handler for dma writing (tx buffer) //------------------------------------------------- -WRITE8_MEMBER(mb89374_device::dma_w) +void mb89374_device::dma_w(uint8_t data) { txWrite(data); } |