Step one instruction (Step In)

This commit is contained in:
tudnai 2022-10-28 11:51:49 -07:00
parent b70fb8c85d
commit 2531ce62b4
2 changed files with 6 additions and 14 deletions

View File

@ -54,36 +54,27 @@ class DebuggerToolBarController: NSWindowController, NSWindowDelegate {
@IBAction func Step_Over(_ sender: Any) {
switch cpuState {
case cpuState_halted:
ViewController.current?.Pause(sender)
case cpuState_running:
ViewController.current?.Pause(sender)
default:
break
}
}
@IBAction func Step_In(_ sender: Any) {
ViewController.current?.Reset(sender)
m6502_Step()
// TODO: This should be in Debugger!
if let debugger = DebuggerViewController.shared {
debugger.Update()
}
}
@IBAction func Step_Out(_ sender: Any) {
ViewController.current?.textDisplay.setSelectedRange(NSRange())
}
@IBAction func SetBreakPoint(_ sender: Any) {
ViewController.current?.Copy()
}
@IBAction func DisableBreakPoint(_ sender: Any) {
ViewController.current?.Paste()
}

View File

@ -220,6 +220,7 @@ extern void rom_loadFile( const char * bundlePath, const char * filename );
extern void tst6502(void);
extern void m6502_ColdReset( const char * bundlePath, const char * romFilePath );
extern void m6502_Run(void);
INLINE int m6502_Step(void);
extern void interrupt_IRQ(void);
extern void interrupt_NMI(void);