Skip to content

Commit

Permalink
Skipped metre rendering for unused parts in QY.
Browse files Browse the repository at this point in the history
  • Loading branch information
PoneyClairDeLune committed Jul 12, 2024
1 parent f79457c commit 667e83d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
18 changes: 10 additions & 8 deletions src/disp/disp_qy.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -416,18 +416,20 @@ let QyDisplay = class extends RootDisplay {
};
};
for (let tch = 0; tch < 8; tch ++) { // target channel
let rch = curSeg * 8 + tch,
let rch = (curSeg << 3) + tch,
textTarget = 1;
upThis.qyRsrc.getBm("CTabOff")?.render((e, x, y) => {
upThis.#nmdb[preCal + 12 * tch + x + y * 128] = e;
});
let cVelo = Math.floor(sum.strength[rch] / 51);
upThis.#renderFill(31 + 12 * tch, preCalY + 11 - cVelo, 9, cVelo + 1);
if (this.#ch == rch) {
textTarget = 0;
upThis.#renderFill(31 + 12 * tch, preCalY, 9, 5);
if (mixerView) {
upThis.#renderFill(30 + 12 * tch, preCalY + 14, 13, 8);
if (sum.chInUse[rch]) {
let cVelo = Math.floor(sum.strength[rch] / 51);
upThis.#renderFill(31 + 12 * tch, preCalY + 11 - cVelo, 9, cVelo + 1);
if (this.#ch == rch) {
textTarget = 0;
upThis.#renderFill(31 + 12 * tch, preCalY, 9, 5);
if (mixerView) {
upThis.#renderFill(30 + 12 * tch, preCalY + 14, 13, 8);
};
};
};
if (rch < 19) {
Expand Down
3 changes: 2 additions & 1 deletion src/state/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3983,7 +3983,7 @@ let OctaviaDevice = class extends CustomEventSource {
let desiredByteTail = boundOff + workArr.length,
desiredLengthHead = boundOff * 6 - ((boundOff * 2428 >> 16) << 1),
desiredLengthTail = desiredByteTail * 6 - ((desiredByteTail * 2428 >> 16) << 1); // That's an integer division of 27, then a multiple of 2.
if (desiredLengthHead >= 640) {
if (desiredLengthHead > 640) {
console.warn(`SC-8850 partial screen dump out of bounds: invalid buffer range.\n`, msg);
return;
};
Expand All @@ -4005,6 +4005,7 @@ let OctaviaDevice = class extends CustomEventSource {
let byteOffset = bundleId * 108 + boundOff,
offset = byteOffset * 6 - ((byteOffset * 2428 >> 16) << 1); // Used for emitting events than for internal processing.
upThis.dispatchEvent("screen", {type: "sc8850", offset, data: screenBuffer});
getDebugState() && console.debug(`SC-8850 screen dump: bundle ${bundleId + 1}, range ${desiredLengthHead}~${desiredLengthTail}`);
});
// GS Part setup
// I wanted this to also be written in a circular structure
Expand Down

0 comments on commit 667e83d

Please sign in to comment.