static READ8_HANDLER( galivan_sound_command_r ) { int data; data = soundlatch_r(offset); soundlatch_clear_w(0,0); return data; }
int galivan_sound_command_r(int offset) { int data; data = soundlatch_r(offset); soundlatch_clear_w(0,0); return data; }
ADDRESS_MAP_END static READ8_HANDLER( latch_r ) { int retval = soundlatch_r(space, 0); soundlatch_clear_w(space, 0, 0); return retval; }
ADDRESS_MAP_END static READ8_HANDLER( esd16_sound_command_r ) { /* Clear IRQ only after reading the command, or some get lost */ cpunum_set_input_line(1,0,CLEAR_LINE); return soundlatch_r(0); }
static READ8_HANDLER( sound_command_r ) { dcheese_state *state = space->machine().driver_data<dcheese_state>(); /* read the latch and clear the IRQ */ state->m_soundlatch_full = 0; device_set_input_line(state->m_audiocpu, 0, CLEAR_LINE); return soundlatch_r(space, 0); }
static READ_HANDLER( m92_soundlatch_r ) { if (offset == 0) { int res = soundlatch_r(offset); // logerror("soundlatch_r %02x\n",res); return res; } else return 0xff; }
int gottlieb_riot_r(int offset) { switch (offset&0x1f) { case 0: /* port A */ return soundlatch_r(offset) ^ 0xff; /* invert command */ case 2: /* port B */ return 0x40; /* say that PB6 is 1 (test SW1 not pressed) */ case 5: /* interrupt register */ return 0x40; /* say that edge detected on PA7 */ default: return riot_regs[offset&0x1f]; } }
static READ8_HANDLER( cop01_sound_command_r ) { cop01_state *state = (cop01_state *)space->machine->driver_data; int res = (soundlatch_r(space, offset) & 0x7f) << 1; /* bit 0 seems to be a timer */ if ((state->audiocpu->total_cycles() / TIMER_RATE) & 1) { if (state->pulse == 0) res |= 1; state->pulse = 1; } else state->pulse = 0; return res; }
static READ8_HANDLER( cop01_sound_command_r ) { int res; static int pulse; #define TIMER_RATE 12000 /* total guess */ res = (soundlatch_r(space,offset) & 0x7f) << 1; /* bit 0 seems to be a timer */ if ((cpu_get_total_cycles(space->cpu) / TIMER_RATE) & 1) { if (pulse == 0) res |= 1; pulse = 1; } else pulse = 0; return res; }
int cop01_sound_command_r(int offset) { int res; static int pulse; #define TIMER_RATE 12000 /* total guess */ res = (soundlatch_r(offset) & 0x7f) << 1; /* bit 0 seems to be a timer */ if ((cpu_gettotalcycles() / TIMER_RATE) & 1) { if (pulse == 0) res |= 1; pulse = 1; } else pulse = 0; return res; }
AM_RANGE(0xff0000, 0xffffff) AM_RAM /* Main RAM */ ADDRESS_MAP_END /* Sound MCU mapping */ static READ8_HANDLER( playmark_snd_command_r ) { UINT8 data = 0; if ((playmark_oki_control & 0x38) == 0x30) { data = soundlatch_r(space,0); } else if ((playmark_oki_control & 0x38) == 0x28) { data = (okim6295_r(devtag_get_device(space->machine, "oki"),0) & 0x0f); } return data; }
AM_RANGE(0xff0000, 0xffffff) AM_RAM /* Main RAM */ ADDRESS_MAP_END /* Sound MCU mapping */ static READ8_HANDLER( playmark_snd_command_r ) { UINT8 data = 0; if ((playmark_oki_control & 0x38) == 0x30) { data = soundlatch_r(0); } else if ((playmark_oki_control & 0x38) == 0x28) { data = (OKIM6295_status_0_r(0) & 0x0f); } return data; }
AM_RANGE(0xff0000, 0xffffff) AM_RAM /* Main RAM */ ADDRESS_MAP_END /* Sound MCU mapping */ static READ8_HANDLER( playmark_snd_command_r ) { sslam_state *state = space->machine().driver_data<sslam_state>(); UINT8 data = 0; if ((state->m_oki_control & 0x38) == 0x30) { data = soundlatch_r(space,0); } else if ((state->m_oki_control & 0x38) == 0x28) { data = (space->machine().device<okim6295_device>("oki")->read(*space,0) & 0x0f); } return data; }
static READ_HANDLER( sauro_sound_command_r ) { int ret = soundlatch_r(offset); soundlatch_clear_w(offset,0); return ret; }
static int niyanpai_sound_r(int offset) { return soundlatch_r(0); }
static READ8_HANDLER( niyanpai_sound_r ) { return soundlatch_r(space, 0); }
static READ16_HANDLER( m107_soundlatch_r ) { return soundlatch_r(space, offset) | 0xff00; }
static int sauro_sound_command_r(int offset) { int ret = soundlatch_r(offset); soundlatch_clear_w(offset,0); return ret; }
static READ8_HANDLER( sound_latch_r ) { ashnojoe_state *state = space->machine->driver_data<ashnojoe_state>(); state->soundlatch_status = 0; return soundlatch_r(space, 0); }
static READ8_HANDLER( speech_data_r ) { cputag_set_input_line(space->machine, "speech", M6502_IRQ_LINE, CLEAR_LINE); return soundlatch_r(space, offset); }
static READ8_HANDLER( sgladiat_soundlatch_r ) { snk_sound_busy_bit = 0; return(soundlatch_r(0)); }
static READ8_HANDLER(madalien_sound_command_r ) { cputag_set_input_line(space->machine(), "audiocpu", 0, CLEAR_LINE); return soundlatch_r(space, offset); }
static READ8_HANDLER( sandscrp_soundlatch_r ) { sandscrp_state *state = space->machine->driver_data<sandscrp_state>(); state->latch1_full = 0; return soundlatch_r(space,0); }
static READ8_HANDLER( sandscrp_soundlatch_r ) { latch1_full = 0; return soundlatch_r(space,0); }
static READ_HANDLER( mario_sh_tune_r ) { return soundlatch_r(offset); }
static READ8_HANDLER( calorie_soundlatch_r ) { UINT8 latch = soundlatch_r(space, 0); soundlatch_clear_w(space, 0, 0); return latch; }
static READ8_HANDLER( sound_command_r ) { sound_cpu_busy = 0; return(soundlatch_r(0)); }
static READ8_HANDLER(madalien_sound_command_r ) { cpunum_set_input_line(machine, 1, 0, CLEAR_LINE); return soundlatch_r(machine, offset); }