mirror of
https://github.com/trebonian/visual6502.git
synced 2024-06-02 17:41:31 +00:00
[dev]force status box to 3-line form, other layout tweaks
This commit is contained in:
parent
5f24e86c3e
commit
2d20ef2dad
|
@ -341,7 +341,7 @@ function chipStatus(){
|
||||||
' Y:' + hexByte(readY()) +
|
' Y:' + hexByte(readY()) +
|
||||||
' SP:' + hexByte(readSP()) +
|
' SP:' + hexByte(readSP()) +
|
||||||
' ' + readPstring();
|
' ' + readPstring();
|
||||||
setStatus(machine1 + "<br>" + machine2 + "<br>Hz: " + estimatedHz().toFixed(1));
|
setStatus(machine1, machine2, "Hz: " + estimatedHz().toFixed(1));
|
||||||
if (loglevel>0) {
|
if (loglevel>0) {
|
||||||
updateLogbox(signalSet(loglevel));
|
updateLogbox(signalSet(loglevel));
|
||||||
}
|
}
|
||||||
|
|
19
wires.js
19
wires.js
|
@ -369,11 +369,11 @@ function handleClick(e){
|
||||||
var cx = Math.round(x*10000/600);
|
var cx = Math.round(x*10000/600);
|
||||||
var cy = Math.round(y*10000/600);
|
var cy = Math.round(y*10000/600);
|
||||||
if(w==-1) {
|
if(w==-1) {
|
||||||
setStatus('x:',cx,'<br>','y:',cy);
|
setStatus('x: '+cx, 'y: '+cy);
|
||||||
} else {
|
} else {
|
||||||
var s1='x: ' + cx + ' y: ' + cy;
|
var s1='x: ' + cx + ' y: ' + cy;
|
||||||
var s2='node: ' + w + ' ' + nodeName(w);
|
var s2='node: ' + w + ' ' + nodeName(w);
|
||||||
setStatus(s1, '<br>', s2);
|
setStatus(s1, s2);
|
||||||
if(ctrace) console.log(s1, s2);
|
if(ctrace) console.log(s1, s2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -408,6 +408,8 @@ function updateExpertMode(isOn){
|
||||||
document.getElementById('expertControlPanel').style.display = 'none';
|
document.getElementById('expertControlPanel').style.display = 'none';
|
||||||
document.getElementById('basicModeText1').style.display = 'block';
|
document.getElementById('basicModeText1').style.display = 'block';
|
||||||
document.getElementById('basicModeText2').style.display = 'block';
|
document.getElementById('basicModeText2').style.display = 'block';
|
||||||
|
if(chipLayoutIsVisible)
|
||||||
|
document.getElementById('layoutControlPanel').style.display = 'none';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -425,10 +427,11 @@ function updateShow(layer, on){
|
||||||
function updateChipLayoutVisibility(isOn){
|
function updateChipLayoutVisibility(isOn){
|
||||||
chipLayoutIsVisible=isOn;
|
chipLayoutIsVisible=isOn;
|
||||||
if(chipLayoutIsVisible) {
|
if(chipLayoutIsVisible) {
|
||||||
document.getElementById('chip').style.display = 'block';
|
document.getElementById('chipsurround').style.display = 'block';
|
||||||
if(expertMode)
|
if(expertMode)
|
||||||
document.getElementById('layoutControlPanel').style.display = 'block';
|
document.getElementById('layoutControlPanel').style.display = 'block';
|
||||||
document.getElementById('nochip').style.display = 'none';
|
document.getElementById('nochip').style.display = 'none';
|
||||||
|
document.getElementById('logstreamscroller').style.height="260px";
|
||||||
// allow the display to update while we load the graphics
|
// allow the display to update while we load the graphics
|
||||||
setStatus('loading graphics...');
|
setStatus('loading graphics...');
|
||||||
setTimeout(setupChipLayoutGraphics, 0);
|
setTimeout(setupChipLayoutGraphics, 0);
|
||||||
|
@ -436,9 +439,10 @@ function updateChipLayoutVisibility(isOn){
|
||||||
// cannot animate the layout if there is no canvas
|
// cannot animate the layout if there is no canvas
|
||||||
updateChipLayoutAnimation(false);
|
updateChipLayoutAnimation(false);
|
||||||
// replace the layout display with a button to show it
|
// replace the layout display with a button to show it
|
||||||
document.getElementById('chip').style.display = 'none';
|
document.getElementById('chipsurround').style.display = 'none';
|
||||||
document.getElementById('layoutControlPanel').style.display = 'none';
|
document.getElementById('layoutControlPanel').style.display = 'none';
|
||||||
document.getElementById('nochip').style.display = 'block';
|
document.getElementById('nochip').style.display = 'block';
|
||||||
|
document.getElementById('logstreamscroller').style.height="880px";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -499,7 +503,12 @@ function localy(el, gy){
|
||||||
|
|
||||||
function setStatus(){
|
function setStatus(){
|
||||||
var res = '';
|
var res = '';
|
||||||
for(var i=0;i<arguments.length;i++) res=res+arguments[i]+' ';
|
// pad the arguments to make this a three-line display
|
||||||
|
// there must be a clean way to do this
|
||||||
|
if(arguments[1]==undefined)arguments[1]="";
|
||||||
|
if(arguments[2]==undefined)arguments[2]="";
|
||||||
|
arguments.length=3;
|
||||||
|
for(var i=0;i<arguments.length;i++) res=res+arguments[i]+'<br>';
|
||||||
statbox.innerHTML = res;
|
statbox.innerHTML = res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user