Data East service buttons, the 8x8 switch matrix, and PinMAME's flipper column
pinmame.input.switch
- -7 … -62 slots
- 1 … 6464 slots
- 81 … 888 slots
- libpinmamechannel=switch
- controller_plugingroup_id=1 · contract_revision=a6f6d7266d30
Technical details for Data East service buttons, the 8x8 switch matrix, and PinMAME's flipper columnSource-derived address behavior and exceptions
Public matrix addresses
Data East uses PinMAME's sequential, column-major 1-64 switch namespace inherited by MACHINE_DRIVER_START(s11) from MACHINE_DRIVER_START(PinMAME). The registered conversion is core_swSeq2m(n)=n+7, so column=((n-1)/8)+1 and row=((n-1)%8)+1 for public address n (src/wpc/core.c core_swSeq2m/core_m2swSeq; src/wpc/s11.c MACHINE_DRIVER_START(s11)). It is not WPC's column-times-ten notation.
Data East matrix strobes are one-hot. pia4b_w keeps only the first asserted strobe bit when locals.deGame is true, and pia4a_r passes that selected column to core_getSwCol (src/wpc/s11.c). Public address numbering remains sequential; this hardware detail matters when interpreting traces with malformed multi-bit strobes.
Cabinet column and diagnostics
DE_COMPORTS supplies ordinary column 1 at public addresses 1-8: tilt=1, ball tilt=2, start=3, coin 1-3=4-6, slam tilt=7, and no defined cabinet input at 8 (src/wpc/s11.h). These are part of the same switch namespace as the playfield matrix. A game using S11_MUXSW2 may overwrite public switch 2 with the live mux-relay state in SWITCH_UPDATE(s11); identify switch 2 from the game-specific driver and manual rather than assuming it is always a physical ball-tilt switch.
Only two negative service addresses exist on Data East hardware:
| Address | PinMAME constant | Driver behavior |
|---|---|---|
-7 |
DE_SWADVANCE |
Black Advance button; s11_irqline presents its asserted public state inverted to PIA2 CA1. |
-6 |
DE_SWUPDN |
Green Up/Down button; presented directly to PIA2 CB1. |
Williams-only CPU and sound diagnostic addresses -5 and -4 are not part of the Data East contract. DE_COMPORTS2 changes the later green button from toggling to momentary input behavior, but its public address remains -6 (src/wpc/s11.h).
Flipper column
PinMAME keeps the cabinet flipper buttons in its own flipper switch column, CORE_FLIPPERSWCOL (internal column 11, src/wpc/core.h). The same core_swSeq2m(n)=n+7 conversion publishes that column at 81-88:
| Address | Bit | Position |
|---|---|---|
81 |
CORE_SWLRFLIPEOSBIT (0x01) |
Lower right end-of-stroke |
82 |
CORE_SWLRFLIPBUTBIT (0x02) |
Lower right button |
83 |
CORE_SWLLFLIPEOSBIT (0x04) |
Lower left end-of-stroke |
84 |
CORE_SWLLFLIPBUTBIT (0x08) |
Lower left button |
85 |
CORE_SWURFLIPEOSBIT (0x10) |
Upper right end-of-stroke |
86 |
CORE_SWURFLIPBUTBIT (0x20) |
Upper right button |
87 |
CORE_SWULFLIPEOSBIT (0x40) |
Upper left end-of-stroke |
88 |
CORE_SWULFLIPBUTBIT (0x80) |
Upper left button |
No pinned Data East driver sets FLIP_SOL: each declares FLIP_SWNO(l,r) or no flipper bits at all, so the flippers are cabinet-wired and the CPU drives no flipper coil. core_updateSw (src/wpc/core.c) then does three things on every update:
- With keyboard handling off (the LibPinMAME default), it reads the two lower button bits from this column as the host wrote them; no driver on this platform sets an
invSwbit in column 11. - It copies
82into matrix switchrand84into matrix switchlthroughcore_setSw, so a host write tolorritself is overwritten on the next update. A driver that declares no switch number for a side (a zero inFLIP_SWNO, or no flipper bits) gets no copy for that side. - While the switched-solenoid enable is on (public
23, whichs11.cpasses tocore_updateSwaslocals.ssEn), it fabricates the synthetic flipper outputs45/46from82and47/48from84(CORE_LRFLIPSOLBITS,CORE_LLFLIPSOLBITS).
A consumer that wants a flipper button to reach the ROM drives 82/84, never the matrix address the game's manual prints for it. The addresses and the copy are identical to the System 9/11 profile's, because Data East runs on the same s11 driver and the same core_updateSw.
locals.flipMask gains an end-of-stroke bit only from FLIP_EOS (implied by FLIP_SOL) and an upper button bit only from FLIP_SW(FLIP_UR)/FLIP_SW(FLIP_UL). No pinned driver on this platform sets either, so core_updateSw never copies 81, 83 or 85-88 anywhere and PinMAME models no end-of-stroke switch here. A host write to them survives in the column, but the ROM cannot read it there: s11.c's pia4a_r reads the matrix only through core_getSwCol with an eight-bit column strobe, which reaches columns 1-8. A definition enumerates 81-88 and states which of them its own driver uses.
Inversion and extensions
The profile's inversion_applied_by_emulator field means consumers use the public LibPinMAME state as delivered and do not perform a second inversion. It does not assert that every game has a nonzero invSw mask. The common INITGAMES11 Data East initializer zero-initializes that mask; custom drivers must be checked individually. A nonzero hw.swCol adds game-specific columns above the base 1-64 range and must be declared by that machine rather than inferred from this base rule.