z80: runToVsync() advances to next interrupt

This commit is contained in:
Steven Hugg 2018-11-28 20:53:31 -05:00
parent b366ffb1d1
commit 0faf4a0f3a
2 changed files with 19 additions and 18 deletions

View File

@ -274,12 +274,6 @@ export abstract class BaseFrameBasedPlatform extends BaseDebugPlatform {
return false;
});
}
/*
runToVsync() {
this.nextFrame(false);
this.runEval(() => { return true; });
}
*/
}
////// 6502
@ -546,6 +540,9 @@ export abstract class BaseZ80Platform extends BaseDebugPlatform {
return false;
});
}
runToVsync() {
this.runEval((c) => { return c['intp']; });
}
getToolForFilename = getToolForFilename_z80;
getDefaultExtension() { return ".c"; };
// TODO

View File

@ -401,18 +401,22 @@ function fixFilename(fn : string) : string {
}
function _revertFile(e) {
var fn = fixFilename(projectWindows.getActiveID());
// TODO: .mame
$.get( "presets/"+platform_id+"/"+fn, function(text) {
if (confirm("Reset '" + fn + "' to default?")) {
projectWindows.getActive().setText(text);
}
}, 'text')
.fail(function() {
// TODO: delete file
alert("Can only revert built-in files.");
});
return true;
var wnd = projectWindows.getActive();
if (wnd && wnd.setText) {
var fn = fixFilename(projectWindows.getActiveID());
// TODO: .mame
$.get( "presets/"+platform_id+"/"+fn, function(text) {
if (confirm("Reset '" + fn + "' to default?")) {
wnd.setText(text);
}
}, 'text')
.fail(function() {
// TODO: delete file
alert("Can only revert built-in files.");
});
} else {
alert("Cannot revert the active window.");
}
}
function _downloadROMImage(e) {