Study of MA-55 audio boards

Pinup
MA-55

"Simple" audio board for SYSTEM 80

Study and explanation of the functionality of these cards.
This article should be considered as a partial technical reference,
because some informations still remain unknown.

Concept

The MA-55 board is directly derived from the C-18389 used on SYSTEM 1, which it takes over the hardware architecture. Although similar, these cards are actually quite different and not only at the connection level. Indeed, the internal program is not all the same, the reference on the R6530 being R3016-11 for the MA-55 (SYSTEM 80) and R3014-13 (or R3014-13) for the C-18389 (SYSTEM 1).

Cadenced by a simple RC clock, theoretical operating frequency is 853 KHz.

The generation of the sound is performed by a digital-to-analog converter (1408), controlled directly by the CPU (6503) and the RRIOT (6530). In order to facilitate the implementation and reduce the required space for the generation of sounds, a specific macro-langage has been integrated to this card. The principle is to have a standardized waveforms (sine, square, triangle) generator, and then to assemble these sequences in function of needs by setting the PROM parameters (HM7643).

We freely call this macro-langage SGOL (by analogy to PGOL and TGOL languages used in CPU boards of SYSTEM 1 and 80. SGOL being an acronym for Sound Programming Oriented Langage.

Troubleshooting and dump

How to troubleshoot a MA-55 board is not very complicated, provided that the 6530 is not burned. To test the board and this particular component, we have adapted our bench test fixture and added a probe that take place of the 6503. This allows to test the sound PROM, but also very easily make a dump of the contents of the 6530.

Test a Black-Hole (export) sound board:
Bench test

Developments and documentation

Originally, the MA-55 board is intended to work either in normal mode (sound), or in a simplified mode (tone), the selection takes place through the switch S1. The concerned pinballs are: Panthera, Spiderman, Circus, Counterforce, Starrace, James Bond 007, and this information appears clearly in the documentation: MA-55 Mode "tone" had only little interest, will be then abandoned. From the Timeline, it will be no more programmed in the sound PROM. For this Pinball, the documentation had been corrected by simple affixing a sticker "MUST BE OFF": MA-55 This mode is definitively abandoned, documentation had been properly corrected for the following pinball machines (Force II and Pink Panther): MA-55 The MA-55 board will then be re-used for "export" version of the Volcano, the Black-Hole, the Devil's Dare (80A) and Eclipse. The documentation does will only mention settings for advanced cards (MA-216). It should be noted that for these pinballs, the "tone" mode is also no more programmed and switch S1 must stay in the OFF position.

The attract-mode bug

When activated by the S2 switch, the attract mode should, in principle, be triggered any 6 minutes. Internally, this is achieved by a delay of 45 x 6.815.744 loop cycles, i.e. all the 306.708.480 clock cycles. At a 853 KHz frequency, this corresponds to 359 seconds, or 6 minutes.

There is however a bug: when a sound is played (except the attract-mode), the counter is reset to 256 instead of 45. The delay so it passes to 256 x 6.815.744 = 1.744.830.464 cycles, i.e., 2045 seconds, which equates to more than 34 minutes !

At startup, as long as no sound was still played, the attract mode is well triggered any 6 minutes. If it launches a game, at the end, the attract-mode fire 34 minutes later, then resumes to its normal cycle of 6 minutes.

Pinup

Structure of the sound PROM

The sound PROM HM7643 is decoded on the space address from $400 to $7FF.

The CPU board send commands to the sound board using S1, S2, S4, S8 wires. Each command corresponds to the number of sound to play and can take values from 1 to 15. Depending on the position of S1 switch, the corresponding "tone" or "sound" is played.

At the beginning of the PROM, are two tables of addresses, each with 15 entries, one for the "tones", one for the "sounds". At the very beginning, the first input is reserved for the sound of the attract mode (which is also played in test mode). So there:

  • 1 x entry to the sound test or attract-mode
  • 15 x entries for the "tones"
  • 15 x entries for the "sound"

Each entry is a group of 3 quartets, forming a 12-bit address. This address points to a sequence written in the SGOL langage, in this PROM. These addresses are easily readable, because stored in the natural order: MSB first, LSB last. Obviously, the prom HM7643, usable address range is $400 to $7FF.

When a tone or a sound are the same, just make them point to the same address. Unused sounds and tones are pointing the tone in general 1.

Attention: From the Timeline, the 'tones' are no longer used and the space allocated to the table has been reused. Therefore, switch S1 must be set to OFF. If it is positioned on ON, trying then to run map not provided addresses code, resulting in generally its crash.

At the end of the PROM is a reserved space from $7C0 to $7FF. This area is to be used to store customized waveform specific to a game.

Test PROM and external code

Although the SGOL is the privileged language to program the PROM, the designers have planned another possibility. The one to execute portions of 6503 code, stored externally in the PROM HM7643. But this PROM has a 4-bit architecture, it was not possible to code directly in the 6503 (on 8-bit) instructions and they have resorted to a device.

The 8-bit code is encoded on two quartets. In order to be executed, the reconstituted instructions are transferred in RAM from the address $010. Capacity RAM of the 6530 being extremely reduced (64 bytes), the code sequence is limited to 45 bytes (leaving just 3 bytes free for the stack).

Complicating all these sequences are stored in the PROM in reverse order... making it completely unreadable code.

Originally, this feature seems to have been scheduled for a test drive. Indeed, when you press the TEST button, a simple sound is played. But if you put the SPARE PIN to ground, then the program provides control sequence stored at the location of the vectors tone/sound. So, it seems that this was intended to run a test program in a specific PROM.

There is also the possibility of triggering a sequence of code 6503 through a statement SGOL. This was that very rarely used, except on the PINK PANTHER, where on the contrary, this has been done massively.

Pinup

SGOL language

The instructions are coded on 4 bits, there is therefore 16 instructions and they are of two types:

  • those intended for the generation of waveforms (less than 8 codes)
  • control (greater than 8 codes).

Some instructions are followed by also on 4-bit-encoded parameters.
The size of a sequence (instructions + parameters) cannot exceed 256 elements.

Instructions

Instructions 0 to 7

TONE and SOUND
Generate a sound depending of the selected mode.
In "tone" mode (instructions 0 to 7), followed by 2 parameters.
In "sound" mode (instructions 0 to 6), followed by 4 or 6 parameters (for instruction 7).

Instruction 8

NOP
Does strictly nothing.
No parameter.

Instruction 9

BREAK
End a sound which has an infinite length (see instructions 0 to 7).
Without real usage, because a such sound is stopped by a new command
(indeed, seems that it is never used).
No parameter.

Instruction A

STOP
Stop the SUSTAIN mode (see below).
By example, stop a melody when specifics sounds are played.
No parameter.

Instruction B

SUSTAIN
Switch to "sustain" mode, where, it is neccessary to maintain command to continue to play a sound.
In case of stop, then go, the sound restart from where it interrupt.
Used, by example, to play a melody.
No parameter.

Instruction C

PRIORITY
Indicate that the following sound has priority and cannot be interrupt by another.
(by default, a new sound command interrupt the current play).
No parameter.

Instruction D

MODE
Alternate between TONE and SOUND mode.
Allow to play "sounds" in TONE mode and "tones" in SOUND mode.
Attention: in case of SUSTAIN, it revert back to initial mode at each instruction of generation (0 to 7).
No parameter.

Instruction E

REPEAT
Repeat a group of instructions.
Followed by 2 parameters.

Instruction F

END
End of SGOL sequence, finishes generating the sound.
No parameter.

Parameters

Parameters of instruction E

REPEAT
The first parameter indicate the size of the group (number of instructions concerned).
The value is minimized by 1, by example, 2 for a group of 3 instructions.
The second parameter give the number of repeats to do.
Only sound generating instructions (0 to 7) can be included in a block to repeat.

In the special case of, the second parameter is set to zero, the instruction is transformed into:
ASM
Execution of 6503 code.
The code is loaded in RAM (start at $010 address) from the PROM (at $702 address).

Parameters of instructions 0 to 7

The number of parameters and their meaning depend on the mode.

TONE
In this mode, played sounds are of simple musical notes and two parameters are adequate.

The first parameter is combined with the instruction code, to indicate a note to play.
The basic score is given by the instruction code (0 = A, 1 = B, 2 = C, 3 = D, 4 = F, 5 = G, 6 = E, 7 = Pause). Bit 0 of the parameter indicates a sharp while the 1 to 3 bits indicate the octave.

The second parameter give the length of this note.
It can take the values 0 to 11 to encode a round, a white, a black, an eighth, a sixteenth, etc... (duration in ms, 0 = 1260, 1 = 940, 2 = 620, 3 = 460, 4 = 300, 5 = 200, 6 = 140, 7 = 100, 8 = 60, 9 = 40, 10 = 20, 11 = 0). It is also possible to encode an infinite duration with the value 12.

SOUND
Study in progress...

Examples and sources coding

The sources above, are expected to be assembled using the macro-assembler 6502 from Michal Kowalski.

Coding of PROM for PANTHERA

Coding of PROM for PINK PANTHER

Source R6530 R3016-14

Last update of this page: May 30th, 2018

French Tech

DDS

Copyright © 2024 Flipprojets - François & Thierry DAVROUX

By continuing your visit to this site, you accept the use of cookies used primarily to measure the traffic on our pages, or to keep your session information.

These datas are used for technical purposes only and are not intended to serve you with advertisements, nor for targeted canvassing, or SPAM. They will not be exchanged with third-party services and will not be used outside this site.

FLIPPROJETS agrees to respect your privacy, click OK if you understand and accept these conditions, otherwise do not continue browsing and leave this site. OK