For fun and because I needed one, I set out to build a JAMMA SuperGun. (It’s not a weapon, by the way. It’s an adapter for arcade games ;P). There are some guides on the web to do so, but factual information is scarse and none of the designs I’ve seen matched what I wanted. So here’s my little contribution to the world of SuperGuns.
Note: I’ve updated the design in 2016. It retains most of the features of the previous versions, introduces new ones, and importantly, now fits on a very compact 10x10 cm PCB. If you are looking for easier DIY versions (with etching masks provided) or specfic features (such as BNC outputs with H/V sync), please check the previous versions here.
I have a limited number of extra PCBs that are up for sale, drop me a line if interested :)
This project licensed under a Creative Commons BY-NC-SA license (“NC” is for Non-Commercial).
The information and methods described herein are provided “AS-IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED. Use the concepts, examples and information at your own risk. There may be errors and inaccuracies, that could be damaging to your devices. Proceed with caution, and although it is highly unlikely that accidents will happen because of following advice or procedures described in this document, the author does not take any responsibility for any damage claimed to be caused by doing so.
There. Feeling better. Now let’s get real ;-)
My design goals were relatively simple:
- KISS design
- Drive all JAMMA variants:
- Boards requiring -5V
- Mono and stereo capable
- Can be built “by hand”
- Should remain relatively inexpensive
Technically speaking I added the following constraints:
- Power source: ATX PSU
- JAMMA connection via harness
- Peritel (SCART)
- Separate audio output
- Separately adjustable R, G and B inputs
ATX power source, though not necessarily very convenient, greatly simplifies the design given the power requirements of JAMMA boards. SCART, S-Video and Composite make for the widest possible connection choices (Component or HDMI is meaningless: we’re talking 525i/576i here, remember?). Separate audio is necessary if S-Video/Composite are being used, and it also allows for plugging the SuperGun into an audio amplifier.
Finally, I wanted to use a harness instead of having a JAMMA male connector directly onto the SuperGun: in my opinion such a connector is a source of problems (connection is not always straightforward, having the connector physically attached to the device will add unnecessary physical constraints and prevents from enclosing the device into e.g. a separate box).
As the following will demonstrate, this design is very versatile and should be able to accomodate most use cases. The presented PCB layout is intended as a compact implementation of the design allowing for the assembly of all variations.
Before we get deeper into details, a few words on JAMMA signals.
The pinouts can be easily found on the web. What’s less obvious though are the actual signal voltages to expect on each outputs, or those to provide on logic inputs.
First things first, all logic inputs are active low. Considering the values of resistors suggested by some SuperGun designs, and also considering the technology of JAMMA boards (TTL circuits…) I was expecting most outputs to be around +5V. Turns out I was close. Here’s a quick summary of the level ranges I’ve measured on MVS and some JAMMA PCBs in a somewhat empiric manner:
- Logic high state: +5V DC
- Video sync: 0–3V AC swing, 0–5V DC bias, high input impedance (1–10kΩ)
- RGB signals: 0–3V AC swing, 0–4V DC bias, high input impedance (1–10kΩ)
- Audio: 0–6V AC swing, no DC bias. On mono boards, each lead is sometimes a few Volts above GND (ca. 5–6V), both leads at the same potential so no DC bias in a balanced configuration anyway, speaker impedance.
Audio leads normally drive an 8Ω speaker, delivering about 5W of max output power.
Finally and for reference, it seems generally understood that typical JAMMA boards will expect to be able to draw at least:
- 6A@+5V (I’ve seen comments about up to 15A for some multigames/multiboards systems).
- 1A@+12V (up to 2A according to some).
- 1A@-5V (this is optional, most JAMMA boards don’t need -5V apparently).
All in all, that’s about 50W give or take, so no need to get psyched up with jumbo PSUs ;-)
Here’s the schematic of the current design:
With the above in mind, most of the design should be self explanatory. Modern TVs and A/V devices require the following signal levels:
- RGB inputs: 0.7V AC, 0–2V DC bias
- Audio inputs: 0.2–2.0V (nominal 0.5V) rms, NO DC bias
- SCART-specific signals:
- Composite sync: 0.3V AC, 0–2V DC bias
- SWTCH: 10–12V (nominal 12V) for 4:3 video (most TVs will auto-switch to Peritel input when voltage is present at this pin)
- BLNK: 1–3V DC (nominal 1V, used to tell the TV it needs to read RGB signals, and sometimes switch to Peritel input)
All signals — but audio and SWTCH — are loaded on 75Ω impedance. Audio and SWTCH are normally loaded on high input impedance (>10kΩ).
Best effort has been made to use common component values and reduce the number of different values required.
Audio section needs to do two things: adapt signal levels to line input standards (0.5V rms on a typical 10–47kΩ input impedance), and cope with both mono (replicating signal on both left and right outputs) and stereo boards.
The usual divider resistor bridge solution is WRONG: it does not provide galvanic isolation, the divider bridge will ground one of the amplifier legs. In certain cases (most notably mono configuration), if the + and - leads have a significant DC offset (typically because of biasing), this is potentially lethal to the amplifier. This is also true if an H-bridge output (Class D amplifier) is used on the JAMMA board.
The proposed solution can accommodate both mono H-bridge and regular unbalanced stereo amplifiers, through the use of isolation 1:1 transformers. The 1:1 ratio makes all calculations easier: secondary impedance seen from primary will be equal to the load on secondary, and vice-versa. The transformer makes no level adjustement, so we can make these adjustments ourselves. Audio power amplifiers are fixed gain current amplifiers adjusted to a given load. We must also keep the apparent load presented to that amplifier as high as possible to reduce linearity issues.
So the goal is to divide the output voltage by 10, while keeping the impedance low: ideally a true power adapter would retain the target 8Ω load impedance, but that would require using large resistors capable of handling the full output power of the game audio amplifier. Thus, a compromise has to be made and in order to reduce the dissipated power, we have to raise the impedance somewhat: if the amplifier delivers 5W on 8Ω, it will typically deliver about 90mW max on 440Ω, which makes it workable with standard resistors.
The divider bridge suggested has a ratio of about 0.1 giving us the circa 0.5V max output swing we’re looking for, with the 440Ω load we need (actually 437Ω, to use common resistor values). Indeed, the high secondary impedance seen from primary is negligible in front of the low 47Ω “in parallel” so the resulting divider is almost 47/(390+47). Output impedance (primary seen from secondary) is in the tens of Ohms which is what we need. Finally, the transformers can handle 100mW, this gives some leeway vs maximum power dissipation, but in any case heavy distorsion will be heard much before reaching a potentially destructive power. Obviously, this design is nothing like HiFi, but that is fairly irrelevant anyway :)
Note: there’s no AC coupling (no capacitor on the signal path) because I didn’t think it was necessary: on the input side, JAMMA boards’ output should be clean enough. They’re driving a 8Ω speaker, any significant DC bias would destroy it, much more than such (reduced thanks to the higher load) bias would destroy the transformers. On the output side, measurements show that secondary DC bias is negligible, as expected. Also, 1/4W resistors are just fine. Given the load, they won’t see half that much power, and if something goes wrong, they’ll be nice little fuses.
Finally, the audio ground is separate, meaning that the audio output section is totally (galvanically) isolated from the rest of the circuit. This helps reducing unwanted noise in the audio output.
Note: the audio section drives both the RCA outputs and the SCART audio signal. Pluging both SCART and RCA plugs at the same time shouldn’t pose a problem given their respective input impedance.
The video section takes care of two things again: adapting the signal levels and impedances, and also converting RGB to Composite and S-Video.
Given the measured signal levels, a ratio of about 0.3/0.2 will give us the required 0.7V swing, within acceptable DC bias range. Since JAMMA requires a high impedance load (>1kΩ), and keeping resistor values relatively low to avoid adding noise, the divider bridge naturally becomes: 390/(1000+390) = 0.3. The supplementary (and very optional) potentiometers are used as variable resistance. Most of the time they will be all the way to the right (short circuit with the proposed wiring), giving the divider bridge its above nominal value. If need be (very strong input signal, or color imbalance) they can be used to adjust the ratio up to about 0.15 (with 1kΩ pots). This gives good results and in the worst case scenario of a 5V input swing, the resulting output will be slightly over 0.7V, which should be OK.
The triple video amplifier (AD8073) handles impedance matching and signal buffering: First, the JAMMA boards expect a high input impedance (1–10kΩ) while the TV outputs must be matched to 75Ω impedance. A basic divider bridge would provide poor matching to either side. Second, the converter needs a constant load: without the amplifier, plugging in the SCART would change the circuit impedance, and the signals levels and balance would be modified. The amplifier is used in a typical double gain buffer, the final 75Ω resistance at the end of the signal path will divide by 2 whenever a standard 75Ω load is plugged, giving unity gain output. It’s also a “safety” device of sorts: if the input signals are overvolted, this amp will limit damage risk to the display.
The RGB signal path isn’t AC-coupled. This allows for the best possible RGB signal integrity. It can be done this way because the JAMMA board shares ground level with the SuperGun (by virtue of being powered by it), and SCART allows for DC offset in the signals. The level adjustment performed by the divider bridges ensures that any DC offset will fall within acceptable level for SCART input without saturating the video amplifier. For more details about AC-coupling video signals, see this article.
The sync separator (LM1881) receives a load-adapted synchro input, and outputs a “clean” composite sync signal at near TTL level. This signal is then fed to the video converter, and adapted for video sync level via a 680Ω resistor to the SCART plug (which presents a 75Ω load, as usual): considering the output load on the LM1881 (about 755Ω), its composite output is in the 3V range, which the 680/75 divider bridge brings down to around 0.3V, in line with standard. Selected RSET values (as per datasheet) are expected to give good results with both PAL and NTSC signals. This setup forgoes proper impedance matching on the sync signal output (it’s a tradeoff to keep costs under control), but as far as I could see, it works reliably.
R17 and C1 form an optional chroma filter which might be useful with very noisy sync signals. If unused, R17 should be bridged and C1 left unpopulated. Note that the price to pay for using the chroma filter is a small added delay (phase shift) on the sync signal. On the RGB output (SCART) this translates to a picture slightly shifted leftward in the overscan area (this is thus noticeable with recent flat panel TVs). However it does not affect the output of the S-Video/composite encoder.
Note: In my previous designs I used the EL1883, which enabled to wire separately CSYNC to the SCART plug and separate HSYNC/VSYNC to the video adapter. I switched to the LM1881 for simplicity (the AD725 doesn’t really need the separate sync, see its datasheet) and for costs considerations. Also because Intersil (the maker of the EL1883) has a stringent sample ordering policy that prevented me from testing some changes I wanted to make.
The rest of the circuit converts the RGB signals into Luma/Chroma and Composite video to drive the remaining two video outputs.
2 gates on the hex-inverter (74HC04N, which must be CMOS, capable of handling the operating frequency) are used to create two Pierce oscillators at 4 times the Frequency Sub Carrier (4FSC) for PAL and NTSC, driving the 4FSC input on the AD725 encoder. The values of resistors are not very sensitive. The series-equivalent capacity of the capacitors net should match the crystal’s recommended value. The tail capacitor is slightly lower in value to compensate for the parasitic input capacitance of the inverter. The following 74157 (see below) has buffered inputs so it isn’t necessary to use another inverter gate to buffer the oscillator output. The inductance L1 on the Vcc path is not strictly necessary: it is meant to help reject high fequency noise (in the 15MHz range), together with the 10nF capacitor.
Everything else is done by the video converter (AD725). The STND signal selects PAL or NTSC video standards depending on the connected game, and the outputs are AC-coupled and 75Ω terminated as they are twice the required level. I didn’t bother using the Luma-trap, I didn’t feel it was worth the effort: composite output is the worst output of the design anyway. Chip-Enable is tied to +5V, I don’t bother turning the chip on and off. I also didn’t bother separating AGND/DGND.
In order to save one (costly) mechanical switch, the STND signal switch is implemented via a tactile momentary switch and a latch made of two remaining gates of the hex inverter. R11 ensures a consistent startup state when power is applied: this pulldown helps the circuit to converge to a low output at pin 8. Note that it is not possible to invert that logic (use a pull-up resistor tied to Vcc to ensure a high output at pin 8 on startup): due to Vcc rise time and oscillations when power is applied, the result is unpredictable. The DEF header is used to select the desired default “power-on” state for the STND signal: the system can power up to either NTSC or PAL by default. The signal is then used to trigger the 74157 digital multiplexer. While it may look overkill to use a 4-bit mux IC to reproduce the effect of a single mechanical switch, it’s actually many times cheaper, and it keeps the high-frequency signals very localized on the PCB. LED1 turns on when NTSC is selected.
Note: The S-Video and Composite output plugs can be used together, and since they’re independent from the RGB outputs, it’s also possible to use them with SCART plugged. In other words, you can basically use all the outputs at the same time ;-)
Remaining bits of interest
Not much more to say. There’s abundant DC-coupling on each IC’s Vcc inputs to provide backup power during spikes and to reject high frequency noise.
LED3 is wired to +5V and is meant to indicate the board is operational. LED2 is wired to -5V, to indicate proper operation of the -5V converter. ATX2.0 PSUs do not provide -5V anymore, so it is generated onboard. This switching converter from Traco Power can deliver 1A, which should suffice to provide negative voltage for the AD8073 while allowing to power most JAMMA boards requiring this negative rail. The converter has integrated overcurrent protection: if LED2 goes off, then the connected game draws too much current from the -5V rail.
This negative suply is necessary for the video amplifier, since RGB signals go all the way down to ground during H-sync. A (costly) rail-to-rail amp would have been necessary in order to get rid of the -5V there.
D1 serves two purposes: it makes it possible to not connect the SWTCH signal on the SCART (e.g. if you don’t want the TV to immediately switch to SCART input when the SuperGun is turned on); and it’s also a “safety” device that avoids a direct connection of the ATX +12V rail to an external, potentially troublesome device. It prevents reverse voltage flowing back, and will nicely blow up if there is a short for instance.
The design is very modular, from the bare PCB many variations can be assembled, with a significant impact on the total assembly price.
If you’re not going to use the SCART output at all (including not using any of its RGB signals, see here), the whole AD8073 block with accompanying RC circuitry can be removed:
- R25–R30, R34–R35, R39–R41
Composite / S-Video removal
Similarly, if you don’t care about S-Vid and Composite, the 74HC04, AD725 and 74157 (and related RC) can be removed:
- IC1, IC3, IC5
- R10, R11, R15–R16, R18–R21, R36–R38
- C2–C8, C10, C12–C13, C16–C17, C22, C25–C26
If you do not require audio adaptation, the following parts can be omitted:
- R22–R23, R32–R33
Of course the SCART output will no longer provide sound to the TV set.
If you will never connect the SuperGun to a JAMMA board requiring -5V, then the expensive Traco TSN 1-2450 can be replaced by a much cheaper LM7905. It will not require heatsinking.
The LEDs can be removed (together with their accompanying resistor).
Finally, if you don’t think you’ll ever need to adjust the RVB levels, the pots can be omitted (simply bridge the unbridged pads for each pot). Actually pots might introduce more problems than they solve, so unless you are certain you will need them, just forget them :) And of course, the TEST switch is also entirely optional.
Here’s a very compact two-sided through-hole layout that fits on a 10x10 cm PCB (a completed PCB is also shown). Package density is around 90%: it is really packed! The component placement grid is 0.025” and there is 0 via.
The partlist is here.
The assembly guide is here.
This layout is fairly straightforward. Routing has been done by hand and it uses a ground plane for all the usual reasons (simplified routing, better shielding against noise and better coherence of the ground level across the whole PCB). Audio is self-contained and as far away from potential “polluters” as possible.
The switches (especially the Audio and Service ones) can be remote wired (i.e. not soldered directly to the PCB, but rather placed on the casing and then having wires routed to them). In fact, it is possible to have connectors either only on two or even only one side if all the “front” section (with video adjustment, Power and Credit switches, and D-sub connectors) are remote wired. This provides plenty of options for case building around the design.
Note: While this layout can implement all the features “on-board”, the resulting “human interface” (the SuperGun controls such as RGB adjustments, On/Off and Credit switches, or gamepad connectors) will be very cramped. If this is going to be a problem I suggest assembling only the outputs (bottom section connectors COMP, SVID, PERITEL, A_OUT) on the PCB and wiring the controls from a case panel, if the device is going to be mounted in a case.
While the design uses a dual (stacked) D-sub connector for compactedness, it should be possible to use a single right-angled connector in the P1 position (closest to the PCB’s edge) if only single player is required. It’s also entirely possible to skip the D-sub connector and provide your own wiring to the JAMMA pins, since there is no processing of these signals at all: they’re wired directly to JAMMA through X2.
Note: If the SCART connector is not needed, but there is a need to get the output RVB+Sync signals, they can easily be collected from the SCART section of the PCB: the signals are identified on the silkscreen, with signal above the letter and its ground below it.
Everything can be soldered by hand, even though the AD725 will require some skill (tip: put a drop of tin solder on e.g. pad 1 without the part, then put the part in place, heat pin 1 which will melt the solder under it, wait for it to cool down: the component is placed and won’t move, you can now solder the remaining pins. Use 0.5mm solder tip).
For what it’s worth, I’ve built a board with this layout and it works ;-)
The wiring of the JAMMA harness to the WAGO connectors is not sequential. To facilitate routing I took some liberties with the wiring sequence (see below). Of course it’s possible to entirely dispense with the connectors and solder the harness wires directly to the PCB.
Note: The X3 WAGO connector routes the power rails. There are two slots for each of the Ground and +5V, please wire them both: these connectors are only rated up to 6A, some boards might require more than this so it is highly recommended to split the load, as suggested in the wiring below.
As a reminder, on the JAMMA connector, letters are on the solder side while numbers are on the components side. WAGO wiring (note: slots are numbered from right to left, see silkscreen):
|WAGO X2||JAMMA||WAGO X1||JAMMA||WAGO X3||JAMMA|