Fix ZSM export to emit LFO AMD/PMD initialization on YM2151

This commit is contained in:
ZeroByteOrg 2022-11-10 12:40:17 -06:00
parent 69bb628a8b
commit e4054348f4

View file

@ -94,10 +94,12 @@ SafeWriter* DivEngine::saveZSM(unsigned int zsmrate, bool loop) {
if (VERA >= 0) disCont[VERA].dispatch->toggleRegisterDump(true); if (VERA >= 0) disCont[VERA].dispatch->toggleRegisterDump(true);
if (YM >= 0) { if (YM >= 0) {
disCont[YM].dispatch->toggleRegisterDump(true); disCont[YM].dispatch->toggleRegisterDump(true);
zsm.writeYM(0x18,0); // initialize the LFO freq to 0 // emit LFO initialization commands
// note - I think there's a bug where Furnace writes AMD/PMD=max zsm.writeYM(0x18,0); // freq = 0
// that shouldn't be there, requiring this initialization that shouldn't zsm.writeYM(0x19,0x7F); // AMD = 7F
// be there for ZSM. zsm.writeYM(0x19,0xFF); // PMD = 7F
// TODO: incorporate the Furnace meta-command for init data and filter
// out writes to otherwise-unused channels.
} }
while (!done) { while (!done) {