diff options
author | Michael Pavone <pavone@retrodev.com> | 2016-02-20 01:11:18 -0800 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2016-02-20 01:11:18 -0800 |
commit | 6e74c67343de1c250f789023b333454057b0346b (patch) | |
tree | 8bc25024aeba72673624809f1f626a2c8a18da5a | |
parent | 86c4388af0d87481df3f8d79aed8c2f7c05a91ae (diff) |
Fix register to operator mapping for channel 3 special mode and actually get it right this time
-rw-r--r-- | ym2612.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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]; |