Main > Main Forum

USB "Gamepad" encoder questions

Pages: << < (2/9) > >>

Tiger-Heli:


--- Quote from: tetsujin on January 26, 2005, 10:24:05 pm ---I'm not particularly interested in hearing more about that, unless you wanted to give me some kind of compelling example of a game I'd want to play that won't work with a proper game controller.

--- End quote ---
Microsoft Train Simulator, Auran TRS2004, probably MS Flight Simulator, any host of other PC games will not work very well with a gamepad, but will work with a keyboard.

In general, there are more games that use the keyboard and not the gamepad, and a few - Virtua Tennis (multiplayer) that want a gamepad and not the keyboard.  Sure you can use Joy2Key or other programs to convert the outputs, but it's an extra step.

Having said my piece, the closest think to a pre-made gamepad emulator (and a very good and reasonable one) is DaveB's AKI - http://dave.bit2000.com/

tetsujin:


--- Quote from: NoOne=NBA= on January 26, 2005, 10:54:18 pm ---Again, why worry about multiple devices if you can hook EVERYBODY up to a 50 button virtual gamepad controller?
And why worry about a 50 key virtual gamepad controller, when you can buy an I-pac4 and be DONE with it?

No learning, no problems, it just WORKS.

--- End quote ---

I was referring to keyboard encoders when I said "keyboard hacks", because I consider them a hack.  I am familiar with the established definition of "keyboard hack", meaning busting open an off-the-shelf keyboard and rewiring it to game controls.  Poor choice of words on my part.

I think I'm losing focus here.  It's clear to me now that my little rant about them was self-defeating to the point of being flamebait.  I'm sorry, let's put my personal distaste for keyboard encoders aside.  They work, they're a good, practical solution for a lot of people.  I just don't want one.  Can we leave it at that?  Then nobody needs to convince me to stop trying to build a gamepad encoder and buy an I-Pac.


--- Quote ---
--- Quote from: NoOne=NBA= ---There is not alot of PRACTICAL difference between how most apps handle input on a keyboard vs. a digital gamepad.
--- End quote ---
I thought THAT answered the exact question asked.

--- End quote ---
It did, I just have no confidence in your ability to make that statement.  If you are confident in your ability to make that claim, please tell me how you know that there is no significant difference in latency between the two systems.  Similarly, I can't imagine any game I'd want to play that doesn't support USB gamepads.  But maybe I forgot something, who knows?  That's why I was asking for suggestions there.

In terms of numbers, the PS/2 interface uses a 16Khz clock and transmits 11 bits per event - about 2/3 of a milisecond for each event (key pressed or key raised.).  It'll be a bit higher if the PC runs the keyboard bus at the slower speed of 10Khz.  So I would expect that for small numbers of simultaneous events the keyboard interface would have interface-to-host latency of around 1-2ms, with interface-to-program latency somewhat higher.

USB time-slices between the different devices, but each device is able to submit its complete state in a single report.  I'm not entirely sure of the timing - but I think it happens in 1ms slices.  So I'd guess with five USB devices the device-to-host latency would presumably be between 5ms-10ms for any events.

I don't know how much latency there is getting the data from the respective interfaces to the running program, or how these delays compare with software-level delays, and whether these delays are significant in terms of gameplay.  I would guess that the latency might become noticable as it approaches the framerate - so around 20-50ms depending on the game?

It is a fact that there will be multiple USB devices on my MAME box.  Probably between five and ten.  This is a necessary consequence of one of my other design goals.  (Can you guess which one?  It's not that hard...)

But as for the difficulty involved in making a USB encoder, it's really going to be pretty minimal.  The source code is already out there on Microchip's website.  I have a PIC programmer and I know how to use it.  And the USB HID drivers are built in to any OS I would ever consider running.  It really doesn't bother me that I'm going to be putting in a little extra effort: what I'm going to learn from this project is going to be well worth the effort, and my finished control panel will stand as a demonstration of those new skills.  And I won't have had to compromise on matters of taste, or resort to buying and hacking up anything to build the controller.  That's really exciting.

Tiger-Heli:

tetsujin,

Did you see my comments above?

Hoagie_one:

That AKI interface is sexsay

tetsujin:


--- Quote from: Tiger-Heli on January 27, 2005, 11:52:30 am ---Did you see my comments above?

--- End quote ---

Yes I did, thank you.  I know when I say something like "What games would I want to play that expect keyboard controls?" it's all guesswork on anybody else's part, but I appreciate the guesses.  Really, I don't know what's out there that might be worth playing besides MAME and maybe the odd console game.  I suppose I'd enjoy having some of my old PC games on there (maybe X-Wing or Wing Commander) but I think flight simulators and the like are out of the question until I build a panel with flight controls.  I haven't heard of the other games.

Thanks for the link to those encoders, too.  I'm not doing analog or 49-way controls on this panel but it's good to see what's out there.  I'm curious about how these encoders were made (i.e., what kind of microcontroller, etc...)

(EDIT): Ah, I can just make it out in the product photo...  he used the PIC16C745...  On the AKI at least.  I can't tell with the SJC.

Pages: << < (2/9) > >>

Go to full version