mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2024-11-21 07:33:14 +00:00
minor scope tweaks, need phantomjs for wavedrom
This commit is contained in:
parent
24d681cbb8
commit
3ff3789bf8
@ -70,10 +70,10 @@ TODO:
|
||||
- fix WebAudio (https://news.ycombinator.com/item?id=18066474)
|
||||
- Safari: verilog scope doesn't work
|
||||
- share playable link w/ verilog?
|
||||
- no errors for verilog inline asm?
|
||||
- allow download of JSASM output
|
||||
- update bootstrap/jquery
|
||||
- clean BOM from verilog
|
||||
- $readmemb/h
|
||||
|
||||
|
||||
WEB WORKER FORMAT
|
||||
|
@ -14,6 +14,7 @@
|
||||
"jsdom": "^12.0.0",
|
||||
"lzg": "^1.0.0",
|
||||
"mocha": "^5.2.0",
|
||||
"phantomjs": "^2.1.7",
|
||||
"typescript": "^3.0.1",
|
||||
"wavedrom-cli": "^0.5.0"
|
||||
},
|
||||
|
@ -26,6 +26,7 @@ module starfield_top(clk, reset, hsync, vsync, rgb);
|
||||
.vpos(vpos)
|
||||
);
|
||||
|
||||
// enable LFSR only in 256x256 area
|
||||
wire star_enable = !hpos[8] & !vpos[8];
|
||||
|
||||
// LFSR with period = 2^16-1 = 256*256-1
|
||||
@ -35,7 +36,7 @@ module starfield_top(clk, reset, hsync, vsync, rgb);
|
||||
.enable(star_enable),
|
||||
.lfsr(lfsr));
|
||||
|
||||
wire star_on = &lfsr[15:9];
|
||||
wire star_on = &lfsr[15:9]; // all 7 bits must be set
|
||||
assign rgb = display_on && star_on ? lfsr[2:0] : 0;
|
||||
|
||||
endmodule
|
||||
|
@ -671,6 +671,7 @@ var VerilogPlatform = function(mainElement, options) {
|
||||
if (trace_buffer) trace_buffer.fill(0);
|
||||
if (video) video.setRotate(gen.rotate ? -90 : 0);
|
||||
$("#verilog_bar").hide();
|
||||
if (!this.hasvideo) this.resume(); // TODO?
|
||||
}
|
||||
tick() {
|
||||
gen.tick2();
|
||||
|
@ -197,10 +197,11 @@ export class WaveformView {
|
||||
var x = 0;
|
||||
var y = 0;
|
||||
var lastval = -1;
|
||||
var radix = this.hexformat ? 16 : 10;
|
||||
for (var i=0; i<data.length; i++) {
|
||||
var val = data[i];
|
||||
if (printvals && val != lastval) {
|
||||
ctx.fillText(val.toString(), x+this.zoom/4, ycen);
|
||||
if (printvals && val != lastval && x < w-100) { // close to right edge? omit
|
||||
ctx.fillText(val.toString(radix), x+this.zoom/4, ycen);
|
||||
}
|
||||
lastval = val;
|
||||
if (i>0)
|
||||
@ -229,7 +230,7 @@ export class WaveformView {
|
||||
var val = data[this.tsel - this.t0];
|
||||
ctx.textAlign = 'right';
|
||||
if (val !== undefined) {
|
||||
var s = this.hexformat ? val.toString(16) : val.toString();
|
||||
var s = val.toString(radix);
|
||||
ctx.fillText(s, w-fh, ycen);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user