Cabinet inputs, 8x8 playfield matrix, and PinMAME flipper column
pinmame.input.switch
- 1 … 88 slots
- 11 … 188 slots
- 21 … 288 slots
- 31 … 388 slots
- 41 … 488 slots
- 51 … 588 slots
- 61 … 688 slots
- 71 … 788 slots
- 81 … 888 slots
- 91 … 988 slots
- 101 … 1088 slots
- 111 … 1188 slots
- libpinmamechannel=switch
Technical details for Cabinet inputs, 8x8 playfield matrix, and PinMAME flipper columnSource-derived address behavior and exceptions
MACHINE_DRIVER_START(PINHECK) in src/wpc/pinheck.c installs MDRV_SWITCH_CONV(pinheck_sw2m, pinheck_m2sw): public address n is internal column n / 10 and row n % 10 - 1, so pinheck_m2sw(col, row) = col * 10 + row + 1 and only rows 1-8 of each decade exist. Any other number maps to an unread column.
| Public | Internal column | What it is |
|---|---|---|
| 1-8 | 0 | Cabinet inputs U12 D0-D7 (factory cabinet switches 1-8) |
| 11-88 | 1-8 | The 8x8 playfield matrix: factory switch n (0-63) is public (n / 8 + 1) * 10 + n % 8 + 1 |
| 91-98 | 9 | Cabinet inputs U11 D0-D7 (factory cabinet switches 9-15 at 91-97) |
| 101-108 | 10 | Unused core allocation (CORE_STDSWCOLS = 12) |
| 111-118 | 11 | PinMAME's flipper column (CORE_FLIPPERSWCOL) |
Matrix 11-88. pinheck_brd_swcol(col) hands the board emulation (src/wpc/pinheck/board.c) swMatrix[col + 1] for strobe column 0-7, and pinheck_board_read pulls a return line low for every set bit, which is how the PIC32 sees a closed contact. Public 1 is therefore the closed (active) contact and no invSw mask exists: consume the level as delivered. The factory charts print the same 0-63 numbering, and the ROM's own Switch Edge test draws each closure at the chart's column and row.
Cabinet 1-8 and 91-98. pinheck_brd_cab packs swMatrix[0] (bits 0-7) and swMatrix[9] (bits 8-15) into the cabinet word the board shifts in through its 74HC165 pair, read active-low like the matrix. pinheck.c documents the mapping as firmware cabinet switch n = public n for 1-8 and n + 82 for 9-15. SWITCH_UPDATE(pinheck) names the bits: 1 coin door closed (swMatrix[0] bit 0, set at every board reset because the door rests closed), 2 the operator User button, 3 and 4 the flipper buttons, 5 Back, 6 Enter, 7 coin, 8 tilt, and 94 (swMatrix[9] bit 3) Start. With keyboard handling off (the LibPinMAME default) core_updateSw passes SWITCH_UPDATE a null port array and it returns at once, so a host writes 1, 2, 5-8 and 91-98 directly. Which of 91-98 a game fits (optos, extra buttons) is per game.
Flipper buttons 3, 4 and 111-118. Every pinHeck driver declares FLIP_SWNO(PINHECK_SWLFLIP, PINHECK_SWRFLIP) = FLIP_SWNO(4, 3) with no FLIP_SOL. core_updateSw reads the host's lower button bits from the flipper column, CORE_SWLRFLIPBUTBIT at 112 (right) and CORE_SWLLFLIPBUTBIT at 114 (left), and copies them into cabinet switches 3 and 4 on every vblank, so drive 112/114, not 3/4: a host write to 3 or 4 is overwritten on the next vblank. The vblank calls core_updateSw(0), so no synthetic flipper solenoid is fabricated, and without FLIP_EOS no end-of-stroke bit is synthesized: 111, 113 and 115-118 hold whatever a host writes and nothing reads them. The flippers are ordinary board coils fired by the ROM, and their end-of-stroke contacts, where fitted, are matrix switches.