From e6e1e53b08cb140c556f6ffd78466052438d9b35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lumi=C3=A8re=20=C3=89lev=C3=A9?= <88174309+PoneyClairDeLune@users.noreply.github.com> Date: Fri, 11 Oct 2024 11:43:42 +0000 Subject: [PATCH] Prepare for GM2 provider... --- src/state/bankReader.js | 25 ++++++++++++++++++++++++- src/state/index.mjs | 4 ++-- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/src/state/bankReader.js b/src/state/bankReader.js index aa71589..dbfa5f9 100644 --- a/src/state/bankReader.js +++ b/src/state/bankReader.js @@ -122,8 +122,31 @@ let VoiceBank = class { }; break; }; - case "g2": case "sd": { + switch (msb) { + case 121: { + args[0] = 96; + break; + }; + case 120: { + args[0] = 104; + break; + }; + }; + if ((args[0] >> 1) == 40) { + args[2] |= 16; + } else if (args[0] > 95 && args[0] < 100) { + args[2] |= 16; + if (prg >> 4 == 7) { + args[0] = 96; + }; + }; + break; + }; + case "g2": { + // Should only be present under SD mode + // However before non-resetting mode switches are available + // This is the only way if ((msb >> 1) == 40) { args[2] |= 16; } else if (msb > 95 && msb < 100) { diff --git a/src/state/index.mjs b/src/state/index.mjs index 97e9026..d116568 100644 --- a/src/state/index.mjs +++ b/src/state/index.mjs @@ -1111,10 +1111,10 @@ let OctaviaDevice = class extends CustomEventSource { upThis.setChActive(part, 1); }; }; - if (upThis.getExt(part)[0] == upThis.EXT_DX) { + /* if (upThis.getExt(part)[0] == upThis.EXT_DX) { let chOff = ccOffTable[part]; //this.#cc.subarray(chOff + ccToPos[142], chOff + ccToPos[157] + 1).fill(64); - }; + }; */ upThis.#prg[part] = det.data; upThis.#bnCustom[part] = 0; upThis.pushChPrimitives(part);