From: Alan Cox Date: Sat, 12 Aug 2017 19:01:44 +0000 (+0100) Subject: plus3: get things back into a compiling state X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=f6c9e1fd41a3f475c100032e7243d5b8808fb6f4;p=FUZIX.git plus3: get things back into a compiling state --- diff --git a/Kernel/platform-plus3/devtty.c b/Kernel/platform-plus3/devtty.c index ff99ef7b..7f160266 100644 --- a/Kernel/platform-plus3/devtty.c +++ b/Kernel/platform-plus3/devtty.c @@ -9,6 +9,10 @@ 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 */ @@ -140,9 +144,16 @@ void tty_pollirq(void) } 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 }; diff --git a/Kernel/platform-plus3/main.c b/Kernel/platform-plus3/main.c index 37987a79..68fa4ef8 100644 --- a/Kernel/platform-plus3/main.c +++ b/Kernel/platform-plus3/main.c @@ -25,3 +25,9 @@ void platform_interrupt(void) void map_init(void) { } + +uint8_t platform_param(char *p) +{ + used(p); + return 0; +} diff --git a/Kernel/platform-plus3/plus3.s b/Kernel/platform-plus3/plus3.s index 61f75b98..36ac2561 100644 --- a/Kernel/platform-plus3/plus3.s +++ b/Kernel/platform-plus3/plus3.s @@ -1,5 +1,11 @@ ; ; 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 @@ -23,12 +29,15 @@ .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 @@ -216,6 +225,14 @@ map_restore: 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. @@ -226,6 +243,8 @@ outchar: .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