blob: 0c04489387b0ee6ded0a35aecae889892fc5e40e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
/***************************************************************************
Centuri Aztarac hardware
***************************************************************************/
#include "emu.h"
#include "cpu/z80/z80.h"
#include "includes/aztarac.h"
READ16_MEMBER(aztarac_state::aztarac_sound_r)
{
return m_sound_status & 0x01;
}
WRITE16_MEMBER(aztarac_state::aztarac_sound_w)
{
if (ACCESSING_BITS_0_7)
{
data &= 0xff;
soundlatch_byte_w(space, offset, data);
m_sound_status ^= 0x21;
if (m_sound_status & 0x20)
machine().device("audiocpu")->execute().set_input_line(0, HOLD_LINE);
}
}
READ8_MEMBER(aztarac_state::aztarac_snd_command_r)
{
m_sound_status |= 0x01;
m_sound_status &= ~0x20;
return soundlatch_byte_r(space,offset);
}
READ8_MEMBER(aztarac_state::aztarac_snd_status_r)
{
return m_sound_status & ~0x01;
}
WRITE8_MEMBER(aztarac_state::aztarac_snd_status_w)
{
m_sound_status &= ~0x10;
}
INTERRUPT_GEN( aztarac_snd_timed_irq )
{
aztarac_state *state = device->machine().driver_data<aztarac_state>();
state->m_sound_status ^= 0x10;
if (state->m_sound_status & 0x10)
device->execute().set_input_line(0,HOLD_LINE);
}
|