Fix keyboard strobe behaviour

This commit is contained in:
Ivan Izaguirre 2019-04-14 12:54:11 +02:00
parent b775526b34
commit 1247d58912
2 changed files with 3 additions and 5 deletions

View File

@ -93,8 +93,7 @@ func getSoftSwitch(ioFlag uint8, isSet bool) softSwitchR {
}
func getKeySoftSwitch(io *ioC0Page) uint8 {
strobed := (io.softSwitchesData[ioDataKeyboard] & (1 << 7)) == 0
if strobed && io.keyboard != nil {
if io.keyboard != nil {
if key, ok := io.keyboard.GetKey(); ok {
io.softSwitchesData[ioDataKeyboard] = key + (1 << 7)
}

View File

@ -35,9 +35,8 @@ func (k *sdlKeyboard) putText(textEvent *sdl.TextInputEvent) {
func (k *sdlKeyboard) putKey(keyEvent *sdl.KeyboardEvent) {
/* To get keys as understood by the Apple2 hardware run:
10 A=PEEK(49152)
20 B = A - 128
30 PRINT A, B
40 GOTO 10
20 PRINT A, A - 128
30 GOTO 10
*/
if keyEvent.Type != sdl.KEYDOWN {
// Process only key pushes