The base is always used for ground. The state of the tip and the middle can be set using the following values. White wire is positive. Red wire is positive. D4 White wire is positive.
Red wire is grounded.
E8 White wire is grounded. Red wire is positive. FC Whits wire is grounded. Red wire is grounded. The above values are the values used by the ROM, except for FC which is not used since the system never sets both wires to ground.