Merge branch 'master' of https://github.com/tildearrow/furnace into es5506_alt
* 'master' of https://github.com/tildearrow/furnace: (77 commits) GUI: use pattern font for input latch GUI: partially implement note input latch UI GUI: transpose value does not transpose effect ID GUI: prepare for note input latch UI GUI: min ins selector width fix GUI: separate operation masks GUI: add missing FDS preset GUI: prepare for separate operation mask GUI: "none" instrument should not remove inscolumn GUI: fix ins 0 being inserted on blank song GUI: add a "none" option to instrument list update to-do list GUI: add "absorb" instrument input mode use good default instrument when adding ins better default instrument for OPL/OPLL GUI: fix selection being visible in dummy row area Further fix looped sample preview GUI: fix about screen in power saving mode VRC6: saw volume 63 GUI: add an effect list window ... # Conflicts: # src/engine/platform/amiga.cpp # src/engine/vgmOps.cpp # src/gui/dataList.cpp # src/gui/guiConst.cpp # src/gui/insEdit.cpp # src/gui/sampleEdit.cpp
This commit is contained in:
commit
49a41ff862
116 changed files with 2535 additions and 993 deletions
|
|
@ -752,11 +752,11 @@ SafeWriter* DivEngine::saveVGM(bool* sysToExport, bool loop, int version) {
|
|||
bool writeDACSamples=false;
|
||||
bool writeNESSamples=false;
|
||||
bool writePCESamples=false;
|
||||
bool writeADPCM=false;
|
||||
bool writeSegaPCM=false;
|
||||
bool writeX1010=false;
|
||||
bool writeQSound=false;
|
||||
bool writeES5506=false;
|
||||
unsigned char writeADPCM=0;
|
||||
unsigned char writeSegaPCM=0;
|
||||
unsigned char writeX1010=0;
|
||||
unsigned char writeQSound=0;
|
||||
unsigned char writeES5506=0;
|
||||
|
||||
for (int i=0; i<song.systemLen; i++) {
|
||||
willExport[i]=false;
|
||||
|
|
@ -832,10 +832,11 @@ SafeWriter* DivEngine::saveVGM(bool* sysToExport, bool loop, int version) {
|
|||
if (!hasSegaPCM) {
|
||||
hasSegaPCM=4000000;
|
||||
willExport[i]=true;
|
||||
writeSegaPCM=true;
|
||||
writeSegaPCM=1;
|
||||
} else if (!(hasSegaPCM&0x40000000)) {
|
||||
isSecond[i]=true;
|
||||
willExport[i]=true;
|
||||
writeSegaPCM=2;
|
||||
hasSegaPCM|=0x40000000;
|
||||
howManyChips++;
|
||||
}
|
||||
|
|
@ -844,10 +845,11 @@ SafeWriter* DivEngine::saveVGM(bool* sysToExport, bool loop, int version) {
|
|||
if (!hasX1) {
|
||||
hasX1=disCont[i].dispatch->chipClock;
|
||||
willExport[i]=true;
|
||||
writeX1010=true;
|
||||
writeX1010=1;
|
||||
} else if (!(hasX1&0x40000000)) {
|
||||
isSecond[i]=true;
|
||||
willExport[i]=true;
|
||||
writeX1010=2;
|
||||
hasX1|=0x40000000;
|
||||
howManyChips++;
|
||||
}
|
||||
|
|
@ -861,10 +863,11 @@ SafeWriter* DivEngine::saveVGM(bool* sysToExport, bool loop, int version) {
|
|||
if (!hasOPNB) {
|
||||
hasOPNB=disCont[i].dispatch->chipClock;
|
||||
willExport[i]=true;
|
||||
writeADPCM=true;
|
||||
writeADPCM=1;
|
||||
} else if (!(hasOPNB&0x40000000)) {
|
||||
isSecond[i]=true;
|
||||
willExport[i]=true;
|
||||
writeADPCM=2;
|
||||
hasOPNB|=0x40000000;
|
||||
howManyChips++;
|
||||
}
|
||||
|
|
@ -966,10 +969,11 @@ SafeWriter* DivEngine::saveVGM(bool* sysToExport, bool loop, int version) {
|
|||
// not be able to handle the 64kb sample bank trick
|
||||
hasQSound=disCont[i].dispatch->chipClock;
|
||||
willExport[i]=true;
|
||||
writeQSound=true;
|
||||
writeQSound=1;
|
||||
} else if (!(hasQSound&0x40000000)) {
|
||||
isSecond[i]=true;
|
||||
willExport[i]=false;
|
||||
writeQSound=2;
|
||||
addWarning("dual QSound is not supported by the VGM format");
|
||||
}
|
||||
break;
|
||||
|
|
@ -993,11 +997,12 @@ SafeWriter* DivEngine::saveVGM(bool* sysToExport, bool loop, int version) {
|
|||
// VGM identifies ES5506 if highest bit sets, otherwise ES5505
|
||||
hasES5505=0x80000000|disCont[i].dispatch->chipClock;
|
||||
willExport[i]=true;
|
||||
writeES5506=true;
|
||||
writeES5506=1;
|
||||
} else if (!(hasES5505&0x40000000)) {
|
||||
isSecond[i]=true;
|
||||
willExport[i]=false;
|
||||
hasES5505|=0xc0000000;
|
||||
writeES5506=2;
|
||||
howManyChips++;
|
||||
}
|
||||
break;
|
||||
|
|
@ -1253,7 +1258,7 @@ SafeWriter* DivEngine::saveVGM(bool* sysToExport, bool loop, int version) {
|
|||
}
|
||||
}
|
||||
|
||||
if (writeSegaPCM) {
|
||||
if (writeSegaPCM>0) {
|
||||
unsigned char* pcmMem=new unsigned char[16777216];
|
||||
|
||||
size_t memPos=0;
|
||||
|
|
@ -1285,70 +1290,82 @@ SafeWriter* DivEngine::saveVGM(bool* sysToExport, bool loop, int version) {
|
|||
if (memPos>=16777216) break;
|
||||
}
|
||||
|
||||
w->writeC(0x67);
|
||||
w->writeC(0x66);
|
||||
w->writeC(0x80);
|
||||
w->writeI(memPos+8);
|
||||
w->writeI(memPos);
|
||||
w->writeI(0);
|
||||
w->write(pcmMem,memPos);
|
||||
for (unsigned char i=0; i<writeSegaPCM; i++) {
|
||||
w->writeC(0x67);
|
||||
w->writeC(0x66);
|
||||
w->writeC(0x80);
|
||||
w->writeI((memPos+8)|(i*0x80000000));
|
||||
w->writeI(memPos);
|
||||
w->writeI(0);
|
||||
w->write(pcmMem,memPos);
|
||||
}
|
||||
|
||||
delete[] pcmMem;
|
||||
}
|
||||
|
||||
if (writeADPCM && adpcmAMemLen>0) {
|
||||
w->writeC(0x67);
|
||||
w->writeC(0x66);
|
||||
w->writeC(0x82);
|
||||
w->writeI(adpcmAMemLen+8);
|
||||
w->writeI(adpcmAMemLen);
|
||||
w->writeI(0);
|
||||
w->write(adpcmAMem,adpcmAMemLen);
|
||||
if (adpcmAMemLen>0) {
|
||||
for (unsigned char i=0; i<writeADPCM; i++) {
|
||||
w->writeC(0x67);
|
||||
w->writeC(0x66);
|
||||
w->writeC(0x82);
|
||||
w->writeI((adpcmAMemLen+8)|(i*0x80000000));
|
||||
w->writeI(adpcmAMemLen);
|
||||
w->writeI(0);
|
||||
w->write(adpcmAMem,adpcmAMemLen);
|
||||
}
|
||||
}
|
||||
|
||||
if (writeADPCM && adpcmBMemLen>0) {
|
||||
w->writeC(0x67);
|
||||
w->writeC(0x66);
|
||||
w->writeC(0x83);
|
||||
w->writeI(adpcmBMemLen+8);
|
||||
w->writeI(adpcmBMemLen);
|
||||
w->writeI(0);
|
||||
w->write(adpcmBMem,adpcmBMemLen);
|
||||
if (adpcmBMemLen>0) {
|
||||
for (unsigned char i=0; i<writeADPCM; i++) {
|
||||
w->writeC(0x67);
|
||||
w->writeC(0x66);
|
||||
w->writeC(0x83);
|
||||
w->writeI((adpcmBMemLen+8)|(i*0x80000000));
|
||||
w->writeI(adpcmBMemLen);
|
||||
w->writeI(0);
|
||||
w->write(adpcmBMem,adpcmBMemLen);
|
||||
}
|
||||
}
|
||||
|
||||
if (writeQSound && qsoundMemLen>0) {
|
||||
if (qsoundMemLen>0) {
|
||||
// always write a whole bank
|
||||
unsigned int blockSize=(qsoundMemLen+0xffff)&(~0xffff);
|
||||
if (blockSize > 0x1000000) {
|
||||
blockSize = 0x1000000;
|
||||
}
|
||||
w->writeC(0x67);
|
||||
w->writeC(0x66);
|
||||
w->writeC(0x8F);
|
||||
w->writeI(blockSize+8);
|
||||
w->writeI(0x1000000);
|
||||
w->writeI(0);
|
||||
w->write(qsoundMem,blockSize);
|
||||
for (unsigned char i=0; i<writeQSound; i++) {
|
||||
w->writeC(0x67);
|
||||
w->writeC(0x66);
|
||||
w->writeC(0x8F);
|
||||
w->writeI((blockSize+8)|(i*0x80000000));
|
||||
w->writeI(0x1000000);
|
||||
w->writeI(0);
|
||||
w->write(qsoundMem,blockSize);
|
||||
}
|
||||
}
|
||||
|
||||
if (writeX1010 && x1_010MemLen>0) {
|
||||
w->writeC(0x67);
|
||||
w->writeC(0x66);
|
||||
w->writeC(0x91);
|
||||
w->writeI(x1_010MemLen+8);
|
||||
w->writeI(x1_010MemLen);
|
||||
w->writeI(0);
|
||||
w->write(x1_010Mem,x1_010MemLen);
|
||||
if (x1_010MemLen>0) {
|
||||
for (unsigned char i=0; i<writeX1010; i++) {
|
||||
w->writeC(0x67);
|
||||
w->writeC(0x66);
|
||||
w->writeC(0x91);
|
||||
w->writeI((x1_010MemLen+8)|(i*0x80000000));
|
||||
w->writeI(x1_010MemLen);
|
||||
w->writeI(0);
|
||||
w->write(x1_010Mem,x1_010MemLen);
|
||||
}
|
||||
}
|
||||
|
||||
if (writeES5506 && es5506MemLen>0) {
|
||||
w->writeC(0x67);
|
||||
w->writeC(0x66);
|
||||
w->writeC(0x8F);
|
||||
w->writeI(es5506MemLen+8);
|
||||
w->writeI(es5506MemLen);
|
||||
w->writeI(0);
|
||||
w->write(es5506Mem,es5506MemLen);
|
||||
if (es5506MemLen>0) {
|
||||
for (unsigned char i=0; i<writeES5506; i++) {
|
||||
w->writeC(0x67);
|
||||
w->writeC(0x66);
|
||||
w->writeC(0x8F);
|
||||
w->writeI((es5506MemLen+8)|(i*0x80000000));
|
||||
w->writeI(es5506MemLen);
|
||||
w->writeI(0);
|
||||
w->write(es5506Mem,es5506MemLen);
|
||||
}
|
||||
}
|
||||
|
||||
// initialize streams
|
||||
|
|
@ -1447,7 +1464,7 @@ SafeWriter* DivEngine::saveVGM(bool* sysToExport, bool loop, int version) {
|
|||
writeLoop=true;
|
||||
}
|
||||
}
|
||||
if (nextTick() || !playing) {
|
||||
if (nextTick(false,true) || !playing) {
|
||||
done=true;
|
||||
if (!loop) {
|
||||
for (int i=0; i<song.systemLen; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue