mirror of
https://github.com/JetSetIlly/Gopher2600.git
synced 2024-06-02 20:18:20 -04:00
clarified emulation hotkeys and updated README
This commit is contained in:
parent
c01da89970
commit
0365e04054
34
README.md
34
README.md
|
@ -369,7 +369,7 @@ The `Scroll Lock` key will also toggle mouse capture.
|
|||
In the debugger, there is a `Capture Mouse` button in the `Control` window. Or
|
||||
you can use the `Scroll Lock` key.
|
||||
|
||||
## Panel
|
||||
### Panel
|
||||
|
||||
The VCS panel is controlled through the function keys of the keyboard.
|
||||
|
||||
|
@ -379,36 +379,30 @@ The VCS panel is controlled through the function keys of the keyboard.
|
|||
* `F4` Player 0 Pro Toggle
|
||||
* `F5` Player 1 Pro Toggle
|
||||
|
||||
In playmode, the additional keys are available:
|
||||
## Emulation Hotkeys
|
||||
|
||||
* `F7` Show FPS Indicator (also shows TV specification information)
|
||||
* `ESC` Quit
|
||||
* `F9` Show Audio Tracker Window
|
||||
* `F10` Show Preferences Window
|
||||
* `F11` Toggle Fullscreen
|
||||
* `F12` Save [Screenshot](#screenshots)
|
||||
|
||||
In addition, the following keys behave the same in both playmode and the
|
||||
debugger.
|
||||
|
||||
* `ESC` Quit
|
||||
* `Scroll Lock` Toggle mouse capture (`F14` on some keyboards)
|
||||
* `Pause` Pause/Resume emulation (`F15` on some keyboard)
|
||||
* `Key below the Escape key` Switch between playmode and debugger
|
||||
|
||||
In playmode the `Tab` key will open up the ROM selector.
|
||||
In playmode only:
|
||||
|
||||
* `F7` FPS Indicator
|
||||
* `Tab` Opent the ROM selector
|
||||
|
||||
The final hotkey switches between the playmode and the debugger. I'll describe
|
||||
this key as the `key below the Escape key`.
|
||||
|
||||
What this key is differs from keyboard to keyboard - in the UK it is the `back
|
||||
tick` key while on US keyboards it is the `tilde` key. Regardless, the key was
|
||||
chosen because it the same key that is used by default in `Stella`.
|
||||
|
||||
## Debugger
|
||||
|
||||
The debugger is available by pressing the `key under the Escape key` (the back
|
||||
tick key on UK keyboards or the tilde key on US keyboard). This key can also be
|
||||
used to switch back to playmode.
|
||||
|
||||
Alternatively the command line `DEBUG` option can be used
|
||||
|
||||
<p align=center>
|
||||
<img src=".screenshots/debugger_halo2600.png" height="400" alt="gopher2600 debugging GUI"/>
|
||||
</p>
|
||||
|
||||
The screenshot above shows a typical window layout of the debugger. The menu
|
||||
bar at the top provides more windows, some of which are specific to certain
|
||||
cartridge mappers. For example, for cartridges with a `ARM7TDMI` an ARM
|
||||
|
|
|
@ -302,51 +302,59 @@ func (img *SdlImgui) serviceKeyboard(ev *sdl.KeyboardEvent) {
|
|||
switch ev.Keysym.Scancode {
|
||||
case sdl.SCANCODE_ESCAPE:
|
||||
img.quit()
|
||||
|
||||
case sdl.SCANCODE_F7:
|
||||
img.playScr.fpsOpen = !img.playScr.fpsOpen
|
||||
case sdl.SCANCODE_TAB:
|
||||
if !img.wm.selectROM.open {
|
||||
img.wm.selectROM.setOpen(true)
|
||||
}
|
||||
default:
|
||||
handled = false
|
||||
}
|
||||
}
|
||||
|
||||
case sdl.SCANCODE_GRAVE:
|
||||
switch ev.Keysym.Scancode {
|
||||
case sdl.SCANCODE_GRAVE:
|
||||
if img.isPlaymode() {
|
||||
img.emulation.SetFeature(emulation.ReqSetMode, emulation.ModeDebugger)
|
||||
} else {
|
||||
img.emulation.SetFeature(emulation.ReqSetMode, emulation.ModePlay)
|
||||
}
|
||||
|
||||
case sdl.SCANCODE_F7:
|
||||
img.playScr.fpsOpen = !img.playScr.fpsOpen
|
||||
case sdl.SCANCODE_F9:
|
||||
w := img.wm.windows[winTrackerID]
|
||||
w.setOpen(!w.isOpen())
|
||||
|
||||
case sdl.SCANCODE_F9:
|
||||
w := img.wm.windows[winTrackerID]
|
||||
w.setOpen(!w.isOpen())
|
||||
case sdl.SCANCODE_F10:
|
||||
w := img.wm.windows[winPrefsID]
|
||||
w.setOpen(!w.isOpen())
|
||||
|
||||
case sdl.SCANCODE_F10:
|
||||
w := img.wm.windows[winPrefsID]
|
||||
w.setOpen(!w.isOpen())
|
||||
case sdl.SCANCODE_F11:
|
||||
img.prefs.fullScreen.Set(!img.prefs.fullScreen.Get().(bool))
|
||||
|
||||
case sdl.SCANCODE_F11:
|
||||
img.prefs.fullScreen.Set(!img.prefs.fullScreen.Get().(bool))
|
||||
case sdl.SCANCODE_F12:
|
||||
shift := ev.Keysym.Mod&sdl.KMOD_LSHIFT == sdl.KMOD_LSHIFT || ev.Keysym.Mod&sdl.KMOD_RSHIFT == sdl.KMOD_RSHIFT
|
||||
ctrl := ev.Keysym.Mod&sdl.KMOD_LCTRL == sdl.KMOD_LCTRL || ev.Keysym.Mod&sdl.KMOD_RCTRL == sdl.KMOD_RCTRL
|
||||
|
||||
case sdl.SCANCODE_F12:
|
||||
shift := ev.Keysym.Mod&sdl.KMOD_LSHIFT == sdl.KMOD_LSHIFT || ev.Keysym.Mod&sdl.KMOD_RSHIFT == sdl.KMOD_RSHIFT
|
||||
ctrl := ev.Keysym.Mod&sdl.KMOD_LCTRL == sdl.KMOD_LCTRL || ev.Keysym.Mod&sdl.KMOD_RCTRL == sdl.KMOD_RCTRL
|
||||
if ctrl && !shift {
|
||||
img.glsl.shaders[playscrShaderID].(*playscrShader).scheduleScreenshot(modeTriple)
|
||||
} else if shift && !ctrl {
|
||||
img.glsl.shaders[playscrShaderID].(*playscrShader).scheduleScreenshot(modeDouble)
|
||||
} else {
|
||||
img.glsl.shaders[playscrShaderID].(*playscrShader).scheduleScreenshot(modeSingle)
|
||||
}
|
||||
|
||||
if ctrl && !shift {
|
||||
img.glsl.shaders[playscrShaderID].(*playscrShader).scheduleScreenshot(modeTriple)
|
||||
} else if shift && !ctrl {
|
||||
img.glsl.shaders[playscrShaderID].(*playscrShader).scheduleScreenshot(modeDouble)
|
||||
} else {
|
||||
img.glsl.shaders[playscrShaderID].(*playscrShader).scheduleScreenshot(modeSingle)
|
||||
}
|
||||
img.playScr.emulationEvent.set(emulation.EventScreenshot)
|
||||
|
||||
img.playScr.emulationEvent.set(emulation.EventScreenshot)
|
||||
case sdl.SCANCODE_F14:
|
||||
fallthrough
|
||||
case sdl.SCANCODE_SCROLLLOCK:
|
||||
img.setCapture(!img.isCaptured())
|
||||
|
||||
case sdl.SCANCODE_F14:
|
||||
fallthrough
|
||||
case sdl.SCANCODE_SCROLLLOCK:
|
||||
img.setCapture(!img.isCaptured())
|
||||
|
||||
case sdl.SCANCODE_F15:
|
||||
fallthrough
|
||||
case sdl.SCANCODE_PAUSE:
|
||||
case sdl.SCANCODE_F15:
|
||||
fallthrough
|
||||
case sdl.SCANCODE_PAUSE:
|
||||
if img.isPlaymode() {
|
||||
var err error
|
||||
if img.emulation.State() == emulation.Paused {
|
||||
err = img.emulation.SetFeature(emulation.ReqSetPause, false)
|
||||
|
@ -356,38 +364,16 @@ func (img *SdlImgui) serviceKeyboard(ev *sdl.KeyboardEvent) {
|
|||
if err != nil {
|
||||
logger.Logf("sdlimgui", err.Error())
|
||||
}
|
||||
|
||||
default:
|
||||
handled = false
|
||||
}
|
||||
} else {
|
||||
switch ev.Keysym.Scancode {
|
||||
case sdl.SCANCODE_GRAVE:
|
||||
img.emulation.SetFeature(emulation.ReqSetMode, emulation.ModePlay)
|
||||
|
||||
case sdl.SCANCODE_F10:
|
||||
w := img.wm.windows[winPrefsID]
|
||||
w.setOpen(!w.isOpen())
|
||||
|
||||
case sdl.SCANCODE_F11:
|
||||
img.prefs.fullScreen.Set(!img.prefs.fullScreen.Get().(bool))
|
||||
|
||||
case sdl.SCANCODE_F14:
|
||||
fallthrough
|
||||
case sdl.SCANCODE_SCROLLLOCK:
|
||||
img.setCapture(!img.isCaptured())
|
||||
|
||||
case sdl.SCANCODE_F15:
|
||||
fallthrough
|
||||
case sdl.SCANCODE_PAUSE:
|
||||
} else {
|
||||
if img.emulation.State() == emulation.Paused {
|
||||
img.term.pushCommand("RUN")
|
||||
} else {
|
||||
img.term.pushCommand("HALT")
|
||||
}
|
||||
default:
|
||||
handled = false
|
||||
}
|
||||
|
||||
default:
|
||||
handled = false
|
||||
}
|
||||
|
||||
if handled {
|
||||
|
|
Loading…
Reference in a new issue