Eliminate unwanted pixel scaling

This commit is contained in:
Jeff Parsons 2016-05-02 19:58:36 -07:00
commit 5fbcc034e3
4 changed files with 85 additions and 78 deletions

View file

@ -273,6 +273,7 @@ CPUSim.prototype.setBinding = function(sHTMLType, sBinding, control, sValue)
case "SP":
case "PC":
case "PS":
case "IF":
case "SF":
case "ZF":
case "AF":
@ -1018,6 +1019,7 @@ CPUSim.prototype.updateStatus = function(fForce)
this.updateReg("PC", this.getPC(), 4);
var regPS = this.getPS();
this.updateReg("PS", regPS, 4);
this.updateReg("IF", (regPS & CPUDef.PS.IF)? 1 : 0, 1);
this.updateReg("SF", (regPS & CPUDef.PS.SF)? 1 : 0, 1);
this.updateReg("ZF", (regPS & CPUDef.PS.ZF)? 1 : 0, 1);
this.updateReg("AF", (regPS & CPUDef.PS.AF)? 1 : 0, 1);

View file

@ -107,6 +107,11 @@ function Video(parmsVideo, canvas, context, textarea, container)
this.textareaScreen = textarea;
this.inputScreen = textarea || canvas || null;
this.contextScreen['webkitImageSmoothingEnabled'] = false;
this.contextScreen['mozImageSmoothingEnabled'] = false;
this.contextScreen['msImageSmoothingEnabled'] = false;
this.contextScreen['imageSmoothingEnabled'] = false;
this.rotateScreen = parmsVideo['screenRotate'];
if (this.rotateScreen == 90) {
this.contextScreen.translate(0, this.cyScreen);
@ -129,7 +134,6 @@ function Video(parmsVideo, canvas, context, textarea, container)
this.canvasBuffer = document.createElement("canvas");
this.canvasBuffer.width = cxBuffer;
this.canvasBuffer.height = cyBuffer;
// this.canvasBuffer.style['image-rendering'] = "pixelated";
this.contextBuffer = this.canvasBuffer.getContext("2d");
}
@ -372,7 +376,6 @@ Video.init = function()
eCanvas.setAttribute("width", parmsVideo['screenWidth']);
eCanvas.setAttribute("height", parmsVideo['screenHeight']);
eCanvas.style.backgroundColor = parmsVideo['screenColor'];
// eCanvas.style['image-rendering'] = "pixelated";
/*
* The "contenteditable" attribute on a canvas element NOTICEABLY slows down canvas drawing on