The bits at the top of the board correspond to the “flip-flops”. These must be set to the correct position at the start of the game based on the number of balls and the win condition (leave or take the last ball). You can use the tables in the manual to determine the starting positions for the bits by using the following conversions:
_ / _ = L L L _ _ / = R L R _ _ _ = L R R / _ _ = R R L
NOTE: It is not possible to represent the
/ _ /flip-flop state using this configuration of bits. Fortunately, the table entries that use this state are (mostly) redundant to other entries, and so this does not impact my implementation’s ability to work with any number of balls.
The gear bits in the middle of the board correspond to the “equalizer”. This causes the machine to make one misplay, thus making it possible for the player to win when going either first or second. Pointing to the right is the starting position.
The gear bits at the bottom of the board correspond to the “turn switch”. Pointing to the right indicates that it is the player’s turn, and pointing to the left indicates that it is the machine’s turn.
Pulling the blue lever corresponds to pushing the “trigger”.
I believe my implementation to be minimal and bug-free. If either is not true, or if you have any questions or other thoughts, please reply!