From: Alan Cox Date: Fri, 25 May 2018 21:29:56 +0000 (+0100) Subject: trs801: remove surplus code X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=03f284c92fa728b6a0292b48221490fd482710f9;p=FUZIX.git trs801: remove surplus code --- diff --git a/Kernel/platform-trs80m1/devtty.c b/Kernel/platform-trs80m1/devtty.c index eed87dbd..de446579 100644 --- a/Kernel/platform-trs80m1/devtty.c +++ b/Kernel/platform-trs80m1/devtty.c @@ -10,14 +10,8 @@ char tbuf1[TTYSIZ]; char tbuf2[TTYSIZ]; -uint8_t curtty; /* output side */ -uint8_t inputtty; /* input side */ -static struct vt_switch ttysave[2]; -static uint8_t vtbackbuf[VT_WIDTH * VT_HEIGHT]; struct vt_repeat keyrepeat; -uint8_t *vtbase[2] = { 0xF800, vtbackbuf }; - __sfr __at 0xE8 tr1865_ctrl; __sfr __at 0xE9 tr1865_baud; __sfr __at 0xEA tr1865_status; @@ -40,17 +34,12 @@ void kputchar(char c) ttyready_t tty_writeready(uint8_t minor) { uint8_t reg; - if (minor != 3) + if (minor != 2) return TTY_READY_NOW; reg = tr1865_status; return (reg & 0x40) ? TTY_READY_NOW : TTY_READY_SOON; } -void vtbuf_init(void) -{ - memset(vtbackbuf, ' ', VT_WIDTH * VT_HEIGHT); -} - void tty_putc(uint8_t minor, unsigned char c) { if (minor == 2) @@ -140,7 +129,7 @@ static void keyproc(void) for (i = 0; i < 8; i++) { /* Set one of A0 to A7, and read the byte we get back. Invert that to get a mask of pressed buttons */ - keyin[i] = *(uint8_t *)(0xF400 | (1 << i)); + keyin[i] = *(uint8_t *)(0x3800 | (1 << i)); key = keyin[i] ^ keymap[i]; if (key) { int n; @@ -233,7 +222,7 @@ static void keydecode(void) else if (capslock && c >= 'a' && c <= 'z') c -= 'a' - 'A'; if (c) - vt_inproc(inputtty+1, c); + vt_inproc(1, c); } void kbd_interrupt(void) diff --git a/Kernel/platform-trs80m1/discard.c b/Kernel/platform-trs80m1/discard.c index 9dcac114..aeedbf80 100644 --- a/Kernel/platform-trs80m1/discard.c +++ b/Kernel/platform-trs80m1/discard.c @@ -5,13 +5,11 @@ void device_init(void) { - vtbuf_init(); #ifdef CONFIG_RTC /* Time of day clock */ inittod(); #endif hd_probe(); - tty_setup(3); } void map_init(void)