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

0 Members and 1 Guest are viewing this topic.

Chris

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4574
  • Last login:September 21, 2019, 04:59:49 pm
    • Chris's MAME Cabinet
Keyboard hack issues
« on: November 05, 2002, 12:14:57 pm »
My cabinet uses a keyboard hack for an interface.  The keyboard does not have the simple matrix controller connected to a membrane; it has a full motherboard with separate keyswitches on the motherboard for each key.  Thus, rather than having a ground loop to one side of the matrix and a wire to each line on the other side of the matrix, I have a pair of wires soldered to each key.  These wires come out the back of the keyboard in a pair of DB25 cables.  The total cable length is probably about 3-4 feet.  Since I had to solder directly to the back of each key, the keyboard itself is still intact, and I can pull it out through the coin door for maintenance.

I've noticed that on both the keys on the keyboard and the buttons on the control panel, quick presses are often missed; I have to hit a control rather firmly for it to respond.  This is a problem in games like Pac-Man and Dragons Lair, and especially Track and Field.

Is the problem likely related to all of the extra wire in between the keyboard and the CP? Am I adding too much resistance to the switches, or possibly draining off too much current?  Do I need to shorten the cable length, or will I be fine if I can just trace out the proper ground loop rather than run two wires for each switch?  Or should I dump that keyboard and buy a cheap keyboard with a small circuit board that I can mount to the CP, providing extra-short wiring?

--Chris

--Chris
DOSCab/WinCab Jukebox: http://www.dwjukebox.com

_Iz-

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 703
  • Last login:Yesterday at 01:01:19 am
  • Time to coin up!
Re:Keyboard hack issues
« Reply #1 on: November 05, 2002, 02:01:28 pm »
Sounds more like a timing issue with the keyboard controller, some require the key to be pressed for a minimum length of time before it is registered. You're apparently faster than the threshold unfortunately. May need to use an ipac or choose a different keyboard to hack...

I use an ipac and it was worth every penny...

Mike

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 307
  • Last login:September 22, 2005, 01:22:14 pm
  • Umm, yea about the TPS report
Re:Keyboard hack issues
« Reply #2 on: November 05, 2002, 02:36:59 pm »
I agree the ipac for an arcade machine is the only way to go. A keyboard hack is just wasting your time until you break down and buy an Ipac. I think if you talk to anyone who has been doing this for any legnth of time they will tell you to buy a keyboard encoder. My Ipac works ten times better than my keyboard hack did.

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 issues
« Reply #3 on: November 06, 2002, 10:33:34 am »
I agree the ipac for an arcade machine is the only way to go. A keyboard hack is just wasting your time until you break down and buy an Ipac. I think if you talk to anyone who has been doing this for any legnth of time they will tell you to buy a keyboard encoder. My Ipac works ten times better than my keyboard hack did.

A properly done keyboard hack will work flawlessly. I think perhaps the problem with this hack is the age of the keyboard. It probably just isn't as fast as a modern design. I've got a keyboard like that, with one big pcb. It's from when 5Mhz was fast. The fact that there is no matrix speaks volumes.

Bob




Chris

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4574
  • Last login:September 21, 2019, 04:59:49 pm
    • Chris's MAME Cabinet
Re:Keyboard hack issues
« Reply #4 on: November 06, 2002, 10:50:24 am »

A properly done keyboard hack will work flawlessly. I think perhaps the problem with this hack is the age of the keyboard. It probably just isn't as fast as a modern design. I've got a keyboard like that, with one big pcb. It's from when 5Mhz was fast. The fact that there is no matrix speaks volumes.
Ordinarily, I would agree... except using the keyboard itself now exhibits this behavior, where it didn't before, which leads me to believe I'm adding too much resistance or something...

The keyboard is a QTronix keyboard with integrated trackball:


It is an older keyboard; when I got it, it was married to a Compaq 386!
--Chris
DOSCab/WinCab Jukebox: http://www.dwjukebox.com

_Iz-

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 703
  • Last login:Yesterday at 01:01:19 am
  • Time to coin up!
Re:Keyboard hack issues
« Reply #5 on: November 06, 2002, 12:55:21 pm »
You're positive the keyboard reacted better before? Or you really don't know for sure because you never used the keyboard before in the way you are now?

Technically, if the length of the wire was a factor it would only affect the external buttons you added as the keys on the keyboard don't use the extra wire, they make immediate contact with the pads on the pcb. You could also test this by trying a key with no wires attached. If it behaves exactly like the ones with wires attached then it's not the wires causing the problem. Have you tried connecting a different keyboard to the computer to see it it exhibits the same behavior as well? If a newer keyboard is slow as well then maybe it's a bios setting that is causing your problems...

Report back with your results.

Chris

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4574
  • Last login:September 21, 2019, 04:59:49 pm
    • Chris's MAME Cabinet
Re:Keyboard hack issues
« Reply #6 on: November 06, 2002, 01:59:50 pm »
You're positive the keyboard reacted better before? Or you really don't know for sure because you never used the keyboard before in the way you are now?

Technically, if the length of the wire was a factor it would only affect the external buttons you added as the keys on the keyboard don't use the extra wire, they make immediate contact with the pads on the pcb. You could also test this by trying a key with no wires attached. If it behaves exactly like the ones with wires attached then it's not the wires causing the problem. Have you tried connecting a different keyboard to the computer to see it it exhibits the same behavior as well? If a newer keyboard is slow as well then maybe it's a bios setting that is causing your problems...
I've used the keyboard extensively before, but not with this PC.  I have used it with a faster PC, though, without problems...

Some keys do seem to work better than others, but I'm not sure that the "working" keys correlate with keys that are not on the CP.  I do know that A and M are particularly bad, and that both of those keys are mapped to buttons.

I'll check it out in more detail when I get home...

--Chris

--Chris
DOSCab/WinCab Jukebox: http://www.dwjukebox.com

RandyT

  • Trade Count: (+14)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7014
  • Last login:July 25, 2025, 02:17:35 pm
  • Friends don't let friends hack keyboards.
    • GroovyGameGear.com
Re:Keyboard hack issues
« Reply #7 on: November 07, 2002, 02:11:16 pm »
I agree the ipac for an arcade machine is the only way to go. A keyboard hack is just wasting your time until you break down and buy an Ipac. I think if you talk to anyone who has been doing this for any legnth of time they will tell you to buy a keyboard encoder. My Ipac works ten times better than my keyboard hack did.

Sorry, don't agree.  Mine worked flawlessly.  Was it a pain? Sure, but it was fun at the same time.  Was it free?  Pretty close.  Would I do it again?  Probably not, but then again, I don't have to.  :)

But it does require a set of skills that might be beyond some folks, and they should definitely go with a real encoder.

As for the poster's problem, I'm afraid I am at a loss.  I have a hard time believing that the speed of the keyboard controller has anything to do with it.  Even if the cpu inside is running at a 1mhz, that should still be plenty fast to catch the keystrokes.  

Also, ALL keyboards use a matrix of some sort.  They have to!  Otherwise, the controller chip would have to have about 120 pins!  No matrix means a separate pin from the controller leading to each key.  This is obviously not what you have here.  

If the keyboard isn't slow without all the extra wire, the problem will lie there, unless you have a high resistance short someplace.

RandyT  


« Last Edit: January 30, 2003, 11:59:16 pm by RandyT »

Chris

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4574
  • Last login:September 21, 2019, 04:59:49 pm
    • Chris's MAME Cabinet
Re:Keyboard hack issues
« Reply #8 on: November 07, 2002, 02:43:38 pm »
Also, ALL keyboards use a matrix of some sort.  They have to!  Otherwise, the controller chip would have to have about 120 pins!  No matrix means a separate pin from the controller leading to each key.  This is obviously not what you have here.  
Yes, the keyboard obviously has a matrix, but because of the way the board is laid out, the matrix is non-obvious, so I wasn't able to wire to it.

If it was likely to make a difference, though, I could use a multimeter to determine which traces are common between keys and map the matrix that way.  If I cut out the front panel below the CP and hinge it, I could shorten the cables as I would no longer have to be able to pull the keyboard through the coin door (and, incidentally, the latches would be accessible so I could do a removeable CP).  I just didn't want to go through all this work without some clue I was headed in the right direction...

Yes, I know the easy way would be to use an IPAC, but that costs money that I'd rather put into better joysticks (#!@$%!! Ultimates!) or a Star Wars yoke.  (My total investment in my cabinet so far is only about $300, which is why my wife hasn't had me drawn and quartered yet.)

--Chris
--Chris
DOSCab/WinCab Jukebox: http://www.dwjukebox.com

_Iz-

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 703
  • Last login:Yesterday at 01:01:19 am
  • Time to coin up!
Re:Keyboard hack issues
« Reply #9 on: November 07, 2002, 04:43:05 pm »
I have a hard time believing that the speed of the keyboard controller has anything to do with it.  Even if the cpu inside is running at a 1mhz, that should still be plenty fast to catch the keystrokes.

RandyT  



I agree that the keyboard controller is plenty fast internally to catch keystrokes as fast as a human can generate them but couldn't the keyboard controller be programmed from the factory to reject or ignore keystrokes that last less than a pre-determined length of time? Maybe the controller was sensitive to voltage fluctuations and they did something like this to make sure it didn't generate phantom keypresses...

Could also be a timing issue between the keyboard and the computer. Some bioses have keyboard timing settings...  Might even be an intermittent short in the keyboard cable itself.

I still strongly recommend testing with another keyboard to eliminate the computer as a suspect and go from there.

Mike

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 307
  • Last login:September 22, 2005, 01:22:14 pm
  • Umm, yea about the TPS report
Re:Keyboard hack issues
« Reply #10 on: November 07, 2002, 06:17:37 pm »
That keyboard isn't original to the 386 you took it off of. It contains the windows logo key which wasn't available till windows 95 came out.  A 386 that came with windows 95 would be a very low end machine at the time and wouldn't have came with a keyboard like that. Plus during that time compaq still as they do today shipped thier own brand of keyboards with the computer. Enough of a history lesson. The picture you have looks like this keyboard here http://www.qtronix.com/Scorp35PMNET.html that they still sell today. My best guess to your problem is that your trying to go to the keys and this is giving you a bad connection or you are ghosting really bad. Since you say the keyboard is still intact I'd try to play some games with the keyboard if It still occurs it could be a problem with the keyboard ghosting if it doesn't occur you pretty much know it's your connection to the keys.

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 issues
« Reply #11 on: November 08, 2002, 12:55:58 pm »
Since the keyboard exhibits problems when using the keys, you can elimninate the wires as a problem.

Since the keyboard used to work just fine, you can eliminate the design as a problem.

My best guess is either:

a) one of the analog components on the pcb has gone bad (like a capacitor).

b) there is something conductive on the pcb that is shorting something out under certain circumstances.

Since you say some keys are worse than others, look into b) first.

bob





Chris

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4574
  • Last login:September 21, 2019, 04:59:49 pm
    • Chris's MAME Cabinet
Re:Keyboard hack issues
« Reply #12 on: January 07, 2003, 12:28:35 am »
This ended up getting fixed by changing motherboards.  I don't know if the old motherboard just didn't like the hack, or it's a speed issue (the old machine was an Athlon 800, this one's an Athlon XP2000+)...

--Chris
--Chris
DOSCab/WinCab Jukebox: http://www.dwjukebox.com

_Iz-

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 703
  • Last login:Yesterday at 01:01:19 am
  • Time to coin up!
Re:Keyboard hack issues
« Reply #13 on: January 07, 2003, 02:34:24 am »
Had a weird problem at work the other day with a keyboard and P4 system. System refused to boot, just beeped like crazy and locked during post. I thought the harddrive was bad until I heard it spinning. I unplugged the keyboard, plugged it back in and all was fine...  Go figure...

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19428
  • Last login:Today at 11:06:50 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:Keyboard hack issues
« Reply #14 on: January 07, 2003, 09:53:28 am »
If you need to use more than 4 inputs simultaniously NEVER use a keyboard hack.  There is this thing called keyboard blocking that prevents keyboards from showing more than a few keypresses at once.

 You shouldn't use this, period, end of story.  

Saint and I were talking about this a few days back and he said he needed to change the faq to reflect the fact that the keyboard entries are just for historical reference at this point.  He just hasn't gotten around to it yet.  People used to use keyboard hacks because they didn't have any other choice, not because they were a better solution.  Now that affordable keyboard encoders are available as well as cheap, multi-button usb joysticks, keyboard hacking has offically been deemed useless.  

If you are building a new cab and don't have enough money for an ipac or usb gamepad to hack then save up enough money until you do.  Keyboard hacks are a waste of time.  

Chris

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4574
  • Last login:September 21, 2019, 04:59:49 pm
    • Chris's MAME Cabinet
Re:Keyboard hack issues
« Reply #15 on: January 07, 2003, 10:09:41 am »
My keyboard hack will show 16 simultaneous inputs without blocking or ghosting.  Since I used a keyboard that was slated to be discarded anyway, the cost to me was $0 and a couple of hours of time.

Since this is "Build your own arcade controls", there are always going to be some people who want to do it themselves rather than buy an off-the-shelf solution.

If I go the route of installing Windows in my cab, then I may shell out for an ipac, but until then, why throw out a working keyboard hack?

--Chris

--Chris
--Chris
DOSCab/WinCab Jukebox: http://www.dwjukebox.com

rampy

  • *shrug*
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2910
  • Last login:March 02, 2007, 11:32:16 am
  • ...as useless as a JPG is to Helen Keller
    • Build Your Own PVR
Re:Keyboard hack issues
« Reply #16 on: January 07, 2003, 11:25:55 am »
If you need to use more than 4 inputs simultaniously NEVER use a keyboard hack.  There is this thing called keyboard blocking that prevents keyboards from showing more than a few keypresses at once.

Now that affordable keyboard encoders are available as well as cheap, multi-button usb joysticks, keyboard hacking has offically been deemed useless.  

If you are building a new cab and don't have enough money for an ipac or usb gamepad to hack then save up enough money until you do.  Keyboard hacks are a waste of time.  

Deemed by  whom? you?

Just because there's a mainstream/established way of doing something doesn't mean one couldn't go a different route.  

That's a pretty arrogant stance (note: I'm not saying that you are arrogant - just that your statements were )

I too would highly recommend an Ipac to anyone that asks - but don't piss in the keyboard hackers wheaties =P  

Although I'm surprised that the motherboard change automagically fixed Chris's problem...  (well not surprised ... but i dont' think it was related to clockspeed)

*shrug* (tm)-
rampy

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 issues
« Reply #17 on: January 07, 2003, 01:08:59 pm »

If I go the route of installing Windows in my cab, then I may shell out for an ipac, but until then, why throw out a working keyboard hack?


My keyboard hack functions as well as yours (16 simultaneous with no problems), and it works in Windows too. What is it about Windows that makes you want to dump your keyboard hack in favor of an ipac?

Bob