Earthshaker - Cheap and Customizable Jamma to PC Interface Board

by baritonomarchetto in Circuits > Arduino

1383 Views, 3 Favorites, 0 Comments

Earthshaker - Cheap and Customizable Jamma to PC Interface Board

IMG_20210505_082929.jpg
IMG_20210505_082849.jpg

WARNING: This project has been updated. See >>HERE<< (Instructables)


Some time ago I realized a PC-to-Jamma interface based on arduino DUE just to show you the feasibility of such a project with arduino and the libraries skilled coders share with us.

That project uses an Arduino DUE board, which is powerful, but not the cheapest Arduino out there. If you add that most arcade conversions ask for 10 digital inputs or less, we are allowed to think that an easyer and cheaper solution could be the optimal for most.

In this Instructable I will then show you a simplified, cheaper version of the project, with some interesting features:

- built-in video amplifier

- out-of-frequency sync signal protection for CRT monitors

- possibility to handle every single kind of arcade input (joystick and buttons, but also wheels, spinners, trackballs etc etc)

- open firmware

I will also share a link to have the board manufactured at PCBWay in order to help you realize the project.

Let's go on then! :)

Schematics

7374 Arduino micro.png

Here is a colored scheme of the whole project. Not so orthodox, but nice and easy to understand in my hopes.

- Arduino pro-micro is the brain of the whole design. It's in charge of: (a) monitoring the video sync frequency, (b) sense button presses, (c) emulate a Human Interface Device (HID) of choice. In other words it translates in keyboard keypresses or joystick buttons presses (or whatever you want it to do!) control panel, coin switch or any other switch connected to the jamma fingerboard. Nice uh! :)

- RGB color signals moves from the PC VGA connector to the video amplifier; a 1Kohm resistor to ground lowers the current to the video amplifier input. On the video amp output side a trimpot lowers the current to the arcade CRT. Notice that I am using a trimpot at the output stage of the amp because depending on the type of CRT monitor you are using (arcade or a replacement TV) the "right" impedence differs from 75 ohms in CRT TVs to some hundreds of ohms in arcade monitors (200 being the optimum for my Hantarex, in example). Those trimpots also help in facing those monitor-to-monitor differences due to ageing, connections, etc etc.

- Separate VGA sync signals are made composite by a simple "one-resistor, one diode" circuit.

- The Video amplifier (THS7374) has a very handy feature: a disable pin. This allows it's direct control from the microcontroller monitoring the sync frequency.

- Audio amplifier is kept outside the PCB board. This is a design choice to let you select the most appropriate amplifier for your cabinet. You will need an appropriate power supply for it.

- Two decoupling capacitors will take care of high and low frequency interferences from the power line. I also placed 4 poly caps for hardware decoupling 4 inputs... but more on this later ;)

- an indication LED will turn on if the video signal is DISABLED.

- Analog inputs are accessible both via jamma fingerboard (5 on "player one side" and 4 on "player 2 side", so to speak) or screw terminals (those on P2 side only). That's because very ofter "special" interfaces like wheels, spinners etc. are not connected to the fingerboard. You can solder those on dedicated pins on the fingerboard or use those screw terminals. It's up to you.

- Arduino and the video amplifier are juiced through the USB cable. Voltages coming from the cabinet (+5V, -5V and +12V) are not used. You can make good use of them though (i.e. to power your audio amp), so they are made reachable via dedicated screw terminals.

Being the number of inputs limited, there is a max number of 14 inputs hardwired to the JAMMA connector, 9 of which can be analog.

There are a whole bunch of digital controls in the arcade world that are not necessarily buttons. In example trackballs, spinners, optical wheels... and here it comes why I placed 4 poly caps for 4 inputs: immagine you want to interface a so called "360°" wheel (those free-spinning wheels, you know) or a spinner: those are optical encoders. There are a lot of methods to debounce that sort of signals, but one I found particular effective is by placing a 0.01uF-0.1uF capacitor to ground. That's what those caps are intended for.

The Hardware

IMG_20210505_082952.jpg
IMG_20210505_082941.jpg
IMG_20210505_083019.jpg

WARNING! I am assuming you have a soldering station and some tin by hand and you know how to use them.

The video amplifier is a surface mount device with 0.65 mm pitch, so I must suggest you to purchase some soldering flux to help solder that microbe. I use a cheap "no-clean" Rosing Mildly Activated (RMA) pen with excellent results. I have tryed other sort of fluxes, but none worked well like that. There are a lot of videos and "how-to's" on how to solder such microbes, but for me melting a little amount of solder on the pads, placing the IC over it and then remelt the pad-solder with a clean iron tip while applying a veeeeery small pressure on top of the IC worked best. Find the way that works best for you and your gear, but consider to buy at least two video amplifiers such in case one goes bad (in my experience they are very temperature sensible).

The interface is made up of (BOM):

- 1x Arduino pro-micro microcontroller board

- 1x THS7374 video amplifier

- 1x audio amplifier

- 1x 1N4148 diode

- 5x 1000 ohm resistors

- 1x 820 ohm resistor

- 3x 500 ohm trimpots

- 1x LED (3mm)

- 1x VGA connector

- 1x 22 uF electrolitic capacitor

- 5x 100nF poly capacitors (4 of which are optional)

- 6x screw terminals (optional)

- 1x Earthshaker Printed Circuit Board

In order to have your copy of the printed circuit board manufactured, HERE is a link (PCBWay): select your favourite color, place the order, source components, assemble your board and have fun with it!

A special thanks goes to those nice guys at PCBWay - PCB Prototype the Easy Way who sponsored this work by manufacturing the PCB proptotype you can see in the pics. Their customer service is very good and PCBs quality great. Thank you!

Sketches/Codes

keymapES.jpg

Sketches? Plural?

Sure! The possibility to upload in our arduinos the sketch makes Eartshaker perfect for most arcade projects and explains the "customizable" word in the title of the present instructable.

Not only this interface board can be used in a "classic" standard upright cabinet with a joystick (4 switches) and up to 10 other switche/buttons, but you could also use it to interface other controls such as an arcade wheel, with analog accelerator and brake!

Want me to be more specific? With the right firmware you can interface arcade cabinets like:

1 - "classic" upright cabinet, one joystick and up to 10 further digital inputs

2 - "classic" upright cabinet, one joystick, one spinner and up to 8 further digital inputs

3 - "classic" upright cabinet, one joystick, one trackball and up to 6 furhter digital inputs

4 - "classic" upright cabinet, two joysticks and up to 6 further digital inputs

5 - racing cabinet with optical wheel (360°) and up to 12 furhter digital inputs

6 - racing cabinet with analog wheel (270°) and up to 13 digital inputs

7 - racing cabinet with analog wheel (270°), analog accelerator and/or brake and up to 11 digital inputs

... and so on :)

Ok, let start with the first exaple sketch!

CLASSIC ONE PLAYER CABINET, JOYSTICK + 4 BUTTONS CPO

This is probably the more common case. Arduino emulates a keyboard and send key presses as per attached key map. When a button is pressed, the corresponding keypress will be emulated. "Start" button (jamma fingerboard pin 17) acts as "SHIFT" button: if you press a button while keeping "start" pressed, a different keystroke will be emulated. This is very useful to trigger those functions you do not use while playing, such as menu opening and diving, quick addition of a credit, etc.

The frequency check function is ongoing all the time in the attached sketch. If you have a simple design where out of frequency sync signals are relegated to the PC boot time, you can think at limiting that check for the first few minutes, up to the first detection of a "good" frequency, or set a defined time after which the video amplifier gets enabled. This will reduce the microcontroller load and speed up the whole loop execution.

You can further speed up things by limiting the buttons to those actually used. "Customizable" is the key word here, remember? ;)

Get the latest code at this link (Github): https://github.com/baritonomarchetto/Earthshaker

DRIVING CABINET WITH OPTICAL (360°) WHEEL

I am working with a friend to interface it's Buggy Boy Junior cabinet and we will use Earthshaker. I will update this instructable as soon as we will have the sketch tested and working ;)

On a side note: why the name "Earthshaker"? I have not an answer for this: it's the name of the favourite pinball of this friend of mine and I liked how it sounded! :)

Game Utility Script (GUS)

If you are not new to the arcade world, you for sure have some familiarity with the word "front-end". A front-end (FE) is a special software very often used in an arcade cabinet. In a nutshell, it welcomes you with a list of available games when you turn on your machine and helps you keeping them organized.

Sometimes a full featured FE is not necessary in a cabinet. In example, if you are planning to place a single game in a dedicated cabinet or a very restricted list of games, a simple script could be more effective then a FE.

In addition, even the most featured FE is often not sufficient to perform all the functions a well thought out arcade machine needs.

With the pourpouse of playing only few games in a racing cabinet (in this specific case Pole Position, Buggy Boy Junior and Championship Sprint), and some special function in mind, I wrote a simple Autoit script.

The script functions are:

- It's invisible (no screenshots, no menu diving... nothing)

- launches a specific game on startup

- closes the running game and launches another game when a defined keyboard button press is detected

- shut down the PC when a defined keyboard button press is detected

I also have coded the possibilty to launch a random game on startup, but it's disabled by default.

You can download the Earthshaker Game Utility Script in the repository at this link (Github), just in case it could be of some use for you.

I had planned to release an application with an external ini file to edit variables, but in the end I think it is more useful (and "educational", if possible) in the plain, code form. Being open and developed on a powerful scripting engine, you can use this as starting material to develop your own special GUS. Remember to share that with us! :)