/************************************* * * Rev. 1 input ports * *************************************/ INPUT_PORTS_START( gottlieb1_sound ) PORT_START("SB1") PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x01, "SB1:7" ) PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x02, "SB1:6" ) PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x04, "SB1:5" ) PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "SB1:1" ) PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "SB1:4" ) PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "SB1:3" ) PORT_DIPNAME( 0x40, 0x40, "Sound Test" ) PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_BIT( 0x80, 0x80, IPT_UNKNOWN ) /* To U3-6 on QBert */ INPUT_PORTS_END /************************************* * * Rev. 2 communication handlers * *************************************/ static void gottlieb2_sh_w(const address_space *space, UINT8 data) { /* when data is not 0xff, the transparent latch at A3 allows it to pass through unmolested */ if (data != 0xff) { /* each CPU has its own latch */ soundlatch_w(space, 0, data); soundlatch2_w(space, 0, data); /* if the previous data was 0xff, clock an IRQ on each */ if (last_command == 0xff) { cputag_set_input_line(space->machine, "audiocpu", M6502_IRQ_LINE, ASSERT_LINE); cputag_set_input_line(space->machine, "speech", M6502_IRQ_LINE, ASSERT_LINE); } } last_command = data; }
static WRITE16_HANDLER( sound_cmd_w ) { if(ACCESSING_LSB) { data &= 0xff; soundlatch_w(0, data); if(!Machine->sample_rate) if(data == 0xfc || data == 0xfe) soundlatch2_w(0, 0x7f); } }
static WRITE16_HANDLER( fromanc2_sndcmd_w ) { fromanc2_state *state = space->machine().driver_data<fromanc2_state>(); soundlatch_w(space, offset, (data >> 8) & 0xff); // 1P (LEFT) soundlatch2_w(space, offset, data & 0xff); // 2P (RIGHT) device_set_input_line(state->m_audiocpu, INPUT_LINE_NMI, PULSE_LINE); state->m_sndcpu_nmi_flag = 0; }
static WRITE8_HANDLER( sandscrp_soundlatch_w ) { latch2_full = 1; soundlatch2_w(space,0,data); }
static WRITE_HANDLER(cslatch2_w) { if (!s11clocals.ignore) soundlatch2_w(offset, data); else s11clocals.ignore--; }
static WRITE8_HANDLER( sandscrp_soundlatch_w ) { sandscrp_state *state = space->machine->driver_data<sandscrp_state>(); state->latch2_full = 1; soundlatch2_w(space,0,data); }