AM_RANGE(0xff0000, 0xffffff) AM_RAM ADDRESS_MAP_END WRITE16_MEMBER(yunsun16_state::magicbub_sound_command_w) { if (ACCESSING_BITS_0_7) { /* HACK: the game continuously sends this. It'll play the oki sample number 0 on each voice. That sample is 00000-00000. */ if ((data & 0xff) != 0x3a) { soundlatch_byte_w(space, 0, data & 0xff); m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); } } }
void lemmings_state::lemmings_sound_cb( address_space &space, UINT16 data, UINT16 mem_mask ) { soundlatch_byte_w(space, 0, data & 0xff); m_audiocpu->set_input_line(1, HOLD_LINE); }
void dblewing_state::dblewing_sound_cb( address_space &space, UINT16 data, UINT16 mem_mask ) { soundlatch_byte_w(space, 0, data & 0xff); m_sound_irq |= 0x02; m_audiocpu->set_input_line(0, (m_sound_irq != 0) ? ASSERT_LINE : CLEAR_LINE); }
void tigeroad_state::f1dream_protection_w(address_space &space) { int indx; int value = 255; int prevpc = space.device().safe_pcbase(); if (prevpc == 0x244c) { /* Called once, when a race is started.*/ indx = m_ram16[0x3ff0/2]; m_ram16[0x3fe6/2] = f1dream_2450_lookup[indx]; m_ram16[0x3fe8/2] = f1dream_2450_lookup[++indx]; m_ram16[0x3fea/2] = f1dream_2450_lookup[++indx]; m_ram16[0x3fec/2] = f1dream_2450_lookup[++indx]; } else if (prevpc == 0x613a) { /* Called for every sprite on-screen.*/ if (m_ram16[0x3ff6/2] < 15) { indx = f1dream_613ea_lookup[m_ram16[0x3ff6/2]] - m_ram16[0x3ff4/2]; if (indx > 255) { indx <<= 4; indx += m_ram16[0x3ff6/2] & 0x00ff; value = f1dream_613eb_lookup[indx]; } } m_ram16[0x3ff2/2] = value; } else if (prevpc == 0x17b70) { /* Called only before a real race, not a time trial.*/ if (m_ram16[0x3ff0/2] >= 0x04) indx = 128; else if (m_ram16[0x3ff0/2] > 0x02) indx = 96; else if (m_ram16[0x3ff0/2] == 0x02) indx = 64; else if (m_ram16[0x3ff0/2] == 0x01) indx = 32; else indx = 0; indx += m_ram16[0x3fee/2]; if (indx < 128) { m_ram16[0x3fe6/2] = f1dream_17b74_lookup[indx]; m_ram16[0x3fe8/2] = f1dream_17b74_lookup[++indx]; m_ram16[0x3fea/2] = f1dream_17b74_lookup[++indx]; m_ram16[0x3fec/2] = f1dream_17b74_lookup[++indx]; } else { m_ram16[0x3fe6/2] = 0x00ff; m_ram16[0x3fe8/2] = 0x00ff; m_ram16[0x3fea/2] = 0x00ff; m_ram16[0x3fec/2] = 0x00ff; } } else if ((prevpc == 0x27f8) || (prevpc == 0x511a) || (prevpc == 0x5142) || (prevpc == 0x516a)) { /* The main CPU stuffs the byte for the soundlatch into 0xfffffd.*/ soundlatch_byte_w(space,2,m_ram16[0x3ffc/2]); } }