mirror of
https://github.com/holub/mame
synced 2025-04-23 08:49:55 +03:00
(nw) invaders revenge: cleaned up nmi code
This commit is contained in:
parent
8e5450ed88
commit
144b37ec75
@ -1023,14 +1023,8 @@ WRITE8_MEMBER(_8080bw_state::invrvnge_port05_w)
|
||||
// The timer frequency controls the speed of the sounds
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(_8080bw_state::nmi_timer)
|
||||
{
|
||||
// This is to prevent an instant NMI and crash before the CPU can set up its environment
|
||||
m_timer_state++;
|
||||
if (m_timer_state < 0x1000)
|
||||
return;
|
||||
|
||||
m_timer_state ^= 1;
|
||||
m_audiocpu->set_input_line(INPUT_LINE_NMI, BIT(m_timer_state, 0) ? ASSERT_LINE : CLEAR_LINE );
|
||||
if (m_timer_state == 0xf000)
|
||||
m_timer_state = 0x8000;
|
||||
}
|
||||
|
||||
|
||||
|
@ -39,6 +39,7 @@ public:
|
||||
, m_palette(*this, "palette")
|
||||
, m_gunx(*this, "GUNX")
|
||||
, m_guny(*this, "GUNY")
|
||||
, m_timer_state(1)
|
||||
{ }
|
||||
|
||||
void indianbtbr(machine_config &config);
|
||||
@ -111,7 +112,7 @@ private:
|
||||
uint8_t m_schaser_background_select;
|
||||
uint16_t m_claybust_gun_pos;
|
||||
u8 m_sound_data;
|
||||
u16 m_timer_state;
|
||||
bool m_timer_state;
|
||||
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(nmi_timer);
|
||||
DECLARE_READ8_MEMBER(indianbt_r);
|
||||
|
Loading…
Reference in New Issue
Block a user