void Opl_Apu::write_data( blip_time_t time, int data ) { run_until( time ); switch (type_) { case type_opll: case type_msxmusic: case type_smsfmunit: case type_vrc7: ym2413_write( opl, 0, addr ); ym2413_write( opl, 1, data ); break; case type_opl: ym3526_write( opl, 0, addr ); ym3526_write( opl, 1, data ); break; case type_msxaudio: /*if ( addr >= 7 && addr <= 7 + 11 ) { unsigned char temp [2] = { addr - 7, data }; fwrite( &temp, 1, 2, logfile ); }*/ y8950_write( opl, 0, addr ); y8950_write( opl, 1, data ); break; case type_opl2: ym3812_write( opl, 0, addr ); ym3812_write( opl, 1, data ); break; } }
static void sfx_soundexpander_sound_machine_store(sound_t *psid, WORD addr, BYTE val) { snd.command = val; if (sfx_soundexpander_chip == 3812) { ym3812_write(YM3812_chip, 1, val); } else { ym3526_write(YM3526_chip, 1, val); } }
static void sfx_soundexpander_sound_store(WORD addr, BYTE value) { if (addr == 0x40) { if (sfx_soundexpander_chip == 3812) { ym3812_write(YM3812_chip, 0, value); } else { ym3526_write(YM3526_chip, 0, value); } } if (addr == 0x50) { sound_store(sfx_soundexpander_sound_chip_offset, value, 0); } }
//WRITE8_DEVICE_HANDLER( ym3526_w ) void ym3526_w(void *_info, offs_t offset, UINT8 data) { //ym3526_state *info = get_safe_token(device); ym3526_state *info = (ym3526_state *)_info; ym3526_write(info->chip, offset & 1, data); }