This project is heavily based on #MegaPlay and uses an Arduino nano to provide a Wii Classic Controller adapter for Atari 5200.
Mai features are:
- Analog Controller (using precise timing);
- Digital Controller on D-PAD just like a Masterplay adapter;
- Full keypad emulation;
- Auto detected second controller adapter for games like Robotron
- Independent Top/Bottom buttons on second controller.
Controls Mapping, one controller:
Controls Mapping, two controller emulation
Second controller adapter consists of a USB A male plug and a DB-15 connector. Shield connection on USB plug is used to detect the presence of the adapter and switch behavior accordingly.
Printed Circuit Board measures 1.8" x 2.0" (~46mm x 51mm ) and incorporates a connector for the Wii Classic controller.
The board also provides an USB type A female for the dual controller adapter cable and a Mini-Din6 connector with wiring ready to interface a PS/2 mouse.
The analog controller information is measured by Pokey chip that measures the time a capacitor takes to increase its voltage from near zero to a given value. This time varies with the resistance of the potentiometer axis.
Many videogames and computers, like ATari 2600, PC gameport, Apple][ gameport usually discharges the capacitors right before start a new reading cycle. On these systems is just a matter of waiting for the capacitors to discharge to know when to push the line high to provide a desired position (timing) information.
But in Atari 5200 that is not so easy because Pokey chip keeps the capacitors discharged by until the next sampling cycle that depends upon the game loo, therefore the discharge moment can not be used as a time reference.
The experiments that I have done consisted in:
- polarize one of the pot inputs with a resistor that provides a low counting, e.g. 10KOhms and detect the voltage increase before it reaches ~1.9V that is the input threshold voltage of POT pins in Pokey Chip.
- Then the line is forced LOW by the time enough to provide the desired counting in Pokey chip.
- Finally the line is pushed high to exceed the threshold voltage and that makes pokey capture the exact counting.
Worth to mention that this method does not depend upon internal calibration of Vac voltage (at pin 9).