static BYTE sfx_soundexpander_sound_machine_read(sound_t *psid, WORD addr) { if (sfx_soundexpander_chip == 3812) { return ym3812_read(YM3812_chip, 1); } return ym3526_read(YM3526_chip, 1); }
int Opl_Apu::read( blip_time_t time, int port ) { run_until( time ); switch (type_) { case type_opll: case type_msxmusic: case type_smsfmunit: case type_vrc7: return ym2413_read( opl, port ); case type_opl: return ym3526_read( opl, port ); case type_msxaudio: { int ret = y8950_read( opl, port ); /*unsigned char temp [2] = { port + 0x80, ret }; fwrite( &temp, 1, 2, logfile );*/ return ret; } case type_opl2: return ym3812_read( opl, port ); } return 0; }
//READ8_DEVICE_HANDLER( ym3812_r ) UINT8 ym3812_r(void *_info, offs_t offset) { //ym3812_state *info = get_safe_token(device); ym3812_state *info = (ym3812_state *)_info; switch(info->EMU_CORE) { #ifdef ENABLE_ALL_CORES case EC_MAME: return ym3812_read(info->chip, offset & 1); #endif case EC_DBOPL: return adlib_OPL2_reg_read(info->chip, offset & 0x01); default: return 0x00; } }
//READ8_DEVICE_HANDLER( ym3812_r ) UINT8 ym3812_r(UINT8 ChipID, offs_t offset) { //ym3812_state *info = get_safe_token(device); ym3812_state *info = &YM3812Data[ChipID]; switch(EMU_CORE) { #ifdef ENABLE_ALL_CORES case EC_MAME: return ym3812_read(info->chip, offset & 1); #endif case EC_DBOPL: return adlib_OPL2_reg_read(info->chip, offset & 0x01); default: return 0x00; } }