OPLL: part 1 of fixing drum volumes

This commit is contained in:
tildearrow 2022-03-24 04:53:09 -05:00
parent 7f39ec723a
commit ea49c760c5

View file

@ -651,6 +651,7 @@ int DivPlatformOPLL::dispatch(DivCommand c) {
void DivPlatformOPLL::forceIns() {
for (int i=0; i<9; i++) {
if (i>=6 && properDrums) continue;
// update custom preset
if (chan[i].state.opllPreset==0 && i==lastCustomMemory) {
DivInstrumentFM::Operator& mod=chan[i].state.op[0];
@ -675,7 +676,7 @@ void DivPlatformOPLL::forceIns() {
}
}
}
if (drums) {
if (drums) { // WHAT?! FIX THIS!
immWrite(0x16,0x20);
immWrite(0x26,0x05);
immWrite(0x16,0x20);
@ -687,6 +688,12 @@ void DivPlatformOPLL::forceIns() {
immWrite(0x18,0xC0);
immWrite(0x28,0x01);
}
// UNTESTED
if (properDrums) {
rWrite(0x36,drumVol[0]);
rWrite(0x37,drumVol[1]|(drumVol[4]<<4));
rWrite(0x38,drumVol[3]|(drumVol[2]<<4));
}
drumState=0;
}