comparison ym2612.c @ 936:f1a8124ad881

Fix register to operator mapping for channel 3 special mode and actually get it right this time
author Michael Pavone <pavone@retrodev.com>
date Sat, 20 Feb 2016 01:11:18 -0800
parents 01fb50390b27
children 5257e85364ed
comparison
equal deleted inserted replaced
935:01fb50390b27 936:f1a8124ad881
593 //base frequency 593 //base frequency
594 ym_channel * channel = context->channels + chan_num; 594 ym_channel * channel = context->channels + chan_num;
595 uint32_t inc, detune; 595 uint32_t inc, detune;
596 if (chan_num == 2 && context->ch3_mode && (op < (2*4 + 3))) { 596 if (chan_num == 2 && context->ch3_mode && (op < (2*4 + 3))) {
597 //supplemental fnum registers are in a different order than normal slot paramters 597 //supplemental fnum registers are in a different order than normal slot paramters
598 int index = (op-2*4) ^ 2; 598 int index = op-2*4;
599 if (index < 2) {
600 index ^= 1;
601 }
599 inc = context->ch3_supp[index].fnum; 602 inc = context->ch3_supp[index].fnum;
600 if (channel->pms) { 603 if (channel->pms) {
601 inc = inc * 2 + lfo_pm_table[(inc & 0x7F0) * 16 + channel->pms + context->lfo_pm_step]; 604 inc = inc * 2 + lfo_pm_table[(inc & 0x7F0) * 16 + channel->pms + context->lfo_pm_step];
602 } 605 }
603 if (!context->ch3_supp[index].block) { 606 if (!context->ch3_supp[index].block) {