oh crap I did not commit

This commit is contained in:
tildearrow 2023-06-22 03:24:39 -05:00
parent b31024847f
commit ef57ad531d
2 changed files with 15 additions and 0 deletions

View File

@ -284,6 +284,8 @@ struct DivRegWrite {
* - xx is the instance ID
* - 0xffffxx03: set sample playback direction
* - x is the instance ID
* - 0xffffxx04: switch sample bank
* - for use in VGM export
* - 0xffffffff: reset
*/
unsigned int addr;

View File

@ -1094,6 +1094,7 @@ SafeWriter* DivEngine::saveVGM(bool* sysToExport, bool loop, int version, bool p
DivDispatch* writeRF5C68[2]={NULL,NULL};
DivDispatch* writeMSM6295[2]={NULL,NULL};
DivDispatch* writeGA20[2]={NULL,NULL};
DivDispatch* writeNES[2]={NULL,NULL};
for (int i=0; i<song.systemLen; i++) {
willExport[i]=false;
@ -1164,11 +1165,13 @@ SafeWriter* DivEngine::saveVGM(bool* sysToExport, bool loop, int version, bool p
CHIP_VOL(20,1.7);
willExport[i]=true;
writeNESSamples=true;
writeNES[0]=disCont[i].dispatch;
} else if (!(hasNES&0x40000000)) {
isSecond[i]=true;
CHIP_VOL_SECOND(20,1.7);
willExport[i]=true;
hasNES|=0x40000000;
writeNES[1]=disCont[i].dispatch;
howManyChips++;
}
break;
@ -1968,6 +1971,16 @@ SafeWriter* DivEngine::saveVGM(bool* sysToExport, bool loop, int version, bool p
w->writeI(0);
w->write(writeGA20[i]->getSampleMem(),writeGA20[i]->getSampleMemUsage());
}
// TODO
if (writeNES[i]!=NULL && writeNES[i]->getSampleMemUsage()>0) {
w->writeC(0x67);
w->writeC(0x66);
w->writeC(0x07);
w->writeI((writeNES[i]->getSampleMemUsage()+8)|(i*0x80000000));
w->writeI(writeNES[i]->getSampleMemCapacity());
w->writeI(0);
w->write(writeNES[i]->getSampleMem(),writeNES[i]->getSampleMemUsage());
}
}
// TODO