GlovePIE: Snes9X Classic Controller
From WiiLi
The following is an algorithm for The Classic Controller written for GlovePIE. The control is mapped for SNES9X.
The Left Analog stick is mapped on the four keys as the directional Pad. For 1 or 2 players.
[edit] GlovePIE Script
/******************************************************************** * This code must be use with SNES9X emulator * Tested with Snes9X v 1.51 * and 1 or 2 the classic controllers * GPL License * Writen by Marc-Andre Larouche * marclar83@gmail.com * Version 0.4 * tested on GlovePIE 0.29 * September 2007 ********************************************************************/ // READ THIS // ************************ Important *************************** // // On older version of Snes9X the 2nd player didn't had any button configured! // In order to correct this problem, make sure theses inputs are set // to the second controller. // // UP: Keyboard I | A: Keyboard H | L: Keyboard Y // DOWN: Keyboard K | B: Keyboard G | R: Keyboard U // LEFT: Keyboard J | X: Keyboard F | Select: Keyboard O // RIGHT: Keyboard L | Y: Keyboard T | Start: Keyboard P // // P1 button mapping Key.C = Wiimote1.Classic.b Key.V = Wiimote1.Classic.a Key.X = Wiimote1.Classic.y Key.D = Wiimote1.Classic.x Key.A = Wiimote1.Classic.L Key.S = Wiimote1.Classic.R Key.Up = Wiimote1.Classic.Up Key.Down = Wiimote1.Classic.Down Key.Left = Wiimote1.Classic.Left Key.Right = Wiimote1.Classic.Right Key.Enter = Wiimote1.Classic.Minus Key.Space = Wiimote1.Classic.Plus // P2 button mapping Key.G = Wiimote2.Classic.b Key.H = Wiimote2.Classic.a Key.F = Wiimote2.Classic.y Key.T = Wiimote2.Classic.x Key.Y = Wiimote2.Classic.L Key.U = Wiimote2.Classic.R Key.I = Wiimote2.Classic.Up Key.K = Wiimote2.Classic.Down Key.J = Wiimote2.Classic.Left Key.L = Wiimote2.Classic.Right Key.O = Wiimote2.Classic.Minus Key.P = Wiimote2.Classic.Plus // Emulator Shared key // Throttle Key.Tab = Wiimote1.Classic.Home Key.Tab = Wiimote2.Classic.Home // Load state Key.F1 = Wiimote1.Classic.ZL Key.F1 = Wiimote2.Classic.ZL // Save state Shift+F1 = Wiimote1.Classic.ZR Shift+F1 = Wiimote2.Classic.ZR // LED P1 Wiimote1.LED1 = true; Wiimote1.LED2 = false; Wiimote1.LED3 = false; Wiimote1.LED4 = false; // LED P2 Wiimote2.LED1 = false; Wiimote2.LED2 = true; Wiimote2.LED3 = false; Wiimote2.LED4 = false; // P1 Analog sticks // The following script mapped the left analog stick to the same controls as the D-pad Key.left = Wiimote1.Classic.Joy1X <= -25% Key.right = Wiimote1.Classic.Joy1X >= 25% Key.up = Wiimote1.Classic.Joy1Y <= -25% Key.down = Wiimote1.Classic.Joy1Y >= 25% // For Smash TV game I have mapped the Right Analog stick to X,Y,A,B Key.X = Wiimote1.Classic.Joy2X <= -25% Key.V = Wiimote1.Classic.Joy2X >= 25% Key.D = Wiimote1.Classic.Joy2Y <= -25% Key.C = Wiimote1.Classic.Joy2Y >= 25% // P2 Analog sticks // The following script mapped the left analog stick to the same controls as the D-pad Key.J = Wiimote2.Classic.Joy1X <= -25% Key.L = Wiimote2.Classic.Joy1X >= 25% Key.I = Wiimote2.Classic.Joy1Y <= -25% Key.K = Wiimote2.Classic.Joy1Y >= 25% // For Smash TV game I have mapped the Right Analog stick to X,Y,A,B Key.F = Wiimote2.Classic.Joy2X <= -25% Key.H = Wiimote2.Classic.Joy2X >= 25% Key.T = Wiimote2.Classic.Joy2Y <= -25% Key.G = Wiimote2.Classic.Joy2Y >= 25%
[edit] Extra controls
The right stick is mapped on A,B,X,Y for SmashTV, the Home button is mapped on Fast Foward, The ZL Load state 0 and ZR Save state 0.

