
Nrf bga
github-linguist/linguist
Language Savant. If your repository's language is being reported incorrectly, send us a pull request!

USB & Bluetooth to IKBD Interface for Atari ST / STE / Mega and TT
PIKBD is an open-source printed circuit board by trickydee, from the trickydee/ultramegausb-atari-st-rpikbd repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board of 98.2 × 68.8 mm with 12 parts on 60 nets, routed with 166 tracks and 0 vias.
Its parts include 3 connectors, 1 IC and 1 diode. It belongs with the retro computing and games and radio and wireless boards and the RP2040 boards of this library.
This project uses a Raspberry PI PICO to emulate the Atari iKBD keyboard controller and provides USB, Bluetooth and Atari 9 Pin connectivity for devices.
This is useful if you have an Atari Mega ST that is missing its keyboard or if you just want to use modern keyboards, mice and joysticks with your ST.
The emulator provides the ability to use USB or Bluetooth keyboards, mice and joysticks / gamepads with the ST. You can also use original 9 pin Dsub 'Atari' Joysticks!.
Currently bluetooth requires a Pico 2w device - with this it is possible to Mix and Match any combination of USB, Bluetooth or 9 Pin Atari Joystick peripherals to create your perfect atari setup. If you just want USB support any Pico device will suffice.
The project is based on an an original idea created by 'fieldofcows' in 2020, this project builds on this amazing foundation to improve compatibility, stability and add support for many modern game controllers either wired USB or wireless Bluetooth connected.
A reference hardware design (KiCad schematic and PCB) for the Atari Mega ST, Mega STE, and TT computers is included in the hardware/ directory, along with Gerber files ready for manufacture at JLCPCB or PCBWAY.

This project is open source and I am happy to receive pull requests and issues to further improve capabilities.
The following USB HID Gamepads/Joysticks are supported (More to come)
v21.0.2: Expanded USB controller support: many additional third-party PS3- and PS4-compatible VID/PIDs (same HID report format as official pads), plus Nintendo Joy-Con Charge Grip and SNES Controller (NSO).
v21.0.3: USB support for PlayStation 5 DualSense and DualSense Edge controllers; full joystick mapping and Llamatron dual-stick mode.
v21.0.4: USB support for PlayStation Classic (PSC) and HORI HORIPAD for Nintendo Switch; HORIPAD supports Llamatron dual-stick mode.
v21.0.5: Build fixes for GCC 15 / current ARM toolchains; build-all.sh continues building all board variants if Pico 2 W fails.
v22.1.1: Fixes mouse scroll wheel (cursor up/down) and multiple Bluetooth mice when a keyboard is paired; single handle_keyboard() per tick.
v22.1.0: OLED Devices / Map Devices UI; USB/BT device names on Map Devices; BLE gamepad pairing fix for Google Stadia and Xbox Wireless when BLE keyboard/mouse already connected (HID-over-GATT, flash-safe Core 1 timing).
The emulator supports Bluetooth keyboards, mice, and gamepads on the Raspberry Pi Pico 2 W (RP2350). This allows you to use wireless devices without USB cables, providing a completely wireless setup for your Atari ST.
For USB devices, just connect your device via the Pico's USB port using a USB OTG HUB. The devices listed above will work a few seconds after being connected, you can confirm they are detected on the OLED screen, if you find a modern device that does not let me know via an issue ticket.
Pairing is simple - just put your device into Bluetooth pairing mode. The emulator will automatically detect and connect to supported devices. The emulator continuously scans for new devices, so you can pair devices at any time without needing to restart. Most Bluetooth devices will remain paired and can be unpaired at the device ot by pressing the right - unpair button on the homescreen.
Note: During testing it has been identified that Logitech MX devices require re-pairing after each restart of the emulator.
On the splash screen (homescreen), you can use the left button to cycle between three modes:
If you need to clear stored Bluetooth pairing keys (for example, if a device won't reconnect or you want to re-pair from scratch), press the right button on the first splash screen. This will delete all stored Bluetooth pairing information, allowing you to re-pair devices from scratch.
Bluetooth gamepads work just like USB gamepads:
Note: Bluetooth support requires a Pico 2 W (RP2350). The original Pico W (RP2040) does not have enough RAM for Bluetooth support.
The emulator supports several keyboard shortcuts for convenient control:
| Shortcut | Function | Description |
|---|---|---|
| Ctrl+F4 | Llamatron Dual-Stick Mode | Share a single dual-stick gamepad (USB or Bluetooth) across Joystick 0 & 1 for Twinstick shooters see Llamatron Dual-Stick Mode section |
| Ctrl+F8 | Restore Joystick Mode | Sends 0x14 to restore joystick event reporting (useful after reconnect) |
| Ctrl+F9 | Toggle Joystick 0 | Switches Joystick 0 between D-SUB and USB |
| Ctrl+F10 | Toggle Joystick 1 | Switches Joystick 1 between D-SUB and USB |
| Ctrl+F11 | XRESET | Triggers HD6301 hardware reset (like power cycling the IKBD) |
| Ctrl+F12 | Toggle Mouse Mode | Switches between USB mouse and joystick 0 * |
| Alt+/ | INSERT Key | Sends Atari ST INSERT key (useful for sending mouse click on Logitech Mac USB keyboards) |
| Alt+[ | Keypad /** | Sends Atari ST keypad divide key |
| Alt+] | Keypad *** | Sends Atari ST keypad multiply key |
| Alt+Plus | Set 270MHz | Overclocks RP2040 to 270MHz for maximum performance |
| Alt+Minus | Set 150MHz | Sets RP2040 to 150MHz for stability |
For reference, these shortcut keys emit the following HD6301/IKBD command sequences:
| Shortcut | Command Sequence | Effect |
|---|---|---|
Ctrl+F5 | 0x1A 0x00, 0x92 0x00, 0x08 | Disable joystick reporting, enable mouse, enter relative mode |
Ctrl+F6 | 0x1A 0x00, 0x92 0x00, 0x09 0x02 0x80 0x01 0x90 | Disable joystick, enable mouse, enter absolute mode (640×400) |
Ctrl+F7 | 0x1A 0x00, 0x92 0x00, 0x0A 0x01 0x01 | Disable joystick, enable mouse, set mouse keycode mode |
Ctrl+F8 | 0x14 | Restore joystick event reporting |
Ctrl+F11 | XRESET line | Full IKBD reset pulse |
Alt+/, [, ] | 0x52, 0x65, 0x66 | Insert / keypad divide / keypad multiply |
*A real ST keyboard has a single DB-9 socket which is shared between the mouse and Joystick 0. The emulator allows you to have a mouse and joystick plugged in simultaneously but you need to select whether the mouse or joystick 0 is active. This can be toggled by pressing the Scroll Lock or Ctrl+F12 keys on the keyboard. The current mode is shown on the OLED display.
If you love Lammatron and Robotron - Who doesnt ;-) Your going to like Lammatron mode, which enables twinstick functionality for modern controllers.
Ctrl+F4 enables “Llamatron” mode: if exactly one gamepad (USB or Bluetooth) with two thumbsticks is connected (and both Atari joystick ports are set to USB), the left stick + face buttons continue to drive Joystick 1, the right stick transparently emulates Joystick 0 movement, and the east/right face button (Circle on PlayStation, B on Xbox, A on Switch, B on Stadia) becomes Joystick 0 fire. How it works:
Requirements:
Automatic deactivation: The mode automatically suspends itself if:
This feature works seamlessly with both USB and Bluetooth gamepads, allowing you to enjoy twin-stick shooters wirelessly on your Atari ST.
The emulator displays a simple user interface on an OLED display. This is entirely optional and you can build a working version without it but it is certainly useful to show successful connection of your USB devices as well as to allow the mouse speed to be tweaked and to view the data flowing between the emulator and the Atari ST.
The interface is available in English, French, German, Spanish and Italian.


The emulator supports both USB and Atari ST compatible joysticks, supported a maximum of two joysticks at a time. Using the user interface you can select whether the USB joystick or Atari joystick are assigned to Joysticks 0 and 1.
The Atari ST keyboard contains an HD6301 microcontroller that can be programmed by the Atari TOS or by user applications to read the keyboard, mouse and joysticks. The keyboard is connected to the Atari via a serial interface (7812.5bps). Commands can be sent from the Atari to the keyboard and the keyboard sends mouse movements, keystrokes and joystick states to the Atari.
Instead of writing code to handle the serial protocol between the Atari and the keyboard, this project provides a full emulation of the HD6301 microcontroller and the hardware connected to it. This means that it appears to the Atari as a real keyboard, and can be customised and programmed by software like a real keyboard, providing maximum compatibility.
The RP2040/RP2350 USB host port or RP2350 Bluetooth is used to connect a keyboard, mouse and joysticks using a USB hub. These are translated into an emulation of the relevant device and fed into the emulated HD6301 control registers, allowing the HD6301 to determine how to communicate this with the Atari.
The emulator is configured as per the schematic below.

All of the external components except the level shifter are optional - you do not need to include the display and buttons if you are happy to use the keyboard shortcuts for changing settings. Also, if you only plan to use USB or Bluetooth gamepads / joysticks then you can omit the DB-9 connectors.
The level shifter is required as the Atari uses 5V logic over the serial connection whereas the Pico uses 3.3V logic.
A reference PCB design is available in KiCad format in the hardware/ directory for the following Atari computers:
The design includes:
gerbers/ subdirectoryultramegausb-atari-mega-adapter-2.2-gerbers.zipYou can upload the ultramegausb-atari-mega-adapter-2.2-gerbers.zip file directly to PCB manufacturers such as JLCPCB or PCBway to order your own boards.


The reference adapter is very simple to construct and is also suprisingly cheap. The table below shows example pricing. A single adapter can be made for around $20.
| Component | Quantity | Required | Link / Comment | Aprx Cost |
|---|---|---|---|---|
| Raspberry PI Pico | 1 | Y | Pico 2040 / 2350 Module | $7 |
| 1 x 20 Pin 2.54 Single Row Male Pin Header Connector | 2 | N | PCB Pico connector - Optional Pico may be soldered to PCB. | inc with Pico |
| 1 x 20 Pin 2.54 Single Row Female Pin Header Connector | 2 | N | PCB Pico connector - Optional as Pico may be soldered to PCB. | $7 for 10 |
| Bi-Directional 4 Channel logic level shifter / converter module 3.3v - 5v | 1 | Y | $7 for 10 | |
| 1 x 6 Pin 2.54 Single Row Male Pin Header Connector | 2 | Y | PCB Voltage Regulator connector | inc with Shifter |
| 1 x RJ12 Unshielded 90 Degree push in type 6P6C connector | 1 | Y | Atari Mega ST/TT Keyboard Connector | $9 for 30 |
| 1 x 6 Pin 2.54 Single Row Female Pin Header Connector | 2 | N | PCB Voltage Regulator connector | $2 for 20 |
| OLED 0.96" Display 128x64 I2C SSD1306. | 1 | N | OLED Display - Blue / White / Yellow + Blue | $4 |
| 1 x 4 Pin 2.54 Single Row Male Pin Header Connector | 1 | N | OLED Connector | inc with OLED |
| Micro Push Button Switch - 6mm x 6mm x5mm | 3 | N | OLED Control buttons | $12 for 20 |
| Micro Push Button Switch - 6mm x 6mm x5mm | 1 | N | Pico Reset buttons | As Above |
| 1 x 4 Pin 2.54 Single Row Female Pin Header Connector | 1 | N | PCB OLED connector | $2 for 20 |
| 9 Pin Male D-Sub Socket PCB Board Mount Connector | 2 | N | 9 Pin Joystick Port | $10.14 for 30! |
| PCB Print at JLPCB | 1 | Y | Example print | $10 for 5 |
You will also need a straight through R12 to RJ12 Cable (All 6 pins connected) to connect between the Atari and the Adapter. These can be purchased pre made from Amazon (A modem cable will do if all 6 pins are terminated).
Compiling on the mac requires xcode, gcc and arm embedded toolchain. A build can be performed with the following commands:
# Default: Pico 2 W production only (fastest for BT development)
./build-all.sh
# Incremental rebuild (keeps build/build-pico2_w/ between runs)
CLEAN_BUILD_DIRS=0 ./build-all.sh
# All boards, all in dist/
BUILD_BOARDS=all ./build-all.sh
# Debug OLED screens
DEBUG=1 ./build-all.sh
# French interface
LANGUAGE=FR ./build-all.sh
# Output (default run): dist/atari_ikbd_pico2_w_production.uf2build-all.sh environment variables| Variable | Default | Description |
|---|---|---|
BUILD_BOARDS | pico2_w | Board(s) to build: pico2_w, comma-separated pico,pico2,pico_w,pico2_w, or all |
BUILD_VARIANT | production | production (OLED on, minimal log), debug (verbose log), or speed (no OLED) |
SKIP_VARIANTS | 1 | 1 = single variant only; 0 = after a debug build, also build production and speed |
CLEAN_BUILD_DIRS | 1 | 1 = wipe build trees before/after; 0 = keep build/build-* for incremental rebuilds |
DEBUG | 0 | 1 = debug OLED UI screens (independent of BUILD_VARIANT) |
LANGUAGE | EN | EN, FR, DE, SP, or IT |
UF2 files are written to dist/ with names like atari_ikbd_pico2_w_production.uf2. CMake trees live under build/build-{pico|pico2|pico_w|pico2_w}/.
PC (Linux)
#Install GCC
sudo apt install gcc-arm-none-eabi
#Install cmake
sudo apt install cmake
# Clone the main repo in your home folder
git clone --recursive https://github.com/trickydee/ultramegausb-atari-st-rpikbd.git
# Update submodules
cd ultramegausb-atari-st-rpikbd
git submodule update --init --recursive
# Fix missing hidparser include in CMakeLists.txt (if needed)
# Open file: ultramegausb-atari-st-rpikbd/pico-sdk/src/rp2_common/tinyusb/CMakeLists.txt
If not present, add this line after line 91: ${PICO_TINYUSB_PATH}/src/class/hid/hidparser/HIDParser.c
You should have:
target_sources(tinyusb_host INTERFACE
${PICO_TINYUSB_PATH}/src/portable/raspberrypi/rp2040/hcd_rp2040.c
${PICO_TINYUSB_PATH}/src/portable/raspberrypi/rp2040/rp2040_usb.c
${PICO_TINYUSB_PATH}/src/host/usbh.c
${PICO_TINYUSB_PATH}/src/host/usbh_control.c
${PICO_TINYUSB_PATH}/src/host/hub.cIf you don't know how or can't build the firmware by yourself, please use the builds in the releases link.
If you build the emulator as per the schematic, the Pico is powered directly from the Atari 5V supply. The Pico boots immediately but USB enumeration can take a few seconds. Once this is complete, the emulator is fully operational.
The user interface has multiple pages that are rotated between by pressing the middle UI button. The first three pages all show the number of connected USB devices at the top but allow configuration of an option below. The pages in order are:
Splash Screen (ATARI logo): Shows firmware version and connection status. On Pico 2 W builds with Bluetooth support:
USB Status + Mouse speed. Left and right buttons change allow the mouse speed to be altered.

USB Status + Joystick 0 assignment. Left and right buttons toggle between USB joystick and DB-9 joystick.

USB Status + Joystick 1 assignment. Left and right buttons toggle between USB joystick and DB-9 joystick.

If you have a debug version deployed you will see Serial data Tx/Rx between emulator and Atari (Debug builds Only). Data received from the Atari is on the left, data sent to the Atari is on the right.

Note: The serial data page should only be used for ensuring the connection works. Displaying the page slows down the emulator and you may seem some mouse lag whilst it is active.
The emulator supports multiple types of USB game controllers with reliable hot-swapping:
The original fieldofcows build had to fix a number of TinyUSB bugs and contained a patched branch of the TinyUSB code. This project uses the latest mainline version of Tiny USB with customizations being externalized,
This build also fixes the following bugs in the original build:
The project is based on an an original idea created by 'fieldofcows' in 2020 - https://github.com/fieldofcows/atari-st-rpikb. This project builds on this great foundation to improve compatibility, stability and add support for many modern game controllers either wired USB or wireless Bluetooth connected.
The "ultramegausb" title is tongue in cheek and intended to highlight the massively enhanced capabilities made possible by the great work of TinyUSB project, Bluepad32 and associated projects listed below.
The project uses code extracted from Steem SSE. All of the work of wiring up the keyboard functions to the HD6301 CPU is credited to Steem SSE. This project contains a stripped-down version of this interface, connecting it to the Raspberry Pi's serial port.
Steem itself uses the HD6301 emulator provided by sim68xx developed by Arne Riiber. The original website for this seems to have gone but an archive can be found here.
The code to handle the OLED display is Copyright (c) 2021 David Schramm and taken from https://github.com/daschr/pico-ssd1306.
Bluetooth support is provided by the Bluepad32 project by Ricardo Quesada https://github.com/ricardoquesada/bluepad32.
Multi-language build support was added by Klyde https://github.com/klyde2278/atari-st-rpikb who also sells a nice kit and device to run this firmware on.
To create this ultramegausb build I also relied on the following projects for inspiration and reference implementations:
A large portion of the code was generated using Cursor AI and Claude LLM.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 2 | Conn_01x06_MountingPin | Connector_PinSocket_2.54mm:PinSocket_1x06_P2.54mm_Vertical | J2, J3 |
| 2 | DE9_Receptacle_MountingHoles | Connector_Dsub:DSUB-9_Male_Horizontal_P2.77x2.84mm_EdgePinOffset7.70mm_Housed_MountingHolesOffset9.12mm | Joystick0, Joystick1 |
| 1 | Conn_01x04_MountingPin | Connector_PinSocket_2.54mm:PinSocket_1x04_P2.54mm_Vertical | Display1 |
| 1 | LED | LED_THT:LED_D3.0mm | D1 |
| 1 | Pico | Raspberry PI Pico:RPi_Pico_SMD_TH | U1 |
| 1 | RJ12 | Connector_RJ:RJ12_Amphenol_54601-x06_Horizontal | J1 |
| 1 | SW_Enter | Button_Switch_THT:SW_PUSH_6mm | Enter1 |
| 1 | SW_Left | Button_Switch_THT:SW_PUSH_6mm | <-1 |
| 1 | SW_Reset | Button_Switch_THT:SW_PUSH_6mm | Reset |
| 1 | SW_Right | Button_Switch_THT:SW_PUSH_6mm | ->1 |

github-linguist/linguist
Language Savant. If your repository's language is being reported incorrectly, send us a pull request!


google/mozc-devices
Circuit diagrams and firmware source code for Gboard DIY keyboards



hackclub/OnBoard
💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

VoronDesign/Voron-Tap
Tap is a nozzle-based z-probe for the V2 and Trident printer designs. The entire toolhead moves to trigger an optical switch. Tap offers many advantages:

stacksmashing/pico-tpmsniffer
A simple, very experimental TPM sniffer for LPC bus
It measures 98.2 × 68.8 mm and has 2 copper layers, 1.6 mm thick.
12 parts. 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 trickydee/ultramegausb-atari-st-rpikbd repository on GitHub, at the commit this page was made from: the board is hardware/Atari-Mega-TT-adapter-v2.2/PIKBD.kicad_pcb and its schematic hardware/Atari-Mega-TT-adapter-v2.2/PIKBD.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository publishes it under the GPL-3.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).