mirror of
https://github.com/trebonian/visual6502.git
synced 2024-12-22 12:29:20 +00:00
display machine state in status panel
This commit is contained in:
parent
3df7065b83
commit
cdd837dd0c
13
macros.js
13
macros.js
@ -288,6 +288,18 @@ function listActiveSignals(pattern){
|
||||
return list;
|
||||
}
|
||||
|
||||
// The 6502 TCState is almost but not quite an inverted one-hot shift register
|
||||
function listActiveTCStates() {
|
||||
var s=[];
|
||||
if(!isNodeHigh(nodenames['clock1'])) s.push("T0");
|
||||
if(!isNodeHigh(nodenames['clock2'])) s.push("T1");
|
||||
if(!isNodeHigh(nodenames['t2'])) s.push("T2");
|
||||
if(!isNodeHigh(nodenames['t3'])) s.push("T3");
|
||||
if(!isNodeHigh(nodenames['t4'])) s.push("T4");
|
||||
if(!isNodeHigh(nodenames['t5'])) s.push("T5");
|
||||
return s.join("+");
|
||||
}
|
||||
|
||||
function readBit(name){
|
||||
return isNodeHigh(nodenames[name])?1:0;
|
||||
}
|
||||
@ -440,6 +452,7 @@ function chipStatus(){
|
||||
' SP:' + hexByte(readSP()) +
|
||||
' ' + readPstring();
|
||||
var machine3 = '';
|
||||
machine3 += 'State: ' + listActiveTCStates() + ' ';
|
||||
machine3 += 'Execute: ' + dis6502[readBits('ir',8)];
|
||||
if(isNodeHigh(nodenames['sync']))
|
||||
machine3 += ' (Fetch: ' + dis6502[readDataBus()] + ')';
|
||||
|
Loading…
Reference in New Issue
Block a user