Map the RESET button to CTRL-F1

This commit is contained in:
Ivan Izaguirre 2019-11-21 00:13:53 +01:00
parent 202f7b36ce
commit 5b8409413c
3 changed files with 10 additions and 1 deletions

View File

@ -114,8 +114,9 @@ Line:
### Keys
- Ctrl-F1: Reset button
- F5: Toggle speed between real and fastest
- Ctrl F5: Show current speed in Mhz
- Ctrl-F5: Show current speed in Mhz
- F6: Toggle between NTSC color TV and green phosphor monochrome monitor
- F7: Save current state to disk
- F8: Restore state from disk

View File

@ -121,6 +121,8 @@ const (
CommandToggleCPUTrace
// CommandKill stops the cpu execution loop
CommandKill
// CommandReset executes a 6502 reset
CommandReset
)
// SendCommand enqueues a command to the emulator thread
@ -161,6 +163,8 @@ func (a *Apple2) executeCommand(command int) {
fmt.Printf("Chargen page %v\n", a.cg.page)
case CommandToggleCPUTrace:
a.cpu.SetTrace(!a.cpu.GetTrace())
case CommandReset:
a.cpu.Reset()
}
}

View File

@ -96,6 +96,10 @@ func (k *sdlKeyboard) putKey(keyEvent *sdl.KeyboardEvent) {
result = 127 // Base64A
// Control of the emulator
case sdl.K_F1:
if ctrl {
k.a.SendCommand(apple2.CommandReset)
}
case sdl.K_F5:
if ctrl {
k.a.SendCommand(apple2.CommandShowSpeed)