Skip to content

Commit

Permalink
Packagus bumpus maxmimus con formattus trailing commae
Browse files Browse the repository at this point in the history
  • Loading branch information
mattgodbolt committed Oct 14, 2023
1 parent 833fc51 commit 28d6366
Show file tree
Hide file tree
Showing 22 changed files with 381 additions and 79 deletions.
4 changes: 2 additions & 2 deletions 6502.js
Original file line number Diff line number Diff line change
Expand Up @@ -1111,7 +1111,7 @@ export class Cpu6502 extends Base6502 {
this.cmos,
this.model.isMaster,
this.config.keyLayout,
this.config.getGamepads
this.config.getGamepads,
);
this.uservia = via.UserVia(this, this.model.isMaster, this.config.userPort);
if (this.config.printerPort) this.uservia.ca2changecallback = this.config.printerPort.outputStrobe;
Expand Down Expand Up @@ -1282,7 +1282,7 @@ export class Cpu6502 extends Base6502 {
(dis + " ").substr(0, 15),
utils.hexbyte(a),
utils.hexbyte(x),
utils.hexbyte(y)
utils.hexbyte(y),
);
};
for (let i = maxToShow - 2; i >= 0; --i) {
Expand Down
2 changes: 1 addition & 1 deletion basic-tokenise.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export async function create() {
}
if (safety === 0) {
throw new Error(
"Unable to tokenize '" + line + "' - got as far as '" + result + "' pc=" + utils.hexword(cpu.pc)
"Unable to tokenize '" + line + "' - got as far as '" + result + "' pc=" + utils.hexword(cpu.pc),
);
}
return result;
Expand Down
4 changes: 2 additions & 2 deletions canvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export class GlCanvas {
0,
checkedGl.RGBA,
checkedGl.UNSIGNED_BYTE,
this.fb8
this.fb8,
);
checkedGl.bindTexture(checkedGl.TEXTURE_2D, null);

Expand Down Expand Up @@ -140,7 +140,7 @@ export class GlCanvas {
maxy - miny,
gl.RGBA,
gl.UNSIGNED_BYTE,
this.fb8.subarray(miny * width * 4, maxy * width * 4)
this.fb8.subarray(miny * width * 4, maxy * width * 4),
);
const extent = { minx, miny, maxx, maxy };

Expand Down
4 changes: 2 additions & 2 deletions ddnoise.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export class DdNoise {
this.state = SPINNING;
});
},
() => {}
() => {},
);
}
spinDown() {
Expand Down Expand Up @@ -113,7 +113,7 @@ async function loadSounds(context, sounds) {
resolve(decodedData);
});
});
})
}),
);
const keys = _.keys(sounds);
const result = {};
Expand Down
6 changes: 3 additions & 3 deletions econet.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export class Econet {
this.SERVER_STATION_ID,
0,
this.serverTx.controlFlag,
this.serverTx.port
this.serverTx.port,
);
this.advanceState(this.FWH_RX_Scout_Received); // 1 - RX Received scout - waiting for ack sent
}
Expand All @@ -169,7 +169,7 @@ export class Econet {
this.SERVER_STATION_ID,
0,
this.serverTx.controlFlag,
this.serverTx.port
this.serverTx.port,
);
this.advanceState(this.FWH_RX_Scout_Received); // reset timer
break;
Expand Down Expand Up @@ -424,7 +424,7 @@ export class Econet {
if (this.beebTx.bytesInBuffer >= 6 && this.wireState === this.FWH_TX_Scout_Sent) {
// if at state 4, copy to server RX block, drop ack into BeebRX and move to state 0
let serverReceiveBlock = this.receiveBlocks.find(
(element) => element.receivePort === this.txPort
(element) => element.receivePort === this.txPort,
);
if (serverReceiveBlock) {
this.copyBuffer(serverReceiveBlock.data, this.beebTx);
Expand Down
2 changes: 1 addition & 1 deletion fdc.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export class BaseDisc {
return;
}
this.data[this.seekOffset + this.sectorOffset + this.byteWithinSector] = this.fdc.readDiscData(
this.byteWithinSector === 255
this.byteWithinSector === 255,
);
if (++this.byteWithinSector === 256) {
this.fdc.discFinishRead();
Expand Down
2 changes: 1 addition & 1 deletion filestore.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export class Filestore {
(this.ram[p + 10] << 8) |
(this.ram[p + 11] << 16) |
(this.ram[p + 12] << 24)) >>>
0
0,
);

this.econet.receiveBlocks.push(rxBuffer);
Expand Down
4 changes: 2 additions & 2 deletions google-drive.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export function GoogleDriveLoader() {
console.log("Google Drive: Need to auth");
resolve(false);
}
}
},
);
});
};
Expand Down Expand Up @@ -75,7 +75,7 @@ export function GoogleDriveLoader() {
gapi.client.drive.files.list({
q: "mimeType = '" + MIME_TYPE + "'",
}),
[]
[],
);
});
}
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
Expand Down
6 changes: 3 additions & 3 deletions lib/jsunzip.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export function JSUnzip() {
var fileName = this.stringOf(fileOffset + 46, fileOffset + 46 + fileNameLength);
var fileComment = this.stringOf(
fileOffset + 46 + fileNameLength + extraFieldLength,
fileOffset + 46 + fileNameLength + extraFieldLength + fileCommentLength
fileOffset + 46 + fileNameLength + extraFieldLength + fileCommentLength,
);

if (this.getInt(relativeOffsetOfLocalHeader + 0, 4) != 0x04034b50)
Expand Down Expand Up @@ -156,7 +156,7 @@ export function JSUnzip() {
status: true,
data: this.data.subarray(
fileInfo.localFileContent,
fileInfo.localFileContent + fileInfo.uncompressedSize
fileInfo.localFileContent + fileInfo.uncompressedSize,
),
};
}
Expand Down Expand Up @@ -497,7 +497,7 @@ export function TINF() {
d,
this.dist_bits[dist],
this.dist_base[dist],
ddestlength == 0x6604
ddestlength == 0x6604,
);

/* copy match */
Expand Down
36 changes: 18 additions & 18 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ const config = new Config(function (changed) {
function () {
updateUrl();
window.location.reload();
}
},
);
}
if (changed.keyLayout) {
Expand Down Expand Up @@ -579,7 +579,7 @@ const cmos = new Cmos(
},
},
model.cmosOverride,
econet
econet,
);

let printerWindow = null;
Expand All @@ -590,7 +590,7 @@ function checkPrinterWindow() {

printerWindow = window.open("", "_blank", "height=300,width=400");
printerWindow.document.write(
'<textarea id="text" rows="15" cols="40" placeholder="Printer outputs here..."></textarea>'
'<textarea id="text" rows="15" cols="40" placeholder="Printer outputs here..."></textarea>',
);
printerTextArea = printerWindow.document.getElementById("text");

Expand All @@ -606,7 +606,7 @@ processor = new Cpu6502(
model.hasMusic5000 ? audioHandler.music5000 : null,
cmos,
emulationConfig,
econet
econet,
);

function setDisc1Image(name) {
Expand Down Expand Up @@ -646,7 +646,7 @@ function discSthClick(item) {
},
function (err) {
loadingFinished(err);
}
},
);
}

Expand All @@ -661,7 +661,7 @@ function tapeSthClick(item) {
},
function (err) {
loadingFinished(err);
}
},
);
}

Expand Down Expand Up @@ -1032,7 +1032,7 @@ function gdAuth(imm) {
function (err) {
console.log("Error handling google auth: " + err);
$googleDrive.find(".loading").text("There was an error accessing your Google Drive account: " + err);
}
},
);
}

Expand Down Expand Up @@ -1160,7 +1160,7 @@ $("#google-drive form").on("submit", function (e) {
},
function (error) {
loadingFinished(error);
}
},
);
});

Expand Down Expand Up @@ -1254,13 +1254,13 @@ const startPromise = Promise.all([audioHandler.initialise(), processor.initialis
imageLoads.push(
loadDiscImage(discImage).then(function (disc) {
processor.fdc.loadDisc(0, disc);
})
}),
);
if (secondDiscImage)
imageLoads.push(
loadDiscImage(secondDiscImage).then(function (disc) {
processor.fdc.loadDisc(1, disc);
})
}),
);
if (parsedQuery.tape) imageLoads.push(loadTapeImage(parsedQuery.tape));

Expand Down Expand Up @@ -1293,7 +1293,7 @@ const startPromise = Promise.all([audioHandler.initialise(), processor.initialis
autoRunBasic();
}
});
})
}),
);
}

Expand All @@ -1306,7 +1306,7 @@ const startPromise = Promise.all([audioHandler.initialise(), processor.initialis
resolve(String.fromCharCode.apply(null, data));
});
}),
needsRun
needsRun,
);
}

Expand All @@ -1315,7 +1315,7 @@ const startPromise = Promise.all([audioHandler.initialise(), processor.initialis
new Promise(function (resolve) {
resolve(parsedQuery.embedBasic);
}),
true
true,
);
}

Expand Down Expand Up @@ -1352,7 +1352,7 @@ startPromise.then(
function (error) {
showError("initialising", error);
console.log(error);
}
},
);

const $ays = $("#are-you-sure");
Expand Down Expand Up @@ -1593,8 +1593,8 @@ window.hd = function (start, end) {
return processor.readmem(x);
},
start,
end
)
end,
),
);
};
window.m7dump = function () {
Expand All @@ -1605,8 +1605,8 @@ window.m7dump = function () {
},
0x7c00,
0x7fe8,
{ width: 40, gap: false }
)
{ width: 40, gap: false },
),
);
};

Expand Down
12 changes: 6 additions & 6 deletions models.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export const allModels = [
true,
false,
beebSwram,
I8271
I8271,
),
new Model(
"BBC B with DFS 0.9",
Expand All @@ -84,7 +84,7 @@ export const allModels = [
true,
false,
beebSwram,
I8271
I8271,
),
new Model(
"BBC B with 1770 (DFS)",
Expand All @@ -93,7 +93,7 @@ export const allModels = [
true,
false,
beebSwram,
WD1770
WD1770,
),
// putting ADFS in a higher ROM slot gives it priority
new Model(
Expand All @@ -103,7 +103,7 @@ export const allModels = [
true,
false,
beebSwram,
WD1770
WD1770,
),
new Model("BBC Master 128 (DFS)", ["Master"], ["master/mos3.20"], false, true, masterSwram, WD1770, null, pickDfs),
new Model(
Expand All @@ -115,7 +115,7 @@ export const allModels = [
masterSwram,
WD1770,
null,
pickAdfs
pickAdfs,
),
new Model(
"BBC Master 128 (ANFS)",
Expand All @@ -126,7 +126,7 @@ export const allModels = [
masterSwram,
WD1770,
null,
pickAnfs
pickAnfs,
),
new Model("Tube65C02", [], ["tube/6502Tube.rom"], false, false), // Although this can not be explicitly selected as a model, it is required by the configuration builder later
];
Expand Down
2 changes: 1 addition & 1 deletion music5000-worklet.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ registerProcessor(

return true;
}
}
},
);
Loading

0 comments on commit 28d6366

Please sign in to comment.