mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2025-01-21 14:30:35 +00:00
new global kbd shortcuts; vcs show bank offset; effective PC (c.EPC) for bankswitching debugging
This commit is contained in:
parent
8ad8d0e88c
commit
ccd0731b14
@ -212,7 +212,7 @@ a.dropdown-toggle {
|
||||
}
|
||||
div.emulator {
|
||||
position:absolute;
|
||||
left:50%;
|
||||
right:0;
|
||||
top:0;
|
||||
width:50%;
|
||||
height:100%;
|
||||
@ -318,8 +318,9 @@ div.replaydiv {
|
||||
background-position: 50%;
|
||||
}
|
||||
.gutter.gutter-vertical {
|
||||
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAFAQMAAABo7865AAAABlBMVEVHcEzMzMzyAv2sAAAAAXRSTlMAQObYZgAAABBJREFUeF5jOAMEEAIEEFwAn3kMwcB6I2AAAAAASUVORK5CYII=')
|
||||
background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAFAQMAAABo7865AAAABlBMVEVHcEzMzMzyAv2sAAAAAXRSTlMAQObYZgAAABBJREFUeF5jOAMEEAIEEFwAn3kMwcB6I2AAAAAASUVORK5CYII=');
|
||||
}
|
||||
.gutter.gutter-horizontal {
|
||||
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg==')
|
||||
}
|
||||
background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg==');
|
||||
height:100%;
|
||||
}
|
||||
|
@ -40,7 +40,6 @@ TODO:
|
||||
- compile stuck when errors unchanged
|
||||
- sound mute?
|
||||
- $error updates source editor
|
||||
- Verilog compile spins forever?
|
||||
- go to error in include files
|
||||
- BOM in upload/download?
|
||||
- online tools for music etc
|
||||
@ -53,14 +52,10 @@ TODO:
|
||||
- better VCS single stepping, maybe also listings
|
||||
- New File (include file)
|
||||
- VCS skips step on lsr/lsr after run to line
|
||||
- update window list after building 2nd time?
|
||||
- stop debugging where mouse clicked
|
||||
- bring back the profiler!
|
||||
- vcs disasm is broken
|
||||
- links to external tools in ide
|
||||
- error msg when #link doesn't work
|
||||
- figure out folders for projects for real
|
||||
- verilog download rom
|
||||
- why loadState() on verilog kill perf?
|
||||
- click to break on raster position
|
||||
- restructure folders
|
||||
@ -68,6 +63,9 @@ TODO:
|
||||
- spinner disappears sometimes (and compiles even when not spinning...) (undo?)
|
||||
- z80 illegal opcode kills platform
|
||||
- quantify verilog "graph iterations"
|
||||
- debug bankswitching for funky formats
|
||||
- "invalid ROM" error should show up better
|
||||
- spaces in filename don't parse code listing (DASM, maybe more)
|
||||
|
||||
|
||||
WEB WORKER FORMAT
|
||||
|
@ -182,7 +182,7 @@ if (window.location.host.endsWith('8bitworkshop.com')) {
|
||||
<div id="javatari-screen" style="margin: 0 auto; box-shadow: 2px 2px 10px rgb(60, 60, 60);"></div>
|
||||
<div id="javatari-console-panel" style="margin: 0 auto; box-shadow: 2px 2px 10px rgb(60, 60, 60);"></div>
|
||||
</div>
|
||||
<div id="emuoverlay" class="emuoverlay">
|
||||
<div id="emuoverlay" class="emuoverlay" style="display:none">
|
||||
</div>
|
||||
</div>
|
||||
<div id="mem_info" class="mem_info" style="display:none">
|
||||
@ -291,6 +291,7 @@ if (window.location.host.endsWith('8bitworkshop.com')) {
|
||||
<script src="FileSaver.js/FileSaver.min.js"></script>
|
||||
<script src="localForage/dist/localforage.nopromises.js"></script>
|
||||
<script src="lib/mousetrap.min.js"></script>
|
||||
<script src="lib/mousetrap-global-bind.min.js"></script>
|
||||
<script src="lib/split.min.js"></script>
|
||||
|
||||
<script>
|
||||
@ -328,6 +329,7 @@ function require(modname) {
|
||||
<script src="local/lzg.js"></script>
|
||||
|
||||
<script>
|
||||
//Split(["#workspace", "#emulator"], {sizes: [50,50]});
|
||||
startUI(true);
|
||||
</script>
|
||||
|
||||
|
1
lib/mousetrap-global-bind.min.js
vendored
Normal file
1
lib/mousetrap-global-bind.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
(function(a){var c={},d=a.prototype.stopCallback;a.prototype.stopCallback=function(e,b,a,f){return this.paused?!0:c[a]||c[f]?!1:d.call(this,e,b,a)};a.prototype.bindGlobal=function(a,b,d){this.bind(a,b,d);if(a instanceof Array)for(b=0;b<a.length;b++)c[a[b]]=!0;else c[a]=!0};a.init()})(Mousetrap);
|
@ -1,4 +1,4 @@
|
||||
|
||||
|
||||
processor 6502
|
||||
include "vcs.h"
|
||||
include "macro.h"
|
||||
@ -35,18 +35,33 @@ Temp .byte
|
||||
jmp BankSwitch
|
||||
ENDM
|
||||
|
||||
; Bank prologue that handles reset
|
||||
; no matter which bank is selected at powerup
|
||||
; it switches to bank 0 and jumps to Reset_0
|
||||
MAC BANK_PROLOGUE
|
||||
lda #>(Reset_0-1)
|
||||
ldy #<(Reset_0-1)
|
||||
ldx #$ff
|
||||
txs ; set up stack pointer
|
||||
inx ; X = 0
|
||||
ENDM
|
||||
|
||||
; Bank epilogue -- 6502 vectors
|
||||
MAC BANK_VECTORS
|
||||
.word Start ; NMI
|
||||
.word Start ; RESET
|
||||
.word Start ; BRK
|
||||
ENDM
|
||||
|
||||
seg Code
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;; BANK 0
|
||||
|
||||
org $1000
|
||||
rorg $F000
|
||||
org $1000
|
||||
rorg $1000
|
||||
;----The following code is the same on both banks----
|
||||
Start
|
||||
; Ensure that bank 0 is selected
|
||||
lda #>(Reset_0-1)
|
||||
ldy #<(Reset_0-1)
|
||||
ldx #0
|
||||
BANK_PROLOGUE
|
||||
BankSwitch
|
||||
BANK_SWITCH_TRAMPOLINE
|
||||
;----End of bank-identical code----
|
||||
@ -63,23 +78,18 @@ Reset_0
|
||||
jmp BankSwitch
|
||||
|
||||
; Bank 0 epilogue
|
||||
org $1FFA
|
||||
org $1FFA
|
||||
rorg $FFFA
|
||||
.word Start ; NMI
|
||||
.word Start ; RESET
|
||||
.word Start ; BRK
|
||||
BANK_VECTORS
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;; BANK 1
|
||||
|
||||
org $2000
|
||||
rorg $F000
|
||||
org $2000
|
||||
rorg $1000
|
||||
;----The following code is the same on both banks----
|
||||
Start
|
||||
; Ensure that bank 0 is selected
|
||||
lda #>(Reset_0-1)
|
||||
ldy #<(Reset_0-1)
|
||||
ldx #0
|
||||
BANK_PROLOGUE
|
||||
BankSwitch
|
||||
BANK_SWITCH_TRAMPOLINE
|
||||
;----End of bank-identical code----
|
||||
@ -92,8 +102,6 @@ Main_1
|
||||
BANK_SWITCH 0,Reset_0
|
||||
|
||||
; Bank 1 epilogue
|
||||
org $2FFA
|
||||
org $2FFA
|
||||
rorg $FFFA
|
||||
.word Start ; NMI
|
||||
.word Start ; RESET
|
||||
.word Start ; BRK
|
||||
BANK_VECTORS
|
||||
|
77
presets/vcs/examples/tigervision[3E].a
Normal file
77
presets/vcs/examples/tigervision[3E].a
Normal file
@ -0,0 +1,77 @@
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; 64K Tigervision bank-switching example
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
TIA_BASE_ADDRESS = $40 ; use TIA mirrors @ $40-$7F
|
||||
|
||||
processor 6502
|
||||
include "vcs.h"
|
||||
include "macro.h"
|
||||
include "xmacro.h"
|
||||
|
||||
seg.u Variables
|
||||
org $80
|
||||
|
||||
Temp .byte
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Macro that performs bank switch
|
||||
|
||||
MAC BANK_SWITCH
|
||||
.Bank SET {1}
|
||||
ldx #.Bank
|
||||
stx $3F
|
||||
ENDM
|
||||
|
||||
seg Code
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;; BANK 0 ($1000-$17ff)
|
||||
|
||||
org $1000
|
||||
rorg $1000
|
||||
Main_1
|
||||
inc Temp
|
||||
lda Temp
|
||||
sta COLUBK ; make rainbows
|
||||
bit INPT4 ; test button
|
||||
bpl Main_1 ; button is pressed, repeat
|
||||
rts
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;; BANK 1 ($1000-$17ff)
|
||||
|
||||
org $1800
|
||||
rorg $1000
|
||||
Main_2
|
||||
lda Temp
|
||||
eor #2
|
||||
sta Temp
|
||||
sta WSYNC
|
||||
sta WSYNC
|
||||
sta COLUBK
|
||||
bit INPT4 ; test button
|
||||
bmi Main_2 ; button not pressed, repeat
|
||||
rts
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;; Last 2K bank ($1800-$1fff)
|
||||
|
||||
org $10800
|
||||
rorg $1800
|
||||
Start
|
||||
CLEAN_START
|
||||
BANK_SWITCH 0
|
||||
jsr Main_1
|
||||
BANK_SWITCH 1
|
||||
jsr Main_2
|
||||
jmp Start
|
||||
|
||||
; Epilogue (CPU vectors)
|
||||
org $10FFA
|
||||
rorg $10FFA
|
||||
.word Start ; NMI
|
||||
.word Start ; RESET
|
||||
.word Start ; BRK
|
@ -123,6 +123,7 @@ class VCSPlatform extends BasePlatform {
|
||||
setupDebug(callback) {
|
||||
Javatari.room.console.onBreakpointHit = (state) => {
|
||||
state.c.PC = (state.c.PC - 1) & 0xffff;
|
||||
this.fixState(state);
|
||||
Javatari.room.console.pause();
|
||||
Javatari.room.speaker.mute();
|
||||
this.lastDebugState = state;
|
||||
@ -150,7 +151,12 @@ class VCSPlatform extends BasePlatform {
|
||||
return new CodeAnalyzer_vcs(this);
|
||||
}
|
||||
saveState() {
|
||||
return Javatari.room.console.saveState();
|
||||
var state = Javatari.room.console.saveState();
|
||||
this.fixState(state);
|
||||
return state;
|
||||
}
|
||||
fixState(state) {
|
||||
state.c.EPC = state.c.PC + (state.ca.bo || 0); // effective PC for ROM
|
||||
}
|
||||
loadState(state) {
|
||||
return Javatari.room.console.loadState(state);
|
||||
@ -210,7 +216,7 @@ class VCSPlatform extends BasePlatform {
|
||||
}
|
||||
getDebugInfo(category, state) {
|
||||
switch (category) {
|
||||
case 'CPU': return this.cpuStateToLongString(state.c);
|
||||
case 'CPU': return (state.ca.bo ? ("BankOffset "+hex(state.ca.bo)+"\n"):"") + this.cpuStateToLongString(state.c);
|
||||
case 'Stack': return dumpStackToString(this, this.getRAMForState(state), 0x100, 0x1ff, 0x100+state.c.SP, 0x20);
|
||||
case 'PIA': return this.ramStateToLongString(state) + "\n" + this.piaStateToLongString(state.p);
|
||||
case 'TIA': return this.tiaStateToLongString(state.t);
|
||||
|
@ -323,7 +323,7 @@ var VerilogPlatform = function(mainElement, options) {
|
||||
this.setFrameRate(60);
|
||||
// setup scope
|
||||
trace_buffer = new Uint32Array(0x20000);
|
||||
var overlay = $("#emuoverlay");
|
||||
var overlay = $("#emuoverlay").show();
|
||||
var topdiv = $('<div class="emuspacer">').appendTo(overlay);
|
||||
this.wavediv = $('<div class="emuscope">').appendTo(overlay);
|
||||
this.split = Split( [topdiv[0], this.wavediv[0]], {
|
||||
@ -580,6 +580,9 @@ var VerilogPlatform = function(mainElement, options) {
|
||||
//trace_ports = current_output.ports;
|
||||
trace_signals = current_output.ports.concat(current_output.signals); // combine ports + signals
|
||||
trace_signals = trace_signals.filter((v) => { return !v.name.startsWith("__V"); }); // remove __Vclklast etc
|
||||
for (var v of trace_signals) {
|
||||
v.label = v.name.replace(/__DOT__/g, "."); // make nicer name
|
||||
}
|
||||
trace_index = 0;
|
||||
// power on module
|
||||
this.poweron();
|
||||
|
44
src/ui.ts
44
src/ui.ts
@ -15,7 +15,7 @@ import { getFilenameForPath, getFilenamePrefix, highlightDifferences, invertMap,
|
||||
import { StateRecorderImpl } from "./recorder";
|
||||
|
||||
// external libs (TODO)
|
||||
declare var ga, Tour, GIF, saveAs, JSZip;
|
||||
declare var ga, Tour, GIF, saveAs, JSZip, Mousetrap;
|
||||
// in index.html
|
||||
declare var exports;
|
||||
|
||||
@ -223,7 +223,8 @@ function getSkeletonFile(fileid:string, callback) {
|
||||
}
|
||||
|
||||
function _createNewFile(e) {
|
||||
var filename = prompt("Create New File", "newfile" + platform.getDefaultExtension());
|
||||
// TODO: support spaces
|
||||
var filename = prompt("Create New File (no spaces)", "newfile" + platform.getDefaultExtension());
|
||||
if (filename && filename.length) {
|
||||
if (filename.indexOf(".") < 0) {
|
||||
filename += platform.getDefaultExtension();
|
||||
@ -599,6 +600,13 @@ function resume() {
|
||||
userPaused = false;
|
||||
}
|
||||
|
||||
function togglePause() {
|
||||
if (platform.isRunning())
|
||||
pause();
|
||||
else
|
||||
resume();
|
||||
}
|
||||
|
||||
function singleStep() {
|
||||
setupBreakpoint("step");
|
||||
platform.step();
|
||||
@ -816,29 +824,41 @@ function _toggleRecording() {
|
||||
}
|
||||
|
||||
function setupDebugControls(){
|
||||
|
||||
$("#dbg_reset").click(resetAndDebug);
|
||||
$("#dbg_pause").click(pause);
|
||||
$("#dbg_go").click(resume);
|
||||
Mousetrap.bindGlobal('ctrl+alt+p', togglePause);
|
||||
Mousetrap.bindGlobal('ctrl+alt+r', resetAndDebug);
|
||||
|
||||
if (platform.step)
|
||||
if (platform.step) {
|
||||
$("#dbg_step").click(singleStep).show();
|
||||
else
|
||||
Mousetrap.bindGlobal('ctrl+alt+s', singleStep);
|
||||
} else
|
||||
$("#dbg_step").hide();
|
||||
if (platform.runToVsync)
|
||||
|
||||
if (platform.runToVsync) {
|
||||
$("#dbg_tovsync").click(singleFrameStep).show();
|
||||
else
|
||||
Mousetrap.bindGlobal('ctrl+alt+v', singleFrameStep);
|
||||
} else
|
||||
$("#dbg_tovsync").hide();
|
||||
if ((platform.runEval || platform.runToPC) && platform_id != 'verilog')
|
||||
|
||||
if ((platform.runEval || platform.runToPC) && platform_id != 'verilog') {
|
||||
$("#dbg_toline").click(runToCursor).show();
|
||||
else
|
||||
Mousetrap.bindGlobal('ctrl+alt+l', runToCursor);
|
||||
} else
|
||||
$("#dbg_toline").hide();
|
||||
if (platform.runUntilReturn)
|
||||
|
||||
if (platform.runUntilReturn) {
|
||||
$("#dbg_stepout").click(runUntilReturn).show();
|
||||
else
|
||||
Mousetrap.bindGlobal('ctrl+alt+o', runUntilReturn);
|
||||
} else
|
||||
$("#dbg_stepout").hide();
|
||||
if (platform.stepBack)
|
||||
|
||||
if (platform.stepBack) {
|
||||
$("#dbg_stepback").click(runStepBackwards).show();
|
||||
else
|
||||
Mousetrap.bindGlobal('ctrl+alt+b', runStepBackwards);
|
||||
} else
|
||||
$("#dbg_stepback").hide();
|
||||
|
||||
if (platform.newCodeAnalyzer) {
|
||||
|
@ -279,8 +279,8 @@ export class SourceEditor implements ProjectView {
|
||||
getActiveLine() {
|
||||
var state = lastDebugState;
|
||||
if (state && state.c && this.sourcefile) {
|
||||
var PC = state.c.PC;
|
||||
var line = this.sourcefile.findLineForOffset(PC, 15);
|
||||
var EPC = state.c.EPC || state.c.PC;
|
||||
var line = this.sourcefile.findLineForOffset(EPC, 15);
|
||||
return line;
|
||||
} else
|
||||
return -1;
|
||||
@ -529,7 +529,7 @@ export class ListingView extends DisassemblerView implements ProjectView {
|
||||
this.refreshListing();
|
||||
if (!this.assemblyfile) return; // TODO?
|
||||
var state = lastDebugState || platform.saveState();
|
||||
var pc = state.c ? state.c.PC : 0;
|
||||
var pc = state.c ? (state.c.PC || state.c.EPC) : 0;
|
||||
var asmtext = this.assemblyfile.text;
|
||||
var disasmview = this.getDisasmView();
|
||||
if (platform_id == 'base_z80') { // TODO
|
||||
|
@ -136,6 +136,7 @@ VirtualList.prototype._renderChunk = function(node, from) {
|
||||
|
||||
VirtualList.createContainer = function(w, h) {
|
||||
var c = document.createElement('div');
|
||||
c.classList.add('vlist');
|
||||
c.style.width = w;
|
||||
c.style.height = h;
|
||||
c.style.overflow = 'auto';
|
||||
|
@ -3,7 +3,7 @@ declare var VirtualList;
|
||||
declare var Mousetrap;
|
||||
|
||||
export interface WaveformMeta {
|
||||
name : string;
|
||||
label : string;
|
||||
len : number;
|
||||
}
|
||||
|
||||
@ -44,7 +44,7 @@ export class WaveformView {
|
||||
destroy() {
|
||||
// remove old thing
|
||||
if (this.wavelist) {
|
||||
$(this.parent).empty();
|
||||
$(this.wavelist.container).remove();
|
||||
}
|
||||
}
|
||||
|
||||
@ -61,7 +61,7 @@ export class WaveformView {
|
||||
itemHeight: rowHeight,
|
||||
totalRows: this.meta.length,
|
||||
generatorFn: (row : number) => {
|
||||
var s = this.meta[row].name;
|
||||
var s = this.meta[row].label;
|
||||
var linediv = document.createElement("div");
|
||||
var canvas = document.createElement("canvas");
|
||||
canvas.width = width - 4;
|
||||
@ -79,7 +79,7 @@ export class WaveformView {
|
||||
$(this.parent).append(wlc);
|
||||
var down = false;
|
||||
var selfn = (e) => {
|
||||
this.setSelTime(e.offsetX / this.zoom + this.t0);
|
||||
this.setSelTime(e.offsetX / this.zoom + this.t0 - 0.5);
|
||||
};
|
||||
$(wlc).mousedown( (e) => {
|
||||
down = true;
|
||||
@ -93,6 +93,9 @@ export class WaveformView {
|
||||
down = false;
|
||||
//if (e['pointerId']) e.target.releasePointerCapture(e['pointerId']);
|
||||
});
|
||||
Mousetrap(wlc).bind('=', (e,combo) => {
|
||||
this.setZoom(this.zoom * 2);
|
||||
});
|
||||
Mousetrap(wlc).bind('+', (e,combo) => {
|
||||
this.setZoom(this.zoom * 2);
|
||||
});
|
||||
@ -111,22 +114,13 @@ export class WaveformView {
|
||||
Mousetrap(wlc).bind('ctrl+right', (e,combo) => {
|
||||
this.setSelTime(this.tsel + this.clocksPerPage/4);
|
||||
});
|
||||
Mousetrap(wlc).bind('ctrl+shift+left', (e,combo) => {
|
||||
this.setSelTime(0);
|
||||
this.setOrgTime(0);
|
||||
});
|
||||
$(window).resize(() => {
|
||||
this.recreate();
|
||||
}); // TODO: remove?
|
||||
// assign buttons
|
||||
$("#scope_go_start").click(() => {
|
||||
this.setOrgTime(0);
|
||||
});
|
||||
$("#scope_go_end").click(() => {
|
||||
// TODO
|
||||
});
|
||||
$("#scope_go_fwd").click(() => {
|
||||
this.setOrgTime(this.t0 + this.clocksPerPage/4);
|
||||
});
|
||||
$("#scope_go_back").click(() => {
|
||||
this.setOrgTime(this.t0 - this.clocksPerPage/4);
|
||||
});
|
||||
}
|
||||
|
||||
roundT(t : number) {
|
||||
@ -147,9 +141,9 @@ export class WaveformView {
|
||||
|
||||
setSelTime(t : number) {
|
||||
t = this.roundT(t);
|
||||
if (t > this.t0 + this.clocksPerPage)
|
||||
if (t >= this.t0 + this.clocksPerPage - 1)
|
||||
this.t0 += this.clocksPerPage / 4;
|
||||
if (t < this.t0)
|
||||
if (t <= this.t0 + 2)
|
||||
this.t0 -= this.clocksPerPage / 4;
|
||||
this.tsel = t;
|
||||
this.setOrgTime(this.t0);
|
||||
@ -173,7 +167,7 @@ export class WaveformView {
|
||||
var canvas = this.lines[row];
|
||||
var meta = this.meta[row];
|
||||
if (!canvas || !meta) return;
|
||||
var isclk = (meta.name == 'clk');
|
||||
var isclk = (meta.label == 'clk');
|
||||
var w = canvas.width;
|
||||
var h = canvas.height;
|
||||
var ctx = canvas.getContext("2d");
|
||||
@ -234,9 +228,7 @@ export class WaveformView {
|
||||
// draw labels
|
||||
ctx.fillStyle = "white";
|
||||
ctx.textAlign = "left";
|
||||
var name = meta.name;
|
||||
name = name.replace(/__DOT__/g, "."); // make nicer name
|
||||
ctx.fillText(name, 5, fh);
|
||||
ctx.fillText(meta.label, 5, fh);
|
||||
}
|
||||
}
|
||||
|
||||
|
131
testwave.html
131
testwave.html
@ -22,70 +22,6 @@ body {
|
||||
<span class="glyphicon glyphicon-menu-hamburger" aria-hidden="true"></span></button>
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" aria-labelledby="dropdownMenuButton">
|
||||
<li><a class="dropdown-item" href="#" id="item_new_file">New Project...</a></li>
|
||||
<li><a class="dropdown-item" href="#" id="item_upload_file">Upload File...</a></li>
|
||||
<li><a class="dropdown-item" href="#" id="item_reset_file">Revert to Original...</a></li>
|
||||
<li class="dropdown dropdown-submenu">
|
||||
<a tabindex="-1" href="#">Download</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a class="dropdown-item" href="#" id="item_download_file">Download Source File</a></li>
|
||||
<li><a class="dropdown-item" href="#" id="item_download_rom">Download ROM Image</a></li>
|
||||
<li><a class="dropdown-item" href="#" id="item_download_zip">Download Project as ZIP</a></li>
|
||||
<li><a class="dropdown-item" href="#" id="item_download_allzip">Download All Changes as ZIP</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown dropdown-submenu">
|
||||
<a tabindex="-1" href="#">Share</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a class="dropdown-item" href="#" id="item_record_video">Record Video...</a></li>
|
||||
<li><a class="dropdown-item" href="#" id="item_share_file">Share Playable Link...</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown dropdown-submenu">
|
||||
<a tabindex="-1" href="#">Debug</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a class="dropdown-item" href="#" id="item_debug_expr">Break Expression...</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown dropdown-submenu">
|
||||
<a tabindex="-1" href="#">Tools</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a class="dropdown-item" target="_8bws_tools" href="./tools/fontgen/">Bitmap Font Generator</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<hr>
|
||||
<li class="dropdown dropdown-submenu">
|
||||
<a tabindex="-1" href="#">Platform</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li class="dropdown dropdown-submenu">
|
||||
<a tabindex="-1" href="#">Game Consoles</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a class="dropdown-item" href="?platform=vcs" id="item_platform_vcs">Atari 2600/VCS</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown dropdown-submenu">
|
||||
<a tabindex="-1" href="#">Computers</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a class="dropdown-item" href="?platform=apple2" id="item_platform_apple2">Apple ][+</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown dropdown-submenu">
|
||||
<a tabindex="-1" href="#">Arcade Systems</a>
|
||||
<ul class="dropdown-menu">
|
||||
<!--<li><a class="dropdown-item" href="?platform=vcs-mame" id="item_platform_vcs">Atari VCS (MAME)</a></li>-->
|
||||
<!--<li><a class="dropdown-item" href="?platform=apple2" id="item_platform_apple2">Apple ][</a></li>-->
|
||||
<li><a class="dropdown-item" href="?platform=vicdual" id="item_platform_vicdual">VIC Dual</a></li>
|
||||
<li><a class="dropdown-item" href="?platform=mw8080bw" id="item_platform_mw8080bw">Midway 8080</a></li>
|
||||
<li><a class="dropdown-item" href="?platform=galaxian-scramble" id="item_platform_galaxian_scramble">Galaxian/Scramble Hardware</a></li>
|
||||
<li><a class="dropdown-item" href="?platform=vector-z80color" id="item_platform_vector_z80color">Atari Color Vector (Z80)</a></li>
|
||||
<li><a class="dropdown-item" href="?platform=williams-z80" id="item_platform_williams_z80">Williams (Z80)</a></li>
|
||||
<li><a class="dropdown-item" href="?platform=sound_williams-z80" id="item_platform_sound_williams_z80">Williams Sound (Z80)</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</span>
|
||||
|
||||
<select id="preset_select" name="" title="Project Select">
|
||||
@ -101,54 +37,27 @@ body {
|
||||
</span>
|
||||
|
||||
<img id="compile_spinner" src="images/spinner.gif" height="20em" style="visibility:hidden;margin-left:8px;margin-right:8px">
|
||||
<span class="btn_group debug_group" id="debug_bar">
|
||||
<button id="dbg_reset" type="submit" title="Reset and Break"><span class="glyphicon glyphicon-refresh" aria-hidden="true"></span></button>
|
||||
<button id="dbg_pause" type="button" title="Pause"><span class="glyphicon glyphicon-pause" aria-hidden="true"></span></button>
|
||||
<button id="dbg_go" type="button" title="Run"><span class="glyphicon glyphicon-play" aria-hidden="true"></span></button>
|
||||
<button id="dbg_step" type="submit" title="Step"><span class="glyphicon glyphicon-step-forward" aria-hidden="true"></span></button>
|
||||
<button id="dbg_tovsync" type="submit" title="Single Frame"><span class="glyphicon glyphicon-forward" aria-hidden="true"></span></button>
|
||||
<button id="dbg_toline" type="submit" title="Run To Line"><span class="glyphicon glyphicon-save" aria-hidden="true"></span></button>
|
||||
<button id="dbg_stepout" type="submit" title="Step Out of Subroutine"><span class="glyphicon glyphicon-hand-up" aria-hidden="true"></span></button>
|
||||
<button id="dbg_stepback" type="submit" title="Step Backwards"><span class="glyphicon glyphicon-step-backward" aria-hidden="true"></span></button>
|
||||
</span>
|
||||
<span class="btn_group view_group" id="extra_bar">
|
||||
<button id="dbg_timing" type="submit" title="Analyze CPU Timing" style="display:none"><span class="glyphicon glyphicon-time" aria-hidden="true"></span></button>
|
||||
<button id="dbg_disasm" type="submit" title="Show Disassembly" style="display:none"><span class="glyphicon glyphicon-list" aria-hidden="true"></span></button>
|
||||
<button id="dbg_memory" type="submit" title="Show Memory" style="display:none"><span class="glyphicon glyphicon-sunglasses" aria-hidden="true"></span></button>
|
||||
<button id="dbg_profile" type="submit" title="Show Profile" style="display:none"><span class="glyphicon glyphicon-stats" aria-hidden="true"></span></button>
|
||||
<button id="dbg_bitmap" type="submit" title="Edit Bitmap"><span class="glyphicon glyphicon-camera" aria-hidden="true"></span></button>
|
||||
<button id="dbg_record" type="submit" title="Start/Stop Replay Recording" style="display:none"><span class="glyphicon glyphicon-record" aria-hidden="true"></span></button>
|
||||
</span>
|
||||
<span class="dropdown" style="float:right">
|
||||
<a class="btn btn-secondary dropdown-toggle" id="booksMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
GET BOOKS <span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu pull-right" aria-labelledby="dropdownMenuButton">
|
||||
<li>
|
||||
<a class="dropdown-item dropdown-link" target="_book_a2600" href="https://www.amazon.com/gp/product/1541021304/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&tag=pzp-20&camp=1789&creative=9325&linkCode=as2&creativeASIN=B01N4DSRIZ&linkId=04d39e274c06e6c93b93d20a9a977111">
|
||||
<img src="images/book_a2600.png"/>
|
||||
<b>Making Games For The Atari 2600</b><!-- (Print/Kindle Editions)-->
|
||||
</a>
|
||||
<a class="dropdown-item dropdown-link" target="_book_arcade" href="https://www.amazon.com/gp/product/1545484759/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1545484759&linkCode=as2&tag=pzp-20&linkId=b27709c022d2ebe639e90316d9f4fd5b">
|
||||
<img src="images/book_arcade.png"/>
|
||||
<b>Making 8-bit Arcade Games in C</b><!-- (Print Edition)-->
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</span>
|
||||
<span class="btn_group view_group" id="scope_bar">
|
||||
<button id="scope_go_start" type="submit" title="Go to beginning of trace"><span class="glyphicon glyphicon-fast-backward" aria-hidden="true"></span></button>
|
||||
<button id="scope_go_back" type="submit" title="Go back a page"><span class="glyphicon glyphicon-backward" aria-hidden="true"></span></button>
|
||||
<input id="scope_index_text" size="5"></input>
|
||||
<button id="scope_go_fwd" type="submit" title="Go forward a page"><span class="glyphicon glyphicon-forward" aria-hidden="true"></span></button>
|
||||
<button id="scope_go_end" type="submit" title="Go to end of trace"><span class="glyphicon glyphicon-fast-forward" aria-hidden="true"></span></button>
|
||||
</span>
|
||||
|
||||
|
||||
</div>
|
||||
<div id="notebook">
|
||||
<div id="workspace">
|
||||
</div>
|
||||
<div class="emulator" id="emulator">
|
||||
<div class="emuoverlay" id="emuoverlay">
|
||||
<span class="btn-group" role="group">
|
||||
<button type="button" class="btn btn-xs" onclick="this.blur();" title="Go to start of trace"><span class="glyphicon glyphicon-fast-backward" aria-hidden="true"></span></button>
|
||||
<button type="button" class="btn btn-xs" onclick="this.blur();" title="Go backward"><span class="glyphicon glyphicon-backward" aria-hidden="true"></span></button>
|
||||
<button type="button" class="btn btn-xs" onclick="this.blur();" title="Go forward"><span class="glyphicon glyphicon-forward" aria-hidden="true"></span></button>
|
||||
<button type="button" class="btn btn-xs" onclick="this.blur();" title="Go to end of trace"><span class="glyphicon glyphicon-fast-forward" aria-hidden="true"></span></button>
|
||||
<button type="button" class="btn btn-xs" onclick="this.blur();" title="Zoom out"><span class="glyphicon glyphicon-zoom-out" aria-hidden="true"></span></button>
|
||||
<button type="button" class="btn btn-xs" onclick="this.blur();" title="Zoom in"><span class="glyphicon glyphicon-zoom-in" aria-hidden="true"></span></button>
|
||||
</span>
|
||||
<div id="scope" class="emuscope">
|
||||
</div>
|
||||
<div id="scope2" class="emuscope">
|
||||
@ -194,16 +103,16 @@ function require(modname) {
|
||||
var wfp = {
|
||||
getSignalMetadata: function() {
|
||||
return [
|
||||
{name:'clk', len:1},
|
||||
{name:'big_signal_name__DOT__which_is_big', len:2},
|
||||
{name:'sig3', len:3},
|
||||
{name:'sig4', len:4},
|
||||
{name:'sig5', len:5},
|
||||
{name:'sig6', len:6},
|
||||
{name:'sig7', len:7},
|
||||
{name:'sig8', len:8},
|
||||
{name:'sig9', len:9},
|
||||
{name:'sig', len:1},{name:'sig', len:1},{name:'sig', len:1},{name:'sig', len:1},{name:'sig', len:1},{name:'sig', len:1},{name:'sig', len:1},
|
||||
{label:'clk', len:1},
|
||||
{label:'big_signal_name__DOT__which_is_big', len:2},
|
||||
{label:'sig3', len:3},
|
||||
{label:'sig4', len:4},
|
||||
{label:'sig5', len:5},
|
||||
{label:'sig6', len:6},
|
||||
{label:'sig7', len:7},
|
||||
{label:'sig8', len:8},
|
||||
{label:'sig9', len:9},
|
||||
{label:'sig', len:1},{label:'sig', len:1},{label:'sig', len:1},{label:'sig', len:1},{label:'sig', len:1},{label:'sig', len:1},{label:'sig', len:1},
|
||||
];
|
||||
},
|
||||
getSignalData: function(i,s,l) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user