Add VRC6 support

2 Pulse channels:
- 8 level pulse duty cycle, DAC mode(just ignores duty cycle)/pulse wave mode, 4 bit volume.
- Furnace support PCM playback in pulse channels with duty cycle ignore mode.

Sawtooth:
- nothing but 6 bit volume (8 bit accumulator in technically) and 12 bit frequency (periodic).

VRC6 instrument:
- 6 bit Volume macro for finer sawtooth volume handling, also 3 bit Duty cycle macro for pulse channels.

Duty, PCM mode command and Duty macro affects for pulse channel only.
This commit is contained in:
cam900 2022-03-28 01:06:56 +09:00
parent 09b5dd556e
commit ef104ce0b0
17 changed files with 1228 additions and 3 deletions

View file

@ -330,6 +330,18 @@ bool DivEngine::perSystemEffect(int ch, unsigned char effect, unsigned char effe
return false;
}
break;
case DIV_SYSTEM_VRC6:
switch (effect) {
case 0x12: // duty or noise mode
dispatchCmd(DivCommand(DIV_CMD_STD_NOISE_MODE,ch,effectVal));
break;
case 0x17: // PCM enable
dispatchCmd(DivCommand(DIV_CMD_SAMPLE_MODE,ch,(effectVal>0)));
break;
default:
return false;
}
break;
default:
return false;
}