static WRITE8_HANDLER( port_sound_w ) { running_device *discrete = space->machine->device("discrete"); running_device *sn = space->machine->device("snsnd"); /* D0 - interrupt enable - also goes to PC3259 as /HTCTRL */ cpu_interrupt_enable(space->machine->device("maincpu"), (data & 0x01) ? TRUE : FALSE); crbaloon_set_clear_collision_address((data & 0x01) ? TRUE : FALSE); /* D1 - SOUND STOP */ sound_global_enable(space->machine, (data & 0x02) ? TRUE : FALSE); /* D2 - unlabeled - music enable */ crbaloon_audio_set_music_enable(discrete, 0, (data & 0x04) ? TRUE : FALSE); /* D3 - EXPLOSION */ crbaloon_audio_set_explosion_enable(sn, (data & 0x08) ? TRUE : FALSE); /* D4 - BREATH */ crbaloon_audio_set_breath_enable(sn, (data & 0x10) ? TRUE : FALSE); /* D5 - APPEAR */ crbaloon_audio_set_appear_enable(sn, (data & 0x20) ? TRUE : FALSE); /* D6 - unlabeled - laugh enable */ crbaloon_audio_set_laugh_enable(discrete, 0, (data & 0x40) ? TRUE : FALSE); /* D7 - unlabeled - goes to PC3259 pin 16 */ pc3259_update(); }
static WRITE8_HANDLER( port_sound_w ) { crbaloon_state *state = space->machine().driver_data<crbaloon_state>(); device_t *discrete = space->machine().device("discrete"); device_t *sn = space->machine().device("snsnd"); /* D0 - interrupt enable - also goes to PC3259 as /HTCTRL */ state->m_irq_mask = data & 0x01; crbaloon_set_clear_collision_address(space->machine(), (data & 0x01) ? TRUE : FALSE); /* D1 - SOUND STOP */ space->machine().sound().system_enable((data & 0x02) ? TRUE : FALSE); /* D2 - unlabeled - music enable */ crbaloon_audio_set_music_enable(discrete, 0, (data & 0x04) ? TRUE : FALSE); /* D3 - EXPLOSION */ crbaloon_audio_set_explosion_enable(sn, (data & 0x08) ? TRUE : FALSE); /* D4 - BREATH */ crbaloon_audio_set_breath_enable(sn, (data & 0x10) ? TRUE : FALSE); /* D5 - APPEAR */ crbaloon_audio_set_appear_enable(sn, (data & 0x20) ? TRUE : FALSE); /* D6 - unlabeled - laugh enable */ crbaloon_audio_set_laugh_enable(discrete, 0, (data & 0x40) ? TRUE : FALSE); /* D7 - unlabeled - goes to PC3259 pin 16 */ pc3259_update(); }