1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-12-25 15:30:03 +00:00

williams: options=rotate%3D<deg>

This commit is contained in:
Steven Hugg 2022-02-21 21:23:10 -06:00
parent 0682af1eed
commit 8c63bef8c9
2 changed files with 10 additions and 10 deletions

View File

@ -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'},

View File

@ -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 {