-Added Multi player support for the following usb adapters (Thanks Coreyw)

Mayflash CCPro USB Adapter - PC045
 MayFlash Wii CC USB Adapter - PC052
 Mayflash WiiU Pro Controller Adapter - W009
To enable it in the controller.ini change MultiIn=1 to MultiIn=2
It wont work for anything that doesn't use the MultiIn command.
Special notes when using it on a wii
 It is incompatible with a wavebird being plugged in.
 If you have gamecube controllers plugged in once you have an empty gamecube connector the next port must also be empty for the cc and cc pro adapters. the wiiu pro adapter can not have any gamecube ports used after the first empty one.
 some users reported setting maxpads to the number of actual gamecube controllers plugged in gave better results
-Added Support for Microsoft Sidewinder Force Feedback 2 Joystick
=Fixed joystick sensitivity in the controller.ini for Mayflash CCPro USB Adapter - PC045
This commit is contained in:
Howard_M_Busch@yahoo.com
2014-08-29 00:37:17 +00:00
parent 1dc2ae7bb9
commit 767f6d4170
8 changed files with 59 additions and 8 deletions

View File

@@ -3,7 +3,7 @@
#define __NINTENDONT_VERSION_H__
#define NIN_MAJOR_VERSION 2
#define NIN_MINOR_VERSION 150
#define NIN_MINOR_VERSION 151
#define NIN_VERSION ((NIN_MAJOR_VERSION << 16) | NIN_MINOR_VERSION)

View File

@@ -23,9 +23,9 @@ RightUp=4,10
DownRight=4,30
DownLeft=4,50
UpLeft=4,70
StickX=3
StickY=4
CStickX=5
CStickY=6
StickX=3,0,100
StickY=4,0,100
CStickX=5,0,100
CStickY=6,0,100
LAnalog=6
RAnalog=7

View File

@@ -0,0 +1,27 @@
[Microsoft Sidewinder Force Feedback 2 Joystick]
VID=045E
PID=001B
Polltype=1
DPAD=1
DigitalLR=1
A=8,01
B=8,02
X=8,08
Y=8,04
Z=8,20
L=8,80
R=8,10
Power=8,F0
S=8,40
Left=7,06
Down=7,04
Right=7,02
Up=7,00
RightUp=7,01
DownRight=7,03
DownLeft=7,05
UpLeft=7,07
StickX=1
StickY=3
CStickX=5
CStickY=6

View File

@@ -406,10 +406,19 @@ retry:
dbgprintf("ES:HIDIRQRead:IOS_Ioctl():%d\r\n", ret );
Shutdown();
}
if(HID_CTRL->MultiIn && Packet[0] != HID_CTRL->MultiInValue)
switch( HID_CTRL->MultiIn )
{
//udelay(500);
goto retry;
default:
case 0: // MultiIn disabled
break;
case 1: // match single controller
if (Packet[0] != HID_CTRL->MultiInValue)
goto retry;
break;
case 2: // multiple controllers fron a single adapter
if ((Packet[0] < HID_CTRL->MultiInValue) || (Packet[0] > NIN_CFG_MAXPAD))
goto retry;
break;
}
memcpy(HID_Packet, Packet, wMaxPacketSize);
sync_after_write(HID_Packet, wMaxPacketSize);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 575 KiB

After

Width:  |  Height:  |  Size: 575 KiB

Binary file not shown.

View File

@@ -158,6 +158,13 @@ u32 _start()
HIDPad = MaxPads;
for (chan = HIDPad; (chan < HID_PAD_NONE) && !Shutdown; chan = HID_PAD_NONE) // Run once for now
{
if (HID_CTRL->MultiIn == 2) //multiple controllers connected to a single usb port
{
chan = chan + HID_Packet[0] - 1; // the controller number is in the first byte
if (chan >= NIN_CFG_MAXPAD) //if would be higher than the maxnumber of controllers
continue; //toss it and try next usb port
}
if(HID_CTRL->Power.Mask && //shutdown if power configured and all power buttons pressed
((HID_Packet[HID_CTRL->Power.Offset] & HID_CTRL->Power.Mask) == HID_CTRL->Power.Mask))
{
@@ -265,6 +272,14 @@ u32 _start()
substickY = 127 - ((HID_Packet[HID_CTRL->CStickY.Offset] - 128) * 4); //raw 88 89...9E 9F A0 A1 ... BA BB (up...center...down)
}
else
if ((HID_CTRL->VID == 0x045E) && (HID_CTRL->PID == 0x001B)) //Microsoft Sidewinder Force Feedback 2 Joystick
{
stickX = ((HID_Packet[HID_CTRL->StickX.Offset] & 0xFC) >> 2) | ((HID_Packet[2] & 0x03) << 6); //raw 80 81...FF 00 ... 7E 7F (left...center...right)
stickY = -1 - (((HID_Packet[HID_CTRL->StickY.Offset] & 0xFC) >> 2) | ((HID_Packet[4] & 0x03) << 6)); //raw 80 81...FF 00 ... 7E 7F (up...center...down)
substickX = HID_Packet[HID_CTRL->CStickX.Offset] * 4; //raw E0 E1...FF 00 ... 1E 1F (left...center...right)
substickY = 127 - (HID_Packet[HID_CTRL->CStickY.Offset] * 2); //raw 00 01...3F 40 ... 7E 7F (up...center...down)
}
else
if ((HID_CTRL->VID == 0x044F) && (HID_CTRL->PID == 0xB315)) //Thrustmaster Dual Analog 4
{
stickX = HID_Packet[HID_CTRL->StickX.Offset]; //raw 80 81...FF 00 ... 7E 7F (left...center...right)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 575 KiB

After

Width:  |  Height:  |  Size: 575 KiB