prepare to fix AY8930 emulation

This commit is contained in:
tildearrow 2022-01-31 16:33:45 -05:00
parent 82e24c0db0
commit 9492edcdab
2 changed files with 2 additions and 2 deletions

View File

@ -1269,7 +1269,7 @@ void ay8910_device::ay8910_reset_ym()
m_register_latch = 0;
m_rng = 1;
m_mode = 0; // ay-3-8910 compatible mode
m_noise_and = 0;
m_noise_and = 0xff;
m_noise_or = 0;
m_noise_value = 0;
m_noise_latch = 0;

View File

@ -267,7 +267,7 @@ private:
inline bool noise_enable(int chan) { return BIT(m_regs[AY_ENABLE], 3 + chan); }
inline unsigned char noise_period() { return is_expanded_mode() ? m_regs[AY_NOISEPER] & 0xff : m_regs[AY_NOISEPER] & 0x1f; }
inline unsigned char noise_output() { return m_rng & 1; }
inline unsigned char noise_output() { return is_expanded_mode() ? m_noise_latch & 1 : m_rng & 1; }
inline bool is_expanded_mode() { return ((m_feature & PSG_HAS_EXPANDED_MODE) && ((m_mode & 0xe) == 0xa)); }
inline unsigned char get_register_bank() { return is_expanded_mode() ? (m_mode & 0x1) << 4 : 0; }