mirror of
https://github.com/trebonian/visual6502.git
synced 2025-01-03 12:31:34 +00:00
[dev]improve expert-mode tabulation
This commit is contained in:
parent
f67125989c
commit
4ce8e4291f
22
macros.js
22
macros.js
@ -86,7 +86,6 @@ function testNMI(n){
|
||||
for(var i=0;i<16;i++){step();}
|
||||
}
|
||||
|
||||
|
||||
function initChip(){
|
||||
var start = now();
|
||||
for(var nn in nodes) nodes[nn].state = 'fl';
|
||||
@ -109,7 +108,7 @@ function initChip(){
|
||||
if(ctrace)console.log('initChip done after', now()-start);
|
||||
}
|
||||
|
||||
var logThese=['sync','irq','nmi','ab','db','rw','pc','a','x','y','s'];
|
||||
var logThese=['cycle','sync','irq','nmi','ab','db','rw','pc','a','x','y','s','p'];
|
||||
|
||||
function step(){
|
||||
trace[cycle]= {chip: stateString(), mem: getMem()};
|
||||
@ -179,12 +178,19 @@ function readBits(name, n){
|
||||
return res;
|
||||
}
|
||||
|
||||
function hexBus(busname){
|
||||
var nodenamelist=[];
|
||||
// console.log('hexBus called: ' + busname);
|
||||
for(i in nodenames){nodenamelist.push(i)};
|
||||
function busToString(busname){
|
||||
// takes a signal name or prefix
|
||||
// returns an appropriate string representation
|
||||
if(busname=='pc')
|
||||
return hexBus('pch') + hexBus('pcl');
|
||||
return busToHex('pch') + busToHex('pcl');
|
||||
if(busname=='p')
|
||||
return readPstring();
|
||||
if(busname=='cycle')
|
||||
return cycle>>1;
|
||||
return busToHex(busname);
|
||||
}
|
||||
|
||||
function busToHex(busname){
|
||||
var width=0;
|
||||
for(var i in nodenamelist){
|
||||
if(nodenamelist[i].search("^"+busname+"[0-9]")==0)
|
||||
@ -298,7 +304,7 @@ function updateLogbox(names){
|
||||
var signals=[];
|
||||
|
||||
for(i in names){
|
||||
signals.push(hexBus(names[i]));
|
||||
signals.push(busToString(names[i]));
|
||||
}
|
||||
logStream.push("<td>" + signals.join("</td><td>") + "</td>");
|
||||
|
||||
|
@ -82,7 +82,8 @@ img.navstop{
|
||||
table.logstream {
|
||||
font-family: monospace;
|
||||
font-size: 12px;
|
||||
border-spacing: 1px;
|
||||
border-spacing: 2px;
|
||||
text-align:center
|
||||
}
|
||||
|
||||
table.memtable {
|
||||
|
7
wires.js
7
wires.js
@ -34,6 +34,7 @@ var drawlayers = [true, true, true, true, true, true];
|
||||
|
||||
var nodes = new Array();
|
||||
var transistors = {};
|
||||
var nodenamelist=[];
|
||||
|
||||
var ngnd = nodenames['vss'];
|
||||
var npwr = nodenames['vcc'];
|
||||
@ -65,6 +66,7 @@ function setup_part2(){
|
||||
recenter();
|
||||
refresh();
|
||||
setupTable();
|
||||
setupNodeNameList();
|
||||
window.onkeypress = function(e){handleKey(e);}
|
||||
hilite.onmousedown = function(e){mouseDown(e);}
|
||||
setStatus('resetting 6502...');
|
||||
@ -364,6 +366,11 @@ function setStatus(){
|
||||
statbox.innerHTML = res;
|
||||
}
|
||||
|
||||
function setupNodeNameList(){
|
||||
for(var i in nodenames)
|
||||
nodenamelist.push(i);
|
||||
}
|
||||
|
||||
function nodeName(n) {
|
||||
for(var i in nodenames){
|
||||
if(nodenames[i]==n) return i;
|
||||
|
Loading…
Reference in New Issue
Block a user