02931 YM-2151: Distorted or otherwise incorrect sound [Phil Bennett]

This commit is contained in:
Phil Bennett 2009-02-19 15:51:59 +00:00
parent b5c9d66068
commit 9ca1fe60c8

View File

@ -87,8 +87,12 @@ static DEVICE_RESET( ym2151 )
READ8_DEVICE_HANDLER( ym2151_r )
{
ym2151_state *token = get_safe_token(device);
if (offset & 1)
{
stream_update(token->stream);
return ym2151_read_status(token->chip);
}
else
return 0xff; /* confirmed on a real YM2151 */
}
@ -96,8 +100,12 @@ READ8_DEVICE_HANDLER( ym2151_r )
WRITE8_DEVICE_HANDLER( ym2151_w )
{
ym2151_state *token = get_safe_token(device);
if (offset & 1)
{
stream_update(token->stream);
ym2151_write_reg(token->chip, token->lastreg, data);
}
else
token->lastreg = data;
}