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