//TIMER_DEVICE_CALLBACK_MEMBER(_1942_state::_1942_scanline) void _1942_scanline(timer_device timer, object ptr, int param) // void *ptr, INT32 param) { int scanline = param; if (scanline == 0x2c) // audio irq point 1 { m_audiocpu.op0.set_input_line(0, HOLD_LINE); } if (scanline == 0x6d) // periodic irq (writes to the soundlatch and drives freeze dip-switch), + audio irq point 2 { m_maincpu.op0.set_input_line_and_vector(0, HOLD_LINE, 0xcf); /* Z80 - RST 08h */ m_audiocpu.op0.set_input_line(0, HOLD_LINE); } if (scanline == 0xaf) // audio irq point 3 { m_audiocpu.op0.set_input_line(0, HOLD_LINE); } if (scanline == 0xf0) // vblank-out irq, audio irq point 4 { m_maincpu.op0.set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* Z80 - RST 10h - vblank */ m_audiocpu.op0.set_input_line(0, HOLD_LINE); } }
//TIMER_DEVICE_CALLBACK_MEMBER(_1942_state::_1942_scanline) public void _1942_scanline(timer_device timer, object ptr, int param) // void *ptr, INT32 param) { int scanline = param; if (scanline == 240) // vblank-out irq { m_maincpu.target.set_input_line_and_vector(0, HOLD_LINE, 0xd7); /* RST 10h - vblank */ } if (scanline == 0) // unknown irq event, presumably vblank-in or a periodic one (writes to the soundlatch and drives freeze dip-switch) { m_maincpu.target.set_input_line_and_vector(0, HOLD_LINE, 0xcf); /* RST 08h */ } }
/************************************* * * Interrupts * *************************************/ //TIMER_DEVICE_CALLBACK_MEMBER(centiped_state::generate_interrupt) public void generate_interrupt(timer_device timer, object ptr, int param) // void *ptr, INT32 param) { int scanline = param; /* IRQ is clocked on the rising edge of 16V, equal to the previous 32V */ if ((scanline & 16) != 0) { m_maincpu.target.set_input_line(0, ((scanline - 1) & 32) != 0 ? ASSERT_LINE : CLEAR_LINE); } /* do a partial update now to handle sprite multiplexing (Maze Invaders) */ m_screen.target.update_partial(scanline); }
/************************************* * * Older Williams interrupts * *************************************/ //TIMER_DEVICE_CALLBACK_MEMBER(williams_state::va11_callback) protected virtual void va11_callback(timer_device timer, object ptr, int param) { throw new emu_unimplemented(); #if false int scanline = param; // must not fire at line 256 if (scanline == 256) { return; } /* the IRQ signal comes into CB1, and is set to VA11 */ m_pia[1]->cb1_w(BIT(scanline, 5)); #endif }
//TIMER_DEVICE_CALLBACK_MEMBER(williams_state::count240_callback) protected virtual void count240_callback(timer_device timer, object ptr, int param) { throw new emu_unimplemented(); #if false #endif }