diff --git a/css/04B_03__.TTF b/css/04B_03__.TTF new file mode 100644 index 00000000..fe4328b6 Binary files /dev/null and b/css/04B_03__.TTF differ diff --git a/css/ui.css b/css/ui.css index 5b820fae..32f34aba 100644 --- a/css/ui.css +++ b/css/ui.css @@ -222,3 +222,7 @@ canvas.pixelated { #javatari-screen div { box-sizing: content-box; } +@font-face { + font-family: TinyFont; + src: url(04B_03__.TTF); +} diff --git a/src/emu.js b/src/emu.js index 0f3b13b9..5a4833f8 100644 --- a/src/emu.js +++ b/src/emu.js @@ -65,9 +65,9 @@ var RasterVideo = function(mainElement, width, height, options) { }; }; - this.getFrameData = function() { - return datau32; - } + this.getFrameData = function() { return datau32; } + + this.getContext = function() { return ctx; } this.updateFrame = function(sx, sy, dx, dy, width, height) { //imageData.data.set(buf8); // TODO: slow w/ partial updates diff --git a/src/platform/verilog.js b/src/platform/verilog.js index 677783b5..fd5ed6a0 100644 --- a/src/platform/verilog.js +++ b/src/platform/verilog.js @@ -77,6 +77,7 @@ var VerilogPlatform = function(mainElement, options) { var gen; var frameRate = 60; var AUDIO_FREQ = 15700; + var current_output; this.getPresets = function() { return VERILOG_PRESETS; } @@ -96,6 +97,65 @@ var VerilogPlatform = function(mainElement, options) { 0xffffffff, ]; + function updateVideoFrame() { + var i=0; + for (var y=0; y1 ? v.len*2+8 : 8; + var y2 = y1+ys; + var z = gen[v.name]; + var y = y2 - ys*((z-lo)/hi); + yposlist[i] = y2; + //idata[x + y1*videoWidth] = COLOR_BORDER; + //idata[x + y2*videoWidth] = COLOR_BORDER; + idata[x + Math.round(y)*videoWidth] = COLOR_SIGNAL; + y1 += ys+yb; + } + } + video.updateFrame(); + // draw labels + var ctx = video.getContext(); + ctx.font = "8px TinyFont"; + ctx.fillStyle = "white"; + for (var i=0; i