void device_reset_qsound(UINT8 ChipID) { qsound_state *chip = &QSoundData[ChipID]; int adr; // init sound regs memset(chip->channel, 0, sizeof(chip->channel)); for (adr = 0x7f; adr >= 0; adr--) qsound_set_command(chip, adr, 0); for (adr = 0x80; adr < 0x90; adr++) qsound_set_command(chip, adr, 0x120); return; }
void device_reset_qsound(void *_info) { qsound_state *chip = (qsound_state *)_info; int adr; // init sound regs memset(chip->channel, 0, sizeof(chip->channel)); for (adr = 0x7f; adr >= 0; adr--) qsound_set_command(chip, adr, 0); for (adr = 0x80; adr < 0x90; adr++) qsound_set_command(chip, adr, 0x120); return; }
//WRITE8_DEVICE_HANDLER( qsound_w ) void qsound_w(void *_info, offs_t offset, UINT8 data) { //qsound_state *chip = get_safe_token(device); qsound_state *chip = (qsound_state *)_info; switch (offset) { case 0: chip->data=(chip->data&0xff)|(data<<8); break; case 1: chip->data=(chip->data&0xff00)|data; break; case 2: qsound_set_command(chip, data, chip->data); break; default: //logerror("%s: unexpected qsound write to offset %d == %02X\n", device->machine().describe_context(), offset, data); #ifdef _DEBUG logerror("QSound: unexpected qsound write to offset %d == %02X\n", offset, data); #endif break; } }