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 (writing 1 to OUT3 and reading SELECT button) 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 built 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:

Schematic of the controller: