ubee: Fix TC shift/ctrl keys
authorAlan Cox <alan@linux.intel.com>
Tue, 24 Apr 2018 19:58:54 +0000 (20:58 +0100)
committerAlan Cox <alan@linux.intel.com>
Tue, 24 Apr 2018 19:58:54 +0000 (20:58 +0100)
Kernel/platform-ubee/README
Kernel/platform-ubee/devtty.c

index 7130cd7..9b6a916 100644 (file)
@@ -47,7 +47,7 @@ Done so far:
        If it mirrors to 0x41 then it's a 2793
        If it writes/reads back but does not mirror it's a WD1002-5
 
-       Now check if writes to 0x45 affect 0x5 with 0x58 switched
+       Now check if writes to 0x45 affect 0x45 with 0x58 switched
        (if so its two controllers and we can repeat the probe algorithm
        for the other one)
 
@@ -60,16 +60,18 @@ Done so far:
 - Support attributes, colour.
 - Buffer reclaim of discard memory
 - Bank the video
+- Debug TC keyboard code: shift/ctrl are busted
 
 
 To Do:
 - Floppy - media detect/sectors per track etc/ hard skew
-- Debug TC keyboard code: shift/ctrl are busted - do we need repeat ?
 - Hard disk driver debug
 - IDE driver (note the ubee512 emulator ide appears to be very busted as
   of 5.8.0)
 - If we have wd1002-5 and fd wtf do we put IDE in major/minors ?
 - Non TC keyboard (lightpen keyboard)
+- Fix reboot/panic logic
+- Keyboard repeat
 
 Longer Term
 - RAM based fonts (load the ROM one into RAM
@@ -145,7 +147,7 @@ Currently in progress
 - Map video at 0x8000                                  DONE
 - Clear attribute ram if present                       DONE
 - Move common up                                       DONE
-- Do buffer over discard change                                UNTESTED
+- Do buffer over discard change                                DONE
 - Check we have video latches/map right everywhere     DEBUGGING
 - Init vtattr_cap and the video variables correctly    PARTLY DONE
 - Check if scrolling in hw is doable or not in 80x25   NO
index c3cefc5..33ac3e2 100644 (file)
@@ -117,7 +117,7 @@ static uint8_t shift_keyboard_tc[15][8] = {
        /* 5x */
        { KEY_F11, ')', 'P', ':', KEY_DEL, '"', '|', '>' },
        { KEY_F12, '_', '{', '\'', 0, '+', '}', '?' },
-       /* 60 shift 67 ctrl 70 alt */
+       /* 67 shift 6F ctrl 77 alt */
 };
 
 
@@ -133,12 +133,12 @@ static void keydecode_tc(void)
        }
 
        /* TODO: ALT */
-       if (keymap[6] & 0x80)   /* shift */
+       if (keymap[12] & 0x80)  /* shift */
                c = shift_keyboard_tc[keybyte][keybit];
        else
                c = keyboard_tc[keybyte][keybit];
 
-       if (keymap[7] & 0x80) { /* control */
+       if (keymap[13] & 0x80) {        /* control */
                if (c > 31 && c < 127)
                        c &= 31;
        }
@@ -157,7 +157,7 @@ static void keymap_down(uint8_t c)
        keybyte = c >> 3;
        keybit = c & 7; 
        if (keybyte < 15) {
-               keymap[keybyte] |= keybit;
+               keymap[keybyte] |= (1 << keybit);
                keysdown++;
                newkey = 1;
        }
@@ -166,7 +166,7 @@ static void keymap_down(uint8_t c)
 static void keymap_up(uint8_t c)
 {
        if (keybyte < 15) {
-               keymap[c >> 3] &= ~(c & 7);
+               keymap[c >> 3] &= ~(1 << (c & 7));
                keysdown--;
        }
 }