Diagnostic buttons, the 8x8 switch matrix, and synthetic flipper-button positions
pinmame.input.switch
- -7 … -35 slots
- 1 … 6464 slots
- 81 … 888 slots
- libpinmamechannel=switch
- controller_plugingroup_id=1 · contract_revision=a6f6d7266d30
Technical details for Diagnostic buttons, the 8x8 switch matrix, and synthetic flipper-button positionsSource-derived address behavior and exceptions
Matrix conversion
src/wpc/s6.c MACHINE_DRIVER_START(s6) imports PinMAME and installs no switch or lamp converter of its own, so System 6 inherits PinMAME's sequential core_swSeq2m/core_m2swSeq (src/wpc/core.c). Public switches are therefore sequential matrix positions addressed column-major, not column-times-ten notation:
| Value | Calculation |
|---|---|
| Column | ((n-1)/8)+1 |
| Row | ((n-1)%8)+1 |
Column 1 is public 1-8 and column 8 is public 57-64. The ROM strobes one column at a time through PIA 1 port B (s6_swcol_w) and reads the eight rows back through port A (s6_swrow_r).
Column 1 and the diagnostic column
Column 1 (public 1-8) is an ordinary matrix column that happens to carry the cabinet switches. When PinMAME's own keyboard handling is enabled, SWITCH_UPDATE(s6) overwrites it every frame from the S6_COMPORTS port (src/wpc/s6.h): tilt 1, ball-roll tilt 2, start 3, coin 1-3 4-6, slam tilt 7, high-score reset 8. With keyboard handling off, as under LibPinMAME and VPinMAME, the consumer writes these addresses directly.
The five negative addresses are internal matrix column 0 through the same n+7 formula and come from the upper byte of the same port:
| Address | Constant | Hardware |
|---|---|---|
-7 |
S6_SWADVANCE |
Advance button, sampled into PIA 0 CA1 on every IRQ |
-6 |
S6_SWUPDN |
Auto-Up/Manual-Down toggle, sampled into PIA 0 CB1; public level 1 is Auto-Up |
-5 |
S6_SWCPUDIAG |
CPU-board diagnostic button, wired to the NMI line |
-4 |
S6_SWSOUNDDIAG |
Sound-board diagnostic button |
-3 |
S6_ENTER |
Master Command Enter; s6_dips_r returns the function switches only while it is held |
They are service controls in the coin door or on the boards, never playfield positions.
Flipper buttons
System 6 flippers are not CPU-driven: the cabinet buttons switch the coils directly and the ROM only enables them. PinMAME still keeps its generic flipper column at internal column 11, which the sequential converter publishes at 81-88; CORE_SWLRFLIPBUTBIT is public 82 and CORE_SWLLFLIPBUTBIT is public 84 (src/wpc/core.h). core_updateSw copies those two bits into the matrix addresses a game names with FLIP_SWNO(left,right), and a zero argument means no copy. It also fabricates the synthetic flipper outputs 45-48 from them whenever the game-on enable is set (see the solenoid group). No System 6 driver declares FLIP_SOL or an FLIP_EOS bit, so the end-of-stroke positions 81, 83, 85 and 87 and the upper-flipper buttons 86 and 88 carry nothing.
Polarity
Every System 6 INITGAMEFULL in src/wpc/s6games.c aggregate-initializes the per-game wpc struct as {{0}}, so the per-game inverted-switch mask is zero and PinMAME normalizes nothing. The public level is the raw closed-equals-1 level of the switch.