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: Hacking keyboard for MAME, which keys to use  (Read 2247 times)

0 Members and 1 Guest are viewing this topic.

menaz

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 12
  • Last login:November 20, 2002, 03:57:06 pm
  • I'm a llama!
Hacking keyboard for MAME, which keys to use
« on: November 23, 2002, 03:07:15 am »
I will be hacking a keyboard so I can use it on my current joystick controller I use for my playstation. This current controller has 8 pushbuttons (the 8 buttons on the psx controller) plus 2 more pushbuttons which are start and select. I would like to be able to use the default MAME keys.
Player 1= 1 key, Coin 1= 5, etc.. I can use the buttons I have set for start and select as the player 1 and Coin 1 keys, but the problem comes with the other buttons. Mame apparently supports up to 10 buttons, my controller only has 8. Out of the 10 buttons mame supports, which 8 would be the best to use? I would assume 1-8, I dont really know any games that use 10 buttons, or 8 for that matter, but I would still like to be able to play the most amount of games.

Cave

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 122
  • Last login:June 07, 2009, 10:27:58 am
Re:Hacking keyboard for MAME, which keys to use
« Reply #1 on: November 23, 2002, 09:48:39 am »
I would recommend using a psx-usb dongle there are lots of these around on ebay,etc and are cheap too, all ten psx buttons can be mapped in mame e.g.select=coin1, start=start player 1 you can even use the analogue sticks if you are using a dual shock pad.

neuromancer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 446
  • Last login:May 10, 2006, 04:26:57 pm
  • Can I Play?
Re:Hacking keyboard for MAME, which keys to use
« Reply #2 on: November 25, 2002, 03:37:25 pm »
If you want to make a keyboard hack, begin by reading the section about keyboard hacks on www.mameworld.net, in the emuadvise section.

The main thing is that if you want to have a keyboard hack that supports fighters, you can't use the default keys for most actions. You need to "decode" the keyboard matrix, and carefully select keys that will not "block" each other.

On most keyboards, for instance, the directional arrows can block one another, so you could end up not being able to move on a diagonal while pressing several other keys.

Bob




menaz

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 12
  • Last login:November 20, 2002, 03:57:06 pm
  • I'm a llama!
Re:Hacking keyboard for MAME, which keys to use
« Reply #3 on: November 25, 2002, 11:52:02 pm »
I wasnt familiar with the inside of keyboards since I had never opened one up until yesterday. Noticed that there are only a few connections to the mainboard for the whole 100+ keys. Thats the first thing that came to my mind, something isnt going to work when hitting two keys at the same time. Thanks for answering my next question in advance :). I will read that URL you gave me. BTW, I would buy a dongle, BUT those are $13.00 plus shipping and I have a $4.00 keyboard laying around, hehe.

eightbit

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1849
  • Last login:September 07, 2019, 07:38:11 pm
  • My cab is never done...
Re:Hacking keyboard for MAME, which keys to use
« Reply #4 on: November 26, 2002, 11:18:31 pm »
Is a couple frustrating hours worth $13? Read more about keyboard hacks before you decide to go that route. Many of the write ups I have seen end with thats how I did it, but I wouldn't do it again.
My statements are my own opinions. They have the value that the reader gives them. My opinion of my opinion varies between foolish and brilliant and these opinions often change with new information.

neuromancer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 446
  • Last login:May 10, 2006, 04:26:57 pm
  • Can I Play?
Re:Hacking keyboard for MAME, which keys to use
« Reply #5 on: November 27, 2002, 01:49:56 am »
Is a couple frustrating hours worth $13? Read more about keyboard hacks before you decide to go that route. Many of the write ups I have seen end with thats how I did it, but I wouldn't do it again.

Each of us has to answer that on his own. I earn more than $13 for 4 hours work, but I can't always choose which hours I get paid for. I can use the hours that I don't work for "fun" projects. Keyboard hacking takes a lot of time to do right.

I've hacked three different keyboards, and two joysticks. The USB stick I just hacked was the easiest of all, but I do not regret the keyboard hacks.

For the $40 an Ipac costs, I would rather (at this point in my life) buy a bottle of Scotch, esp, since I have two more IBM AT keyboards, which I have already decoded..

YMMV!!!

Bob



menaz

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 12
  • Last login:November 20, 2002, 03:57:06 pm
  • I'm a llama!
Re:Hacking keyboard for MAME, which keys to use
« Reply #6 on: November 27, 2002, 01:39:56 pm »
At this point in time, I have a whole lot of time and not a whole lot of money. So yeah, I dont really mind the headache, I see it as a learning experience. What do you mean you decoded your keyboards?

neuromancer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 446
  • Last login:May 10, 2006, 04:26:57 pm
  • Can I Play?
Re:Hacking keyboard for MAME, which keys to use
« Reply #7 on: December 03, 2002, 11:57:23 pm »
What do you mean you decoded your keyboards?

Sorry for the delayed reply. I actually have a job, a wife and a house with a contractor present.

Anyway, the detailed instructions are found at www.mameworld.net under the emuadvice link. (search for it).

In general, think of the kids game "battle ship". Keyboards work the same way. Most keyboard "decoders" have an 16x8 matrix, or something like that (my internet connection is too slow to check!).

You need to figgure out for each pair of pins on the encoder, what is the keystroke. The reason this is important is pretty easy:

Remember "battle ship"? consider A1, A2, B1, B2. That's a square, right? Well if you only have 4 pins, then if you have three of those held down, you can't tell if you press the third one or not.

Remember above we talked about 16x8 Matrix? Well, 16 pins is exactly enough to have 12 buttons (6 per player) and 2 sticks (2 axis x 2). If you want to play games like fighters, then it is imperitive that you find 16 different keyboard characters that correspond to 16 pins on the encoder.

The only thing you should feel comfortable about is:
the 16 characters you 'decode' for your keyboard hack will not be anything that makes sense for playing with a real keyboard.

If you're still with me, I'm sure that you have some real questions (I'm wasted now).

Read that section on Mameworld.net first, because it's really good, and then ask some specific questions.

Bob