Is there a way to get the feedback signal out of computer games

Status
Not open for further replies.

mrmu

Member
Is there a way to get the feedback signal out of computer game? For example, if I want to build a speed meter with teensy for a car race game. So I want to get the speed information out of the game. Another example, if I want to make a vibrator, I would like to get the vibration information from the game too. Is there any project or idea about this?
 
There are a number of projects doing this but all need a mod or built in API to pull the data from the game. In some cases designers work really hard to prevent this sort of access since in multiplayer games it allows aimbots and other cheats so really depends on the game and what the designers will allow.

Teensy includes and xplane plugin, and I've used Kerbal space program's KSPIO. So your first step is for each game to check what if any external interfaces exist or have mods extant for, then work out how the hardware end would work.

Vibration information is a bit more possible, but depends on the game supporting rumble in some form of device and they are pretty rare in the PC space so have not seen any arduino USB emulations of them. If you can find such a device it would be pretty straightforward to sample to the motor drive signals into some other device though, if aim was to turn a controller vibrate into a seat rattle. Most likely would not even need any true microcontroller/software beyond the original (working) device.
 
Thanks Gremelin. The plugin sounds interesting and I am going to check it out. I was thinking the game developer might have some guide pdf or something for the game control developers to use the information generated by the game. Or, there should be some standard or official way to use this information. Then the game controller driver developer can write the right driver and then the hardware. I believe m$ has some standard like that and there was a emulator basically make games believe any pad plugged in is a 360 xbox controller.

While I am trying third party mods, I would like to understand what real driver developer/HID hardware developer and the host software(game) developer would do in order to make a real commercial HID. At some point, I think I need to write some driver because that might be a better way to communicate with games. In another thread in this forum I was asking how to increase the polling rate of a usb mouse(a teensy mouse). After doing some reasearch, I found the host side is responsible for that.
 
Game controller is pretty well settled around HID joystick
https://www.pjrc.com/teensy/td_joystick.html
Which can declare a range of button/axis combinations.

Getting data the other way is much vaguer, and any decision to add a custom USB driver to a game is always going to be a hard sell, with presenting a USB serial port streaming characters being as close as things get to a standard. A possible route to a standard might actually be an ethernet based API, since that would allow tablet/phone interfaces with much lower upfront cost than custom hardware, therfore higher uptake and more acceptance for needing a peripheral to play a game.

Edit: always a trade off making a custom controller part of a game, if it adds little then why would people buy it, if it is mandatory then how many actual copies of the game do you sell? May be interesting watching this project
http://objectsgame.com/the-controllers/blueprints-schematics/
 
Years ago there was a project called the Church of Robotron, where they made an alter with the two 8-way joysticks and many gadgets around the room (like laser pointers) which would be triggered by actions within the game.

Apparently they ran Robotron in a debug version of the emulator and attached breakpoints or watchpoints to memory locations (learned by reverse engineering) that corresponded to the things they wanted to trigger. The PC send data out by serial and early version of Teensy were used to hear the serial messages and run the various game-religious experience enhancing widgets.
 
Thanks guys. Now I think I understand how it works.

I recall I have used a 3D mouse called 3d connexion or something when I was at school, it has 4 axis assembled in one stick and can be used in a lot 3D design software like Maya and 3dmaxs. The interesting part is it can rotate the model freely while the regular mouse operating without interrupting it. So may I assume its driver must have some secret protocol with the host software so we can not just make one with our Teensy without writing a host driver?

I had this kind of question for a long time. I had a lot logitech mice. Some of them have extra programmable buttons. In there driver, one can simply map one of these button to "show desktop" in windows. Intially, I was think this button simply send the ascii of "window" key and the "D" key of the keyboard or a virtual keyboard. But I think during the time I pressed it, I could still use the "window" key for other purpose. So it must call some API of windows gui directly to show the desktop.

So the conclusion is that, if I want to make a usb device operate the windows program (any program) or the windows gui in a way other than the HID compatible device does, I probably have to collaborate with the program of the windows gui. A usb device itself can't achieve this goal.
 
Last edited:
That's pretty much it. You could technically have a storage device with autoplay on it that loaded some form of driver but that trick is also used by malicious actors so any sanely setup computer will block it in some/many ways. If looking at ways to do things, if 10 seconds thought comes up with a way to use it as a security exploit than you can't depend on it working easily, or continuing to work.
 
Status
Not open for further replies.
Back
Top