mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2024-11-22 14:33:51 +00:00
verilog: fixed keyboard strobe
This commit is contained in:
parent
06fb57e0d5
commit
6a21b467cf
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "8bitworkshop",
|
||||
"version": "3.8.0b1",
|
||||
"version": "3.8.0b2",
|
||||
"author": "Steven Hugg",
|
||||
"category": "Development",
|
||||
"description": "Desktop version of 8bitworkshop.com retro programming IDE",
|
||||
|
@ -415,6 +415,18 @@ var VerilogPlatform = function(mainElement, options) {
|
||||
}
|
||||
}
|
||||
|
||||
tick2(cycles: number) {
|
||||
// if a key is pressed, check for strobe after every cycle
|
||||
if (keycode >= 128) {
|
||||
while (cycles-- > 0) {
|
||||
top.tick2(1);
|
||||
resetKbdStrobe();
|
||||
}
|
||||
} else {
|
||||
top.tick2(cycles);
|
||||
}
|
||||
}
|
||||
|
||||
// use trace buffer to update video
|
||||
updateVideoFrameFast(tmod: HDLModuleTrace) {
|
||||
if (scanlineCycles <= 0) throw new Error(`scanlineCycles must be > 0`);
|
||||
@ -431,9 +443,8 @@ var VerilogPlatform = function(mainElement, options) {
|
||||
}
|
||||
// generate frames in trace buffer
|
||||
if (nextlineCycles > 0) {
|
||||
top.tick2(nextlineCycles);
|
||||
this.tick2(nextlineCycles);
|
||||
}
|
||||
resetKbdStrobe();
|
||||
// convert trace buffer to video/audio
|
||||
var n = 0;
|
||||
// draw scanline visible pixels
|
||||
|
Loading…
Reference in New Issue
Block a user