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

@ -1924,7 +1924,7 @@ void FurnaceGUI::drawInsEdit() {
if ((ins->type==DIV_INS_PCE || ins->type==DIV_INS_AY8930)) {
volMax=31;
}
if (ins->type==DIV_INS_OPL || ins->type==DIV_INS_VERA) {
if (ins->type==DIV_INS_OPL || ins->type==DIV_INS_VERA || ins->type==DIV_INS_VRC6) {
volMax=63;
}
if (ins->type==DIV_INS_AMIGA) {
@ -1985,6 +1985,10 @@ void FurnaceGUI::drawInsEdit() {
dutyLabel="Duty";
dutyMax=63;
}
if (ins->type==DIV_INS_VRC6) {
dutyLabel="Duty";
dutyMax=7;
}
bool dutyIsRel=(ins->type==DIV_INS_C64 && !ins->c64.dutyIsAbs);
const char* waveLabel="Waveform";
@ -1993,7 +1997,7 @@ void FurnaceGUI::drawInsEdit() {
if (ins->type==DIV_INS_C64 || ins->type==DIV_INS_AY || ins->type==DIV_INS_AY8930 || ins->type==DIV_INS_SAA1099) {
bitMode=true;
}
if (ins->type==DIV_INS_STD) waveMax=0;
if (ins->type==DIV_INS_STD || ins->type==DIV_INS_VRC6) waveMax=0;
if (ins->type==DIV_INS_TIA || ins->type==DIV_INS_VIC || ins->type==DIV_INS_OPLL) waveMax=15;
if (ins->type==DIV_INS_C64) waveMax=4;
if (ins->type==DIV_INS_SAA1099) waveMax=2;