Menu Content/Inhalt
Start arrow Emulation arrow Advance Keyboard Hack (AdvKH) - Prototype
Advance Keyboard Hack (AdvKH) - Prototype Drucken E-Mail

Introduction:

I wanted to use my hacked keyboard encoder in an arcade cabinet. Normally this would require a total rewiring of the panel since each button would be connected to the two row / column connectors. (Read the keyboard hacking page from EmuAdvice in case you don't understand what this is about). An arcade pcb only needs one path to a button because the ground for all buttons is the same. All Arcade cabinets are wired exactly like that: one wire for each button and a common ground. The wires from the buttons lead to the JAMMA or Austrian standard socket.

Now what I was looking for was a way to connect my keyboard hack to the 44-pole "System Austria" socket (see index for a German description). This is the story of the AdvKH prototype, designed for my VA+MP cab.

Principle:

Image

This picture shows the underlying principle of the adapter: The optocoupler SFH-601 acts as a switch for the column+row combination that comes from the encoder circuit. The optocoupler is controlled by de facto only one wire, namely the one that is grounded by the button or joystick switch.

BTW - I had the idea of using optocouplers BEFORE I found the PC2JAMMA solution using CMOS switches. I am not sure which design is better - probably my approach is cheaper and more robust but needs more soldering.

Optocouplers:

You can use other flavours of optocouplers like the PC817 too. I chose the SFH601 because it was one of the cheapest around. Cost is relevant because of the quantity you need. Each switch needs one optocoupler so you will end up with around 20+ optocouplers.

The optocoupler can be supplied with either the available 5V or 12 V but in each case the LED needs a preresistor. Its value can be calculated with the following formula: R = (Us - Uf) / If.

Using the specs from the SFH601 datasheet as an example the R value would be calculated like this:

Us = 12 V (supply voltage)
Uf = 1,2 V (input forward voltage)
If = 10 mA (input DC forward current)

R = (12-1,2)/0,01 = 1080 Ohm ~ 1 kOhm

Before connecting the row/column to the E and C of the optocoupler you have to know which voltage of row or column is higher. The one with the higher value then is connected to the collector. Warning: I am not quite sure if this also works with other keyboard encoders. If connecting the row and column via a diode produces a keystroke then the thing will most likely work. More on my experience with keyboard encoders can be found here.

To be honest I have no idea if and how changing to another CTR ratio affects the switching behaviour. The Vishay SFH601-2 that I used has a CTR of 63-125%. So far everything has worked fine.

Putting it all together:

Image

Yes, you are right, that was a lot of soldering. All components were mounted on a board of wood which later was put in my Gigant cab. On the upper right there's the keyboard encoder. It was a noname DIN keyboard with 14 non-blocking keys. The green wires from the column and row connectors go to the C and E of the optocouplers (21x). The brown wires lead from pin 2 to the fingerboard which is plugged in the cab's socket. You could do the same with JAMMA parts. Via the 6 terminal blocks (in the upper left) you can connect 12V (coming from the PC or the cab's power supply, available on the System Austria or JAMMA socket), GND, 5V (for the VGA circuit), game select button, 1P/2P fire buttons 4. See below for a detailed picture.

Image

The double black wire goes to the game select button. Fire buttons 4 are not yet connected but could one day be used in a MAME cab. Right above the terminal connectors you can see the parts of Tim's simple VGA circuit (check my page on connecting arcade monitors to the VGA card). The VGA output was soldered to the fingerboard too. The metal plate is used to lock the adapter below the System Austria socket.

Image

So this is what the whole AdvKH looks like. On the right there are the VGA connector, power plug from the PC and the DIN keyboard plug.

To put it in a nutshell: My prototype does the same as a JPAC/ ArcadeVGA combo (worth 130 EUR) with minimal hardware but special software (like AdvanceMAME or VAntAGE). As a bonus, it fits perfectly in my Gigant cabs. No performance issues yet.

Building an AdvKH only makes sense if:

  • only a small number of input lines is required (~10): e.g. when adapting an old dedicated cab with a one-player panel for an emulator project.
  • you have a suitable and cheap keyboard for hacking
  • you are not afraid of soldering and have to do it anyway when building the other circuits (video, enabling, audio)
  • you cannot get a dedicated keyboard encoder (which should not be more expensive than 30 EUR + shipping)
  • you have plenty of spare time (a general prerequisite for emulation projects...)

Update:

I used the design once again in my reVA+MPed Cab (check my VA+MP Cab page). Although I already had KeyWiz Eco encoders I thought it would be a pity to use the high performance encoders in a small project with only 10 input lines. This time I hacked a Logitech keyboard.

 
Weiter >