diff options
author | cam900 <dbtlrchl@naver.com> | 2019-09-11 01:43:22 +0900 |
---|---|---|
committer | ajrhacker <ajrhacker@users.noreply.github.com> | 2019-09-10 12:43:22 -0400 |
commit | e4f1fad214b38adabe2981a975b87e2fc9f7448b (patch) | |
tree | a7f2fa1d05c86d104ec0ddb48e75ee237bd83d63 /src/devices/sound | |
parent | 1fc8f1827544e2e698cea4abdad17303490f7a8e (diff) |
ay8910.h : Fix duty masking (#5616)
Diffstat (limited to 'src/devices/sound')
-rw-r--r-- | src/devices/sound/ay8910.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/devices/sound/ay8910.h b/src/devices/sound/ay8910.h index 8e6135a1404..146c1926522 100644 --- a/src/devices/sound/ay8910.h +++ b/src/devices/sound/ay8910.h @@ -263,7 +263,7 @@ private: inline bool tone_enable(int chan) { return BIT(m_regs[AY_ENABLE], chan); } inline u8 tone_volume(tone_t *tone) { return tone->volume & (is_expanded_mode() ? 0x1f : 0x0f); } inline u8 tone_envelope(tone_t *tone) { return (tone->volume >> (is_expanded_mode() ? 5 : 4)) & ((m_feature & PSG_EXTENDED_ENVELOPE) ? 3 : 1); } - inline u8 tone_duty(tone_t *tone) { return is_expanded_mode() ? (tone->duty & 0x8 ? 0x8 : tone->duty) : 0x4; } + inline u8 tone_duty(tone_t *tone) { return is_expanded_mode() ? (tone->duty & 0x8 ? 0x8 : (tone->duty & 0xf)) : 0x4; } inline u8 get_envelope_chan(int chan) { return is_expanded_mode() ? chan : 0; } inline bool noise_enable(int chan) { return BIT(m_regs[AY_ENABLE], 3 + chan); } |