-Added new controller.ini button LZ

it adds the same functionality the bluetooth controllers have when DigitalLR=1 for half pressed AnalogR and AnalogR triggers when L or R are pressed at the same time as the LZ button.
-Changed game selection menu Dpad Left and Right buttons to advance a screen at a time
-Updated Logitech Thrustmaster Firestorm Dual Analog 2 controller.ini to support the LZ button
This commit is contained in:
Howard_M_Busch@yahoo.com
2014-09-14 00:04:32 +00:00
parent 72ad2b71d8
commit 813295cbda
11 changed files with 77 additions and 10 deletions

View File

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

View File

@@ -8,6 +8,7 @@ A=0,01
B=0,02
X=0,04
Y=0,08
ZL=0,10
Z=0,40
L=0,20
R=0,80

View File

@@ -204,6 +204,9 @@ s32 HIDInit( void )
HID_CTRL->Y.Offset = ConfigGetValue( Data, "Y", 0 );
HID_CTRL->Y.Mask = ConfigGetValue( Data, "Y", 1 );
HID_CTRL->ZL.Offset = ConfigGetValue( Data, "ZL", 0 );
HID_CTRL->ZL.Mask = ConfigGetValue( Data, "ZL", 1 );
HID_CTRL->Z.Offset = ConfigGetValue( Data, "Z", 0 );
HID_CTRL->Z.Mask = ConfigGetValue( Data, "Z", 1 );

View File

@@ -38,6 +38,7 @@ typedef struct Controller
layout B;
layout X;
layout Y;
layout ZL;
layout Z;
layout L;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 641 KiB

After

Width:  |  Height:  |  Size: 642 KiB

Binary file not shown.

View File

@@ -246,7 +246,7 @@ void SelectGame( void )
if( MenuMode == 0 ) //game select menu
{
if( FPAD_Down(0) || FPAD_Right(0) )
if( FPAD_Down(0) )
{
PrintFormat( MENU_POS_X+51*6-8, MENU_POS_Y + 20*6 + PosX * 20, " " );
@@ -264,7 +264,30 @@ void SelectGame( void )
redraw=1;
SaveSettings = true;
} else if( FPAD_Up(0) || FPAD_Left(0) )
}
else if( FPAD_Right(0) )
{
PrintFormat( MENU_POS_X+51*6-8, MENU_POS_Y + 20*6 + PosX * 20, " " );
if( PosX == ListMax - 1 )
{
if( PosX + ListMax + ScrollX < gamecount)
ScrollX = ScrollX + ListMax;
else
if( PosX + ScrollX != gamecount -1)
ScrollX = gamecount - ListMax;
else {
PosX = 0;
ScrollX = 0;
}
} else {
PosX = ListMax - 1;
}
redraw=1;
SaveSettings = true;
}
else if( FPAD_Up(0) )
{
PrintFormat( MENU_POS_X+51*6-8, MENU_POS_Y + 20*6 + PosX * 20, " " );
@@ -283,6 +306,27 @@ void SelectGame( void )
redraw=1;
SaveSettings = true;
}
else if( FPAD_Left(0) )
{
PrintFormat( MENU_POS_X+51*6-8, MENU_POS_Y + 20*6 + PosX * 20, " " );
if( PosX == 0 )
{
if( ScrollX - (s32)ListMax >= 0 )
ScrollX = ScrollX - ListMax;
else
if( ScrollX != 0 )
ScrollX = 0;
else {
ScrollX = gamecount - ListMax;
}
} else {
PosX = 0;
}
redraw=1;
SaveSettings = true;
}
if( FPAD_OK(0) )
{

View File

@@ -33,6 +33,7 @@ typedef struct Controller
layout B;
layout X;
layout Y;
layout ZL;
layout Z;
layout L;

View File

@@ -236,7 +236,18 @@ u32 _start()
button |= PAD_BUTTON_Y;
if(HID_Packet[HID_CTRL->Z.Offset] & HID_CTRL->Z.Mask)
button |= PAD_TRIGGER_Z;
if( HID_CTRL->DigitalLR == 2) //no digital trigger buttons compute from analog trigger values
if( HID_CTRL->DigitalLR == 1) //digital trigger buttons only
{
if(!(HID_Packet[HID_CTRL->ZL.Offset] & HID_CTRL->ZL.Mask)) //ZL acts as shift for half pressed
{
if(HID_Packet[HID_CTRL->L.Offset] & HID_CTRL->L.Mask)
button |= PAD_TRIGGER_L;
if(HID_Packet[HID_CTRL->R.Offset] & HID_CTRL->R.Mask)
button |= PAD_TRIGGER_R;
}
}
else if( HID_CTRL->DigitalLR == 2) //no digital trigger buttons compute from analog trigger values
{
if ((HID_CTRL->VID == 0x0925) && (HID_CTRL->PID == 0x03E8)) //Mayflash Classic Controller Pro Adapter
{
@@ -362,12 +373,18 @@ u32 _start()
/* then triggers */
if( HID_CTRL->DigitalLR == 1)
{ /* digital triggers, not much to do */
if(Pad[chan].button & PAD_TRIGGER_L)
Pad[chan].triggerLeft = 255;
if(HID_Packet[HID_CTRL->L.Offset] & HID_CTRL->L.Mask)
if(HID_Packet[HID_CTRL->ZL.Offset] & HID_CTRL->ZL.Mask) //ZL acts as shift for half pressed
Pad[chan].triggerLeft = 0x7F;
else
Pad[chan].triggerLeft = 255;
else
Pad[chan].triggerLeft = 0;
if(Pad[chan].button & PAD_TRIGGER_R)
Pad[chan].triggerRight = 255;
if(HID_Packet[HID_CTRL->R.Offset] & HID_CTRL->R.Mask)
if(HID_Packet[HID_CTRL->ZL.Offset] & HID_CTRL->ZL.Mask) //ZL acts as shift for half pressed
Pad[chan].triggerRight = 0x7F;
else
Pad[chan].triggerRight = 255;
else
Pad[chan].triggerRight = 0;
}
@@ -490,7 +507,7 @@ u32 _start()
if(BTPad[chan].button & BT_TRIGGER_ZR)
button |= PAD_TRIGGER_Z;
}
else
else //digital triggers
{
if(BTPad[chan].button & BT_TRIGGER_ZL)
{

View File

@@ -43,7 +43,7 @@ MEM2
0x93003020-0x93003420=ios58 kernel path
0x93003420-0x93005000=old hid thread stack
0x93005000-0x930050d4=hid controller positions
0x93005000-0x930050dC=hid controller positions
0x930050E0=hid packet
0x93007420-0x93009000=old di thread stack

Binary file not shown.

Before

Width:  |  Height:  |  Size: 641 KiB

After

Width:  |  Height:  |  Size: 642 KiB