Main > Main Forum
keyboard hack / encoder question
neuromancer:
I've had good success hacking IBM PS/2 keyboards.
There are exactly enough input lines on most non-usb keyboards to enable 2 joysticks with 6 buttons each. They key's that are used to make a bunctional hack end up being bizzarre, like scrl lock, F8, \ and the like.
It took me about 2 hours to decode the input matrix on the keyboard. Upon playing it, we found that I had used certain keys that do a windows function, like the alt key and the enter key, that would dump one out of most emulators.
There is a tutorial on mameworld.net that will tell you everything you need to know about how to hack a keyboard, including decoded matrixes for several keyboards.
I hacked a Saitek gamepad too, which seems to work well enough.
If you're spending money on a cabinet anyway, and don't mind spending more, then go for the encoder, because they sound so much easier. If you're scrounging for spare parts and want to build on the most restrictive budget, then a keyboard hack will serve you just fine, provided you don't need more than 2 sticks with 6 buttons each.
Bob
markb:
Firstly welcome to the boards Soublazer, always good to have someone with a bit of programming knowledge 'sign up'
I will second pretty much what everyone else has said having gone down the joystick-keyboard-encoder route myself. Unless you are on an extremely tight budget I would go for the encoder straight off, hacking a joystick or keyboard can be a challenge however the effort & drawbacks now outweigh the cost of an encoder.
I would however read up about what encoder to buy as there are some good choices out there
Tiger-Heli:
Okay - first off, I wrote the aforementioned piece on keyboard hacking - you can find it here -
http://www.mameworld.net/emuadvice/keyhack2.html
I also wrote a lengthy comparison of keyboard encoders here:
http://www.mameworld.net/tigerheli/encoder/index.htm
Master link to all pages Tiger-Heli:
http://www.mameworld.net/tigerheli/
Short summary - You will save yourself time and money buying a keyboard encoder first off and forgetting about a keyboard hack.
Yes, you probably can make a keyboard hack work for two-player fighters, but there are ghosting and blocking issues to work around (and they can be overcome).
soulblazer28:
Thanks for all the great responses -- more than I anticipated. I'm really at a point of considering everything and just wanted to clear up the confusion about "blocking."
One of my goals is to make a dedicated Defender/Stargate CP (my all-time favs), which means I'd have to make removable panels, which I originally thought I could use cheap keyboard hacks for each board, but have been wised up on using one encoder and RJ45 connectors.
Thanks for the welcome as well. I have ten years programming experience in everything from games to databases. I'm toying with the idea of creating a Mame / Jukebox combo front-end sometime this year -- if I dont get busy ;D
soulblazer28:
After doing some planning and research I find myself with a dilemma
I am planning on a control panel that has two players, each having dual joysticks and six buttons. By my count that is 16 inputs for the joysticks, and 12 inputs for the buttons, plus 4 buttons for 1&2 player coin and start. That is a total of 32 inputs. Oh no! What about administrative buttons?
The dual joysticks will be used for games such as smash tv, total carnage, and robotron. These are all games where most of the buttons will not be used. I suppose I can map four inputs per player to both the buttons and the left joystick. However, I am weary of doing this if I can avoid it.
Does anyone know of any other sensible solution without having to buy two 32 input encoders, or a single encoder with more inputs? I don't suppose its feasible to have one of the action keys as a shift key, or is the shift key a separate entity? If that were the case, I think I'd be set.