Coder Social home page Coder Social logo

dekunukem / usb4vc Goto Github PK

View Code? Open in Web Editor NEW
195.0 9.0 12.0 285.88 MB

USB Keyboard/Mouse/Gamepads on Retro Computers!

License: MIT License

Shell 0.01% Python 0.71% C 90.17% Assembly 0.27% Makefile 1.76% HTML 6.59% C++ 0.02% CSS 0.39% JavaScript 0.08%
retrogaming retrocomputing ibm vintage-computers retro raspberrypi raspberry-pi macintosh ibmpc computer

usb4vc's People

Contributors

dekunukem avatar jamescadd avatar jsanpedro avatar ljward2023 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

usb4vc's Issues

Few certain button assignments not working on the retro PC

First of all, loving the USB4VC that I just got in the mail today. Works almost perfectly, but I've been running into a couple of issues and a certain glitch so far.

So, here's the thing. I've got a PC KVM setup consisting of four machines ranging from MS-DOS to Windows XP. Although, I'm only using the USB4VC for the game port so that I can have proper joystick support, especially in pure DOS. So, here's my current setup of controllers as I write this:

Microsoft Sidewinder Force Feedback 2
Logitech MOMO Force Feedback Wheel
Logitech Rumblepad 2
Microsoft Sidewinder Freestyle Pro
Microsoft Sidewinder Dual Strike
Microsoft Sidewinder Strategic Commander

All joysticks are run through a USB KVM switch, which then would go right into the RPi on the USB4VC. Works just fine despite being unsupported and it does detect all of the buttons and axes according to the Event Log. I'm also using a custom configuration and have set these to work as USB generic devices.

Although, I've noticed with my Freestyle Pro that when pressing the sensor button to switch to digital mode from proportional mode, the USB4VC goes completely nuts (i.e. One of the LEDs on the IBM PC protocol card, which detects the axes and buttons I would assume, flashes continuously. It actually exited out the Event Log without holding + on the USB4VC and pressing a joystick button). But when I press any other button on the controller, it goes back to normal. Weird.

As soon as I started using it on my PCs via game port though, that's when I ran into issues. FIrst of all, the BTN_JOYSTICK assignment doesn't register with my PCs on all of my joysticks that utilize it (minus the Strategic Commander), whether I'm using a Windows 9x DOS Box or pure DOS. And on my Force Feedback 2 and Strategic Commander, the ABS_RZ axis doesn't register with the PCs either. Otherwise, everything else works just fine, and strangely enough, on my Rumblepad 2, the ABS_RZ axis does work on my PCs.

So, I'm not sure if it's a bug in the firmware or what. I even did a proper reset on the USB4VC, but to no avail. Any input is greatly appreciated.

EDIT: Another thing to add is that I tried to do combined petals on the Y-axis since my Logitech MOMO has two separate axes for the petals themselves, being the accelerator (ABS_Y) and the brake (ABS_Z). Unfortunately, with the way I set it up, being the positive Y axis for the accelerator and the negative Y axis for the brake, ABS_Z doesn't work and ABS_Y is completely non-proportional, all on the PC.

EDIT 2: Another thing to note is one of the LEDs on the IBM protocol card. which flashes when the axes are moved and buttons are pressed as I've mentioned previously. Considering that I've assigned BTN_JOYSTICK to Button 1 and ABS_RZ to the Joystick 2 X axis on the game port, the LED does not flash when pressing said button or moving said axis.

All the gameport button and axes assignments work just fine with further testing though. So, that does confirm that the communication within the game port itself is working properly.

Keyboard "echo" from ssh session

Is it possible to echo commands to the PS2 port of the ibm-pc protocol card when connecting via SSH to a Raspberry Pi running USB4VC?

That would help me a lot as I'm suffering from 2 keyboards on the same table.

USB4VC GameCube support

It would be great if GameCube Controller and GameCube Keyboard support could be added.
(Connecting any USB/bluetooth game controller and mapping it as a GameCube controller; connecting any kind of PC keyboard and mapping it as a GameCube keyboard.)

Some detailed information:

Identifier Console Device
0x0500 N64 Controller
0x0500 N64 Dancepad
0x0001 N64 VRU
0x0200 N64 Mouse
0x0002 N64 Randnet Keyboard
0x2004(1) N64 Densha de Go
0x0004 GBA Game Boy Advance
0x0900(1) GC Controller
0x8800(1) GC Receiver
0x8B10(1) GC Wavebird
0x0800(1) GC Steering Wheel
0x0802(1) GC Keyboard
0x0808(1) GC Dance Mat

( https://n64brew.dev/wiki/Joybus_Protocol )
_

_

ID Device
0x0500 ? N64 Controller
0x0001 ? N64 Microphone
0x0002 ? N64 Keyboard
0x0200 ? N64 Mouse
0x0004 GBA
0x0800 GBA (n/a)
0x0900 GC Standard Controller
0xe960 ? GC Wavebird Receiver
0xe9a0 ? GC Wavebird
0xa800 ? GC Wavebird
0xebb0 ? GC Wavebird
0x0820 GC Keyboard
0x0800 ? GC Steering Wheel
0x0900 DKongas (same as std Controller)
? Resident Evil4 Chainsaw

( http://hitmen.c02.at/files/yagcd/yagcd/chap9.html )

Some more information:
Beside the public GameCube ASCII keyboard, here are some further Keyboard to Gamecube adapter/converter possibilities/variants:

+ Mad Catz - Sharkboard
https://www.amazon.com/-/es/dp/B0002E5OJQ
http://www.nintendoworldreport.com/news/9248/mad-catz-ships-out-sharkboard

+ Datel/codejunkies - Powerboard
http://us.codejunkies.com/Products/GCN-Powerboard__EF000313.aspx
(this is the first one which I have got and which is also working very well in Datel's/Codejunkies': SD media launcher and Action Replay)

+ ebest - e-Keyboard Converter for PC/PS2/GC/XBOX ("EB0019832")
https://www.amazon.de/PC-Multi-Keyboard-Converter-Xbox/dp/B0007P8KHS
https://retrostuff.org/2013/01/11/connecting-a-keyboard-to-a-gamecube/
(this is the second one which I have got and which is also working very well in Datel's/Codejunkies': SD media launcher and Action Replay)

+ Mayflash - GC Keyboard & PS controller Adapter 2 in 1 ("GC020")
https://www.insomnia.gr/classifieds/item/1824046-gc-keyboard-ps-controller-adapter-2-in-1-%CE%B3%CE%B9%CE%B1-gamecube/
https://cdn-bb-eu1.insomnia.gr/file/insomnia-s3/monthly_2021_08/64C35C85-DC9B-4932-B5CB-3DBA2CA15BAF.jpeg.f580c2da99c243b9fc0f00577b3312fa.jpeg
https://i.ebayimg.com/d/w1600/pict/254804607328_/Mayflash-Tastatur-ps2-Controller-f%C3%BCr-GameCube-Adapter.jpg
https://web.archive.org/web/20060622142906/http://www.mayflash.com/gc/gc020/GC020-1.htm
https://www.google.com/search?source=univ&tbm=isch&q=%22GC+Keyboard%22+mayflash
https://www.facebook.com/2070956029869509/posts/mayflash-gc-keyboard-controller-adapter-2in1mayflash-rare-collectoritem/2569997976631976/

+ tototek GC KEYBOARD CONVERTER 2in1
http://www.tototek.com/pio/main1/SUBMENU/PARTS/LINKS/GC/gckeyboard2in1us.htm

Further GameCube Keyboard controler/adapter/coverter related links:
a)
http://www.pso-world.com/forums/showthread.php?25176-Tototek-s-GC-2-in-1-keyboard-converter-REVIEW
b)
http://web.archive.org/web/20030802212927/http://www.pantsofevilgamers.com/kb/ordering.htm
http://web.archive.org/web/20030803012738/http://www.pantsofevilgamers.com/kb/pics.htm
(build your own GameCube Keyboard adapter, )

This may be useful for realizing GameCube Keyboard support in Swiss:
a)
http://www.blarg.ca/2021/02/15/using-a-gamecube-ascii-keyboard-controller-with-libogc/
b)
https://github.com/gered/gc-ascii-keyboard
c)
http://hitmen.c02.at/files/yagcd/yagcd/chap9.html#sec9.3
d)
https://simplecontrollers.bigcartel.com/
https://simplecontrollers.bigcartel.com/product/gamecube-controller-value-and-snapback-tester-reader
https://simplecontrollers.bigcartel.com/product/sammy-ascii-keyboard-to-usb-adapter

USB4VC and KVM?

Hello, I'm trying to use my USB4VC+IBM board with an Aten PS\2+VGA KVM. The results are not good; in my slowest computers I can type a dozen characters before I get a beep from the PC speaker. It doesn't matter if I type them fast or slow, sometimes writing a simple command in DOS will require me to wait for a second. All the letters appear afterwards, however. In faster machines (ie, Pentium and beyond) it seems the mouse is more problematic, although some of my keyboard inputs are also eaten.

Am I correct to assume that the issue comes from having a KVM in between? I can give it a try, connecting the computers directly, but the back of my rack is somewhat inaccessible (and those PS\2 connectors love to get their pins bent when you try to plug them blind).

MIDI question

I see unused pins on PC board. Especially I am interested in TX/RX/5V/3V/GND. Does it mean I can add MIDI compatibility, especially MIDI IN/OUT? I am very interested, because I don't want to waste Raspberry 3 power and can add MT32 compatibility, for example.

Mouse Input Latency

Hello! Awesome project and loving mine so far. I've attached a USB mouse to my Raspberry Pi 3A+ and have the output through the IBM PC compatible board through Mouse PS/2.

I am noticing some input latency (feels more than 0.75ms) when moving the mouse consistently (similar mouse movements to how you would move in a fast paced shooter such as Unreal Tournament, or just stress testing by moving the mouse in a circle consistently).

However, latency has been great for individual key presses (clicks), but seems to be noticeable with consistent fast input.

I unfortunately don't have any measurements or analysis, but just an anecdotal experience which I notice the difference when the mouse is plugged directly in to the PC vs through the USB4VC.

No input with SGI Octane

Hi there!

Trying this out on my Octane for PS/2 support with the IBM module. Whole set up seems happy, Octane does seem to detect that there is a keyboard, it normally gives an error if not. But, I get no input. I suspect this is because PS/2 has multiple "scan code" modes, and SGI systems are notoriously fickle and only want a specific one (3). Might there be an easy way I can add that mapping?

Instability from system restart

Sometimes when I reboot the machine(a socket 7 system), the USB4VC becomes either entirely unresponsive(no LED lighting from input) or seemingly responsive but the computer doesn't see any input.

I see there is a technical bulletin that is supposed to "improve stability" but, I don't want to go through with this modification without knowing what problem it specifically tackles(I'm not sure if it is relevant to this specific issue) and how it works.

Stuck with 2 Keyboards

Hey.
I have just received the hardware today.
I have just noticed that I now have nothing connected and the dispay is showing me:
KBD 2 AT/PS2
MOS 0 PS/2
GPD 0 Generic 15-Pin

The only ports I have connected on the card are the 2 PS2 ports. Even if I disconnect everything, the display will still be showing 2 Keyboards.

I have already reflashed the card from scratch and still seeing it.

I'm curious if this is the reason that my USB keyboard stopped being detected on the computer I connected the device to.

Sporadic / exaggerated mouse input

I have tried several mice, a very old Logitech USB mouse as well as modern Logitech Unifying mice and a Logitech gaming mouse. When using the PS/2 output to my machine, the mouse is detected, and if I move the mouse very slowly, I can move the cursor accurately, but then without warning any movement sends the mouse fully into the corners, with inputs getting jumbled - mouse clicks will move the cursor up and down or side to side.

When a PS/2 mouse is connected directly to the machine, I have no problems. PS/2 keyboard and 15-pin joystick are working perfectly with this machine. USB4VC is updated to latest firmware, and I've tried both Cutemouse 1.9 and 2.1 with the same results. Mouse sensitivity on the USB4VC is set to 0.25.

I seem to remember getting serial mouse to work with one of these USB mice, but that was over a year ago and I am not currently set up to easily test that. Event code monitor shows normal looking inputs as far as I can tell.

Update: Can confirm that over 9-pin serial, these same USB mice present no issues and I can use them just fine with the Microsoft Serial protocol. Something is going wrong on the PS/2 side. Might try a fresh SD card or something I guess.

Keyboard function keys recognized as media keys - Keychron K5 SE

After using USB4VC with different keyboards (USB, BT, combined mouse and KB dongles) and all of them working perfectly, I just got a Keychron K5 SE keyboard, which has the following issue.

Function keys do not work and using the option "Show Event Codes" shows, that they are recognized as media keys (volume controls and so on) instead of as function keys. Pressing the FN key and then any of the function keys still shows them as media key via Show Event Codes.
The keyboard has an option to switch its standard function key behaviour between function keys and media keys but this doesn't help as the USB4VC doesn't recognize button presses at all when switching the keyboard to the other mode.

I guess, normally keyboards "hardmap" function keys as said function keys but this keyboard (an maybe others too) might hardmap them as media keys.

Is there a way to manually map the keys like it is for gamepads? If not, maybe the USB4VC Configurator app for gamepads could be expanded to also offer this functionality for keyboards.

Raspberry PI Zero

Trying this initially on a Raspberry Pi Zero (non-W) which doesn't have bluetooth/wifi.

It's done it's initial set up but now it's stuck in a loop

"Disabling ERTM.....
ertm_status: cat: /sys/module/bluetooth/paramaters/disable_ertm: No such file or directory"

Is there a way I can turn this part of the script off by editing the sd card on another system?

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.