From 8c63bef8c9732072bef9b30cb2f94a1e1ab5e036 Mon Sep 17 00:00:00 2001 From: Steven Hugg Date: Mon, 21 Feb 2022 21:23:10 -0600 Subject: [PATCH] williams: options=rotate%3D --- src/platform/williams.ts | 18 ++++++++++-------- src/worker/tools/m6809.ts | 2 -- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/platform/williams.ts b/src/platform/williams.ts index 777e9cb1..54de92ab 100644 --- a/src/platform/williams.ts +++ b/src/platform/williams.ts @@ -11,10 +11,11 @@ var WILLIAMS_PRESETS = [ { id: 'bitmap_rle.c', name: 'RLE Bitmap' }, ]; -var WilliamsPlatform = function(mainElement, proto, isDefender) { +var WilliamsPlatform = function(mainElement, proto, options) { var self = this; this.__proto__ = new (proto ? proto : Base6809Platform)(); + var isDefender = options.isDefender; var SCREEN_HEIGHT = 304; var SCREEN_WIDTH = 256; @@ -302,7 +303,8 @@ var WilliamsPlatform = function(mainElement, proto, isDefender) { workerchannel = new WorkerSoundChannel(worker); audio.master.addChannel(workerchannel); - video = new RasterVideo(mainElement, SCREEN_WIDTH, SCREEN_HEIGHT, { rotate: -90 }); + let rotate = options.rotate == null ? -90 : parseFloat(options.rotate); + video = new RasterVideo(mainElement, SCREEN_WIDTH, SCREEN_HEIGHT, { rotate }); video.create(); $(video.canvas).click(function(e) { var x = Math.floor(e.offsetX * video.canvas.width / $(video.canvas).width()); @@ -432,12 +434,12 @@ var WilliamsPlatform = function(mainElement, proto, isDefender) { ] } }; } -var Williams6809Platform = function(mainElement) { - this.__proto__ = new WilliamsPlatform(mainElement, null, false); +var Williams6809Platform = function(mainElement, options) { + this.__proto__ = new WilliamsPlatform(mainElement, null, options); } -var WilliamsZ80Platform = function(mainElement) { - this.__proto__ = new WilliamsPlatform(mainElement, BaseZ80Platform, false); +var WilliamsZ80Platform = function(mainElement, options) { + this.__proto__ = new WilliamsPlatform(mainElement, BaseZ80Platform, options); // Z80 @ 4 MHz // also scale bitblt clocks @@ -456,8 +458,8 @@ var WilliamsZ80Platform = function(mainElement) { } } -var WilliamsDefenderPlatform = function(mainElement) { - this.__proto__ = new WilliamsPlatform(mainElement, null, true); +var WilliamsDefenderPlatform = function(mainElement, options) { + this.__proto__ = new WilliamsPlatform(mainElement, null, {isDefender:true}); this.getMemoryMap = function() { return { main:[ {name:'NVRAM',start:0x400,size:0x200,type:'ram'}, {name:'Video RAM',start:0x0000,size:0xc000,type:'ram'}, diff --git a/src/worker/tools/m6809.ts b/src/worker/tools/m6809.ts index 2ea6ddbc..ead8f41c 100644 --- a/src/worker/tools/m6809.ts +++ b/src/worker/tools/m6809.ts @@ -41,7 +41,6 @@ export function assembleXASM6809(step: BuildStep): BuildStepResult { return { errors: errors }; var aout = FS.readFile(binpath, { encoding: 'binary' }); if (aout.length == 0) { - console.log(alst); errors.push({ line: 0, msg: "Empty output file" }); return { errors: errors }; } @@ -118,7 +117,6 @@ export function compileCMOC(step: BuildStep): BuildStepResult { var asmout = FS.readFile(destpath, { encoding: 'utf8' }); if (step.params.set_stack_end) asmout = asmout.replace('stack space in bytes', `\n lds #${step.params.set_stack_end}\n`) - console.log(asmout); putWorkFile(destpath, asmout); } return {