示例#1
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;
	}
}
示例#2
0
//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;
	}
}