seife / marble_fx

Arduino leonardo as USB converter for Logitech Trackman MarbleFX
4 stars 2 forks source link

Pass-through of PS/2 keyboard in addition to PS/2 Trackball? #3

Open sobukus opened 7 months ago

sobukus commented 7 months ago

Maybe this is trivial or it is impossible: Do you think it is feasible to translate both a PS/2 trackball and pass through an PS/2 keyboard at the same time? This would be a straight upgrade from the simple PS/2 to USB converter I have here (could repurpose its casing, even;-) and would enable having the trackball and a matching IBM Model M wired up only using one USB port.

Can the 32u4 drive two PS/2 devices at the same time? I imagine a keyboard being a lot less work than a pointing device.

seife commented 4 months ago

I did not try this yet. The 32u4 should be able to handle both PS2 ports at the same time, especially since this code now is interrupt driven, so there should be no "concurrent access timing issues" AFAICS.

My guess is you would need to do two instances of mbuf (or mbuf[2]) and hook these up to two interupts (for two ports), then just process them differently, where keyboard is probably even more trivial than interpreting the logitech protocol (my guess is that you can more or less pass through the ps2 key codes 1:1 to USBHID, but you would need to verify that).

Sounds like an interesting project :-) But I'll certainly (if ever) only take this up in (some distant...) winter.