From 6e74c67343de1c250f789023b333454057b0346b Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Sat, 20 Feb 2016 01:11:18 -0800 Subject: Fix register to operator mapping for channel 3 special mode and actually get it right this time --- ym2612.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ym2612.c') diff --git a/ym2612.c b/ym2612.c index a0ec8e0..4ba38ae 100644 --- a/ym2612.c +++ b/ym2612.c @@ -595,7 +595,10 @@ uint32_t ym_calc_phase_inc(ym2612_context * context, ym_operator * operator, uin uint32_t inc, detune; if (chan_num == 2 && context->ch3_mode && (op < (2*4 + 3))) { //supplemental fnum registers are in a different order than normal slot paramters - int index = (op-2*4) ^ 2; + int index = op-2*4; + if (index < 2) { + index ^= 1; + } inc = context->ch3_supp[index].fnum; if (channel->pms) { inc = inc * 2 + lfo_pm_table[(inc & 0x7F0) * 16 + channel->pms + context->lfo_pm_step]; -- cgit v1.2.3