Skip to content

Commit

Permalink
GS 0x10 drops channels. #21 Thx @ValleyBell
Browse files Browse the repository at this point in the history
  • Loading branch information
PoneyClairDeLune committed Oct 20, 2023
1 parent 812b7fa commit b329e8e
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/state/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1052,10 +1052,13 @@ let OctaviaDevice = class extends CustomEventSource {
if (!tree[e]?.constructor) {
tree[e] = [];
};
tree[e].push(i);
if (e < allocated.ch) {
// Remove disabled channels
tree[e].push(i);
};
});
this.#receiveTree = tree;
//console.debug(tree);
console.debug(tree);
};
getActive() {
let result = this.#chActive;
Expand Down Expand Up @@ -3063,7 +3066,12 @@ let OctaviaDevice = class extends CustomEventSource {
}, () => {
upThis.#prg[part] = e; // program
}, () => {
let ch = upThis.chRedir(e, track, true);
let ch = 0;
if (e < 16) {
ch = upThis.chRedir(e, track, true);
} else {
ch = allocated.ch; // Effectively disabling event receives
};
upThis.#chReceive[part] = ch; // Rx CH
if (part != ch) {
upThis.buildRchTree();
Expand Down

0 comments on commit b329e8e

Please sign in to comment.