GlovePIE: Genesis 2 players (gens - Fusion)

From WiiLi

Jump to: navigation, search

The following is an algorithm for The Wiimote and Classic Controller written for GlovePIE. The control is mapped for two players on Gens.

Contents

[edit] Smash TV

The Right Analog stick of the first classic controller is mapped on the DPAD of the second controller. If you play smashTV on Gens set the controls to "1 player, 2 controllers" for an enhanced experience.


[edit] Mortal Kombat

I also included alternative buttons mapping for Mortal Kombat, making controls similar to the SNES version.

[edit] Extra controls

(classic controller only)

The ZL Load state and ZR Save state.


[edit] GlovePIE script

/********************************************************************
* This code must be use with Gens/Fusion emulators.
* For 1 or 2 players, Wiimotes/Classic controllers
*
* GPL License
* Writen by Marc-Andre Larouche
* marclar83@gmail.com
* Version 0.2
* tested on GlovePIE 0.29, Gens 2.14, Fusion 3.5
*
* you can also use alternative mapping for Mortal Kombat,
* set "1 player 2 controllers" on Smash TV
* for Dual thumbstick control on the 1st controller.
*
* September 2007
********************************************************************/

/****************************
           Player 1
****************************/
// Wiimote (3 buttons)
Key.Up = Wiimote1.Right
Key.Down = Wiimote1.Left
Key.Left = Wiimote1.Up
Key.Right = Wiimote1.Down

Key.RightShift = Wiimote1.Minus
Key.Enter = Wiimote1.Plus

// Classic controller (6 buttons)
Key.Up = Wiimote1.Classic.Up
Key.Down = Wiimote1.Classic.Down
Key.Left = Wiimote1.Classic.Left
Key.Right = Wiimote1.Classic.Right

Key.RightShift = Wiimote1.Classic.Minus
Key.Enter = Wiimote1.Classic.Plus

// P1 (default) buttons mapping
// A,B,C
Key.A = Wiimote1.A
Key.S = Wiimote1.one
Key.D = Wiimote1.two
Key.A = Wiimote1.Classic.y
Key.S = Wiimote1.Classic.b
Key.D = Wiimote1.Classic.a
Key.D = Wiimote1.B
// X,Y,Z
Key.Z = Wiimote1.Classic.x
Key.X = Wiimote1.Classic.L
Key.C = Wiimote1.Classic.R

// P1 (Mortal Kombat) buttons mapping
/* Remove comment to enable (put default controls in comment!)
// A,B,C
Key.S = Wiimote1.A
Key.A = Wiimote1.one
Key.D = Wiimote1.two
Key.Z = Wiimote1.Classic.y
Key.A = Wiimote1.Classic.b
Key.D = Wiimote1.Classic.a
// X,Y,Z
Key.C = Wiimote1.Classic.x
Key.X = Wiimote1.Classic.L
Key.S = Wiimote1.Classic.R
*/

/****************************
           Player 2
****************************/
// Wiimote (3 buttons)
Key.Y = Wiimote2.Right
Key.H = Wiimote2.Left
Key.G = Wiimote2.Up
Key.J = Wiimote2.Down

Key.T = Wiimote2.Minus
Key.U = Wiimote2.Plus

// Classic controller (6 buttons)
Key.Y = Wiimote2.Classic.Up
Key.H = Wiimote2.Classic.Down
Key.G = Wiimote2.Classic.Left
Key.J = Wiimote2.Classic.Right

Key.T = Wiimote2.Classic.Minus
Key.U = Wiimote2.Classic.Plus

// P2 (default) button mapping
// A,B,C
Key.K = Wiimote2.A
Key.L = Wiimote2.one
Key.M = Wiimote2.two
Key.K = Wiimote2.Classic.y
Key.L = Wiimote2.Classic.b
Key.M = Wiimote2.Classic.a
// X,Y,Z
Key.I = Wiimote2.Classic.x
Key.O = Wiimote2.Classic.L
Key.P = Wiimote2.Classic.R

// P2 (Mortal Kombat) buttons mapping
/* Remove comment to enable (put default controls in comment!)
// A,B,C
Key.L = Wiimote2.A
Key.K = Wiimote2.one
Key.M = Wiimote2.two
Key.I = Wiimote2.Classic.y
Key.K  = Wiimote2.Classic.b
Key.M = Wiimote2.Classic.a
// X,Y,Z
Key.P = Wiimote2.Classic.x
Key.O = Wiimote2.Classic.L
Key.L  = Wiimote2.Classic.R
*/

// Emulator Shared key
//load state
Key.F8 = Wiimote1.Classic.ZL
Key.F8 = Wiimote2.Classic.ZL
//save state
Key.F5 = Wiimote1.Classic.ZR
Key.F5 = Wiimote2.Classic.ZR
//throttle
Key.BackSpace = Wiimote1.Home
Key.BackSpace = Wiimote2.Home
Key.BackSpace = Wiimote1.Classic.Home
Key.BackSpace = Wiimote2.Classic.Home

// 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 P2 DPAD
Key.G = Wiimote1.Classic.Joy2X <= -25%
Key.J = Wiimote1.Classic.Joy2X >= 25%
Key.Y = Wiimote1.Classic.Joy2Y <= -25%
Key.H = Wiimote1.Classic.Joy2Y >= 25%

//  P2 Left Analog stick
// The following script mapped the left analog stick to the same controls as the D-pad
Key.G = Wiimote2.Classic.Joy1X <= -25%
Key.J = Wiimote2.Classic.Joy1X >= 25%
Key.Y = Wiimote2.Classic.Joy1Y <= -25%
Key.H = Wiimote2.Classic.Joy1Y >= 25%

Personal tools
Online Casino - best online casino reviews.
Facebook Developers - facebook applications, facebook developers, facebook development, social network application development and viral widget social media strategy