
Unijoysticle2 c64
ricardoquesada/unijoysticle2
Bluetooth gamepad support for the Commodore 64 / Atari / Amiga, etc.

Use bluetooth joysticks with your MSX computer
Msx joyblue v2-build2 is an open-source printed circuit board by herraa1, from the herraa1/msx-joyblue-v2 repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board of 62 × 72 mm with 64 parts on 82 nets, routed with 629 tracks and 97 vias.
It is built around the CH340C, ESP32-WROOM-32E and 74LS03P-E, with the AMS1117-3.3 and S8050 among its other parts. Its parts include 16 resistors, 14 capacitors, 7 ICs, 6 diodes and 5 switches. It belongs with the retro computing and games and keyboards and input boards and the ESP32 boards of this library.
Connect Bluetooth controllers to MSX computers
The msx-joyblue is an adapter that allows connecting Bluetooth controllers to MSX General Purpose I/O Interfaces (aka joystick ports).
The adapter is based on the unijoysticle2 and bluepad32 projects, both owned by Ricardo Quesada.
The main features of the msx-joyblue v2 adapter are:
The msx-joyblue v2 adapter uses an ESP32-WROOM-32E chip to convert the Bluetooth controller actions to the MSX joystick standard signalling.
A two-sided printed circuit board (PCB) is used to put together all components:
Connection to the MSX general purpose I/O interfaces is implemented using DE9 joystick extension cables with a female DE9 connector on one side and a loose end on the other side. The MSX joystick extension cable loose end is wired according to the following pinout mapping.
| MSX side pin | Cable color (may vary) | Signal |
|---|---|---|
| 5 | Brown | +5v |
| 4 | Orange | RIGHT |
| 3 | Grey | LEFT |
| 2 | Black | DOWN |
| 1 | Red | UP |
| 6 | Green | TRIG1 |
| 7 | White | TRIG2 |
| 8 | Blue | STROBE |
| 9 | Yellow | GND |
[!WARNING] The msx-joyblue v2 adapter uses a different pin order on the PH2.0 header than the msx-joyblue v1 adapter.
Make sure you respect the correct pin order for msx-joyblue-v2.
Please, use msx-joyblue-v2 Build2c for making new boards.
You can find ready to order PCBs and the complete BoM at the PCBWay community site.
Interactive Bill Of Materials (BoM)
The Build2c adapter implements the following changes since Build2b:
[!NOTE] Build2b was never fabricated and has been marked obsolete. Use the recommended build instead.
The Build2b is similar to Build2 but changes slightly some silkscreen text and graphics.
[!NOTE] Build2 has been marked obsolete. Use the recommended build instead.
The Build2 adapter mimics completely the standard MSX joystick behavior:
This build uses discrete logic components to honor the pin8 signaling (four 74LS03DR quad 2-input positive-nand gates with open collector outputs) and uses open collector outputs which makes the adapter safer 1 than the standard MSX joystick schematic depicted in the MSX Technical Data Book, as it avoids a series of undesired conditions that can lead to bus contention/short circuits.
The msx-joyblue v2 adapter firmware uses Ricardo Quesada bluepad32 library to drive Bluetooth controllers. A small modification to the library that enables support for MSX computers has been already commited to the main branch.
See bluepad32 documentation for supported Bluetooth controllers.
A simple yet functional acrylic enclosure design is included.
The msx-joyblue adapter uses about ~107mA when operating, while a single MSX general purpose I/O interface is capable of delivering up to 50mA according to the MSX standard 2. That means that even using two MSX general purpose I/O interfaces (50mA + 50mA = 100mA) we are slightly over (107mA) the max current specification for the MSX general purpose I/O interfaces.
Thus, the safest way to power the msx-joyblue adapter is by powering it via the USB mini connector of the board using an external 5V USB power supply. The board automatically powers up when using the USB mini connector without enabling any switch.
Nevertheless, even if the MSX especification puts such a low limit on the current that can be drawn from a general purpose I/O interface, real MSX hardware usually can safely deliver enough current for the msx-joyblue adapter to work correctly without harming our beloved classic computers.
Taking that into account, the msx-joyblue adapter has been enabled to be optionally powered by the MSX general purpose I/O interfaces port 1 and port 2.
To enable powering the msx-joyblue adapter from Port 1 and/or Port 2, the switch SW5 JOY PWR must be first turned on by sliding the switch handle to the right.
[!NOTE] A 1N5819 SMD Schottky diode D3 is used to avoid leaking current from the msx-joyblue adapter to the MSX in case the msx-joyblue adapter is powered by USB while the JOY PWR switch is ON. Another 1N5819 SMD Schottky diode D2 prevents backpowering the USB side from the MSX side. And two Positive Temperature Coeficient (PTC) resettable fuses F1 and F2 of 50mA each protect the MSX general purpose I/O interfaces port 1 and port 2 from excess of current in case something goes horribly wrong on the msx-joyblue adapter side.
To power the msx-joyblue adapter using the MSX general purpose I/O interfaces we must first understand how the PTC protections on the msx-joyblue adapter are implemented.
The selected PTCs are rated for 50mA which is the so called Hold Current (the maximum current that can flow in normal operation). There is also the Trip Current (the minimum current necessary for the PTC to move to high-resistance state) which for the selected PTCs is around 100mA. Those thresholds are dependent on temperature and voltage. And to make things more undeterministic, the behavior of the PTC when current is between those thresholds is undefined (it may trip or not).
In normal operation and for a room temperature of around 25 degrees Celsius, the selected PTCs in practice never trip below 75mA.
[!NOTE] Depending on the exact PTCs installed, the trip current may be slightly different and the adapter may trip at a different point. Unless you buy the PTCs from a reliable source, it is very difficult to know the exact PTC specifications.
Remember that the PTCs are provided as a safeguard in case something goes really wrong on the adapter, not to act as an exact current limiter to strictly comply with the 50mA per-port MSX specification.
So if our MSX computer can safely provide more than 50mA on each MSX general purpose I/O interface (which is usually the case), we can connect both Port 1 and Port 2 to the MSX computer and turn on the SW5 JOY PWR switch to power the msx-joyblue adapter. Note that we need to connect both ports even if we use just one Bluetooth gamepad, just to meet the power requirements.
Two jumpers JP2 and JP3 can be used to bypass the PTC protections for Port 1 and Port 2 respectively.
[!WARNING] Bypassing the PTC protections may damage your MSX computer. Do not bypass the PTC protections unless you known what you are doing.
By closing JP2 (and/or JP3) and if our MSX computer can safely provide more than 100mA on a single MSX general purpose I/O interface, we can connect Port 1 (or Port 2) to the MSX computer and turn on the SW5 JOY PWR switch to power the msx-joyblue adapter using a single joystick port.
In summary, we can use the following options to power the msx-joyblue adapter (from safest to less safe):
| Switch | State | Description |
|---|---|---|
| JOYPWR | Off | power from MSX computer via joystick port(s) is off (except logic gates) |
| JOYPWR | On | board electronics get power from MSX computer via joystick port(s) |
[!NOTE] If you plug a +5V USB power supply to the USB mini connector, the adapter will turn on unconditionally irrespective of the JOYPWR switch position.
| Button | Description |
|---|---|
| MODE | change the operation mode of the connected gamepad between "basic mode" and "twin stick mode" |
| SWAP | swap connected gamepads between MSX joystick ports |
| RESET | restart the firmware, gamepads get disconnected |
| LED | State | Indication |
|---|---|---|
| POWER | Off | board is not receiving 3V3 power |
| POWER | Solid Red | board is receiving 3V3 power |
| Port1 | Off | no gamepad is controlling Port 1 |
| Port1 | Solid Green | a connected gamepad is controlling Port 1 |
| Port1 | Blinking Green | Every 1sec, PTCs are tripping, see Troubleshooting |
| Port2 | Off | no gamepad is controlling Port 2 |
| Port2 | Solid Green | a connected gamepad is controlling Port 2 |
| BT DISC | Off | Bluetooth discovery is off, no new connections are accepted, existing connections (if any) stay on |
| BT DISC | Solid Blue | Bluetooth discovery is on, new connections are accepted, both "connects" and "re-connects" are accepted |
See also the Unijoysticle user guide, keeping in mind that led colors are slightly different.
Q: Just after powering the board POWER led is solid red, Port2 and BT DISC leds are off and the Port1 led is solid green, but the adapter does not work
A: Press the reset button to reinitialize the adapter, the BT DISC led should go solid blue shortly, when the adapter is ready.
Q: I did the reset, but now the Port1 led blinks every second, the BT DISC led is off and the Port2 is solid green but the adapter does not work
A: The PTC fuses are tripping preventing the adapter to properly work. See the Powering the msx-joyblue adapter section: use a USB power supply or install the fuse bypass jumpers.
Q: The BT DISC led went off, what happened?
A: You either have 2 gamepads already connected or have turned on the Twin Stick mode.
This can happen too if the PTC fuses are tripping (see previous question).
Q: My Wiimote does not connect
A: If the adapter was previously connected, try pushing any Wiimote button until the Wiimote connects. If that does not work, open the battery compartment and press the red SYNC button to pair the Wiimote with the adapter.
| Model | Adapter PCB v2 Build2c |
|---|---|
| Sony MSX HB-101P | OK |
| Sony MSX HB-501F | OK |
| Toshiba MSX HX-10P | OK |
| Philips MSX2 VG-8235 | OK |
| Panasonic MSX2+ FS-A1WSX | OK |
| Omega MSX2+ | OK |
| MSXVR | OK |
| Tides Rider | OK |
| JFF-TMSHAT | OK |
Follow these Build instructions in order to assemble the msx-joyblue v2 adapter.
Ricardo Quesada bluepad32 library
Ricardo Quesada Unijoysticle2 project
MSX general purpose I/O interface
https://www.msx.org/wiki/Joystick/joypad_controller (see "Undesired Conditions") ↩
| Qty | Value | Footprint | References |
|---|---|---|---|
| 6 | 10K | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R1, R3, R4, R10, R11, R13 |
| 6 | 3.3K | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R8, R9, R12, R14, R15, R16 |
| 4 | .1uF | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C1, C2, C4, C9 |
| 4 | 0.1uF | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C11, C12, C13, C14 |
| 4 | 22uF | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C3, C5, C7, C8 |
| 4 | 74LS03 | Package_SO:SOIC-14_3.9x8.7mm_P1.27mm | U4, U5, U6, U7 |
| 4 | MountingHole_Pad | My_Components:Hole_3mm | H1, H2, H3, H4 |
| 3 | 1K | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R5, R6, R7 |
| 2 | 1N5819 | Diode_SMD:D_SOD-123 | D2, D3 |
| 2 | 50mA | Fuse:Fuse_1206_3216Metric_Pad1.42x1.75mm_HandSolder | F1, F2 |
| 2 | S8050 | Package_TO_SOT_SMD:SOT-23 | Q1, Q2 |
| 1 | 1uF | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C10 |
| 1 | 2200uF | Capacitor_SMD:CP_Elec_10x10.5 | C6 |
| 1 | 3K3 | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R2 |
| 1 | AMS1117-3.3 | Package_TO_SOT_SMD:SOT-223-3_TabPin2 | U2 |
| 1 | BOOT | Unijoysticle:SW_Push_1P1T_NO_5.1x5.1mm | SW2 |
| 1 | BT DISC | LED_SMD:LED_0805_2012Metric_Pad1.15x1.40mm_HandSolder | D6 |
| 1 | CH340C | Package_SO:SOIC-16_3.9x9.9mm_P1.27mm | U3 |
| 1 | ESP32-WROOM-32E | My_Components:ESP32-WROOM-32 | U1 |
| 1 | I2C | Connector_JST:JST_PH_B4B-PH-K_1x04_P2.00mm_Vertical | J4 |
| 1 | J1 Fuse Bypass | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | JP2 |
| 1 | J2 Fuse Bypass | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | JP3 |
| 1 | JOY PWR | My_Components:SW_SK-12D07G6-1P2T-6mm | SW5 |
| 1 | LOGO | My_Components:msx-joyblue-logo | G*** |
| 1 | Logo_Open_Hardware_Large | Symbol:OSHW-Logo_7.5x8mm_SilkScreen | SYM1 |
| 1 | MODE | Button_Switch_THT:SW_Tactile_SPST_Angled_PTS645Vx39-2LFS | SW3 |
| 1 | MSX Port1 | Connector_JST:JST_PH_S9B-PH-K_1x09_P2.00mm_Horizontal | J2 |
| 1 | MSX Port2 | Connector_JST:JST_PH_S9B-PH-K_1x09_P2.00mm_Horizontal | J3 |
| 1 | PWR | LED_SMD:LED_0805_2012Metric_Pad1.15x1.40mm_HandSolder | D1 |
| 1 | Port1 | LED_SMD:LED_0805_2012Metric_Pad1.15x1.40mm_HandSolder | D4 |
| 1 | Port2 | LED_SMD:LED_0805_2012Metric_Pad1.15x1.40mm_HandSolder | D5 |
| 1 | RESET | Button_Switch_THT:SW_Tactile_SPST_Angled_PTS645Vx39-2LFS | SW1 |
| 1 | SWAP | Button_Switch_THT:SW_Tactile_SPST_Angled_PTS645Vx39-2LFS | SW4 |
| 1 | USB_B_Mini | Connector_USB:USB_Mini-B_Lumberg_2486_01_Horizontal | J1 |

ricardoquesada/unijoysticle2
Bluetooth gamepad support for the Commodore 64 / Atari / Amiga, etc.


rudnik275/astronaut-lamp
Ночник «космонавт на луне» → нативное HomeKit-устройство на ESP32 + HAA: разбор родной платы, схема драйвера, конфиг, корпус

joefscholtz/current_monitoring_esp32
Firmware and hardware design ESP32 and ESP-IDF framework for measuring current and detecting leakage using CT sensors.



herraa1/msx-joyduke-v1
Use original Xbox joysticks with your MSX computer

hackclub/OnBoard
💡 Join 1,000 teenagers and make your first PCB with a $100 grant!
It measures 62 × 72 mm and has 2 copper layers, 1.6 mm thick.
64 parts, built around the CH340C, ESP32-WROOM-32E, 74LS03P-E and AMS1117-3.3. 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 herraa1/msx-joyblue-v2 repository on GitHub, at the commit this page was made from: the board is hardware/kicad/msx-joyblue-v2-build2c/msx-joyblue-v2-build2.kicad_pcb and its schematic hardware/kicad/msx-joyblue-v2-build2/msx-joyblue-v2-build2.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).