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