KeyZilla

A PS/2 Keyboard Hack for Arcade Joystick Input for MAME


I'm an avid video game fanatic - I've heard the term "vidiot" used, or video-game-aholic - whatever. I recently found a website where I can download more ROM sets for MAME than I ever knew there were. You have to swear that you have the rights to download copies, and then pay what amounts to a few cents per ROM set. You can probably find MAME at http://www.mame.net and at least this one source of ROMs at http://www.romarchive.com/virtuaroms/.
I'm arguably legally entitled to download copies, because I once worked at a place called Hanson Distributing, in Bloomington, MN, USA, a distributor of games. They must have had a license, because they were copying ROMS routinely, to sell to customers to change their games. Right? (wink, wink, nudge, nudge)

Anyway, for most of the games, the keyboard works fine for steering and shooting - I play classic arcade games, notably Mr.Do!, Donkey Kong, Galaga, that sort of thing. Well, I found Robotron at the ROM archive, downloaded it, and verified that it's a nightmare trying to emulate two 8-way joysticks on a keyboard.

So, being a Classic Hacker®, I decided to seek out joysticks. Found a pair, well-used, on Ebay for $0.01 + $4.00 S&H.

The Joysticks
Click here for 640x480 image


I left positive feedback. :-)

Now, I needed to figure out a way to connect these puppies to the computer. They each came with a sort of inverse "game port" connector, i.e. female DB-15 plug, a la the serial port. But the jack on the back of the comp. is female too. And the game port only has room for about 2, maybe 4, switches, and expects rheostats for the JS. But these guys have switches, as you can clearly see. So I cut the connectors off and threw them away.

A little research turned up a couple of notable web pages:
http://www.arcadecontrols.com/arcade_input.shtml
http://www.ctips.com/ps2.html
http://home.t-online.de/home/stephan.hans/tricks.htm#DUAL-KEYBOARD%20Circuit
If you have popups blocked, you might have to unblock them, because these links are supposed to open a new browser window.

So, since I have a spare keyboard lying around collecting dust, I decided to do the "Keyboard hack." I took the keyboard apart, of course.

Just Opened
Just Opened
The Membranes
The Membranes
The controllerThe Controller Too
The Controller

A little judicious probing showed that those traces are just bare metal (well, they're laminated in plastic, but there's a hole in the inner membrane at each pad), and the controller responds quite nicely to a simple SPST switch closure, thank you very much. After some soul-searching on how to bring out certain pairs of contacts, to wire to an external switch in parallel - I thought of all sorts of clooges, but finally settled on the Y-connector. Interestingly, I spotted a 6-pin Mini-DIN Y adapter at Fry's, but, as luck would have it, just a "straight-through" Y locks up the system, so I cut it up. :-) I had to do something to spread the signals apart, but didn't have the right parts on hand to build either of the circuits above, so settled on a couple of DPDT slide switches. I have to switch them simultaneously, and am considering epoxying their handles together, because the Radio Shack slide switch grab-bag didn't have any 4PDT switches. )-;

Encoder Front
Encoder Front
Mounting Switches
Mounting Switches
Switches Mounted
Switches Mounted
Crossover Wiring
Crossover Wiring
Encoder + Y
Encoder + Y
Making Contact
Making Contact

Here's a simplified schematic - one of the connectors on the right actually isn't a connector, but goes right to the board. I'm too lazy to draw up the whole thing - just substitute 4 pins labeled "V D C G" for the obvious ones.
Simplified Schematic
(This one's full-sized. Single-bit gif's don't use many bytes.)


I don't know if I get sidetracked easily or what, but I just took a tangent and did this on M$ Excel and M$ Word:

 

A

B

C

D

E

F

G

H

1

 

 

 

*

 

*

*

*

2

 

*

 

 

*

 

 

 

3

 

ESC

Z

 

A

TAB

Q

1

4

 

 

X

F1

S

CAPS

W

2

5

 

F4

C

F2

D

F3

E

3

6

B

G

V

5

F

T

R

4

7

LT

UP

 

HOME

CR

 

KP+

END

8

 

KP0

KP*

PGUP

KP3

KP6

KP9

PGDN

9

RT

SPC

KP/

INS

KP2

KP5

KP8

 

10

DOWN

'

NUM

DEL

KP1

KP4

KP7

 

11

/

KP0

\

 

 

[

P

ZERO

12

*

F6

.

F8

L

F7

O

9

13

 

H

.

=

K

]

I

8

14

N

F11

M

6

J

Y

U

7

15

F12

 

CR

F9

\

BS

 

F10

16

 

 

RCTL

LCTL

 

 

PAUS

F5

17

 

 

 

*

RSHF

LSHF

*

 

18

 

 

 

 

 

 

 

 

19

RALT

LALT

SRCH

 

 

 

SCLK

PTSC



The ones with a * all did something weird, like open a start menu, or start the internet connection wizard, or kill the computer or knock it unconscious. So I'll probably snip the leads to pins 1, 2, 17, 18, & 19.

Speaking of leads:
Crosspoints Crosspoints 2

Crosspoints here could be a rat's nest, but if you keep it sparse it isn't bad.

Of course, as has been pointed out, I need to bring out the coin switch(es) and the start button. Robotron doesn't have a fire button, so that's moot. So I've got a preliminary control panel:

Control Panel 1 Interface

Of course, you understand that the project is a work in progress, as is this web page.

And I really don't have much more - I'll keep poking away at it. I don't have anything like a "gallery" page, but you should be able to see a list of the pix:

I Win!

http://home.earthlink.net/~entheos_engineering/images/

Have Fun!