summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/audio/aztarac.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/audio/aztarac.c')
-rw-r--r--src/mame/audio/aztarac.c55
1 files changed, 55 insertions, 0 deletions
diff --git a/src/mame/audio/aztarac.c b/src/mame/audio/aztarac.c
new file mode 100644
index 00000000000..951d9b00986
--- /dev/null
+++ b/src/mame/audio/aztarac.c
@@ -0,0 +1,55 @@
+/***************************************************************************
+
+ Centuri Aztarac hardware
+
+***************************************************************************/
+
+#include "driver.h"
+#include "cpu/z80/z80.h"
+#include "aztarac.h"
+
+static int sound_status;
+
+READ16_HANDLER( aztarac_sound_r )
+{
+ return sound_status & 0x01;
+}
+
+WRITE16_HANDLER( aztarac_sound_w )
+{
+ if (ACCESSING_LSB)
+ {
+ data &= 0xff;
+ soundlatch_w(offset, data);
+ sound_status ^= 0x21;
+ if (sound_status & 0x20)
+ cpunum_set_input_line(1, 0, HOLD_LINE);
+ }
+}
+
+READ8_HANDLER( aztarac_snd_command_r )
+{
+ sound_status |= 0x01;
+ sound_status &= ~0x20;
+ return soundlatch_r(offset);
+}
+
+READ8_HANDLER( aztarac_snd_status_r )
+{
+ return sound_status & ~0x01;
+}
+
+WRITE8_HANDLER( aztarac_snd_status_w )
+{
+ sound_status &= ~0x10;
+}
+
+INTERRUPT_GEN( aztarac_snd_timed_irq )
+{
+ sound_status ^= 0x10;
+
+ if (sound_status & 0x10)
+ cpunum_set_input_line(1,0,HOLD_LINE);
+}
+
+