
UniversalKeyboardAdapter
roberto314/UniversalKeyboardAdapter
a replacement USB Keyboard for Retro Computers. Supports serial, parallel, matrix and PS2 - like protocols.

a replacement USB Keyboard for Retro Computers. Supports serial, parallel, matrix and PS2 - like protocols.
Mainboard 8x16 multi USB is an open-source printed circuit board by roberto314, from the roberto314/UniversalKeyboardAdapter repository on GitHub, published under the BSD-2-Clause licence. It is a 2-layer board of 100 × 58.5 mm with 44 parts on 111 nets, routed with 1,222 tracks and 120 vias.
It is built around the 74LS245SC. Its parts include 11 resistors, 11 connectors, 8 diodes, 5 ICs and 4 capacitors. It belongs with the keyboards and input and computers and single-board computers boards and the STM32 boards of this library.
A USB Keyboard to Retro Computer Adapter with focus on universality and longeivity.
Version: 1.28 (Software), 3.21 (Hardware)

Because many of the solutions use a "small" PIC or Atmel microcontroller and have to use PS2 Protocol. I wanted something with USB because you can use wireless keyboards (i know there are wireless PS2 KBs), and modern solutions like your own keyboard with QMK or TMK firmware or nice mechanical KBs. Also if you have more than one "Retro-Computer" it could get quite costly if you need more than one converter.
To read the PS2 Scancodes a small Hardware modifikation can be necessary! Readback is now on B13,B14.
--- USE ONLY ONE 5V INPUT WHEN A COMPUTER IS CONNECTED TO EITHER PORT! --- That means no additional 5V Source.
The Serial Speed is 115200 8N1 with 3.3V Level. If you open a serial Port with a terminal emulator program (Realterm on Windows or picocom on linux) you'll get a prompt which looks like this: "ch> ".
With "help" you get a list of builtin commands. If you connect a Keyboard to the USB Port you get a Message like
"00316.849 HID: Connected, HID0" - that means the keyboard is recognized. If on the other hand you get:
"00151.938 Unable to load driver." - the Keyboard cannot be used.
If you press "d" and "b" BOTH at the same time you'll get additional debug output. Successful entry to the configuration menu is shown at the increased blinking speed of the blue LED.
You get an output like this:
-------------------------------
Scancode1 04 with modifier 00 entered
Length of output codes1: 01
code: 10
Output Data: 10 active: 01
Output Data: 10 active: 00
Keycode1 found at offset: 0016
Locking Key: 0000
matrix store one key first place: 10
matrix release one key first place: 10This means a mapped Output code is found. If you get this however:
-------------------------------
Scancode1 35 with modifier 00 entered no output is mapped.
The Output means the following: Scancode1 04 with modifier 00 is the HEX Code from the USB Keyboard.
modifier 00 is the modifier bits (1-CTRL, 2-SHIFT, 4-LALT, 8-LWIN, 10-NUMLOCK, 20-CAPSLOCK, 40-RALT, 80-RWIN) these can be found in keyboard_usb.h.
Length of output codes: 01 means one byte output code: 10 with code 0x10. Output Data: 10 active: 01 Output 10 has been activated (Switch turned on). Output Data: 10 active: 00 Output 10 has been deactivated (Switch turned off).
Keycode1 found at offset: 0016 Offset in map where the scancode and modifier has been found.
Maximum size of data is 4056 byte, one entry is at least 4 byte but can be 8 byte.
For example: If you have an 8x8 Matrix connect ROW0 to ROW7 and COL0 to COL7.
EPROM can be a Winbond 25X or 25Q Series with 1-64MBit. (maybe more look in eprom.c and eprom.h)
the last 4k Page is used to store the last used map (16bit). If a value == 0xFFFF is found it uses the value before as the map id.
Maps are 4kB each.
If no EPROM is found the values from the internal ROM are used.
to store the map to EPROM in config Mode: (press c + o on the keyboard, watch the LED blink fast)
Changing a map is in config mode:
To change data in the header of a map simply use "kwiz" change the data and the exit with "x". Check with dumpcon for correct inputs and save the map in-place with CTRL+F11 in config mode.
To load the hardcoded data and NOT the Eprom content delete simply the last Page in the Eprom. The info comes at startup:
Winbond W25X Series found. Size: 2 MBIT.
Looking for last stored map from 3F000 to 3F0FF
Found stored map address at pos: 3F00C
Loading map from EPROM @ 0
keymap TRS-80_MC10_GER loaded.In this case clrpee 0x3F000 deletes all the entries without deleting the data. It is still possible to load maps with F12 or SHIFT + F12 in config mode. If one wants to load a map again at startup just press F11 in config mode.
Download ChibiStudio 20 for Windows or Linux
Get Universal Keyboard Adapter Files
Copy the code folder into the workspace_trunk folder of your ChibiStudio instalation
In the linux version open the file ChibiStudio-GCC9.2.1 in the root folder of ChibiStudio and fix your PATH (not necessary if you used ~/ChibiStudio).
Copy the contents of the folder "copy this" inside the code folder to their respective locations. (Readme.txt is your friend)
Start ChibiStudio now and delete all the projects on the left side. They don't work in linux anyway.
Import the existing Project into workspace.
Open the Project by double-click on the name. There should be a small triangle left of the name now.
Try compiling now. Either right-click on the name and select "Build Project" or use the Hammer Symbol in the menu bar.
If all works well (no errors), you are set.
Programming can be set up in "Run/External Tools/External Tools Configurations".
| Qty | Value | Footprint | References |
|---|---|---|---|
| 9 | 1k | Resistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolder | R3, R4, R5, R6, R7, R8, R9, R10, R11 |
| 8 | 1N4148 | Diode_SMD:D_1206_3216Metric_Pad1.42x1.75mm_HandSolder | D1, D2, D3, D4, D5, D6, D7, D8 |
| 4 | 100n | Capacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolder | C1, C2, C3, C4 |
| 2 | 10k | Resistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolder | R1, R2 |
| 2 | 74LS245 | Package_DIP:DIP-20_W7.62mm_LongPads | U3, U4 |
| 2 | Conn_01x03 | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical | J13, J14 |
| 1 | 8812/8816 | Jumper:SolderJumper-3_P1.3mm_Bridged12_RoundedPad1.0x1.5mm | JP1 |
| 1 | 8816/8812 | Jumper:SolderJumper-3_P1.3mm_Bridged12_RoundedPad1.0x1.5mm | JP2 |
| 1 | Apple II | Connector_PinHeader_2.54mm:PinHeader_2x08_P2.54mm_Vertical | J3 |
| 1 | Conn_01x01 | Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_Vertical | J6 |
| 1 | Conn_02x17_Odd_Even | Connector_PinHeader_2.54mm:PinHeader_2x17_P2.54mm_Vertical | J15 |
| 1 | DEBUG | Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Vertical | J4 |
| 1 | I2C | Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Vertical | J7 |
| 1 | I2C Voltage | Jumper:SolderJumper-3_P1.3mm_Bridged12_RoundedPad1.0x1.5mm | JP5 |
| 1 | MT8816_DIP | Package_DIP:DIP-40_W15.24mm_Socket_LongPads | U2 |
| 1 | MT8816_PLCC | Package_LCC:PLCC-44_SMD-Socket | U1 |
| 1 | MT8816_TQFP | Package_QFP:TQFP-44_10x10mm_P0.8mm | U7 |
| 1 | Mini-DIN-6 | PS2_mini_din_6:MINI-DIN-6-FULL-SHIELD | J12 |
| 1 | Reserve | Jumper:SolderJumper-3_P1.3mm_Bridged12_RoundedPad1.0x1.5mm | JP4 |
| 1 | STM32F411 | Package_DIP:DIP-40_W15.24mm_Socket_LongPads | J1 |
| 1 | TX Voltage | Jumper:SolderJumper-3_P1.3mm_Bridged12_RoundedPad1.0x1.5mm | JP3 |
| 1 | UART | Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Vertical | J8 |
| 1 | USB_A | Connector_USB:USB_A_Wuerth_614004134726_Horizontal | J9 |

roberto314/UniversalKeyboardAdapter
a replacement USB Keyboard for Retro Computers. Supports serial, parallel, matrix and PS2 - like protocols.

roberto314/UniversalKeyboardAdapter
a replacement USB Keyboard for Retro Computers. Supports serial, parallel, matrix and PS2 - like protocols.


SukkoPera/Raemixx500
Open Hardware Remake of the Commodore Amiga 500+ Mainboard

mudmin/AnotherMaker
This is where I will store code snippets for AnotherMaker Videos


Nakazoto/CenturionComputer
This is just a simple backup of all the files related to the Centurion that I have stored on my HD. The Wiki itself has far more in-depth information about the Centurion and it's individual cards.


The-Invent0r/8-bit-Computer-PCB
These are the KiCAD files for my 8-Bit Computer.

tjboldt/Apple2-IO-RPi
Apple II expansion card using a Raspberry Pi for I/O
It measures 100 × 58.5 mm and has 2 copper layers, 1.6 mm thick.
44 parts, built around the 74LS245SC. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
From the roberto314/UniversalKeyboardAdapter repository on GitHub, at the commit this page was made from: the board is schematics/Mainboard_8x16_multi_USB/Mainboard_8x16_multi_USB.kicad_pcb and its schematic schematics/AppleAdapter/AppleAdapter.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository publishes it under the BSD-2-Clause licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).