1 // license:BSD-3-Clause 2 // copyright-holders:Mathis Rosenhauer 3 /*************************************************************************** 4 5 Centuri Aztarac hardware 6 7 ***************************************************************************/ 8 9 #include "emu.h" 10 #include "cpu/z80/z80.h" 11 #include "includes/aztarac.h" 12 13 sound_r()14uint16_t aztarac_state::sound_r() 15 { 16 return m_sound_status & 0x01; 17 } 18 sound_w(offs_t offset,uint16_t data,uint16_t mem_mask)19void aztarac_state::sound_w(offs_t offset, uint16_t data, uint16_t mem_mask) 20 { 21 if (ACCESSING_BITS_0_7) 22 { 23 data &= 0xff; 24 m_soundlatch->write(data); 25 m_sound_status ^= 0x21; 26 if (m_sound_status & 0x20) 27 m_audiocpu->set_input_line(0, HOLD_LINE); 28 } 29 } 30 snd_command_r()31uint8_t aztarac_state::snd_command_r() 32 { 33 m_sound_status |= 0x01; 34 m_sound_status &= ~0x20; 35 return m_soundlatch->read(); 36 } 37 snd_status_r()38uint8_t aztarac_state::snd_status_r() 39 { 40 return m_sound_status & ~0x01; 41 } 42 snd_status_w(uint8_t data)43void aztarac_state::snd_status_w(uint8_t data) 44 { 45 m_sound_status &= ~0x10; 46 } 47 INTERRUPT_GEN_MEMBER(aztarac_state::snd_timed_irq)48INTERRUPT_GEN_MEMBER(aztarac_state::snd_timed_irq) 49 { 50 m_sound_status ^= 0x10; 51 52 if (m_sound_status & 0x10) 53 device.execute().set_input_line(0,HOLD_LINE); 54 } 55