Code Monkey home page Code Monkey logo

ps2x2pico's Introduction

ps2x2pico

USB keyboard/mouse to PS/2 interface converter using a Raspberry Pi Pico

hw1 hw2 hw3 hw4

Keyboard only (incl. PC-XT) variant: https://github.com/No0ne/ps2pico

PicoMiteVGA variant: https://github.com/No0ne/hid2cdc

PiKVM integration:

Usage

⚠️ Please note that some older motherboards have non-resettable fuses rated under 300mA.

Check the power consumption of your keyboard/mouse/hub first before plugging in!

Level Shifter wiring diagram

PS/2 Pinout diagram

⚠️ Do not assume wire colors will match cables depicted in photos. Double-check your pinout with a multimeter.

Troubleshooting

You can hook up a USB serial adapter to GPIO0 for additional debugging output. The serial settings are 115200 baud, 8 data bits and no parity. You can also use another Pico running the pico-uart-bridge for this.

⚠️ If you have a YD-RP2040 (see silkscreen on back of board if unsure) and are not using a USB hub with its own power supply, you need to bridge two pads of the diode pair near the USB-C port as seen here:

Fix for YD-RP2040

Build

(update to the latest TinyUSB release first)

export PICO_SDK_PATH=/path/to/pico-sdk
cd $PICO_SDK_PATH/lib/tinyusb
git checkout 0.16.0

cd /path/to/ps2x2pico
mkdir build
cd build
cmake ..
make

Resources

ps2x2pico's People

Contributors

bstrobel avatar no0ne avatar nvllsvm avatar serisman avatar ssokolow avatar updateing avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ps2x2pico's Issues

Freezing on KVM

I have KVM with 4 computers attached, ps2pico plugged to PC4 KVM USB port.
ps/2 ports on ZX Evolution <-> ps2pico <-> PC4 USB port on KVM / Common USB port <-> USB Logitech unifying receiver -> Logitech Mouse & Keyboard

If I switching on ZX Evolution with KVM setted to PC4 - all works perfectly untlil I have switched to PC1/2/3 computer - after several second ps2pico stop acting. Same problem if I switching on ZX Evo with KVM setted to PC1/2/3.

Debug press key

Hello, great project. Please could you indicate more specifically the configurations, connections and hardware necessary to be able to debug when a key is pressed. Thank you

Adapter causing dropped keyboard input on 386 machine

Machine details:

TMC/MyComp/MyNix/Megastar PAT38PX V3.10
1MB SIMM 30pin 70ns (x8 set)
Tseng Labs ET4000AX 1MB VGA ISA 16bit
3Com Etherlink III 3c509-COMBO
UM82C862F Multi I/O 16-Bit ISA (Floppy, IDE, 2x COM, LPT, Gameport)
Teac DF354H911A 3.5" Floppy Drive High Density
Sony CDU611 IDE CD-ROM Drive 24x
AMD Am386 DX/DXL-40 386 40MHz
3C87-33 80387 Math Coprocessor, 33MHz
Quantum Maverick ProDrive 540MB IDE
SoundMan 16 / Pro Audio Spectrum 16 Basic ISA

On MS-DOS and in games (e.g. Epic Pinball) some few inputs are dropped. If I load EMM386, the issue is exacerbated (but also happens without it).

With a regular PS/2 keyboard there are no issues :S

Tested with the latest firmware, both the regular one and the one that forces a 100 Hz rate.

Mouse wheel input is ignored on some mice

With ps2x2pico.uf2 or ps2x2pico-200hz.uf2 from the Version 1.0 release:

  • The mouse wheel registers just fine on the Gateway pack-in mouse (Model: MOAKUO) that I was testing with in case I screwed up my assembly and fried something.
  • The mouse wheel on the Acer pack-in mouse (Model: MOLDUO) that I actually use (better sensor that doesn't just give up on the white hardtop mouse pad I'm used to) has no effect
  • Both mouse wheels work just fine when plugged into a PC with USB support

Does not work with YD RP2040

This is an interesting issue (in my opinion)...

First of all, thanks for sharing this great project!!! It worked as expected with my original Raspberry Pi Pico Board using a micro USB OTG adapter to my USB keyboard...

Then I used this YD-RP2040 board:

with an USB Type C OTG adapter, but it does not work... the board is completely pin compatible with the Raspberry Pi Pico...

Do you have any clue? Thanks in advance 😄

[feature request] PS2 input repeating

Hello. I would like to use this project on my KVM which is almost older than me and has only PS2 port. But i would also like to keep my RKM working, which has ps2 output.

Can you please make optional PS2 input, so it can repeat PS2 input and also convert USB to PS2? This way i can connect both USB keyboard and PS2 keyboard to raspberry, and use both inputs. Maybe it will cause issues when used simultaneously, but otherwise it should be ok. Thank you.

Mouse issues when using PS/2 to USB adaper

First of all, love this project. I've used it numerous times on PiKVM v2 but now I'm running into a unique issue. I have a device that has independent USB mouse and keyboard inputs. I used the Pico HID to convert the HID to PS/2, then two independent PS/2 > USB adapters to convert back to USB. Is there an easy way to tweak the code to allow the Pico to just isolate Keyboard from Mouse and output to two separate USB-A? Forgive my lack of coding knowledge.

My problem when using Pico Bridge on PiKVM v4+ is when converting the PS/2 mouse back to USB the screen scrolls when I move the mouse up and down as if I am holding down a scroll wheel or mouse button.

image

Keyboard not reconnecting after power cycle

I'm using a ps2x2pico w/ a Picomite (keyboard only) and have wired up two versions, one using the level shifter board as prescribed, and one using direct wiring from pico to pico with 4k7 'pullups' going to GP13 of the ps2x2pico. Both versions work well until a power cycle, after which I need to reset the ps2x2pico by grounding the run pin before it will reconnect to the keyboard again. As a workaround, I am toggling the run pin on boot with an extra GPIO on the picomite. Love being able to use a USB keyboard for input, much thanks!

USB_keeb4pico_v3

Possible to support USB gamepad to KBD? ...and Pico W variant for built-in bluetooth?

I'm wondering if it's possible to add USB gamepad support to this project?

If I understand correctly USB gamepads are HID devices so it should be possible to support them by outputting keyboard presses for each button press?

Also, would it be possible to use the Pico W variant for built-in bluetooth?

I might try adding support for both but I don't have much experience with embedded systems (ie. I'm a C# .NET developer)

HyperX Alloy FPS Mechanical Gaming Keyboard not working

I mentioned it in my pull request. My HyperX Alloy FPS Mechanical Gaming Keyboard is behaving strangely.

Symptoms:

It is register correctly:

HID(2,3,KEYBOARD) mounted
 ID: 0951:16b7
 Manufacturer: Kingston
 Product:      HyperX Alloy FPS Mechanical Gaming Keyboard

But when a key is pressed all the events are recognized as mouse events although they come from the dev_addr/instance that was identified as KEYBOARD (i.e. dev_addr=2, instance=3 in the above example). The mouse cursor jumps wildly across the screen and ps2x2pico hangs eventually.

Investigation

I did some investigation and found out that the events identified as mouse events are actually keyboard events, but not from the simplified boot protocol that tinyusb uses but with a real HID event descriptor. They are 16 bytes long, not 8 and they have different but correct format. I wrote some code to decode them and could reliably identify all keypresses, except the EUROPE_1 and EUROPE_2 keys (these are the keys that are not present on US american keyboards, but on many european ones). The latter two keys were send in the 8 byte long boot protocol, but with the modifier bit field always 0.

So my assumption is that the keyboard in question does not support the old boot protocol but only the full featured HID protocol. Tinyusb is not able to cope with this. The tinyusb function tuh_hid_interface_protocol(dev_addr, instance) to identify the protocol of the event (i.e. if it is mouse or keyboard) is not compatible with the full protocol mode and falsely claims that it is a mouse event.

The lock up of ps2x2pico is probably due to concurrency issues. Could be due to calling the ms_usb_receive(report) function while the previous call is not finished or maybe due to a tinyusb problem where they are overrun by the events and ps2x2pico is not consuming them fast enough.

This little project here really ignited my interest and I want to dive deeper into this USB stuff. So I will continue to work on this. So maybe there will be another pull request in the future for this.

Multiple keys press on gaming keyboard to ps2 keyboard

The project has been super interesting to me, yesterday I was entertained putting it together. And now I'm testing it to use it in some FPGA products that have a PS/2 port.

The drawback that I have noticed is that I cannot press depending on which keys simultaneously (arrow keys diagonally + spacebar) even when the USB keyboard can do it (gaming keyboard with support for 5 simultaneous keys)

That would be useful for example in cases like cores of MSX computers in FPGA ZXuno or SX1mini

Data and clock pins reversed according to oscilloscope measurement?

First of all I want to share news that I managed to build working unit with HW-221 TXS0108E level converter that I had lying around:
IMG_9495 1
IMG_9494
Notable differences:

  1. GPIO13 is connected to OE of TXS0108E, instead of powering the unit. TXS0108E is powered from 3.3V and 5V pins.
  2. Only 4 of 8 are used and shifter is on the back of Rpi Pico, but HW-221 board is extremely cheap so IMHO can be better bang for buck for this project. And I have quite a stock of these boards.
  3. Looks there's a short between GND and A3, but actually they don't touch, and there's additional transparent isolation.
  4. I did not solder PS/2 plugs, instead use Dupont, since I want also to talk with boards/FPGA that have PS/2 pins but no proper sockets.

Now the problem. According to my oscilloscope I see keyboard clock on GPIO11 and data on GPIO12, which is opposite from what is written in the documentation. I checked both level shifter and Pi pins. This looks like some trivial problem but I have honestly no clue why this is happening. Any thoughts?
Test 1
image

mouse/keyboard becomes unresponsive on USB KVM switch

At the moment, the behaviour is:

  1. If I want it to work, I have to set the KVM switch to make the input devices visible before I power on the PS/2 side. (It was always like this)
  2. If I KVM switch away and back after it's started, the Logitech G203 Prodigy stops responding but the keyboard comes back fine.
  3. If I KVM switch away and back again, there's at least a chance (I only tried it once) that I'll also lose the keyboard.

In any of those failure modes, un-plugging and re-plugging the USB side doesn't fix things and never has.

EDIT: Maybe I should look up which pin is RESET and solder on an alternative to the reset pushbutton buried under the level shifter.

Originally posted by @ssokolow in #35 (comment)

Document cautions regarding current consumption

Given that PS/2 ports are rated for 275mA, that older motherboards originally used non-resettable fuses, that there's no spec requirement for newer motherboards to use resettable fuses, and that some USB keyboards draw so much power that they require two 500mA USB A plugs to stay within specified limits (my brother has one), it'd be a good idea to document the DOs and DON'Ts in that regard.

(In my case, my solution was to hang the Pi (after programming but before soldering), the keyboard I plan to use, the mouse I plan to use, and the USB/VGA KVM switch this whole endeavour is for (my HP t5530 running Win98SE gives Fatal Error 0E if you unplug a USB HID device while it's running), which doubles as a three-port USB hub, off one of those cheap Chinese Charger Doctor voltmeter/ammeter things and I got a maximum observed current draw of 0.17 amps.)

Add Buffer option

I need it to delay the mouse movement by some time.
can you edit it, so it just buffers the mouse movement received by 1 second.
just buffer all of it, doesn't have to modify it in any way just buffer the mouse data.
(at least just give me instructions on how to do this to your code I have it opened up on visual studio code.)
and specify at which line it is (delay amount) that so its editable later on by someone not smart?

also how well does the mouse work like the polling rate and dpi for the mouse. and is the mouse jittery and stuff?
also, can I use a usba cable to connect to the bidirectional level shifter with the pc, because the cables are the same color for usb and ps2? i will close the issue if you tell me to.

Inverted Y-Axis

Hi.

Just finished building the adapter and it all works great except I got some issues with the mouse.
My test system is a Pentium III WinME computer and a Razor DeathAdder USB mouse.
The keyboard works fine, but the mouse Y-Axis is inverted.

Q. Should I connect both keyboard and mouse?

I am very interested on your project. But I have little knowledge about electric and embedded.

I know you already informed keyboard only project, but I found it is easier to get 4ch logic level shifter, I soledered rp2040 clone - may be yd-rp2040, and not wired mouse.

It did not worked. So I’ve ordered original rp2040 board and trying to make one.

When I connect rp2040 to ps/2, board led turns on even though PC was turned off.

I have no idea about it.

Should I connect both keyboard and mouse connect?

Or my PC send power when turned off makes problem?

I hope original rp2040 and keyboard mouse connection can solve this!

Gamepad and joystick support

Hi!
How difficult will it be to implement gamepad support?
For example, use the gamepad buttons to emulate pressing the keyboard buttons, and move the mouse by tilting the sticks?

Mouse Issues

First of all, awesome project!

It was super easy to get a Logitech wireless keyboard/mouse (K345/M275) combo up and running on an old DOS PC with only PS2 ports.

I haven't found any issues with the keyboard at all, but the mouse code seems buggy.

I am testing with both the CTMOUSE.EXE driver as well as Microsoft MOUSE.EXE driver. With both drivers, by default, the mouse cursor jumps around pretty randomly and it seems like button presses are being toggled without actually pressing anything. No amount of tweaking the driver's resolution seems to help things. Eventually, I found that the /O switch on CTMOUSE (which enables wheel support) seems to work... about half the time. Other times it just reports 'Error: device not found".

I think what is happening is that this code is always reporting 'Mouse with scroll wheel' and sending 4-byte 'Intellimouse' data packets, even when the computer hasn't asked for them (yet). If I'm reading the documentation at (https://wiki.osdev.org/PS/2_Mouse) correctly, it seems like by default the mouse is supposed to report back type 0 'Standard PS/2 mouse' and send 3-byte data packets until a specific initialization sequence is requested to put the mouse into enhanced mode at which point it will report back type 3 'Mouse with scroll wheel' and send 4-byte data packets.

SGI O2 Ctrl acts as CAPS Lock - Scan Code Set 3 not supported

I have 2 SGI O2s that work well with any standard PC PS/2 keyboard that I have. When connecting them to my ps2x2pico adapter everything seemed to work until I pressed the Ctrl key. It acts as if it were the CAPS Lock key.

To debug this issue I connected a serial debug terminal and added these log messages in ps2kb.c
image
image

I found out that the O2 requests Scan Code Set 3:

...
kb_receive(byte = f0, prev_byte = f5) 
kb_send(byte = fa) 
kb_receive(byte = 3, prev_byte = f0) 
kb_send(byte = fa) 
...

This corresponds to the observed behaviour since make code 0x14 is Ctrl in Scan Code Set 2 and Caps Lock in Scan Code Set 3.The former is the one that is widely used and also used in your translation table in the code I assume.

So to support such old and rare hardware the proper selection and mapping of the 3 scan code sets should be implemented. I assume there is more fancy retro equipment out there that does similar things

If you're ok with it, I can do this. But no problem if you want to implement this yourself.

Chinese mechanical keyboards not being initialized

Thank you so much for your work on this! This is a life saver!

I have tried two chinese mechanical keyboards (Machenike K500 and Redragon Dark Avenger K568WP) and they are not initialized. BIOS complains about missing keyboard.
However, if I turn the computer on (and consequently the adapter as well) using another USB keyboard (have used Dells and HPs without any glitches) and then switch back to any of the two chinese keyboards, they work perfectly, until I switch the computer off and on again. Resets wouldn't affect this at all.
Interestingly, I can also make these keyboards work if I initialize the computer using a USB mouse, then switch it with any of the chinese keyboards.
Seems like there's something missing in these keyboards at initialization time.

Thanks in advance for any support in this matter!

ps2x2pico initializes too slowly to be able to enter BIOS

I just messed up the Win98SE install on my HP t5530 and, when I held F12 for "force netboot to the top of the boot order" to access my homebrew "Apple Internet Restore for DOS/Win9x PCs" so I could restore my backup, I discovered the hard way that none of those BIOS "hold X to Y" keys work, whether on a cold boot or if I warm boot via Ctrl+Alt+Del.

I'm not sure if this is fixable, but maybe there could be some kind of workaround where the ps2x2pico remembers whether a function key or Delete was being held down before a warm reboot and persists that state on the PS/2 side to the PC until USB device initialization completes and it has fresher data?

Not Found board_api.h

Build process breaks in commit 404aaf02949d5bee8013e3b5d0b3239abf6e13bd:

(...)
[ 26%] Building C object CMakeFiles/ps2x2pico.dir/src/ps2x2pico.c.obj
/home/chandler/Documentos/ps2x2pico/src/ps2x2pico.c:32:10: fatal error: bsp/board_api.h: No such file or directory
   32 | #include "bsp/board_api.h"
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
(...)

Suggested Resource

To help novices with building this, you might want to consider including a link to https://www-ug.eecg.utoronto.ca/desl/nios_devices_SoC/datasheets/PS2%20Protocol.htm

It's just about the only resource I've found for the pinout of a PS/2 connector that unambiguously shows both the plug and socket views, making it much harder to get confused. (Especially when you've cut apart a cheap male-to-male PS/2 cable off Aliexpress and the colors don't match the cable used in the photos.)

I've confirmed that the "Female (Socket)" diagram in it matches the "Female connector from the front" diagram on Wikipedia and every other pinout diagram I could find, bar one which apparently got them mixed up.

PS/2 as a library

Hello from PiKVM Project! :)

I am very impressed with your work on PS/2 and especially with the fact that unlike other projects, you got rid of sleep() calls.

My project uses an Arduino-based firmware to emulate a USB keyboard and mouse, and a PS/2 keyboard. Right now I'm porting to RP2040, and it would be great if I could reuse your work to emulate PS/2 mouse and keyboard, because PS/2 support seems pretty tricky to me.

Do you think you could make a part of your project in the form of a library? I would be happy to donate if you did that.

[request] Troubleshooting Guide

I just built what should be a functioning ps2x2pico, but it's not.

  1. The pin assignments between it and the level shifter are all as described in the README.
  2. It does show up for programming if I BOOTSEL, so the chip isn't dead.
  3. The power LED does come on when it's being powered off its PS2 side by a PS2-to-USB adapter (I don't want to risk plugging it into the vintage machine until I trust it)
  4. The USB Type-C OTG adapter does allow me to successfully plug the test mouse or test keyboard into a modern PC's USB Type C port and use them.
  5. For the surrogate vintage PC, I've tested with both a $3 eBay PS2-to-USB adapter and a $20-30 ioGear adapter from 10+ years ago with the same Chesen chip used by this high-quality StarTech adapter and both work fine with the test keyboard and mouse when talking to them directly.
  6. I double and triple checked and couldn't find any solder bridges or places where I should be getting continuity but am not.

...but the test input devices just don't come up when I plug them into it via the USB OTG adapter and then plug it into the modern PC via the PS2-to-USB adapter for the smoke test. (The LED for the optical sensor on the mouse doesn't light, and the keyboard doesn't do anything)

I thought maybe these lines were indicative of Dolphin's file copying interacting badly with the Pi Pico's "reboot when it thinks you're done sending the firmware" behaviour...

[1269453.915631] device offline error, dev sdd, sector 260 op 0x1:(WRITE) flags 0x100000 phys_seg 1 prio class 2
[1269453.915636] Buffer I/O error on dev sdd1, logical block 259, lost async page write
[1269454.128385] FAT-fs (sdd1): unable to read boot sector to mark fs as dirty

...so I tried using cp /home/ssokolow/inc/ps2x2pico.uf2 /media/ssokolow/RPI-RP2/ and cp /home/ssokolow/inc/ps2x2pico_5628f15_200hz.uf2 /media/ssokolow/RPI-RP2/ instead, which did cut it down to this...

[1270597.093027] FAT-fs (sdd1): unable to read boot sector to mark fs as dirty

...but no change in results from either firmware version.

There needs to be some kind of guide to what to do next to diagnose "thing doesn't work but it doesn't appear to be an assembly problem".

(I have no experience with the RP2040. What minimal experience with microcontroller programming I do have is all Arduino Uno plus Arduino IDE and STM32 Blue Pill + STM32duino + cheap Chinese ST-Link clone... dammit, Jim, I'm a PC and web developer not a microelectronics guy! With things as they are, I'm basically just stuck tossing what should be a couple of pieces of electrical tape, a squirt of hot glue, and a few screws away from being a fully assembled and cased ps2x2pico into the closet and putting up with reaching for the rear of my two keyboards when I want to practice programming for Windows 98 SE.)

error compilation

Hello, after installing the necessary dependencies, I am compiling following the steps indicated on an Ubuntu arm64. I have updated the tinyusb library to tag 0.16.0 but I get the following result....

-- Configuring incomplete, errors occurred!
parallels@ubuntu-linux-22-04-02-desktop:/ps2x2pico/build$ export PICO_SDK_PATH=/home/parallels/pico-sdk
parallels@ubuntu-linux-22-04-02-desktop:
/ps2x2pico/build$ cmake ..
Using PICO_SDK_PATH from environment ('/home/parallels/pico-sdk')
PICO_SDK_PATH is /home/parallels/pico-sdk
Defaulting PICO_PLATFORM to rp2040 since not specified.
Defaulting PICO platform compiler to pico_arm_gcc since not specified.
-- Defaulting build type to 'Release' since not specified.
PICO compiler is pico_arm_gcc
-- The C compiler identification is GNU 10.3.1
-- The CXX compiler identification is GNU 10.3.1
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/arm-none-eabi-gcc
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/arm-none-eabi-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/arm-none-eabi-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Build type is Release
PICO target board is pico.
Using board configuration from /home/parallels/pico-sdk/src/boards/include/boards/pico.h
-- Found Python3: /usr/bin/python3.10 (found version "3.10.12") found components: Interpreter
TinyUSB available at /home/parallels/pico-sdk/lib/tinyusb/src/portable/raspberrypi/rp2040; enabling build support for USB.
BTstack available at /home/parallels/pico-sdk/lib/btstack
cyw43-driver available at /home/parallels/pico-sdk/lib/cyw43-driver
Pico W Bluetooth build support available.
lwIP available at /home/parallels/pico-sdk/lib/lwip
mbedtls available at /home/parallels/pico-sdk/lib/mbedtls
-- Configuring done
-- Generating done
-- Build files have been written to: /home/parallels/ps2x2pico/build
parallels@ubuntu-linux-22-04-02-desktop:~/ps2x2pico/build$ make
Scanning dependencies of target bs2_default
[ 1%] Building ASM object pico-sdk/src/rp2_common/boot_stage2/CMakeFiles/bs2_default.dir/compile_time_choice.S.obj
[ 2%] Linking ASM executable bs2_default.elf
[ 2%] Built target bs2_default
[ 3%] Generating bs2_default.bin
[ 4%] Generating bs2_default_padded_checksummed.S
[ 4%] Built target bs2_default_padded_checksummed_asm
[ 5%] Creating directories for 'PioasmBuild'
[ 6%] No download step for 'PioasmBuild'
[ 7%] No update step for 'PioasmBuild'
[ 9%] No patch step for 'PioasmBuild'
[ 10%] Performing configure step for 'PioasmBuild'
loading initial cache file /home/parallels/ps2x2pico/build/pico-sdk/src/rp2_common/pico_cyw43_driver/pioasm/tmp/PioasmBuild-cache-Release.cmake
-- The CXX compiler identification is GNU 11.4.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/parallels/ps2x2pico/build/pioasm
[ 11%] Performing build step for 'PioasmBuild'
[ 10%] Building CXX object CMakeFiles/pioasm.dir/main.cpp.o
[ 20%] Building CXX object CMakeFiles/pioasm.dir/pio_assembler.cpp.o
[ 30%] Building CXX object CMakeFiles/pioasm.dir/pio_disassembler.cpp.o
[ 40%] Building CXX object CMakeFiles/pioasm.dir/gen/lexer.cpp.o
[ 50%] Building CXX object CMakeFiles/pioasm.dir/gen/parser.cpp.o
[ 60%] Building CXX object CMakeFiles/pioasm.dir/c_sdk_output.cpp.o
[ 70%] Building CXX object CMakeFiles/pioasm.dir/python_output.cpp.o
[ 80%] Building CXX object CMakeFiles/pioasm.dir/hex_output.cpp.o
[ 90%] Building CXX object CMakeFiles/pioasm.dir/ada_output.cpp.o
[100%] Linking CXX executable pioasm
[100%] Built target pioasm
[ 12%] No install step for 'PioasmBuild'
[ 13%] Completed 'PioasmBuild'
[ 13%] Built target PioasmBuild
[ 14%] Generating ps2out.pio.h
[ 14%] Built target ps2x2pico_ps2out_pio_h
[ 15%] Generating ps2in.pio.h
[ 15%] Built target ps2x2pico_ps2in_pio_h
[ 17%] Creating directories for 'ELF2UF2Build'
[ 18%] No download step for 'ELF2UF2Build'
[ 19%] No update step for 'ELF2UF2Build'
[ 20%] No patch step for 'ELF2UF2Build'
[ 21%] Performing configure step for 'ELF2UF2Build'
-- The C compiler identification is GNU 11.4.0
-- The CXX compiler identification is GNU 11.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/parallels/ps2x2pico/build/elf2uf2
[ 22%] Performing build step for 'ELF2UF2Build'
[ 50%] Building CXX object CMakeFiles/elf2uf2.dir/main.cpp.o
[100%] Linking CXX executable elf2uf2
[100%] Built target elf2uf2
[ 23%] No install step for 'ELF2UF2Build'
[ 25%] Completed 'ELF2UF2Build'
[ 25%] Built target ELF2UF2Build
Scanning dependencies of target ps2x2pico
[ 26%] Building C object CMakeFiles/ps2x2pico.dir/src/ps2x2pico.c.obj
/home/parallels/ps2x2pico/src/ps2x2pico.c: In function 'tuh_hid_umount_cb':
/home/parallels/ps2x2pico/src/ps2x2pico.c:129:3: warning: implicit declaration of function 'tuh_deinit'; did you mean 'tuh_init'? [-Wimplicit-function-declaration]
129 | tuh_deinit(TUH_OPT_RHPORT);
| ^~~~~~~~~~
| tuh_init

[ 27%] Building C object CMakeFiles/ps2x2pico.dir/src/scancodesets.c.obj
[ 28%] Building C object CMakeFiles/ps2x2pico.dir/src/ps2kb.c.obj
[ 29%] Building C object CMakeFiles/ps2x2pico.dir/src/ps2ms.c.obj
[ 30%] Building C object CMakeFiles/ps2x2pico.dir/src/ps2out.c.obj
[ 31%] Building C object CMakeFiles/ps2x2pico.dir/src/ps2in.c.obj
[ 32%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/rp2_common/pico_stdlib/stdlib.c.obj
[ 34%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/rp2_common/hardware_gpio/gpio.c.obj
[ 35%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/rp2_common/pico_platform/platform.c.obj
[ 36%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/rp2_common/hardware_claim/claim.c.obj
[ 37%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/rp2_common/hardware_sync/sync.c.obj
[ 38%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/rp2_common/hardware_irq/irq.c.obj
[ 39%] Building ASM object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/rp2_common/hardware_irq/irq_handler_chain.S.obj
[ 40%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/common/pico_sync/sem.c.obj
[ 42%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/common/pico_sync/lock_core.c.obj
[ 43%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/common/pico_sync/mutex.c.obj
[ 44%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/common/pico_sync/critical_section.c.obj
[ 45%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/common/pico_time/time.c.obj
[ 46%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/common/pico_time/timeout_helper.c.obj
[ 47%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/rp2_common/hardware_timer/timer.c.obj
[ 48%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/common/pico_util/datetime.c.obj
[ 50%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/common/pico_util/pheap.c.obj
[ 51%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/common/pico_util/queue.c.obj
[ 52%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/rp2_common/hardware_uart/uart.c.obj
[ 53%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/rp2_common/hardware_clocks/clocks.c.obj
[ 54%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/rp2_common/hardware_pll/pll.c.obj
[ 55%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/rp2_common/hardware_vreg/vreg.c.obj
[ 56%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/rp2_common/hardware_watchdog/watchdog.c.obj
[ 57%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/rp2_common/hardware_xosc/xosc.c.obj
[ 59%] Building ASM object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/rp2_common/hardware_divider/divider.S.obj
[ 60%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/rp2_common/pico_runtime/runtime.c.obj
[ 61%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/rp2_common/pico_printf/printf.c.obj
[ 62%] Building ASM object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/rp2_common/pico_bit_ops/bit_ops_aeabi.S.obj
[ 63%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/rp2_common/pico_bootrom/bootrom.c.obj
[ 64%] Building ASM object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/rp2_common/pico_divider/divider.S.obj
[ 65%] Building ASM object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/rp2_common/pico_double/double_aeabi.S.obj
[ 67%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/rp2_common/pico_double/double_init_rom.c.obj
[ 68%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/rp2_common/pico_double/double_math.c.obj
[ 69%] Building ASM object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/rp2_common/pico_double/double_v1_rom_shim.S.obj
[ 70%] Building ASM object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/rp2_common/pico_int64_ops/pico_int64_ops_aeabi.S.obj
[ 71%] Building ASM object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/rp2_common/pico_float/float_aeabi.S.obj
[ 72%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/rp2_common/pico_float/float_init_rom.c.obj
[ 73%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/rp2_common/pico_float/float_math.c.obj
[ 75%] Building ASM object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/rp2_common/pico_float/float_v1_rom_shim.S.obj
[ 76%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/rp2_common/pico_malloc/pico_malloc.c.obj
[ 77%] Building ASM object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/rp2_common/pico_mem_ops/mem_ops_aeabi.S.obj
[ 78%] Building ASM object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/rp2_common/pico_standard_link/crt0.S.obj
[ 79%] Building CXX object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/rp2_common/pico_standard_link/new_delete.cpp.obj
[ 80%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/rp2_common/pico_standard_link/binary_info.c.obj
[ 81%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/rp2_common/pico_stdio/stdio.c.obj
[ 82%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/rp2_common/pico_stdio_uart/stdio_uart.c.obj
[ 84%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/rp2_common/hardware_pio/pio.c.obj
[ 85%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/lib/tinyusb/src/portable/raspberrypi/rp2040/hcd_rp2040.c.obj
[ 86%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/lib/tinyusb/src/portable/raspberrypi/rp2040/rp2040_usb.c.obj
[ 87%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/lib/tinyusb/src/host/usbh.c.obj
[ 88%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/lib/tinyusb/src/host/hub.c.obj
[ 89%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/lib/tinyusb/src/class/cdc/cdc_host.c.obj
[ 90%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/lib/tinyusb/src/class/hid/hid_host.c.obj
[ 92%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/lib/tinyusb/src/class/msc/msc_host.c.obj
[ 93%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/lib/tinyusb/src/class/vendor/vendor_host.c.obj
[ 94%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/lib/tinyusb/src/tusb.c.obj
[ 95%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/lib/tinyusb/src/common/tusb_fifo.c.obj
[ 96%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/lib/tinyusb/hw/bsp/rp2040/family.c.obj
[ 97%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/rp2_common/pico_unique_id/unique_id.c.obj
[ 98%] Building C object CMakeFiles/ps2x2pico.dir/home/parallels/pico-sdk/src/rp2_common/hardware_flash/flash.c.obj
[100%] Linking CXX executable ps2x2pico.elf
/usr/lib/gcc/arm-none-eabi/10.3.1/../../../arm-none-eabi/bin/ld: CMakeFiles/ps2x2pico.dir/src/ps2x2pico.c.obj: in function tuh_hid_umount_cb': ps2x2pico.c:(.text.tuh_hid_umount_cb+0x1e): undefined reference to tuh_deinit'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/ps2x2pico.dir/build.make:1111: ps2x2pico.elf] Error 1
make[1]: *** [CMakeFiles/Makefile2:1513: CMakeFiles/ps2x2pico.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

Use this with Mouse Only?

Is it possible to use this only for the Mouse? I have a PS/2 keyboard and would like to use this for the Mouse only.

I'm seeing it register my USB mouse in the debug messages on GPIO0, but the machine does not recognize it.

Keyboard Issues

When KeyPresses with my Keyboard (Logitech Unify Keyboard K400+) are entered slowly and with a slight delay (half a second) everything seems to be fairly ok - seem to work flawlessly then. Using legacy PS/2 equipment does not produce any of the these behaviors - so it seems to be replated to the ps2x2pico somewhere.

But when playing a game (is reproduce-able in DungeonKeeper D3D within playing a few minutes) the cursor keys seem to "hang". So when pressing "LEFT"-cursor key for longer than 1-2seconds the key hangs and permanently sends "LEFT"-cursor to the game (even when the key is released). Only solution is to press and release the "LEFT"-cursor again shortly (not longer than a second). The same behavior could be reproduced when playing Unreal.

Additionally when this "hanging" happens there also seem to be random "ghost" keypresses (other keys) and also mouse movement (not sure about the mouse movement as it seems to produce "ghost" movement on its own without any keypress at all)

And last but not least - the complete system seems to freeze when this "ghost" actions appear to often. So randomly after 1 to 60 minutes the system freezes whenever you trigger these behaviors at least once. Only a Reset/Repower does resolve this issue.

Version used: 0.8 (i think) - most recent download available as release.
System/Mainboard used: MSI 875P Neo-LSR/ FIS2R (Pentium 4 Board)

[feature request] Touchscreen support?

Can you also add support for USB and RS232->USB touchscreen?
I didnt even knew that there is touchscreen support on PS2 port until i found this toiuchscreen controller. https://a.aliexpress.com/_ExQC93b

Im not sure if real touchscreen mode is possible trought ps2 port, but al least mouse emulation in touchpad style control should be available as it would act just as regular mouse on ps2 output. If there is real touchscreen support available on ps2 port, maybe there wouldnt be bad idea to use one gpio as input to select switch between 3v3/gnd to select real touchscreen and touchpad mode, which would be ingnored when no touchscreen is connected, so when not present, it wouldnt affect users not using touchscreen.

Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.