Genesis: allow sample preview

This commit is contained in:
tildearrow 2022-01-20 16:40:18 -05:00
parent 0b7772e76c
commit 917c9cf2e3
1 changed files with 10 additions and 0 deletions

View File

@ -175,6 +175,16 @@ int DivPlatformGenesis::dispatch(DivCommand c) {
switch (c.cmd) {
case DIV_CMD_NOTE_ON: {
DivInstrument* ins=parent->getIns(chan[c.chan].ins);
if (c.chan==5) {
if (ins->type==DIV_INS_AMIGA) {
dacMode=1;
rWrite(0x2b,1<<7);
printf("enabling dac\n");
} else if (chan[c.chan].furnaceDac) {
dacMode=0;
rWrite(0x2b,0<<7);
}
}
if (c.chan==5 && dacMode) {
if (skipRegisterWrites) break;
if (ins->type==DIV_INS_AMIGA) { // Furnace mode