TWISTER SOUND Board development
Replacing of the audio boards
based on 6503/6530
Study and realization of an alternative
board using an ALTERA FPGA
integrating all simple audio boards.
Table of content
Introduction
Replacing and troubleshooting the Gottlieb C-18389 (SYSTEM 1), MA-55 (SYSTEM 80 / 80A) and MA-490 (SYSTEM 80A / 80B) audio boards been problematic because of the specificity of the circuits used. Over the years several alternative solutions have been proposed, but none has ever been truly satisfactory: either because of the use of obsolete components, or because some models (in particular SYSTEM 80B) were not reproduced.
There is today a modern and inexpensive solution : use a FPGA
We will not detail here the advantages and disadvantages of this technology, nor the reasons that led us to use it. It should be remembered that this solution is inexpensive and easy to implement by an amateur.
The use of preassembled modules will prevent us from making complex welds, while improving reliability and maintenance.
The FPGA in practice
Implementing an FPGA is terribly simple, although at first it may seem complex. Indeed, welding of the case is almost impossible for a particular, the circuit uses multiple voltages (1.2 volts, 2.5 volts and 3.3 volts), moreover, it is also necessary to add a clock and the entire programming system.
In practice, there are modules ready to use, with everything on it and with easily connectable pins (in pitch of 2.54mm). Programming is via an integrated JTAG connector and a small "USB BLASTER" box that plugs into a USB port. The power supply can also be supplied via a USB port.
The implementation is therefore very simple, since we just need to:
- A module with an FPGA
- A USB Blaster programmer
- Programming software
- A printed circuit board to receive the module, audio amplifier and some additional components.
The programming software will be retrieved from the manufacturer ALTERA (Intel): the Web edition version (or lite) of QUARTUS II is free. Warning, this software is now only available in 64 bits, if you want to install it on a 32-bit machine, it will be limited to version 13.1.
Even if you only use the programmer part, you will have to install this software in its entirety (rather greedy in place disk).
It should be noted that the FPGA itself (this circuit being similar to a RAM) is not programmed, but the configuration memory type EPCS16 (which is always associated with it). This circuit is similar to a serial EEPROM and is programmed via the standard JTAG connector on the board.
At startup, the configuration is automatically transferred from the EEPROM to the FPGA. On some modules, it is also possible to force this transfer at any time, by pressing the "nCONFIG" button.
Concept of the board
The three audio boards C-18389, MA-55 and MA-490, although with differences, operate on the same principle. This consists of generating a mono audio signal from a DAC converter (1408), and then amplifying it. The commands sent by the CPU are transmitted by grounded signals.
The idea is to integrate a maximum number of circuits in the FPGA, if necessary by adapting their functionality to this component. However, since we do not wish to alter the initial sounds, we should reproduce the original architecture (cpu, memory, i / o, clock). This implies in particular respecting the memory mapping as well as the clock frequency.
It also avoids the use of an external memory, type SD card or other EEPROM. The capacity of the FPGAs is now sufficient to make everything fit, and this solution allows to limit the number of elements to be programmed.
The FPGA meeting our specifications is an ALTERA CYCLONE IV EP4CE10, big brother of the EP4CE6. Its increased memory capacity allows it to accommodate all configurations without the need to split them.
Caution: The aim of the project is to reproduce the original maps, as faithfully as possible with modern components. The aim is not to improve the quality of sounds, to correct defects or to add new functionalities to these cards.
Since the FPGA does not have an analog output, it could be made to process only the logical part and keep the DAC / amp part. This part being obsolete, the replacement of 1408 was also to be envisaged. The solution is to integrate into the FPGA a SIGMA-DELTA converter operating at high speed.
In order to complete the series, we also integrated the 3 tones "555" board in the FPGA ... Which, it must be admitted, is not necessarily very profitable ! But the circuit having unused resources, it would have been a pity to deprive it. This "Deluxe" version will have at least the advantage of having ultra-stable oscillators.
In order to secure the module against hazardous manipulations, a buffer circuit ULN2803 is interposed at the inputs.
Prototype
The "logic" section was studied on a A-C4E6 development board equipped with an ALTERA FPGA Cyclone IV EP4CE10. This circuit is the big brother of EP4CE6, but contains more elements and more memory. A series module, equipped with an EP4CE6 was also used for our tests.
We chose the C4E6-K because this type of module has everything you need to configure and use an FPGA: A 50 MHz clock, a regulated power supply, a memory flash, some LEDs and push buttons, a simple but complete connectivity.
For testing the amplification, one will also use a ready to use module, no need to complicate life ! One will choose a module built around an LM1875 (or a TDA2030) and powered in 12 volt single voltage.
The hardware part remaining to be realized, will therefore be limited to a plate connecting the modules FPGA, amplifier and auxiliary components. We will just need: a block of DIP switches, a TEST pushbutton, a resistor and a capacitor for the analog interface, a connector to connect the card to the pinball.
Video of the functional prototype
Designing a theoretical prototype on paper and simulating it is one thing, but realizing it and testing it is another! Indeed, the simulation does not make it possible to completely check the correct functioning of the circuit, which works in theory, does not always work in practice.
We therefore tested and validated our prototype in real on a development board. The only difference compared to the final model is the use of mini-switches to control the sounds and the use of an amplified speaker.
For the time being, it is not necessary to connect the prototype to a real pinball machine, thus avoiding the problems of connection and power supply.
But before achieving this result, several technical problems had to be solved first, as will be seen below.
The SIGMA-DELTA converter
In order to compensate for the absence of DAC, this assembly easy to implement and childish simplicity, is recommended by the various manufacturers of FPGA. It replaces advantageously the traditional networks of resistors, on the condition, however, of having a circuit running at high speed, which is our case (50 MHz).
A single pin is used at the output, it is connected to a low pass filter, built with resistor of 3.3 KΩ and a capacitor of 4.7 nF. These values are not super-critical, for testing we took what came to hand: a resistance of 3 KΩ and a capacitor of 47 nF, which worked fine.
In order to validate this option, we first tested it individually. There are several examples of implementations in VHDL or Verilog at the manufacturers, who ask only to be recovered. Our schema to test the converter is extremely simple, in input we put the clock, the reset and the value selected by DIP switches, output a free pin.
The tests showed that the accuracy was excellent and largely sufficient for the intended use. The outputs of the FPGA are supplied with 3.3 v (3.34 v to be precise) and here are some values noted.
The covered range is full (0 → 0 volts & 255 → 3.34 volts), giving a resolution of 0.0131 volts per step.
For intermediate positions (63, 128 and 192), the linearity is perfectly respected with voltages conforming to the expected values. Let 0.82, 1.67 and 2.51 volts.
The oscillators of type NE555
On 3-tones cards based on NE555, the frequencies as well as the duty cycles are determined by two resistors and a capacitor. For the three commands "10", "100" and "1000", the calculation of the theoretical values of the frequencies gives 594 Hz, 266 Hz and 153 Hz respectively. All with a duty cycle close to 50%.
It is relatively simple to reproduce these oscillators in an FPGA using frequency dividers.
In order to verify that this part was correctly implemented, we isolated it and verified to the oscilloscope the output frequencies. The signal is measured directly at the output of the FPGA, as can be seen it is a square signal.
The same signal was measured after the low-pass filter used for the Sigma-Delta converter.
We notice that the edges are well rounded, which is normal since we test with a capacitor of 47 nF instead of a 4.7 nF.
With a smaller capacitor, the edges will be stiffer.
The square signal modulated by the 555 can be directly mixed with the output of the DAC, since all these signals are binary. However, it is more advisable to inject this signal downstream of the Sigma-Delta converter, which allows uniform processing of signals whatever their source. In passing, we take the opportunity to add a level adjustment with the DIP S6, S7 and S8 which were unused in this mode.
With a capacitor of 10 nF, the squares are much better drawn.
The volume control acts on 8 levels, symmetrically on the amplitude of the signal.
As can be seen, section 555 does not interfere with a test signal generated by the CPU / DAC portion.
The VUmeter
FPGA boards often include LEDs, which are free to use. Our C4E6-K board has 8 LEDs, so use them for a VU-meter !
The modeling of this component was carried out in VHDL, where a basic behavior (amplitude measurement) is defined but visually effective. The signal is measured directly at the input of the SIGMA-DELTA converter, allowing operation in all modes, including NE555.
Integrated buttons
The C4E6-K board has three standard push-buttons used by the nCONFIG, DEV_CLR and DEV_OE inputs.
- The nCONFIG button is used to force the FPGA to be reloaded from the EEPROM
- The DEV_CLR button is configured to generate a RESET
- The DEV_OE button is not used (reserved for an optionnal futur development)
The RESET (DEV_CLR) allows, if necessary, to restart the board in case it is crashed (which never happens !).
DIP-SWITCHES: configuration and selection of pinball machines
A block of 8 mini-switches allows to choose the configuration, as well as the model of pinball. The first two DIPs S1 and S2 function as on the original cards (S1 for TONE mode, S2 for ATTRACT MODE). The other six configure the operating mode, as shown below.
Caution : DIP S3 to S8 must only be operated when the pinball is powered off.
3 tones board (EM and early SYSTEM 1)
S3 | S4 | S5 | S6 | S7 | S8 | Pinball | Model | System | |
---|---|---|---|---|---|---|---|---|---|
OFF | OFF | ON | v | v | v | EM & SYS1 | 3 tones "555" |
In this mode, the output volume can be changed with the DIP S6 to S8. When the three DIPs are ON, the volume is at the maximum. When OFF, the volume is at the minimum.
SYSTEM 1 (C-18389 / 3014-12)
S3 | S4 | S5 | S6 | S7 | S8 | Pinball | Model | System | |
---|---|---|---|---|---|---|---|---|---|
OFF | OFF | OFF | OFF | OFF | OFF | Totem | #429 | SYS 1 (R3014-12) | |
OFF | OFF | OFF | OFF | OFF | ON | Hulk | #433 | SYS 1 (R3014-12) | |
OFF | OFF | OFF | OFF | ON | OFF | Genie | #435 | SYS 1 (R3014-12) | |
OFF | OFF | OFF | OFF | ON | ON | Buck Rogers | #437 | SYS 1 (R3014-12) | |
OFF | OFF | OFF | ON | OFF | OFF | Torch | #438 | SYS 1 (R3014-12) | |
OFF | OFF | OFF | ON | OFF | ON | Roller Disco | #440 | SYS 1 (R3014-12) | |
OFF | OFF | OFF | ON | ON | OFF | Asteroid Annie | #442 | SYS 1 (R3014-12) |
SYSTEM 1 (C-18389 / 3014-13)
S3 | S4 | S5 | S6 | S7 | S8 | Pinball | Model | System | |
---|---|---|---|---|---|---|---|---|---|
OFF | ON | OFF | OFF | OFF | OFF | Totem | #429 | SYS 1 (R3014-13) | |
OFF | ON | OFF | OFF | OFF | ON | Hulk | #433 | SYS 1 (R3014-13) | |
OFF | ON | OFF | OFF | ON | OFF | Genie | #435 | SYS 1 (R3014-13) | |
OFF | ON | OFF | OFF | ON | ON | Buck Rogers | #437 | SYS 1 (R3014-13) | |
OFF | ON | OFF | ON | OFF | OFF | Torch | #438 | SYS 1 (R3014-13) | |
OFF | ON | OFF | ON | OFF | ON | Roller Disco | #440 | SYS 1 (R3014-13) | |
OFF | ON | OFF | ON | ON | OFF | Asteroid Annie | #442 | SYS 1 (R3014-13) |
SYSTEM 80 and 80A (MA-55 / 3016-11)
S3 | S4 | S5 | S6 | S7 | S8 | Pinball | Model | System | |
---|---|---|---|---|---|---|---|---|---|
ON | OFF | OFF | OFF | OFF | OFF | Hulk | #500 | SYS 80 (R3016-11) | |
ON | OFF | OFF | OFF | OFF | ON | Panthera | #652 | SYS 80 (R3016-11) | |
ON | OFF | OFF | OFF | ON | OFF | Spiderman | #653 | SYS 80 (R3016-11) | |
ON | OFF | OFF | OFF | ON | ON | Circus | #654 | SYS 80 (R3016-11) | |
ON | OFF | OFF | ON | OFF | OFF | Counterforce | #656 | SYS 80 (R3016-11) | |
ON | OFF | OFF | ON | OFF | ON | Star Race | #657 | SYS 80 (R3016-11) | |
ON | OFF | OFF | ON | ON | OFF | James Bond | #658 | SYS 80 (R3016-11) | |
ON | OFF | OFF | ON | ON | ON | Timeline | #659 | SYS 80 (R3016-11) | |
ON | OFF | ON | OFF | OFF | OFF | Force II | #661 | SYS 80 (R3016-11) | |
ON | OFF | ON | OFF | OFF | ON | Pink Panther | #664 | SYS 80 (R3016-11) | |
ON | OFF | ON | OFF | ON | OFF | Volcano (export) | #667 | SYS 80 (R3016-11) | |
ON | OFF | ON | OFF | ON | ON | Black Hole (export) | #668 | SYS 80 (R3016-11) | |
ON | OFF | ON | ON | OFF | OFF | Devil's Dare (export) | #670 | SYS 80A (R3016-11) | |
ON | OFF | ON | ON | OFF | ON | Eclipse | #671 | SYS 80 (R3016-11) |
SYSTEM 80A and 80B (MA-490 / MA-488 Piggyback)
S3 | S4 | S5 | S6 | S7 | S8 | Pinball | Model | System | |
---|---|---|---|---|---|---|---|---|---|
ON | ON | OFF | OFF | OFF | OFF | Amazon Hunt | #684A | SYS 80A (Piggyback) | |
ON | ON | OFF | OFF | OFF | ON | Rack Em Up | #685 | SYS 80A (Piggyback) | |
ON | ON | OFF | OFF | ON | OFF | Ready Aim Fire | #686 | SYS 80A (Piggyback) | |
ON | ON | OFF | OFF | ON | ON | Jacks To Open | #687 | SYS 80A (Piggyback) | |
ON | ON | OFF | ON | OFF | OFF | Touchdown | #688 | SYS 80A (Piggyback) | |
ON | ON | OFF | ON | OFF | ON | Alien Star | #689 | SYS 80A (Piggyback) | |
ON | ON | OFF | ON | ON | OFF | The Games | #691 | SYS 80A (Piggyback) | |
ON | ON | OFF | ON | ON | ON | El Dorado | #692 | SYS 80A (Piggyback) | |
ON | ON | ON | OFF | OFF | OFF | Ice Fever | #693 | SYS 80A (Piggyback) | |
ON | ON | ON | OFF | OFF | ON | Bounty Hunter | #694 | SYS 80B (Piggyback) | |
ON | ON | ON | OFF | ON | OFF | Chicago Cub | #695 | SYS 80B (Piggyback) | |
ON | ON | ON | OFF | ON | ON | Tag Team | #698 | SYS 80B (Piggyback) | |
ON | ON | ON | ON | OFF | OFF | Star King | MANILAMATIC |
Pre-series board
A first simplified version of the printed circuit was first performed in order to validate the operational behavior in a real pinball machine. Intended only for SYSTEM-80, it first enabled us to check that the whole of the electronics worked as expected.
We then used it for endurance tests that gave full satisfaction. Used for long periods, the card is perfectly reliable and does not heat at all.
We were also able to check that the amplifier was perfectly adapted and that the sounds produced were in conformity with the originals.
In order to finalize the project, it was only necessary to create a new printed circuit compatible with SYSTEM-1. This last stage, which is relatively complex because of the broaching differences, finally ended with the birth of the definitive TWISTER SOUND board.