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  (Read 2263 times)

0 Members and 1 Guest are viewing this topic.

Bonesthedog

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 25
  • Last login:May 17, 2004, 07:59:56 pm
  • I'm a llama!
Keyboard Hack
« on: October 08, 2003, 10:23:00 am »
I'm trying a keyboard hack for the first time(ive only done joystick before) and i had a few questions.

There is two groups of wires on my keyboard controller. one group of 8, one of 17. when i touch one from one group to one of the other group, it creates a keystroke. so i mapped it out using keyhook. now i need to know, how do i wire it if i need more then one key on the same wire

example: 1+15 is esc, and 1+3 is 5. or 3+6 is A, and 2+6 is B. How would i go about wiring/soldering?

tmasman

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 537
  • Last login:January 04, 2024, 03:50:44 pm
  • Hello...
    • My (no so up to date) Home
Re:Keyboard Hack
« Reply #1 on: October 08, 2003, 12:58:27 pm »
The easiest way is to solder a single wire to the contact on the KB PCB...
Then attach that wire to a terminal strip with screws.
Then the wires going to your buttons would attach to the screws on ther other sire of the strip.
(See diag below)
I'm not a freak!...
Oh wait...
Yes I am...

ducky123

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 8
  • Last login:May 03, 2004, 05:13:39 pm
  • I'm a llama!
Re:Keyboard Hack
« Reply #2 on: October 08, 2003, 11:42:36 pm »
doesn't ghosting happen? Like when you press like 3 keys or something other keys get pressed too... I never tried it but was gonna.... when I heard about that.. is tat true?

freppa

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 24
  • Last login:September 30, 2004, 08:45:31 am
Re:Keyboard Hack
« Reply #3 on: October 09, 2003, 06:00:51 am »
Ghosting might happen if you press three or more keys at once. But only if you aren't carefull in selecting keys...  ;)

If you select keys carefully, there is no possibility of ghosting or blocking. I think Bonesthedog might be able to get 17 individual inputs, if he also selects his keys carefully he would be able to get two joysticks and 6 buttons per player with one input to spare... ::)

/freppa

paigeoliver

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10994
  • Last login:July 06, 2024, 08:43:49 pm
  • Awesome face!
Re:Keyboard Hack
« Reply #4 on: October 09, 2003, 06:11:03 am »
Ghosting might happen if you press three or more keys at once. But only if you aren't carefull in selecting keys...  ;)

If you select keys carefully, there is no possibility of ghosting or blocking. I think Bonesthedog might be able to get 17 individual inputs, if he also selects his keys carefully he would be able to get two joysticks and 6 buttons per player with one input to spare... ::)

/freppa

Except that he wouldn't be able to press all his buttons at once. Most keyboards that I have seen won't register more than 5 or so keys held down at once.
Acceptance of Zen philosophy is marred slightly by the nagging thought that if all things are interconnected, then all things must be in some way involved with Pauly Shore.

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
« Reply #5 on: October 09, 2003, 06:46:01 am »
See the recently revised http://www.mameworld.net/emuadvice/keyhack2.html for how to choose the inputs to avoid ghosting.

Except that he wouldn't be able to press all his buttons at once. Most keyboards that I have seen won't register more than 5 or so keys held down at once.

Not true, the majority of keyboards will only register 5 or so random keys, because they employ keyblocking that keeps additional keys from registering once 3 keys that form a right triangle on the matrix are depressed.  Avoid right triangles and all 17 keys will work.

A few keyboards employ an arbitrary "pressed key maximum" of (usually 8) keys that can be pressed simultaneously, but these are much less common.  (I've never seen one, and I know at least a dozen people who've used the methods I explain, but RandyT has one and Andy Warne reported this to me originally).

Tmasman - Nice graphic.  Okay if I steal that for the NEXT revision to the above page?
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.

tmasman

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 537
  • Last login:January 04, 2024, 03:50:44 pm
  • Hello...
    • My (no so up to date) Home
Re:Keyboard Hack
« Reply #6 on: October 13, 2003, 02:25:39 pm »
Tmasman - Nice graphic.  Okay if I steal that for the NEXT revision to the above page?

Sure...
It was just a quick sketch, but if you like it, use it.
I'm not a freak!...
Oh wait...
Yes I am...

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
« Reply #7 on: October 14, 2003, 06:49:22 am »
Tmasman - Nice graphic.  Okay if I steal that for the NEXT revision to the above page?

Sure...
It was just a quick sketch, but if you like it, use it.
Thanks!
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.

Babu

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 18
  • Last login:October 14, 2003, 10:42:46 pm
  • Boo...
Re:Keyboard Hack
« Reply #8 on: October 14, 2003, 10:46:47 pm »
See the recently revised http://www.mameworld.net/emuadvice/keyhack2.html for how to choose the inputs to avoid ghosting.

Except that he wouldn't be able to press all his buttons at once. Most keyboards that I have seen won't register more than 5 or so keys held down at once.

Not true, the majority of keyboards will only register 5 or so random keys, because they employ keyblocking that keeps additional keys from registering once 3 keys that form a right triangle on the matrix are depressed.  Avoid right triangles and all 17 keys will work.

A few keyboards employ an arbitrary "pressed key maximum" of (usually 8) keys that can be pressed simultaneously, but these are much less common.  (I've never seen one, and I know at least a dozen people who've used the methods I explain, but RandyT has one and Andy Warne reported this to me originally).

Tmasman - Nice graphic.  Okay if I steal that for the NEXT revision to the above page?

Ive seen this site http://smellhound.com/mame/  
there the guy says hes gonna add resistors to try to keep ghosting problems as low as possible I dont know if he knows about that stuff or he has no idea what hes talking bout. You guys tell me cause im about to go through a keyboard hack and ima try to make as best as possible. And if its true how do you know what resistors to use.

Thanx Cya

Tailgunner

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1156
  • Last login:October 06, 2009, 01:21:16 pm
  • ...
Re:Keyboard Hack
« Reply #9 on: October 14, 2003, 11:04:57 pm »
See the recently revised http://www.mameworld.net/emuadvice/keyhack2.html for how to choose the inputs to avoid ghosting.

Except that he wouldn't be able to press all his buttons at once. Most keyboards that I have seen won't register more than 5 or so keys held down at once.

Not true, the majority of keyboards will only register 5 or so random keys, because they employ keyblocking that keeps additional keys from registering once 3 keys that form a right triangle on the matrix are depressed.  Avoid right triangles and all 17 keys will work.

A few keyboards employ an arbitrary "pressed key maximum" of (usually 8) keys that can be pressed simultaneously, but these are much less common.  (I've never seen one, and I know at least a dozen people who've used the methods I explain, but RandyT has one and Andy Warne reported this to me originally).

Tmasman - Nice graphic.  Okay if I steal that for the NEXT revision to the above page?

Ive seen this site http://smellhound.com/mame/  
there the guy says hes gonna add resistors to try to keep ghosting problems as low as possible I dont know if he knows about that stuff or he has no idea what hes talking bout. You guys tell me cause im about to go through a keyboard hack and ima try to make as best as possible. And if its true how do you know what resistors to use.

Thanx Cya

I believe you'd get better results using diodes.

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
« Reply #10 on: October 14, 2003, 11:11:17 pm »
See the recently revised http://www.mameworld.net/emuadvice/keyhack2.html for how to choose the inputs to avoid ghosting.

Except that he wouldn't be able to press all his buttons at once. Most keyboards that I have seen won't register more than 5 or so keys held down at once.

Not true, the majority of keyboards will only register 5 or so random keys, because they employ keyblocking that keeps additional keys from registering once 3 keys that form a right triangle on the matrix are depressed.  Avoid right triangles and all 17 keys will work.

A few keyboards employ an arbitrary "pressed key maximum" of (usually 8) keys that can be pressed simultaneously, but these are much less common.  (I've never seen one, and I know at least a dozen people who've used the methods I explain, but RandyT has one and Andy Warne reported this to me originally).

Tmasman - Nice graphic.  Okay if I steal that for the NEXT revision to the above page?

Ive seen this site http://smellhound.com/mame/  
there the guy says hes gonna add resistors to try to keep ghosting problems as low as possible I dont know if he knows about that stuff or he has no idea what hes talking bout. You guys tell me cause im about to go through a keyboard hack and ima try to make as best as possible. And if its true how do you know what resistors to use.

Thanx Cya
He's confused.  Resistors won't help anything.  Diodes might help, but only if the keyboard doesn't use blocking or  have a pressed key maximum.  Most do use blocking, though.  Even if it doesn't you can get by without diodes.

See my EmuAdvice page (above) and you'll be fine.
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.

Babu

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 18
  • Last login:October 14, 2003, 10:42:46 pm
  • Boo...
Re:Keyboard Hack
« Reply #11 on: October 15, 2003, 06:57:55 pm »
How do I know what diode to get? And how do i set them up?

Cya

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
« Reply #12 on: October 16, 2003, 08:02:50 am »
How do I know what diode to get? And how do i set them up?

Cya

AFAIK, any standard diode is fine.  You shouldn't need them.  They will only work if your keyboard shows "ghosting"  i.e. you press three keys forming a right triangle of the matrix and four keys show as depressed.  They will NOT work if your keyboard uses blocking i.e. you press three keys forming a right triangle of the matrix and the third key does not register.

Everything I know about them is in the FAQ section of the page above.
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.

grafixmonkey

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 743
  • Last login:October 16, 2010, 08:16:50 pm
  • must... tear self... away from... Tron...
    • My graphics/arcade/circuits site!
Re:Keyboard Hack
« Reply #13 on: October 16, 2003, 10:40:55 pm »
Diodes are pretty standard as long as it doesn't say "zener" on it.  They all drop about 0.7v.  What changes is the current they can handle, and that's only important if the diode is part of a power supply circuit.
-----------
-- See my grafix, circuits and cab on my
-- new arcadey page:  http://www.bkgrafix.net

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
« Reply #14 on: October 27, 2003, 01:56:28 pm »
I think diodes are an urban myth!

I've never seen (not once) a wiring diagram that showed how you're supposed to hook them up, nor a theory as to what they might do.

All (or nearly enough to go ahead and say "all") AT and PS2 keyboards will allow 16 simultaneous keypresses, which is exaclty enough to get 2 sticks with 6 buttons each, or 4 sticks with 2 buttons each.

You just have to be very careful to avoid "Windows" combinations, and you need to plan out implementation to avoid any blocking combos. It's easy to do by just using each line on the "long" side of the matrix once.

Usually takes me 2 hours to figgue out.

Bob

tmasman

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 537
  • Last login:January 04, 2024, 03:50:44 pm
  • Hello...
    • My (no so up to date) Home
Re:Keyboard Hack
« Reply #15 on: October 27, 2003, 02:03:40 pm »
There are a handfull of sites referencing how to include diodes in your KB hack, but they are not even usefull with today's KBs... Today's KBs use blocking to avoid key ghosting... (Blocking is programmed into the IC... no hardware way to avoid it...)

So if you've got a hacked KB & are having problems... either use different keys, or a different KB...

Anyhow, have you guys seen this? It's just a hacked KB, but I don't know if this guy even knows about blocking/ghosting... He acts as though there are no problems w/ KB hacks...

Ebay auction f/ hacked & mapped KB

eh... I'm watching it to see the final price he gets... I maight have to throw a few on greedbay if he makes anything off them...  ;)
I'm not a freak!...
Oh wait...
Yes I am...

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
« Reply #16 on: October 27, 2003, 03:54:50 pm »
There are a handfull of sites referencing how to include diodes in your KB hack, but they are not even usefull with today's KBs... Today's KBs use blocking to avoid key ghosting...

Yes, I've seen references, but I've never seen details. I've tested dozens of keyboards, some as old as 1985, and every one of them had blocking. I'm beginning to think that blocking might be part of the AT Keyboard specification.

Quote
he acts as though there are no problems w/ KB hacks...

Ebay auction f/ hacked & mapped KB


There are no problems with keyboard hacks that are properly done, and within the constraints of the hardware, but it's obvious that the guy in the link isn't aware of them, because there's no way to have 4 sticks with 4 buttons each without running into blocking.

Bob