Mahjong controller
Mahjong controller is a special controller designed to play mahjong games, it is made of 21 push buttons dispatched in two rows.
First row is buttons A B C D E F G H I J K L M N.
Second row is buttons SELECT START, then PON CHI KAN REACH RON. (Japanese pon chî kan rîchi ron)
Software
Mahjong controller is suported by all standard BIOS.
MVS BIOS doesn't look for the device, but reads hard dip 3 and sets status byte of INPUT_1 to 3 if set. It never sets INPUT_2 to 3, meaning mahjong controller is a single player setup only on MVS.
NEOGEO bios detects the device individually on each port and sets the corresponding input status byte to 3, permitting the use of two mahjong controller.
Calling SYSTEM_IO mahjong controller status and update the corresponding input registers.
Hardware
Controller is build using an array of buttons, using controller port outputs to probe data. OUT3 and SELECT are connected, to enable detection of the controller by home systems.
Button array is:
OUT1 | OUT2 | OUT3 | |
UP | A | H | PON |
DOWN | B | I | CHI |
LEFT | C | J | KAN |
RIGHT | D | K | RON |
A | E | L | REACH |
B | F | M | - |
C | G | N | - |
Schematic of the controller: