# CMM2 game controllers library

A library to allow games and other programs on the Colour Maximite 2 to read joysticks, Wii controllers, and maybe others all in the same way.

pins.inc is a library to read an arcade joystick or Atari/Commodore 9 pin joystick connected to the CMM2 pins as defined in the forum post at https://www.thebackshed.com/forum/ViewTopic.php?TID=12282&PID=151902#151902

pins.bas is a test program to display the read pins.

pins-compat.inc and pins-compat.bas are similar but compatible both with that connection standard and some alternatives discussed earlier in the thread.

terminal-controller.inc presents a similar program interface, but reads keys from the terminal keyboard instead of reading buttons and joysticks. It is intended for testing but won't be as good as joysticks or USB keyboards, as it can't tell when a key stays pressed down.

terminal-test.bas is a test program for terminal-controller.inc

controllers.inc supports the same joystick as pins.inc but has untested support for autodetection of Wii controllers, and using them instead.

controllers-test.bas is a test program for controllers.inc, including testing the controller detection.