two-tone kludge

This commit is contained in:
msaarna@gmail.com 2022-03-27 19:19:37 -04:00
parent a934dad27e
commit a0009b0d00
2 changed files with 6 additions and 4 deletions

View file

@ -666,8 +666,10 @@ uint32_t pokey_device::step_one_clock(void)
else else
m_channel[CHAN1].reset_channel(); m_channel[CHAN1].reset_channel();
if (m_SKCTL & SK_TWOTONE) // ** In two-tone mode both channels should reset each other, but activating
m_channel[CHAN2].reset_channel(); // ** this one causes off-pitch notes with two-tone music...
// if (m_SKCTL & SK_TWOTONE)
// m_channel[CHAN2].reset_channel();
process_channel(CHAN1); process_channel(CHAN1);
@ -676,11 +678,13 @@ uint32_t pokey_device::step_one_clock(void)
m_irq_f(IRQ_TIMR1); m_irq_f(IRQ_TIMR1);
} }
if (m_channel[CHAN2].check_borrow()) if (m_channel[CHAN2].check_borrow())
{ {
int isJoined = (m_AUDCTL & CH12_JOINED); int isJoined = (m_AUDCTL & CH12_JOINED);
if (isJoined) if (isJoined)
m_channel[CHAN1].reset_channel(); m_channel[CHAN1].reset_channel();
if (m_SKCTL & SK_TWOTONE) if (m_SKCTL & SK_TWOTONE)
m_channel[CHAN1].reset_channel(); m_channel[CHAN1].reset_channel();
@ -693,7 +697,6 @@ uint32_t pokey_device::step_one_clock(void)
m_irq_f(IRQ_TIMR2); m_irq_f(IRQ_TIMR2);
} }
if (m_channel[CHAN3].check_borrow()) if (m_channel[CHAN3].check_borrow())
{ {
int isJoined = (m_AUDCTL & CH34_JOINED); int isJoined = (m_AUDCTL & CH34_JOINED);

View file

@ -269,7 +269,6 @@ private:
inline void sample(void) { m_filter_sample = m_output; } inline void sample(void) { m_filter_sample = m_output; }
inline void reset_channel(void) { m_counter = m_AUDF ^ 0xff; } inline void reset_channel(void) { m_counter = m_AUDF ^ 0xff; }
inline void reset_channel1(void) { m_counter = (m_AUDF ^ 0xff)-1; }
inline void inc_chan(int cycles) inline void inc_chan(int cycles)
{ {