char tbuf1[TTYSIZ];
+uint8_t vtattr_cap;
+struct vt_repeat keyrepeat;
+static uint8_t kbd_timer;
+
/* buffer for port scan procedure */
uint8_t keybuf[8];
/* Previous state */
}
keymap[i] = keybuf[i];
}
+ if (keysdown && keysdown < 3) {
+ if (newkey) {
+ keydecode();
+ kbd_timer = keyrepeat.first;
+ } else if (! --kbd_timer) {
+ keydecode();
+ kbd_timer = keyrepeat.continual;
+ }
+ }
- if (keysdown < 3 && newkey)
- keydecode();
}
static uint8_t cursor[4] = { KEY_LEFT, KEY_DOWN, KEY_UP, KEY_RIGHT };
;
; ZX Spectrum Plus 2A and Plus 3 hardware support
+;
+
+;
+; For the moment we just have a single user bank and simple swap. Once
+; we have things running that will be changed and will need the map
+; handlers here to be adjusted
;
.module plus3
.globl map_kernel_restore
.globl map_video
.globl unmap_video
+ .globl map_for_swap
+ .globl _need_resched
.globl _kernel_flag
.globl port_map
; exported debugging tools
.globl _trap_monitor
+ .globl _trap_reboot
.globl outchar
; imported symbols
pop hl
pop af
ret
+
+;
+; a is 1 for the first bank 2 for the second. Switch to that process
+; bank
+;
+map_for_swap:
+ jp switch_user
+
;
; We have no easy serial debug output instead just breakpoint this
; address when debugging.
.area _COMMONDATA
_kernel_flag:
.db 1
+_need_resched:
+ .db 0
port_map: ; place to store current map register values
.db 0 ; because we have no ability to read 1ffd port
; to detect what page is mapped currently