dev236 - fix OPM E5xx range

when loading older files or DefleMask modules, E5xx effects will be
converted to the new range (previously it was 40-C0).
This commit is contained in:
tildearrow 2025-10-21 03:12:45 -05:00
parent 03794b58f2
commit 6569477706
4 changed files with 40 additions and 8 deletions

View file

@ -1380,12 +1380,6 @@ void DivEngine::processRow(int i, bool afterDelay) {
break;
case 0xe5: // pitch
chan[i].pitch=effectVal-0x80;
// why isn't this removed yet? we shouldn't give this chip special treatment!
if (sysOfChan[i]==DIV_SYSTEM_YM2151) { // YM2151 pitch oddity
chan[i].pitch*=2;
if (chan[i].pitch<-128) chan[i].pitch=-128;
if (chan[i].pitch>127) chan[i].pitch=127;
}
// send pitch now
dispatchCmd(DivCommand(DIV_CMD_PITCH,i,chan[i].pitch+(((chan[i].vibratoDepth*vibTable[chan[i].vibratoPos]*chan[i].vibratoFine)>>4)/15)));
dispatchCmd(DivCommand(DIV_CMD_HINT_PITCH,i,chan[i].pitch));