diff --git a/src/engine/platform/opl.cpp b/src/engine/platform/opl.cpp index 06bba5b5..2549deed 100644 --- a/src/engine/platform/opl.cpp +++ b/src/engine/platform/opl.cpp @@ -788,8 +788,20 @@ int DivPlatformOPL::dispatch(DivCommand c) { break; } case DIV_CMD_FM_EXTCH: { + if (!properDrumsSys) break; properDrums=c.value; immWrite(0xbd,(dam<<7)|(dvb<<6)|(properDrums<<5)|drumState); + slots=properDrums?slotsDrums:slotsNonDrums; + if (oplType==3) { + chanMap=properDrums?chanMapOPL3Drums:chanMapOPL3; + melodicChans=properDrums?15:18; + totalChans=properDrums?20:18; + } else { + chanMap=properDrums?chanMapOPL2Drums:chanMapOPL2; + melodicChans=properDrums?6:9; + totalChans=properDrums?11:9; + } + printf("CHANGING. DRUMS. MODE.\n"); break; } case DIV_ALWAYS_SET_VOLUME: @@ -812,7 +824,16 @@ int DivPlatformOPL::dispatch(DivCommand c) { } void DivPlatformOPL::forceIns() { - for (int i=0; i