Cabinet test inputs, Gottlieb-numbered switch matrix, and synthetic flipper column
pinmame.input.switch
- -8 … -54 slots
- 0 … 78 slots
- 10 … 178 slots
- 20 … 278 slots
- 30 … 378 slots
- 40 … 478 slots
- 50 … 578 slots
- 60 … 678 slots
- 70 … 778 slots
- 80 … 878 slots
- 90 … 978 slots
- 100 … 1078 slots
- 110 … 1178 slots
- 140 … 1478 slots
- libpinmamechannel=switch
Technical details for Cabinet test inputs, Gottlieb-numbered switch matrix, and synthetic flipper columnSource-derived address behavior and exceptions
Matrix conversion
MACHINE_DRIVER_START(gts3) in src/wpc/gts3.c registers MDRV_SWITCH_CONV(gts3_sw2m, gts3_m2sw), so public switch numbers are Gottlieb's own decimal notation: the tens digit is the strobe (matrix column) and the units digit the return (row).
| Function | Definition |
|---|---|
gts3_sw2m(no) |
(no / 10 + 1) * 8 + no % 10, or -1 when no % 10 > 7 |
gts3_m2sw(col, row) |
row - 8 for internal column 0, otherwise (col - 1) * 10 + row |
A number whose last digit is 8 or 9 has no switch: gts3_sw2m returns -1, and core_setSw/core_getSw do not bounds-check the index they then use, so never write one.
Switch matrix
The CPU strobes up to twelve columns with the same 12-bit shift register that strobes the lamp matrix (xvia_0_b_w, LDATA/LSTRB), and reads the eight returns on VIA U4 port A through xvia_0_a_r, which returns ~core_getSwCol(GTS3locals.lampColumn). The public matrix is therefore 0-7, 10-17, ..., 110-117 (internal columns 1-12). The read is complemented in hardware, so public 1 is the closed-contact reading the CPU sees. No INITGAME* macro in src/wpc/gts3games.c sets an inverted-switch mask, so PinMAME normalizes nothing per game: a switch the ROM treats as active at public 1 has a contact that rests open.
With PinMAME keyboard handling on, SWITCH_UPDATE(GTS3) also rewrites the low bits of internal column 1 (public 0-7) from the cabinet port, and the port layout follows the game's INITGAME* macro (src/wpc/gts3.h):
| Macro | Port flag | Public addresses rewritten |
|---|---|---|
INITGAME2 (GTS32_COMPORTS) |
0x8000 |
0 Coin 2, 1 Coin 1, 2 Coin 3, 3 Coin 4, 4 Start, 5 Tournament (toggle), 6 Coin Door (toggle) |
INITGAME1 (GTS31_COMPORTS) and INITGAME_IC (GTS3_IC_COMPORTS) |
0x4000 |
0 Coin 2, 1 Coin 1, 2 Coin 3, 3 Coin 4, 4 Start |
INITGAME (GTS3_COMPORTS) |
none | 0 Coin 2, 1 Coin 1, 2 Coin 3, 3 Start, 4 Left Advance, 5 Right Advance |
The port labels are emulator key names, not the game's switch names; take those from the game's own switch test. With keyboard handling off, every one of these addresses keeps what the host writes.
Cabinet test inputs
Internal column 0 is not part of the matrix. SWITCH_UPDATE(GTS3) reads four of its bits back through core_getSw into dedicated latches every update (GTS3_SWDIAG, GTS3_SWTILT, GTS3_SWSLAM, GTS3_SWPRIN in src/wpc/gts3.h):
| Address | Constant | CPU read path |
|---|---|---|
-8 |
GTS3_SWDIAG |
Test (diagnostic) switch: VIA U4 PB3 on the DMD generation and the second alpha generation, VIA U4 CA1 on the first alpha generation |
-7 |
GTS3_SWTILT |
Tilt: VIA U4 PB4 |
-6 |
GTS3_SWSLAM |
Slam tilt: VIA U4 CA1 (on the first alpha generation PB3) |
-5 |
GTS3_SWPRIN |
Printer present: the communications adapter status aux1_r returns |
dmd_u4_pb_r and alpha_u4_pb_r copy the latches without inversion (the source comments say NOT INVERTED!). With keyboard handling on, the cabinet port rewrites them from the Diagnostic, Ball Tilt, Slam Tilt and Printer keys; with it off they keep the host's writes. Bits -4 to -1 are never read.
Flipper column
core_updateSw (src/wpc/core.c) keeps the cabinet flipper buttons in internal column 15 for GEN_GTS3 (its flipSwCol test), not in CORE_FLIPPERSWCOL. gts3_m2sw(15, row) publishes that column at 140-147:
| Address | Bit | Position |
|---|---|---|
140 |
CORE_SWLRFLIPEOSBIT |
Lower right end-of-stroke |
141 |
CORE_SWLRFLIPBUTBIT |
Lower right button |
142 |
CORE_SWLLFLIPEOSBIT |
Lower left end-of-stroke |
143 |
CORE_SWLLFLIPBUTBIT |
Lower left button |
144 |
CORE_SWURFLIPEOSBIT |
Upper right end-of-stroke |
145 |
CORE_SWURFLIPBUTBIT |
Upper right button |
146 |
CORE_SWULFLIPEOSBIT |
Upper left end-of-stroke |
147 |
CORE_SWULFLIPBUTBIT |
Upper left button |
Every pinned System 3 driver declares its flippers with FLIP_SWNO(l, r) (two alpha games with FLIP_SW(FLIP_L)), never FLIP_SOL, FLIP_EOS or an upper FLIP_SW, so locals.flipMask holds only the two lower button bits. With keyboard handling off, core_updateSw reads 141 and 143 as the host wrote them, copies them into the game's FLIP_SWNO matrix switches on every update (overwriting any direct write there), and fabricates the synthetic flipper outputs 45-48 from them while the game-on relay (solenoid 32) is energized. The ROM cannot read column 15: the 12-bit strobe reaches internal columns 1-12 only. The VPinMAME library GTS3.VBS names the same addresses swLRFlip = 141, swLLFlip = 143, swURFlip = 145 and swULFlip = 147.