Close

Controller priority

A project log for Wolf

Use a Jaguar or SNES controller as a joystick and a keypad in Atari 2600 and 7800

danjovicdanjovic 04/09/2022 at 18:550 Comments

As the standard jaguar controller can not be differentiated from an open circuit, the SNES controller has precedence. In other words the controller operation is mutually exclusive and the SNES controller has a higher priority on the control of the ouputs.

void sampleAndProcessControllerData(void) {

  // clear reports
  atariKeypad[0] = 0xff;
  atariKeypad[1] = 0xff;
  atariKeypad[2] = 0xff;
  atariKeypad[3] = 0xff;

  sampleJaguarController();
  if ( sampleSNESController() )
    processSnesSampleData();
  else
    processJaguarSampledData();
}
New firmware was uploaded to github.

Discussions