MONSTERBASH - Open Firmware Jamma to PC Interface Board for Arcade Cabinets

by baritonomarchetto in Circuits > Arduino

1411 Views, 5 Favorites, 0 Comments

MONSTERBASH - Open Firmware Jamma to PC Interface Board for Arcade Cabinets

IMG_20210520_101953.jpg
IMG_20210520_101829.jpg
IMG_20210520_103736.jpg

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


Monsterbash is a revival of an old project of mine: JammarduinoDUE

At the time I was not able to design my own printed circuit board, so It was presented as a DIY project for thinkerers and nothing more.

Since then, I don't know how many people realized the board, but having a PCB printed by professionals for sure will help people having an open firmware board up and running in a very short time!

The shield main features are:

- RGB signal amplification

- Sync frequency check to protect your low resolution CRT monitor

- HID interface emulation to "translate" button presses on arcade control panel to something the PC can handle

- Audio signal amplification

- Possibility to handle a whole lot of arcade inputs (joystick and buttons, but also wheels)

- Open firmware!

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

Schematics

7374 MONSTERBASH.png

Here is a colored scheme of the project. Not so orthodox, but easier to follow, in my hopes.

Wirings are as easy as they look:

- Arduino DUE 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.

- RGB color signals moves from the PC VGA connector to the video amplifier. Three pull-down resistors avoid floating signals entering the amplifier. 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 sync from the VGA is made composite first, then lowered by a voltage divider to respect the Arduino DUE specs (3.3V logic). The voltage divider is calculated assuming a 5V sync signal.

- 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. The amplifier can be powered at 3.3V or 5V; being that powering at 5V allows for a wider range of input voltages/signals and being that THS7374 can be controlled by 3.3V even if juiced at 5V, i went the 5V way.

- Two decoupling capacitors will take care of high and low frequency interferences from the power line.

- Four analog inputs are directly accessible via screw terminals. They can be used to interface positional guns or 270° wheels or any other arcade control based on potentiometers.

- the built-in audio amplifier is juiced by the +12V coming from the cabinet power supply to the jamma connector. The circuit is built around an LM386N and the volume can be regulated with a 10K trimmer. You can eventually install a 10K ohm potentiometer instead of the trimmer, and place it in a more accessible position, if you prefer.

There is a max number of 24 possible inputs hardwired to the JAMMA connector, plus 4 analog inputs accessible via screw terminals.

Hardware

I will assume 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).

Bill of materials (BOM):

Boards:

- 1x Monsterbash PCB

- 1x Arduino DUE microcontroller board

Video amplification and handling circuit:

- 1x VGA PCB mount female connector

- 1x THS7374 video amplifier

- 1x 1N4148 diode

- 1x 820 ohm resistor

- 3x 500 ohm trimpots

- 1x LED (3mm)

- 6x 1Kohm resistors

- 1x 220 ohm resistor

- 2x 22 uF electrolitic capacitor

- 1x 100nF poly capacitor

Audio amplification circuit:

- 1x LM386 audio amplifier

- 2x 10uF electrolitic capacitor

- 1x 220uF electrolitic capacitor

- 1x 47nF poly capacitor

- 1x 22nF poly capacitor

- 1x 100nF poly capacitor

- 1x 10 ohm resistor

- 1x 5100 ohm resistor

- 1x 10K ohm trimpot/potentiometer

Others:

- 2x 40 pin headers strip line, 2.54 mm spacing

- 1x VGA cable

- 1x audio cable

In order to have your copy of the printed circuit board manufactured, HERE is the 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. Thumbs up!

Code/Sketch

MONSTERBASH PINOUT.png

One of the main Monsterbash (and Earthshaker) features is the firmware: being open source, you can modify it at your will and have it perfectly tuned to your project.

I wrote two base sketches and you can download them at THIS LINK (GitHub).

Both have the following functions:

- Sync frequecy check and video amplification enable/disable

- HID emulation

The main difference between the two is that one emulates a keyboard, the other one emulates a joystick. This means that any control panel button you will press, a keyboard keypress (or joystick button press, depending on the firmware uploaded) will be sent to the PC.

In both firmwares, the "start" button has a "button shift" function. This means that if you press a control panel button while keeping "start" pressed, the key press emulated will be different to the case of start button not kept pressed. This doubles the number of key presses you can send to the emulator/frontend and is handy while menu diving.

The joystick firmware uses the excellent ArduinoJoystickLibrary. This library is not included in the default arduino IDE distribution, so you have to install it in order to compile the code. Super Easy, don't worry!

The keyboard firmware follows the default MAME key configuration. The keyboard library is already present in the deafult IDE package.

To upload the firmware you must install Arduino IDE first; you must install the SAM Cortex M3 Core too (not present by default). Last but not least, install Arduino DUE drivers. Refer to the official "Getting Started with Arduino Due" tutorial for most up-to-date information.

Monsterbash Vs Earthshaker

EAvsMO.png

Someone aware of the fact that I also made another Jamma-to-PC interface board could ask: what is the difference between Monsterbash and Earthshaker? Which one is best suited for my project?

Main differences are the increased number of inputs Monsterbash can handle and the built-in audio amplifier. Earthshaker is cheaper (mainly because cheaper is the arduino board it uses) and probably easier to assemble given the reduced number of components.

By using a 84Mhz, 32bit CortexM3 ARM microprocessor, Monsterbash can handle more "complex" functions with respect to Earthshaker, based instead on a 16MHz, ATmega32U4 microprocessor.

Monsterbash someway pays the 3.3V logic of the Arduino board it's built around (Arduino DUE) which makes a little bit trickier to interface genuine arcade spinners, trackballs, 360° wheel or any other optical arcade control. A simple, cheap, external logic level converter will do the job anyway.

See the comparison sheet for more differencies.

If you have trouble in the board selection for your project, feel free to post a comment below ;)