changeset 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 9364dad5561a
files ym2612.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ym2612.c	Thu Feb 18 21:28:33 2016 -0800
+++ b/ym2612.c	Sat Feb 20 01:11:18 2016 -0800
@@ -595,7 +595,10 @@
 	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];