Skip to content

**** ****

retrogame.c goodness


Thanks to Adafruits continued trek into the forays of Arcade goodness they did some retrogame.c updates the last few months. When they mentioned for the CupCade you could do a 1p+coin to ESC from games (sound familiar?) but also shut down with this combo I went and checked out the retrogame project on GitHub.

// A "Vulcan nerve pinch" (holding down a specific button combination
// for a few seconds) issues an 'esc' keypress to MAME (which brings up
// an exit menu or quits the current game).  The button combo is
// configured with a bitmask corresponding to elements in the above io[]
// array.  The default value here uses elements 6 and 7 (credit and start
// in the Cupcade pinout).  If you change this, make certain it's a combo
// that's not likely to occur during actual gameplay (i.e. avoid using
// joystick directions or hold-for-rapid-fire buttons).
const unsigned long vulcanMask = (1L << 6) | (1L << 7);
const int           vulcanKey  = KEY_ESC, // Keycode to send
                    vulcanTime = 1500;    // Pinch time in milliseconds

Sure enough this is now in the code. I connected my Arcade console to the network and updated my local repository with the new updates.

Verdict: Wonderful. My SD cards haven’t been very happy with me the last year but it should be clear sailing from here on! Thanks Adafruit for another useful gem.

 

Facebook Comments


Categorized as: What's up



Leave a Reply