mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2025-04-16 05:37:05 +00:00
z80 illegal opcode breakpoint
This commit is contained in:
parent
00621bdf16
commit
a8fbddaee2
@ -6,8 +6,6 @@ TODO:
|
||||
- confuse code/data in listing
|
||||
- show memory locations hovering over lines
|
||||
- don't check against ROM signatures
|
||||
- better errors when ROM format wrong
|
||||
- debugging inside of bank switching??? relocated segs?
|
||||
- support 6502 test cases
|
||||
- DASM: macro forward refs
|
||||
- asm: support macro expansion
|
||||
@ -24,7 +22,7 @@ TODO:
|
||||
- MAME single step (?)
|
||||
- step over
|
||||
- slowdown beam for all platforms?
|
||||
- kbd shortcuts
|
||||
- more kbd shortcuts
|
||||
- PC x86 support
|
||||
- show errors in list (maybe window list?)
|
||||
- can't see 1st line in editor sometimes (when scrolling cursor past bottom of screen)
|
||||
@ -34,7 +32,6 @@ TODO:
|
||||
- update Javatari version? (and others?)
|
||||
- unify versioning
|
||||
- disassembler for uploaded ROMs
|
||||
- show tool-specific (readonly) include files
|
||||
- verilog debugging/reloading makes it slow
|
||||
- remove FPS and play controls when Verilog scope paused
|
||||
- compile stuck when errors unchanged
|
||||
@ -61,7 +58,6 @@ TODO:
|
||||
- restructure folders
|
||||
- update memory browser window if view before 1st compile, update symbols
|
||||
- spinner disappears sometimes (and compiles even when not spinning...) (undo?)
|
||||
- z80 illegal opcode kills platform
|
||||
- quantify verilog "graph iterations"
|
||||
- debug bankswitching for funky formats
|
||||
- "invalid ROM" error should show up better
|
||||
|
@ -426,16 +426,21 @@ export abstract class BaseZ80Platform extends BaseDebugPlatform {
|
||||
return 0;
|
||||
var debugCond = this.getDebugCallback();
|
||||
var targetTstates = cpu.getTstates() + cycles;
|
||||
if (debugCond) { // || trace) {
|
||||
while (cpu.getTstates() < targetTstates) {
|
||||
if (debugCond && debugCond()) {
|
||||
debugCond = null;
|
||||
break;
|
||||
try {
|
||||
if (debugCond) { // || trace) {
|
||||
while (cpu.getTstates() < targetTstates) {
|
||||
if (debugCond && debugCond()) {
|
||||
debugCond = null;
|
||||
break;
|
||||
}
|
||||
cpu.runFrame(cpu.getTstates() + 1);
|
||||
}
|
||||
cpu.runFrame(cpu.getTstates() + 1);
|
||||
} else {
|
||||
cpu.runFrame(targetTstates);
|
||||
}
|
||||
} else {
|
||||
cpu.runFrame(targetTstates);
|
||||
} catch (e) {
|
||||
// TODO: show alert w/ error msg
|
||||
this.breakpointHit(cpu.getTstates());
|
||||
}
|
||||
return cpu.getTstates() - targetTstates;
|
||||
}
|
||||
|
11
src/ui.ts
11
src/ui.ts
@ -562,14 +562,18 @@ function setDebugButtonState(btnid:string, btnstate:string) {
|
||||
$("#dbg_"+btnid).addClass("btn_"+btnstate);
|
||||
}
|
||||
|
||||
function setupBreakpoint(btnid? : string) {
|
||||
_disableRecording();
|
||||
function setupDebugCallback(btnid? : string) {
|
||||
platform.setupDebug(function(state) {
|
||||
lastDebugState = state;
|
||||
showDebugInfo(state);
|
||||
projectWindows.refresh(true);
|
||||
if (btnid) setDebugButtonState(btnid, "stopped");
|
||||
setDebugButtonState(btnid||"pause", "stopped");
|
||||
});
|
||||
}
|
||||
|
||||
function setupBreakpoint(btnid? : string) {
|
||||
_disableRecording();
|
||||
setupDebugCallback(btnid);
|
||||
if (btnid) setDebugButtonState(btnid, "active");
|
||||
}
|
||||
|
||||
@ -654,6 +658,7 @@ function runStepBackwards() {
|
||||
function clearBreakpoint() {
|
||||
lastDebugState = null;
|
||||
if (platform.clearDebug) platform.clearDebug();
|
||||
setupDebugCallback(); // in case of BRK/trap
|
||||
showDebugInfo();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user