diff --git a/README.md b/README.md index e1f1ea759..95f27bef3 100644 --- a/README.md +++ b/README.md @@ -220,6 +220,8 @@ Below the menu-bar are the debugging windows. In this screenshot we can see: Note that much of the information presented in the windows is editable in-place. For example, the contents of the CPU's PC register can be edited via the window. As in all areas of this project, the user is encouraged to experiment. +A video of the debugger in action can be found [here](https://www.youtube.com/watch?v=3vLyRw8iVCA). + #### Debugger Terminal As an alternative to GUI interaction the debugger can also be controlled through a terminal. This is available through the `terminal` window. The rest of this section describes the operation of the terminal in detail. diff --git a/debugger/debugger.go b/debugger/debugger.go index 007ddcee9..5db379314 100644 --- a/debugger/debugger.go +++ b/debugger/debugger.go @@ -403,9 +403,9 @@ func (dbg *Debugger) attachCartridge(cartload cartridgeloader.Loader) error { // reset of vcs is implied with attach cartridge err = setup.AttachCartridge(dbg.VCS, cartload) if err != nil && !curated.Has(err, cartridge.Ejected) { - dbg.printLine(terminal.StyleError, "%v", err) + logger.Log("attach", err.Error()) - // an error has occured so attach the ejected cartridge + // an error has occurred so attach the ejected cartridge err = setup.AttachCartridge(dbg.VCS, cartridgeloader.Loader{}) if err != nil { return err diff --git a/disassembly/preferences.go b/disassembly/preferences.go index 7870aa7e4..f81d81ff6 100644 --- a/disassembly/preferences.go +++ b/disassembly/preferences.go @@ -42,10 +42,12 @@ func (p *Preferences) String() string { // newPreferences is the preferred method of initialisation for the Preferences type. func newPreferences(dsm *Disassembly) (*Preferences, error) { - p := &Preferences{ - dsm: dsm, - mirrorOrigin: memorymap.OriginCart, - } + p := &Preferences{dsm: dsm} + + // set defaults + p.FxxxMirror.Set(true) + p.Symbols.Set(true) + p.mirrorOrigin = memorymap.OriginCartFxxxMirror // save server using the prefs package pth, err := paths.ResourcePath("", prefs.DefaultPrefsFile) diff --git a/gui/sdlimgui/preferences.go b/gui/sdlimgui/preferences.go index f9e7397b3..4826411ef 100644 --- a/gui/sdlimgui/preferences.go +++ b/gui/sdlimgui/preferences.go @@ -44,6 +44,9 @@ type preferences struct { func newDebugPreferences(img *SdlImgui) (*preferences, error) { p := &preferences{img: img} + // defaults + p.openOnError.Set(true) + // setup preferences pth, err := paths.ResourcePath("", prefs.DefaultPrefsFile) if err != nil { diff --git a/gui/sdlimgui/win_coproc_lastexecution.go b/gui/sdlimgui/win_coproc_lastexecution.go index 055b0b254..a9952b8a7 100644 --- a/gui/sdlimgui/win_coproc_lastexecution.go +++ b/gui/sdlimgui/win_coproc_lastexecution.go @@ -55,6 +55,10 @@ func (win *winCoProcLastExecution) draw() { return } + if !win.img.lz.CoProc.HasCoProcBus || win.img.lz.Dbg.Disasm.Coprocessor == nil { + return + } + imgui.SetNextWindowPosV(imgui.Vec2{465, 285}, imgui.ConditionFirstUseEver, imgui.Vec2{0, 0}) imgui.SetNextWindowSizeV(imgui.Vec2{353, 466}, imgui.ConditionFirstUseEver) diff --git a/hardware/memory/cartridge/supercharger/supercharger.go b/hardware/memory/cartridge/supercharger/supercharger.go index 3e4eaa909..05aef8278 100644 --- a/hardware/memory/cartridge/supercharger/supercharger.go +++ b/hardware/memory/cartridge/supercharger/supercharger.go @@ -68,6 +68,12 @@ func NewSupercharger(cartload cartridgeloader.Loader) (mapper.CartMapper, error) var err error + // load bios and activate + cart.bios, err = loadBIOS(path.Dir(cartload.Filename)) + if err != nil { + return nil, curated.Errorf("supercharger: %v", err) + } + // set up tape if cartload.IsSoundData { cart.state.tape, err = newSoundLoad(cart, cartload) @@ -78,12 +84,6 @@ func NewSupercharger(cartload cartridgeloader.Loader) (mapper.CartMapper, error) return nil, curated.Errorf("supercharger: %v", err) } - // load bios and activate - cart.bios, err = loadBIOS(path.Dir(cartload.Filename)) - if err != nil { - return nil, curated.Errorf("supercharger: %v", err) - } - // prepare onLoaded function if cartload.OnLoaded == nil { cart.onLoaded = func(cart mapper.CartMapper) error { return nil }