mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2024-05-28 08:41:30 +00:00
fixed tests, removed listings from parseCA65Listing
This commit is contained in:
parent
0fc860f524
commit
b284fc694d
|
@ -225,7 +225,7 @@ export abstract class BasePlatform {
|
||||||
getDebugTree() : {} {
|
getDebugTree() : {} {
|
||||||
var o : any = { };
|
var o : any = { };
|
||||||
o.state = this.saveState();
|
o.state = this.saveState();
|
||||||
if (this.debugSymbols.debuginfo) o.debuginfo = this.debugSymbols.debuginfo;
|
if (this.debugSymbols?.debuginfo) o.debuginfo = this.debugSymbols.debuginfo;
|
||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
readFile(path: string) : FileData {
|
readFile(path: string) : FileData {
|
||||||
|
|
|
@ -15,7 +15,7 @@ var WilliamsPlatform = function(mainElement, proto, options) {
|
||||||
var self = this;
|
var self = this;
|
||||||
this.__proto__ = new (proto ? proto : Base6809Platform)();
|
this.__proto__ = new (proto ? proto : Base6809Platform)();
|
||||||
|
|
||||||
var isDefender = options.isDefender;
|
var isDefender = options?.isDefender;
|
||||||
var SCREEN_HEIGHT = 304;
|
var SCREEN_HEIGHT = 304;
|
||||||
var SCREEN_WIDTH = 256;
|
var SCREEN_WIDTH = 256;
|
||||||
|
|
||||||
|
@ -303,7 +303,7 @@ var WilliamsPlatform = function(mainElement, proto, options) {
|
||||||
workerchannel = new WorkerSoundChannel(worker);
|
workerchannel = new WorkerSoundChannel(worker);
|
||||||
audio.master.addChannel(workerchannel);
|
audio.master.addChannel(workerchannel);
|
||||||
|
|
||||||
let rotate = options.rotate == null ? -90 : parseFloat(options.rotate);
|
let rotate = options?.rotate == null ? -90 : parseFloat(options.rotate);
|
||||||
video = new RasterVideo(mainElement, SCREEN_WIDTH, SCREEN_HEIGHT, { rotate });
|
video = new RasterVideo(mainElement, SCREEN_WIDTH, SCREEN_HEIGHT, { rotate });
|
||||||
video.create();
|
video.create();
|
||||||
$(video.canvas).click(function(e) {
|
$(video.canvas).click(function(e) {
|
||||||
|
|
|
@ -230,11 +230,12 @@ export function linkLD65(step: BuildStep): BuildStepResult {
|
||||||
if (fn.endsWith('.lst')) {
|
if (fn.endsWith('.lst')) {
|
||||||
var lstout = FS.readFile(fn, { encoding: 'utf8' });
|
var lstout = FS.readFile(fn, { encoding: 'utf8' });
|
||||||
lstout = lstout.split('\n\n')[1] || lstout; // remove header
|
lstout = lstout.split('\n\n')[1] || lstout; // remove header
|
||||||
var asmlines = []; // TODO: parseCA65Listing(lstout, symbolmap, params, false);
|
var asmlines = parseCA65Listing(lstout, symbolmap, params, false);
|
||||||
var srclines = parseCA65Listing(lstout, symbolmap, params, true, listings);
|
var srclines = parseCA65Listing(lstout, symbolmap, params, true); // TODO: listings param for ecs
|
||||||
putWorkFile(fn, lstout);
|
putWorkFile(fn, lstout);
|
||||||
listings[fn] = {
|
listings[fn] = {
|
||||||
lines: [],
|
asmlines: srclines.length ? asmlines : null,
|
||||||
|
lines: srclines.length ? srclines : asmlines,
|
||||||
text: lstout
|
text: lstout
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -196,9 +196,9 @@ async function testPlatform(platid, romname, maxframes, callback) {
|
||||||
assert.equal(clks, proberec.countClocks());
|
assert.equal(clks, proberec.countClocks());
|
||||||
}
|
}
|
||||||
// debug tree
|
// debug tree
|
||||||
if (platform.getDebugTree) {
|
if (platform.getDebugTree != null) {
|
||||||
var dbgtree = platform.getDebugTree();
|
var dbgtree = platform.getDebugTree();
|
||||||
JSON.stringify(dbgtree);
|
if (dbgtree != null) JSON.stringify(dbgtree);
|
||||||
}
|
}
|
||||||
// misc
|
// misc
|
||||||
assert.ok(platform.getDefaultExtension().startsWith('.'));
|
assert.ok(platform.getDefaultExtension().startsWith('.'));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user