Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: keyboard hack / encoder question  (Read 2129 times)

0 Members and 1 Guest are viewing this topic.

soulblazer28

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 32
  • Last login:September 27, 2009, 09:12:17 pm
  • I want to build my own arcade controls!
keyboard hack / encoder question
« on: December 30, 2005, 01:14:34 am »
Hello all,

Well I am the newest retro dreamer to start planning on building a MAME cabinet from scratch -- despite no woodworking skills or wiring skills.  I've seen and read enough to be somewhat confident enough to at least get myself into trouble.

Anyway, I've been a long time programmer and perhaps I have a naive question. Being new to the ideas of hacking a keyboard or keyboard encoders, I am left a bit confused about one thing. Keyboards have limits on the number of keys that can be pressed simultaneously, yet it seems that there is no such limit with keyboard hacks or encoders -- at least not that I could find on the forum search.  As much as I'd liike to know how the limitation disappears (perhaps its not a hardware issue but a bios issue, etc) but ultimately I just want to rest in peace that one could press every button and joystick on the cabinet simultaneously and have all of them register.

I'd be grateful if anyone could enlighten me. Thanks! :)


Kremmit

  • - AHOTW -
  • Wiki Contributor
  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3165
  • Last login:June 17, 2025, 04:07:55 pm
  • Who the heck is that?
Re: keyboard hack / encoder question
« Reply #1 on: December 30, 2005, 01:24:14 am »
Keyboards suffer from Ghosting and Blocking.  Blocking is when some of your keypresses get missed, and Ghosting is when you get extra keypresses even though you didn't press those keys. 

Keyboard hacks suffer from these problems exactly the same way that regular keyboards do.   There are ways to prevent some of it and work around some of it.  If you really care, take a look at the website that is the companion to these message forums- www.byoac.com will get you there.  There's lots of info about keyboard hacks there.

But the short version is, it's a lot easier and not much more expensive (if at all) to just buy a keyboard encoder.  Decent encoders have the Ghosting and Blocking problems ironed out already, so you don't have to sweat it.

missioncontrol

  • MC-Retro says Wot!
  • Trade Count: (+13)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7855
  • Last login:November 06, 2024, 06:22:12 pm
Re: keyboard hack / encoder question
« Reply #2 on: December 30, 2005, 03:41:28 am »
one warning about keyboard hacks... test it on an old pc that you don't care about....

I fried my test computer with one

Thenasty

  • Trade Count: (+17)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4420
  • Last login:August 19, 2025, 11:35:31 pm
    • Thenasty's Arcademania Horizontal/Vertical monitor setup.
Re: keyboard hack / encoder question
« Reply #3 on: December 30, 2005, 05:39:54 am »
save yourself the TIME and HEADACHES, buy an ENCODER ASAP . . . . . . ;)
Thenasty's Arcademania Horizontal/Vertical setup.
http://forum.arcadecontrols.com/index.php?topic=26696.0

Free VGA Breakout Cable
http://forum.arcadecontrols.com/index.php?topic=38228.0

Ultimate All in One Coin Mech write up (Make your own)
http://forum.arcadecontrols.com/index.php?topic=19200.0

Lilwolf

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4945
  • Last login:July 31, 2022, 10:26:34 pm
Re: keyboard hack / encoder question
« Reply #4 on: December 30, 2005, 10:27:15 am »
I hacked a keyboard... then I hacked a joystick (better but less keys.. made for gaming)... then I bought an encoder.  Best money I've spent on my arcade.

But now thta you can get an encoder for 21 bucks (keywiz eco + ide standoffs) its super easy and cheap.  There is no reason to hack a keyboard right now...

Heck, I bought one for my jukebox where I never had to deal with any of those problems... just because the 20 bucks was worth it in easier wiring!

There are other 20 buck items you can probably get away without... but encoder shouldn't be the place to scrimp.  I would rather have a computer 1/3 the speed instead myself.

neuromancer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 446
  • Last login:May 10, 2006, 04:26:57 pm
  • Can I Play?
Re: keyboard hack / encoder question
« Reply #5 on: January 03, 2006, 04:21:02 pm »
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

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 317
  • Last login:April 30, 2011, 06:41:02 am
  • The One and Only.
Re: keyboard hack / encoder question
« Reply #6 on: January 03, 2006, 05:50:48 pm »
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

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
Re: keyboard hack / encoder question
« Reply #7 on: January 04, 2006, 08:08:20 am »
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).
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.

soulblazer28

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 32
  • Last login:September 27, 2009, 09:12:17 pm
  • I want to build my own arcade controls!
Re: keyboard hack / encoder question
« Reply #8 on: January 04, 2006, 11:50:53 pm »
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

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 32
  • Last login:September 27, 2009, 09:12:17 pm
  • I want to build my own arcade controls!
Re: keyboard hack / encoder question
« Reply #9 on: January 17, 2006, 01:59:17 am »
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.

aumameman

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 163
  • Last login:November 18, 2009, 09:50:07 pm
  • AUSSIE MAMER !!
    • Arcade joystick - First attempt
Re: keyboard hack / encoder question
« Reply #10 on: January 17, 2006, 02:33:58 am »
Maybe your answer is the ipac from www.ultimarc.com as it has shift key function build in. Example player 1 and player 2 button hit together will cause "esc" key. Basically the player 1 button is a sift button aswell as its usual player 1 start.
-- The Internet has you --

Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
Re: keyboard hack / encoder question
« Reply #11 on: January 17, 2006, 07:49:38 am »
Maybe your answer is the ipac from www.ultimarc.com as it has shift key function build in. Example player 1 and player 2 button hit together will cause "esc" key. Basically the player 1 button is a sift button aswell as its usual player 1 start.
Player 1 and Player 2 Start together = Escape is a good reason NOT to get the I-PAC, but you could always set the shift key to a different input and avoid this problem.
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?

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.
I think your best bet would be the KeyWiz from GroovyGameGear.  It has a separate shift key (not combined with one of the 32-inputs), plus you can wire a button so it activates a shift function automatically.

You do not want the action key as a shift key or as a shifted input, but coin, start, etc. as a shift key is fine.  For the panel you describe, you are looking at 28 action keys.  I would have Pause and maybe Escape as "hard" inputs, along with coin 1 and coin 2, and map the P1 and P2 Start keys to stealth-shifted inputs.

In this thread, I explain how to wire up a 4-player panel using the KeyWiz.  You would be doing something similar, but could avoid all shared inputs.

See http://www.mameworld.net/tigerheli/encoder/shiftkeys.htm for a discussion of stealth-shifted inputs, and http://www.mameworld.net/tigerheli/encoder/startkey.htm for a discussion about getting rid of the start keys to save more inputs (although you wouldn't need to do this).
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.

rwhip41

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 46
  • Last login:April 04, 2006, 12:46:36 am
Re: keyboard hack / encoder question
« Reply #12 on: January 19, 2006, 12:57:53 am »
Regarding the ipac and the Shift function...

You could run a junctionfrom the Player 1 and Player 2 buttons to a seperate button that serves as the Escape function.

EDIT: I have an ipac and like it a lot, but a motivation to go with a Keywiz are for the 2-player games with a Continue option (more coins in). We've accidently ended many a game when both players hit their Player start buttons at the same time. Otherwise, the ipac works great for shift functions via easy extra button hookups.
« Last Edit: January 19, 2006, 01:04:34 am by rwhip41 »

Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
Re: keyboard hack / encoder question
« Reply #13 on: January 19, 2006, 07:35:32 am »
Regarding the ipac and the Shift function...

You could run a junctionfrom the Player 1 and Player 2 buttons to a seperate button that serves as the Escape function.

EDIT: I have an ipac and like it a lot, but a motivation to go with a Keywiz are for the 2-player games with a Continue option (more coins in). We've accidently ended many a game when both players hit their Player start buttons at the same time. Otherwise, the ipac works great for shift functions via easy extra button hookups.
Exactly . . .

The problem Soulblazer has is that he is using 28 ACTION keys so there is no good way to make the shift function work (short of maybe combining P1 and P2 buttons 3 through 6 with the P1 and P2 second joystick inputs, which frees up 8 inputs - i.e., there are ways to work around it and make it work but they are awkward).

In general, regarding the P1 and P2 = Escape problem - I am a big fan of a dedicated Pause Key - so if you remap P2 B8 to "P", leaving 27 other inputs, you then can set P2B8 as the Shift key, so pressing Pause and 1P Start at the same time = Escape, etc.   This is MUCH less likely to be accidentally activated.

BTW - Soulblazer - Another option to consider would be the I-PAC VE which has 32 inputs and is USB.  It can also use Stealth-shifted keys, but the wiring is more complicated.
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.