Virtual Boy: VGM export

This commit is contained in:
tildearrow 2022-10-09 00:00:00 -05:00
parent 504778d975
commit b53319354c
3 changed files with 21 additions and 5 deletions

View file

@ -683,6 +683,11 @@ void DivEngine::performVGMWrite(SafeWriter* w, DivSystem sys, DivRegWrite& write
w->writeC(write.val&0xff);
}
break;
case DIV_SYSTEM_VBOY:
w->writeC(0xc7);
w->writeS_BE(baseAddr2S|(write.addr>>2));
w->writeC(write.val&0xff);
break;
case DIV_SYSTEM_OPL:
case DIV_SYSTEM_OPL_DRUMS:
w->writeC(0x0b|baseAddr1);
@ -1217,6 +1222,17 @@ SafeWriter* DivEngine::saveVGM(bool* sysToExport, bool loop, int version, bool p
howManyChips++;
}
break;
case DIV_SYSTEM_VBOY:
if (!hasVSU) {
hasVSU=disCont[i].dispatch->chipClock;
willExport[i]=true;
} else if (!(hasVSU&0x40000000)) {
isSecond[i]=true;
willExport[i]=true;
hasVSU|=0x40000000;
howManyChips++;
}
break;
case DIV_SYSTEM_OPL:
case DIV_SYSTEM_OPL_DRUMS:
if (!hasOPL) {