More diagnostic output improvements

This commit is contained in:
Jeff Parsons 2017-06-28 17:51:15 -07:00 committed by Jeff Parsons
commit 51f8440e9b
40 changed files with 4462 additions and 4398 deletions

View file

@ -305,11 +305,16 @@ class Computer extends Component {
if (sStatePath) this.fServerState = true;
}
if (!sStatePath) {
this.sStateURL = sStatePath;
if (!this.sStateURL) {
this.setReady();
} else {
Web.getResource(sStatePath, null, true, function(sURL, sResource, nErrorCode) {
var sProgress = "Loading " + this.sStateURL + "...";
Web.getResource(this.sStateURL, null, true, function(sURL, sResource, nErrorCode) {
cmp.doneLoad(sURL, sResource, nErrorCode);
}, function(nState) {
cmp.println(sProgress, Component.TYPE.PROGRESS);
});
}
@ -367,6 +372,7 @@ class Computer extends Component {
if (control) {
control.style.opacity = "0";
control.style.lineHeight = "0";
control.value = "";
}
}
}

View file

@ -135,12 +135,13 @@ class ROM extends Component {
*/
initBus(cmp, bus, cpu, dbg)
{
var rom = this;
this.cmp = cmp;
this.bus = bus;
this.cpu = cpu;
this.dbg = dbg;
if (this.sFileURL) {
var rom = this;
var sProgress = "Loading " + this.sFileURL + "...";
Web.getResource(this.sFileURL, null, true, function(sURL, sResponse, nErrorCode) {
rom.doneLoad(sURL, sResponse, nErrorCode);

View file

@ -2385,15 +2385,13 @@ class Video extends Component {
* }
*/
var sFileURL = parmsVideo['fontROM'];
if (sFileURL) {
var sFileExt = Str.getExtension(sFileURL);
this.sFileURL = parmsVideo['fontROM'];
if (this.sFileURL) {
var sFileExt = Str.getExtension(this.sFileURL);
if (sFileExt != "json") {
sFileURL = Web.getHost() + DumpAPI.ENDPOINT + '?' + DumpAPI.QUERY.FILE + '=' + sFileURL + '&' + DumpAPI.QUERY.FORMAT + '=' + DumpAPI.FORMAT.BYTES;
this.sFileURL = Web.getHost() + DumpAPI.ENDPOINT + '?' + DumpAPI.QUERY.FILE + '=' + this.sFileURL + '&' + DumpAPI.QUERY.FORMAT + '=' + DumpAPI.FORMAT.BYTES;
}
Web.getResource(sFileURL, null, true, function(sURL, sResponse, nErrorCode) {
video.doneLoad(sURL, sResponse, nErrorCode);
});
}
}
@ -2411,6 +2409,8 @@ class Video extends Component {
*/
initBus(cmp, bus, cpu, dbg)
{
var video = this;
this.bus = bus;
this.cpu = cpu;
this.dbg = dbg;
@ -2457,7 +2457,6 @@ class Video extends Component {
}
if (DEBUGGER && dbg) {
var video = this;
dbg.messageDump(Messages.VIDEO, function onDumpVideo(asArgs) {
video.dumpVideo(asArgs);
});
@ -2495,6 +2494,15 @@ class Video extends Component {
else if (this.sTouchScreen == "keygrid") {
if (this.kbd) this.captureTouch(Video.TOUCH.KEYGRID);
}
if (this.sFileURL) {
var sProgress = "Loading " + this.sFileURL + "...";
Web.getResource(this.sFileURL, null, true, function(sURL, sResponse, nErrorCode) {
video.doneLoad(sURL, sResponse, nErrorCode);
}, function(nState) {
video.println(sProgress, Component.TYPE.PROGRESS);
});
}
}
/**