-
Notifications
You must be signed in to change notification settings - Fork 1.7k
NeXT
With this converter you can use NeXT keyboard(non-ADB) on modern computer.
You can support this project by buying prebuilt TMK NeXT Keyboard Converter.
- Prebuilt converter: https://geekhack.org/index.php?topic=72052.0
TMK NeXT Keyboard Converter does not support mouse at this point.(2023-02)
https://github.com/tmk/tmk_keyboard/tree/master/converter/next_usb
make -f Makefile.unimap clean
make -f Makefile.unimap
make -f Makefile.unimap dfu
Edit MCU
in Makefile for your own DIY converter.
For prebuilt TMK NeXT Keyboard Converter you can use Keymap Editor.
You can remap keys with Keymap Editor for prebuilt TMK NeXT Keyboard Converter.
http://www.tmk-kbd.com/tmk_keyboard/editor/unimap/?next_usb
Connections to ATmega32U2/U4
FROM(Pin3): PD0
TO(Pin2): PD1
PSW(Pin4): PD4
GND(Pin5): GND
VCC(Pin1): VCC
https://deskthority.net/wiki/NeXT
_____
GND / 5 4 \ PSW
FROM | 3 2 | TO
| 1 | VCC
`-----'
FROM: keyboard to computer
TO: computer to keyboard
PSW: Power key
Power key line is normally high and is pulled to ground when pressed. PSW pin is needed to detect Power key unlike ADB.
+-----+
|Black|\
|Green|-\
|Yello|--\-------- to computer via Mini-Din 5 plug
|Orang|--/--------
|Red |-/
|Brown|/
+-----+
Black: FG
Green: GND
Yellow: PSW(Power key)
Orange: FROM Keyboard
Red: TO Keyboard
Brown: VCC
-
https://web.archive.org/web/20040210004233/68k.org/~degs/nextkeyboard.html
-
https://learn.adafruit.com/usb-next-keyboard-with-arduino-micro/research
18958.3333baud(455kHz / 24), 52.7472us per bit
- https://github.com/tmk/tmk_keyboard/issues/704
- https://journal.spencerwnelson.com/entries/nextkb.html
Then, it is just a uart signal with 10-bit frame, perhaps.
1-start bit(0), 8-data bit(lsb-first), X(0), 1-stop bit(1)
1-start bit(0), 8-data bit(lsb-first), X(1), 1-stop bit(1)
X is not parity bit, or
1-start bit(0), 9-data bit(lsb-first), 1-stop bit(1)
Stop bit can be prolonged in Host to Keyboard command at least.
____ ___ ______
\_________________/ \_________________/
S 0 1 2 3 4 5 6 7 X T S 0 1 2 3 4 5 6 7 X T
22-bit: 0x300600 uart: 0x00, 0x00
Keycode event:
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
____ _______________ _ _______________ ____
\_/_____________X_\_/ \_/_____________/ \_/
S F 0 T S a b c d e f g 1 0 T
code: bit0-6 / F: 0(pressed), 1(released)
Modifier event:
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
____ _ _ _____________ ____
\_______________/ \_/ \_/_____________\___/
S 1 0 T S a b c d e f g 0 0 T
Modifier state: 0(off), 1(on)
a: Control
b: L-Shift
c: R-Shift
d: L-Command
e: R-Command
f: L-Alt
g: R-Alt
22-bit: 0x200500 0x80, 0xMM
0 1 2 3 4 5 6 7
____ _ ____
\_________/ \_____/
S 1 1 T
22-bit: 0x620 0x10
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
____ _____ ___ __
\_________________/ \_/___\_____________/
S 1 T S L R 0 T
LED state: 0(off), 1(on)
L: Left LED
R: Right LED
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
____ _______ ___________ __
\_/ \_/ \___________________/
S 0 1 T S 0 T
,---------------------------------------------------------. ,-----------. ,---------------.
|Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| BS | |VUp|Pwr|BrU| |` | =| /| *|
|---------------------------------------------------------| |-----------| |---------------|
| Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |VDn| |BrD| | 7| 8| 9| -|
|---------------------------------------------------------| `---' `---' |---------------|
| Ctrl | A| S| D| F| G| H| J| K| L| ;| '|Return| | 4| 5| 6| +|
|---------------------------------------------------------| ,---. |---------------|
| Shift | Z| X| C| V| B| N| M| ,| .| /| Shift | |Up | | 1| 2| 3| |
|---------------------------------------------------------| ,-----------. |-----------|Ent|
|Alt |Cmd | Space | Cmd | Alt | |Lef|Dow|Rig| | 0| .| |
`---------------------------------------------------------' `-----------' `---------------'
,---------------------------------------------------------. ,-----------. ,---------------.
| 49| 4A| 4B| 4C| 4D| 50| 4F| 4E| 1E| 1F| 20| 1D| 1C| 1B | | 1A|*58| 19| | 26| 27| 28| 25|
|---------------------------------------------------------| |-----------| |---------------|
| 41 | 42| 43| 44| 45| 48| 47| 46| 06| 07| 08| 05| 04| 03| | 02| | 01| | 21| 22| 23| 24|
|---------------------------------------------------------| `---' `---' |---------------|
| *57 | 39| 3A| 3B| 3C| 3D| 40| 3F| 3E| 2D| 2C| 2B| 2A | | 12| 18| 13| 15|
|---------------------------------------------------------| ,---. |---------------|
| *56 | 31| 32| 33| 34| 35| 37| 36| 2E| 2F| 30| *55 | | 16| | 11| 17| 14| |
|---------------------------------------------------------| ,-----------. |-----------| 0D|
| *52 | *54 | 38 | *53 | *51 | | 09| 0F| 10| | 0B | 0C| |
`---------------------------------------------------------' `-----------' `---------------'
*: pseudo scan code
There are two variants for keyboard layout. Note that Return
and \
key are different.
https://www.nextcomputers.org/forums/index.php?topic=4918.msg29168#msg29168
Mouse is connected to keyboard and host queries to keyboard for mouse data.
0 1 2 3 4 5 6 7
____ _ _ ____
\_/ \_____/ \_____/
S 1 T
Not confirmed.
Mouse event:
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
____ _______________ _ _______________ ____
\_/_X_____________\_/ \_/_X_____________\_/
B 0 1 2 3 4 5 6 0 T S B 0 1 2 3 4 5 6 0 T
B: Button (0: pressed)
X: X-movement
B: Button (0: pressed)
Y: Y-movement
- NeXT Keyboard: https://deskthority.net/wiki/NeXT
-
NeXT Computer(N1000) have non-ADB interface on Display(N4000).
-
NeXTcube(N1000A) seems to have non-ADB interface on Display(N4000A).
-
NeXTstation seems to have ADB interface on SoundBox and Display.
-
NeXTstation Turbo(N1100)
-
NeXTstation Turbo Color(N1200)
-
SoundBox(N4004)
- https://apple.fandom.com/wiki/NeXT_MegaPixel_Display
- N4000A 17-inch monochrome
- N4001 17-inch color
- N4005 21-inch color