nRage: Add ability to compile version 2.3c
This commit is contained in:
parent
ad85ec3f05
commit
e58fc5ab78
|
@ -75,6 +75,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SortRdb", "Source\SortRdb\S
|
|||
{B4A4B994-9111-42B1-93C2-6F1CA8BC4421} = {B4A4B994-9111-42B1-93C2-6F1CA8BC4421}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NRage_Input_V2", "Source\nragev20\NRage_Input_V2.vcproj", "{FD617E80-9E40-4138-85DA-B94633972E6A}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Beta Release|Win32 = Beta Release|Win32
|
||||
|
@ -182,6 +184,12 @@ Global
|
|||
{5788717F-E3D4-40CF-9637-3A2AEE85BB81}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{5788717F-E3D4-40CF-9637-3A2AEE85BB81}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{5788717F-E3D4-40CF-9637-3A2AEE85BB81}.Release|Win32.Build.0 = Release|Win32
|
||||
{FD617E80-9E40-4138-85DA-B94633972E6A}.Beta Release|Win32.ActiveCfg = Release|Win32
|
||||
{FD617E80-9E40-4138-85DA-B94633972E6A}.Beta Release|Win32.Build.0 = Release|Win32
|
||||
{FD617E80-9E40-4138-85DA-B94633972E6A}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{FD617E80-9E40-4138-85DA-B94633972E6A}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{FD617E80-9E40-4138-85DA-B94633972E6A}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{FD617E80-9E40-4138-85DA-B94633972E6A}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,220 @@
|
|||
/**********************************************************************************
|
||||
Common Controller plugin spec, version #1.0 maintained by
|
||||
zilmar (zilmar@emulation64.com)
|
||||
|
||||
All questions or suggestions should go through the mailing list.
|
||||
http://www.egroups.com/group/Plugin64-Dev
|
||||
**********************************************************************************/
|
||||
#ifndef _CONTR_H_INCLUDED__
|
||||
#define _CONTR_H_INCLUDED__
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Note: BOOL, BYTE, WORD, DWORD, TRUE, FALSE are defined in windows.h */
|
||||
|
||||
#define PLUGIN_TYPE_CONTROLLER 4
|
||||
|
||||
/*** Conteroller plugin's ****/
|
||||
|
||||
#define PLUGIN_NONE 1
|
||||
#define PLUGIN_MEMPAK 2
|
||||
// not implemeted for non raw data
|
||||
#define PLUGIN_RUMBLE_PAK 3
|
||||
// not implemeted for non raw data
|
||||
#define PLUGIN_TRANSFER_PAK 4
|
||||
#define PLUGIN_RAW 5
|
||||
|
||||
/*********************************************************************************
|
||||
Note about Conteroller plugin's:
|
||||
the rumble pak needs a function for the force feed back joystick and tranfer pak
|
||||
probaly needs a function for the plugin to be able to select the GB rom and
|
||||
eeprom... maybe this should be done by the emu instead of the plugin, but I think
|
||||
it probaly should be done by the plugin. I will see about adding these functions
|
||||
in the next spec
|
||||
**********************************************************************************/
|
||||
|
||||
#define EXPORT __declspec(dllexport)
|
||||
#define CALL __cdecl
|
||||
|
||||
/***** Structures *****/
|
||||
typedef struct {
|
||||
WORD Version; /* Should be set to 0x0100 */
|
||||
WORD Type; /* Set to PLUGIN_TYPE_CONTROLLER */
|
||||
char Name[100]; /* Name of the DLL */
|
||||
BOOL Reserved1;
|
||||
BOOL Reserved2;
|
||||
} PLUGIN_INFO;
|
||||
|
||||
typedef struct {
|
||||
BOOL Present;
|
||||
BOOL RawData;
|
||||
int Plugin;
|
||||
} CONTROL;
|
||||
|
||||
typedef union {
|
||||
DWORD Value;
|
||||
struct {
|
||||
unsigned R_DPAD : 1;
|
||||
unsigned L_DPAD : 1;
|
||||
unsigned D_DPAD : 1;
|
||||
unsigned U_DPAD : 1;
|
||||
unsigned START_BUTTON : 1;
|
||||
unsigned Z_TRIG : 1;
|
||||
unsigned B_BUTTON : 1;
|
||||
unsigned A_BUTTON : 1;
|
||||
|
||||
unsigned R_CBUTTON : 1;
|
||||
unsigned L_CBUTTON : 1;
|
||||
unsigned D_CBUTTON : 1;
|
||||
unsigned U_CBUTTON : 1;
|
||||
unsigned R_TRIG : 1;
|
||||
unsigned L_TRIG : 1;
|
||||
unsigned Reserved1 : 1;
|
||||
unsigned Reserved2 : 1;
|
||||
|
||||
signed Y_AXIS : 8;
|
||||
|
||||
signed X_AXIS : 8;
|
||||
};
|
||||
} BUTTONS;
|
||||
|
||||
/******************************************************************
|
||||
Function: CloseDLL
|
||||
Purpose: This function is called when the emulator is closing
|
||||
down allowing the dll to de-initialise.
|
||||
input: none
|
||||
output: none
|
||||
*******************************************************************/
|
||||
EXPORT void CALL CloseDLL (void);
|
||||
|
||||
/******************************************************************
|
||||
Function: ControllerCommand
|
||||
Purpose: To process the raw data that has just been sent to a
|
||||
specific controller.
|
||||
input: - Controller Number (0 to 3) and -1 signalling end of
|
||||
processing the pif ram.
|
||||
- Pointer of data to be processed.
|
||||
output: none
|
||||
|
||||
note: This function is only needed if the DLL is allowing raw
|
||||
data.
|
||||
|
||||
the data that is being processed looks like this:
|
||||
initilize controller: 01 03 00 FF FF FF
|
||||
read controller: 01 04 01 FF FF FF FF
|
||||
*******************************************************************/
|
||||
EXPORT void CALL ControllerCommand ( int Control, BYTE * Command);
|
||||
|
||||
/******************************************************************
|
||||
Function: DllAbout
|
||||
Purpose: This function is optional function that is provided
|
||||
to give further information about the DLL.
|
||||
input: a handle to the window that calls this function
|
||||
output: none
|
||||
*******************************************************************/
|
||||
EXPORT void CALL DllAbout ( HWND hParent );
|
||||
|
||||
/******************************************************************
|
||||
Function: DllConfig
|
||||
Purpose: This function is optional function that is provided
|
||||
to allow the user to configure the dll
|
||||
input: a handle to the window that calls this function
|
||||
output: none
|
||||
*******************************************************************/
|
||||
EXPORT void CALL DllConfig ( HWND hParent );
|
||||
|
||||
/******************************************************************
|
||||
Function: DllTest
|
||||
Purpose: This function is optional function that is provided
|
||||
to allow the user to test the dll
|
||||
input: a handle to the window that calls this function
|
||||
output: none
|
||||
*******************************************************************/
|
||||
EXPORT void CALL DllTest ( HWND hParent );
|
||||
|
||||
/******************************************************************
|
||||
Function: GetDllInfo
|
||||
Purpose: This function allows the emulator to gather information
|
||||
about the dll by filling in the PluginInfo structure.
|
||||
input: a pointer to a PLUGIN_INFO stucture that needs to be
|
||||
filled by the function. (see def above)
|
||||
output: none
|
||||
*******************************************************************/
|
||||
EXPORT void CALL GetDllInfo ( PLUGIN_INFO * PluginInfo );
|
||||
|
||||
/******************************************************************
|
||||
Function: GetKeys
|
||||
Purpose: To get the current state of the controllers buttons.
|
||||
input: - Controller Number (0 to 3)
|
||||
- A pointer to a BUTTONS structure to be filled with
|
||||
the controller state.
|
||||
output: none
|
||||
*******************************************************************/
|
||||
EXPORT void CALL GetKeys(int Control, BUTTONS * Keys );
|
||||
|
||||
/******************************************************************
|
||||
Function: InitiateControllers
|
||||
Purpose: This function initialises how each of the controllers
|
||||
should be handled.
|
||||
input: - The handle to the main window.
|
||||
- A controller structure that needs to be filled for
|
||||
the emulator to know how to handle each controller.
|
||||
output: none
|
||||
*******************************************************************/
|
||||
EXPORT void CALL InitiateControllers (HWND hMainWindow, CONTROL Controls[4]);
|
||||
|
||||
/******************************************************************
|
||||
Function: ReadController
|
||||
Purpose: To process the raw data in the pif ram that is about to
|
||||
be read.
|
||||
input: - Controller Number (0 to 3) and -1 signalling end of
|
||||
processing the pif ram.
|
||||
- Pointer of data to be processed.
|
||||
output: none
|
||||
note: This function is only needed if the DLL is allowing raw
|
||||
data.
|
||||
*******************************************************************/
|
||||
EXPORT void CALL ReadController ( int Control, BYTE * Command );
|
||||
|
||||
/******************************************************************
|
||||
Function: RomClosed
|
||||
Purpose: This function is called when a rom is closed.
|
||||
input: none
|
||||
output: none
|
||||
*******************************************************************/
|
||||
EXPORT void CALL RomClosed (void);
|
||||
|
||||
/******************************************************************
|
||||
Function: RomOpen
|
||||
Purpose: This function is called when a rom is open. (from the
|
||||
emulation thread)
|
||||
input: none
|
||||
output: none
|
||||
*******************************************************************/
|
||||
EXPORT void CALL RomOpen (void);
|
||||
|
||||
/******************************************************************
|
||||
Function: WM_KeyDown
|
||||
Purpose: To pass the WM_KeyDown message from the emulator to the
|
||||
plugin.
|
||||
input: wParam and lParam of the WM_KEYDOWN message.
|
||||
output: none
|
||||
*******************************************************************/
|
||||
EXPORT void CALL WM_KeyDown( WPARAM wParam, LPARAM lParam );
|
||||
|
||||
/******************************************************************
|
||||
Function: WM_KeyUp
|
||||
Purpose: To pass the WM_KEYUP message from the emulator to the
|
||||
plugin.
|
||||
input: wParam and lParam of the WM_KEYDOWN message.
|
||||
output: none
|
||||
*******************************************************************/
|
||||
EXPORT void CALL WM_KeyUp( WPARAM wParam, LPARAM lParam );
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
@ -0,0 +1,233 @@
|
|||
/**********************************************************************************
|
||||
Common Controller plugin spec, version #1.1 maintained by
|
||||
zilmar (zilmar@emulation64.com)
|
||||
|
||||
All questions or suggestions should go through the emutalk plugin forum.
|
||||
http://www.emutalk.net/cgi-bin/ikonboard/ikonboard.cgi?s=3bd272222f66ffff;act=SF;f=20
|
||||
**********************************************************************************/
|
||||
#ifndef _CONTR_H_INCLUDED__
|
||||
#define _CONTR_H_INCLUDED__
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Note: BOOL, BYTE, WORD, DWORD, TRUE, FALSE are defined in windows.h */
|
||||
|
||||
#define PLUGIN_TYPE_CONTROLLER 4
|
||||
|
||||
/*** Conteroller plugin's ****/
|
||||
#define PLUGIN_NONE 1
|
||||
#define PLUGIN_MEMPAK 2
|
||||
// not implemeted for non raw data
|
||||
#define PLUGIN_RUMBLE_PAK 3
|
||||
// not implemeted for non raw data
|
||||
#define PLUGIN_TRANSFER_PAK 4
|
||||
// the controller plugin is passed in raw data
|
||||
#define PLUGIN_RAW 5
|
||||
|
||||
/*********************************************************************************
|
||||
Note about Conteroller plugin's:
|
||||
the rumble pak needs a function for the force feed back joystick and tranfer pak
|
||||
probaly needs a function for the plugin to be able to select the GB rom and
|
||||
eeprom... maybe this should be done by the emu instead of the plugin, but I think
|
||||
it probaly should be done by the plugin. I will see about adding these functions
|
||||
in the next spec
|
||||
**********************************************************************************/
|
||||
|
||||
#define EXPORT __declspec(dllexport)
|
||||
#define CALL _cdecl
|
||||
|
||||
/***** Structures *****/
|
||||
typedef struct {
|
||||
WORD Version; /* Should be set to 0x0101 */
|
||||
WORD Type; /* Set to PLUGIN_TYPE_CONTROLLER */
|
||||
char Name[100]; /* Name of the DLL */
|
||||
BOOL Reserved1;
|
||||
BOOL Reserved2;
|
||||
} PLUGIN_INFO;
|
||||
|
||||
typedef struct {
|
||||
BOOL Present;
|
||||
BOOL RawData;
|
||||
int Plugin;
|
||||
} CONTROL;
|
||||
|
||||
typedef union {
|
||||
DWORD Value;
|
||||
struct {
|
||||
unsigned R_DPAD : 1;
|
||||
unsigned L_DPAD : 1;
|
||||
unsigned D_DPAD : 1;
|
||||
unsigned U_DPAD : 1;
|
||||
unsigned START_BUTTON : 1;
|
||||
unsigned Z_TRIG : 1;
|
||||
unsigned B_BUTTON : 1;
|
||||
unsigned A_BUTTON : 1;
|
||||
|
||||
unsigned R_CBUTTON : 1;
|
||||
unsigned L_CBUTTON : 1;
|
||||
unsigned D_CBUTTON : 1;
|
||||
unsigned U_CBUTTON : 1;
|
||||
unsigned R_TRIG : 1;
|
||||
unsigned L_TRIG : 1;
|
||||
unsigned Reserved1 : 1;
|
||||
unsigned Reserved2 : 1;
|
||||
|
||||
signed Y_AXIS : 8;
|
||||
|
||||
signed X_AXIS : 8;
|
||||
};
|
||||
} BUTTONS;
|
||||
|
||||
typedef struct {
|
||||
HWND hMainWindow;
|
||||
HINSTANCE hinst;
|
||||
|
||||
BOOL MemoryBswaped; // If this is set to TRUE, then the memory has been pre
|
||||
// bswap on a dword (32 bits) boundry, only effects header.
|
||||
// eg. the first 8 bytes are stored like this:
|
||||
// 4 3 2 1 8 7 6 5
|
||||
BYTE * HEADER; // This is the rom header (first 40h bytes of the rom)
|
||||
CONTROL *Controls; // A pointer to an array of 4 controllers .. eg:
|
||||
// CONTROL Controls[4];
|
||||
} CONTROL_INFO;
|
||||
|
||||
/******************************************************************
|
||||
Function: CloseDLL
|
||||
Purpose: This function is called when the emulator is closing
|
||||
down allowing the dll to de-initialise.
|
||||
input: none
|
||||
output: none
|
||||
*******************************************************************/
|
||||
EXPORT void CALL CloseDLL (void);
|
||||
|
||||
/******************************************************************
|
||||
Function: ControllerCommand
|
||||
Purpose: To process the raw data that has just been sent to a
|
||||
specific controller.
|
||||
input: - Controller Number (0 to 3) and -1 signalling end of
|
||||
processing the pif ram.
|
||||
- Pointer of data to be processed.
|
||||
output: none
|
||||
|
||||
note: This function is only needed if the DLL is allowing raw
|
||||
data, or the plugin is set to raw
|
||||
|
||||
the data that is being processed looks like this:
|
||||
initilize controller: 01 03 00 FF FF FF
|
||||
read controller: 01 04 01 FF FF FF FF
|
||||
*******************************************************************/
|
||||
EXPORT void CALL ControllerCommand ( int Control, BYTE * Command);
|
||||
|
||||
/******************************************************************
|
||||
Function: DllAbout
|
||||
Purpose: This function is optional function that is provided
|
||||
to give further information about the DLL.
|
||||
input: a handle to the window that calls this function
|
||||
output: none
|
||||
*******************************************************************/
|
||||
EXPORT void CALL DllAbout ( HWND hParent );
|
||||
|
||||
/******************************************************************
|
||||
Function: DllConfig
|
||||
Purpose: This function is optional function that is provided
|
||||
to allow the user to configure the dll
|
||||
input: a handle to the window that calls this function
|
||||
output: none
|
||||
*******************************************************************/
|
||||
EXPORT void CALL DllConfig ( HWND hParent );
|
||||
|
||||
/******************************************************************
|
||||
Function: DllTest
|
||||
Purpose: This function is optional function that is provided
|
||||
to allow the user to test the dll
|
||||
input: a handle to the window that calls this function
|
||||
output: none
|
||||
*******************************************************************/
|
||||
EXPORT void CALL DllTest ( HWND hParent );
|
||||
|
||||
/******************************************************************
|
||||
Function: GetDllInfo
|
||||
Purpose: This function allows the emulator to gather information
|
||||
about the dll by filling in the PluginInfo structure.
|
||||
input: a pointer to a PLUGIN_INFO stucture that needs to be
|
||||
filled by the function. (see def above)
|
||||
output: none
|
||||
*******************************************************************/
|
||||
EXPORT void CALL GetDllInfo ( PLUGIN_INFO * PluginInfo );
|
||||
|
||||
/******************************************************************
|
||||
Function: GetKeys
|
||||
Purpose: To get the current state of the controllers buttons.
|
||||
input: - Controller Number (0 to 3)
|
||||
- A pointer to a BUTTONS structure to be filled with
|
||||
the controller state.
|
||||
output: none
|
||||
*******************************************************************/
|
||||
EXPORT void CALL GetKeys(int Control, BUTTONS * Keys );
|
||||
|
||||
/******************************************************************
|
||||
Function: InitiateControllers
|
||||
Purpose: This function initialises how each of the controllers
|
||||
should be handled.
|
||||
input: - The handle to the main window.
|
||||
- A controller structure that needs to be filled for
|
||||
the emulator to know how to handle each controller.
|
||||
output: none
|
||||
*******************************************************************/
|
||||
EXPORT void CALL InitiateControllers (CONTROL_INFO ControlInfo);
|
||||
|
||||
/******************************************************************
|
||||
Function: ReadController
|
||||
Purpose: To process the raw data in the pif ram that is about to
|
||||
be read.
|
||||
input: - Controller Number (0 to 3) and -1 signalling end of
|
||||
processing the pif ram.
|
||||
- Pointer of data to be processed.
|
||||
output: none
|
||||
note: This function is only needed if the DLL is allowing raw
|
||||
data.
|
||||
*******************************************************************/
|
||||
EXPORT void CALL ReadController ( int Control, BYTE * Command );
|
||||
|
||||
/******************************************************************
|
||||
Function: RomClosed
|
||||
Purpose: This function is called when a rom is closed.
|
||||
input: none
|
||||
output: none
|
||||
*******************************************************************/
|
||||
EXPORT void CALL RomClosed (void);
|
||||
|
||||
/******************************************************************
|
||||
Function: RomOpen
|
||||
Purpose: This function is called when a rom is open. (from the
|
||||
emulation thread)
|
||||
input: none
|
||||
output: none
|
||||
*******************************************************************/
|
||||
EXPORT void CALL RomOpen (void);
|
||||
|
||||
/******************************************************************
|
||||
Function: WM_KeyDown
|
||||
Purpose: To pass the WM_KeyDown message from the emulator to the
|
||||
plugin.
|
||||
input: wParam and lParam of the WM_KEYDOWN message.
|
||||
output: none
|
||||
*******************************************************************/
|
||||
EXPORT void CALL WM_KeyDown( WPARAM wParam, LPARAM lParam );
|
||||
|
||||
/******************************************************************
|
||||
Function: WM_KeyUp
|
||||
Purpose: To pass the WM_KEYUP message from the emulator to the
|
||||
plugin.
|
||||
input: wParam and lParam of the WM_KEYDOWN message.
|
||||
output: none
|
||||
*******************************************************************/
|
||||
EXPORT void CALL WM_KeyUp( WPARAM wParam, LPARAM lParam );
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
@ -0,0 +1,157 @@
|
|||
/*
|
||||
N-Rage`s Dinput8 Plugin
|
||||
(C) 2002, 2006 Norbert Wladyka
|
||||
|
||||
Author`s Email: norbert.wladyka@chello.at
|
||||
Website: http://go.to/nrage
|
||||
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "commonIncludes.h"
|
||||
#include <windows.h>
|
||||
#include "FileAccess.h"
|
||||
|
||||
bool bDebug = true;
|
||||
|
||||
|
||||
HANDLE hDebug = INVALID_HANDLE_VALUE;
|
||||
|
||||
|
||||
void _DebugAnsiFileWrite( LPCSTR szRemark )
|
||||
{
|
||||
if( !bDebug )
|
||||
return;
|
||||
|
||||
if (hDebug == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
TCHAR szFile[] = _T("NRage-Debug.txt");
|
||||
TCHAR szBuffer[MAX_PATH+1];
|
||||
|
||||
GetAbsoluteFileName( szBuffer, szFile, DIRECTORY_APPLICATION );
|
||||
hDebug = CreateFile( szBuffer, GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL );
|
||||
if (hDebug != INVALID_HANDLE_VALUE)
|
||||
SetFilePointer(hDebug, 0, 0, FILE_END);
|
||||
}
|
||||
|
||||
if( hDebug != INVALID_HANDLE_VALUE )
|
||||
{
|
||||
DWORD dwWritten;
|
||||
LPCSTR szText = szRemark;
|
||||
if( szText == NULL )
|
||||
szText = "\r\n";
|
||||
|
||||
LPCSTR szCurrPos = szText;
|
||||
|
||||
while( ( szCurrPos = strchr( szCurrPos, '\n' )) != NULL )
|
||||
{
|
||||
DWORD length = szCurrPos - szText;
|
||||
if( length > 0 && szCurrPos[-1] == '\r' )
|
||||
--length;
|
||||
|
||||
if( length > 0 )
|
||||
WriteFile( hDebug, (LPCVOID)szText, length, &dwWritten, NULL );
|
||||
WriteFile( hDebug, "\r\n", 2, &dwWritten, NULL );
|
||||
|
||||
szText = ++szCurrPos;
|
||||
}
|
||||
|
||||
DWORD length = lstrlenA( szText );
|
||||
|
||||
if( length > 0 )
|
||||
WriteFile( hDebug, (LPCVOID)szText, length, &dwWritten, NULL );
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void _cdecl _DebugWriteA( LPCSTR szFormat, ... )
|
||||
{
|
||||
if( szFormat != NULL )
|
||||
{
|
||||
char szBuffer[4096];
|
||||
|
||||
va_list val;
|
||||
|
||||
va_start( val,szFormat );
|
||||
wvsprintfA( szBuffer, szFormat, val );
|
||||
va_end( val );
|
||||
szBuffer[sizeof(szBuffer)-1] = '\0';
|
||||
|
||||
_DebugAnsiFileWrite( szBuffer );
|
||||
}
|
||||
else
|
||||
_DebugAnsiFileWrite( NULL );
|
||||
}
|
||||
|
||||
void _cdecl _DebugWriteW( const LPCWSTR szFormat, ... )
|
||||
{
|
||||
if( szFormat != NULL )
|
||||
{
|
||||
WCHAR szBuffer[4096];
|
||||
va_list val;
|
||||
|
||||
va_start( val,szFormat );
|
||||
wvsprintfW( szBuffer, szFormat, val );
|
||||
va_end( val );
|
||||
szBuffer[(sizeof(szBuffer) / sizeof(WCHAR))-1] = L'\0';
|
||||
|
||||
char szAnsi[sizeof(szBuffer) / sizeof(WCHAR)];
|
||||
WideCharToMultiByte( CP_ACP, 0, szBuffer, -1, szAnsi, sizeof(szAnsi), NULL, NULL );
|
||||
_DebugAnsiFileWrite( szAnsi );
|
||||
}
|
||||
else
|
||||
_DebugAnsiFileWrite( NULL );
|
||||
}
|
||||
|
||||
void _WriteDatasA( LPCSTR Header, const int Control, const unsigned char * Data, const HRESULT hr )
|
||||
{
|
||||
if( !bDebug || Data == NULL )
|
||||
return;
|
||||
|
||||
_DebugWriteA( "%d:%s\n", Control, Header);
|
||||
|
||||
if( hr )
|
||||
{
|
||||
_DebugWriteA( "Failed! ErrorCode: %08X\n", hr );
|
||||
}
|
||||
|
||||
|
||||
int iEnd = Data[0] + Data[1] + 2;
|
||||
|
||||
for( int i = -1; i < iEnd; i += 8 )
|
||||
{
|
||||
_DebugWriteA( "%02X%02X%02X%02X %02X%02X%02X%02X\n", Data[i+0], Data[i+1], Data[i+2], Data[i+3], Data[i+4], Data[i+5], Data[i+6], Data[i+7] );
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void _CloseDebugFile()
|
||||
{
|
||||
if( hDebug != INVALID_HANDLE_VALUE )
|
||||
{
|
||||
_DebugWriteA("---DEBUG FILE CLOSED---\n");
|
||||
CloseHandle( hDebug );
|
||||
}
|
||||
}
|
||||
|
||||
void _DebugFlush()
|
||||
{
|
||||
if( hDebug != INVALID_HANDLE_VALUE )
|
||||
{
|
||||
FlushFileBuffers(hDebug);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,65 @@
|
|||
/*
|
||||
N-Rage`s Dinput8 Plugin
|
||||
(C) 2002, 2006 Norbert Wladyka
|
||||
|
||||
Author`s Email: norbert.wladyka@chello.at
|
||||
Website: http://go.to/nrage
|
||||
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef _DEBUG_H_
|
||||
#define _DEBUG_H_
|
||||
|
||||
#include <wtypes.h>
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
||||
extern bool bDebug;
|
||||
|
||||
void _DebugAnsiFileWrite( LPCSTR szRemark );
|
||||
void _WriteDatasA( LPCSTR Header, const int Control, const unsigned char * Data, const HRESULT hr );
|
||||
void _cdecl _DebugWriteA( LPCSTR szFormat, ... );
|
||||
void _cdecl _DebugWriteW( LPCWSTR szFormat, ... );
|
||||
void _CloseDebugFile();
|
||||
void _DebugFlush();
|
||||
|
||||
#define DebugWriteA _DebugWriteA
|
||||
#define DebugWriteW _DebugWriteW
|
||||
#define WriteDatasA( header, control, data, hr ) _WriteDatasA( header, control, data, hr )
|
||||
#define CloseDebugFile() _CloseDebugFile()
|
||||
#define DebugWriteByteA(str) DebugWriteA("%02X", str)
|
||||
#define DebugWriteWordA(str) DebugWriteA("%04X", str)
|
||||
#define DebugFlush() _DebugFlush()
|
||||
|
||||
#else // #ifndef _DEBUG
|
||||
#define DebugWriteByteA(str)
|
||||
#define DebugWriteWordA(str)
|
||||
#define DebugWriteA ;//
|
||||
#define DebugWriteW ;//
|
||||
#define WriteDatasA(header,control,data,hr)
|
||||
#define CloseDebugFile()
|
||||
#define DebugFlush()
|
||||
|
||||
#endif // #ifdef _DEBUG
|
||||
|
||||
#ifdef _UNICODE
|
||||
#define DebugWrite DebugWriteW
|
||||
#else
|
||||
#define DebugWrite DebugWriteA
|
||||
#endif
|
||||
|
||||
#endif // #ifndef _DEBUG_H_
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,156 @@
|
|||
/*
|
||||
N-Rage`s Dinput8 Plugin
|
||||
(C) 2002, 2006 Norbert Wladyka
|
||||
|
||||
Author`s Email: norbert.wladyka@chello.at
|
||||
Website: http://go.to/nrage
|
||||
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef _DIRECTINPUT_H_
|
||||
#define _DIRECTINPUT_H_
|
||||
|
||||
#include <dinput.h>
|
||||
|
||||
extern LPDIRECTINPUT8 g_pDIHandle;
|
||||
|
||||
|
||||
bool InitDirectInput( HWND hWnd );
|
||||
void FreeDirectInput ();
|
||||
bool PrepareInputDevices();
|
||||
void InitMouse();
|
||||
void GetDeviceDatas();
|
||||
bool GetNControllerInput ( const int indexController, LPDWORD pdwData );
|
||||
|
||||
BOOL CALLBACK EnumMakeDeviceList( LPCDIDEVICEINSTANCE lpddi, LPVOID pvRef );
|
||||
|
||||
bool IsBtnPressed(BUTTON btnButton);
|
||||
bool GetInputDevice( HWND hWnd, LPDIRECTINPUTDEVICE8 &lpDirectInputDevice, GUID gGuid, DWORD dwDevType, DWORD dwCooperativeLevel );
|
||||
void ReleaseDevice( LPDIRECTINPUTDEVICE8 &lpDirectInputDevice );
|
||||
bool CreateEffectHandle( HWND hWnd, LPDIRECTINPUTDEVICE8 lpDirectInputDevice, LPDIRECTINPUTEFFECT &pDIEffect, BYTE bRumbleTyp, long lStrength );
|
||||
void ReleaseEffect( LPDIRECTINPUTEFFECT &lpDirectEffect );
|
||||
|
||||
|
||||
BYTE GetAdaptoidStatus( LPDIRECTINPUTDEVICE8 lpDirectInputDevice );
|
||||
bool IsAdaptoidCommandSupported( LPDIRECTINPUTDEVICE8 lpDirectInputDevice, DWORD cmd );
|
||||
HRESULT DirectRumbleCommand( LPDIRECTINPUTDEVICE8 lpDirectInputDevice, DWORD cmd );
|
||||
HRESULT InitializeAdaptoid( LPDIRECTINPUTDEVICE8 lpDirectInputDevice, LPBYTE status );
|
||||
HRESULT ReadAdaptoidPak( LPDIRECTINPUTDEVICE8 lpDirectInputDevice, DWORD addr, LPBYTE data );
|
||||
HRESULT WriteAdaptoidPak( LPDIRECTINPUTDEVICE8 lpDirectInputDevice, DWORD addr, LPBYTE data );
|
||||
|
||||
|
||||
#define MINAXISVALUE -32767
|
||||
#define MAXAXISVALUE 32767
|
||||
#define ZEROVALUE 0
|
||||
#define THRESHOLD 90
|
||||
#define RANGERELATIVE (MAXAXISVALUE - ZEROVALUE + 1)
|
||||
#define ABSTHRESHOLD (RANGERELATIVE * THRESHOLD / 100)
|
||||
// plus or minus this many 1/100 degrees counts as GetJoyPadPOV being pressed
|
||||
#define POVANGLETHRESH 5675
|
||||
|
||||
#define MOUSEMOVE 5
|
||||
// by default, scale the mouse input by this much
|
||||
#define MOUSESCALEVALUE 10
|
||||
// percent to decay mouse buffer every frame.
|
||||
// Tweak this from 0-100 to control how much the mouse drifts; values closer to 100 drift more,
|
||||
// while values closer to 0 are very stiff (deadpan) and don't turn well
|
||||
#define MOUSEBUFFERDECAY 80
|
||||
|
||||
#define N64DIVIDER 258
|
||||
|
||||
|
||||
#define DID_KEYBOARD 0
|
||||
#define DID_MOUSE 1
|
||||
#define DID_GAMEPAD 2
|
||||
|
||||
#define DIB_KEYBOARD DISCL_NONEXCLUSIVE | DISCL_FOREGROUND
|
||||
#define DIB_MOUSE DISCL_EXCLUSIVE | DISCL_FOREGROUND
|
||||
#define DIB_FF DISCL_EXCLUSIVE | DISCL_BACKGROUND
|
||||
#define DIB_DEVICE DISCL_NONEXCLUSIVE | DISCL_BACKGROUND
|
||||
|
||||
#define DIB_CONFIG DISCL_NONEXCLUSIVE | DISCL_BACKGROUND
|
||||
|
||||
#define RUMBLE_NONE 0x00
|
||||
#define RUMBLE_CONSTANT 0x01
|
||||
#define RUMBLE_RAMP 0x02
|
||||
#define RUMBLE_CONDITION 0x04
|
||||
#define RUMBLE_PERIODIC 0x08
|
||||
#define RUMBLE_CUSTOM 0x10
|
||||
|
||||
#define RUMBLE_DIRECT 0x80
|
||||
|
||||
#define RUMBLE_EFF1 RUMBLE_CONSTANT
|
||||
#define RUMBLE_EFF2 RUMBLE_RAMP
|
||||
#define RUMBLE_EFF3 RUMBLE_DIRECT
|
||||
|
||||
// Reported Name of the Adaptoid
|
||||
#define STRING_ADAPTOID "Adaptoid"
|
||||
#define STRING_GUID_SYSKEYBOARD _T("Keyboard")
|
||||
#define STRING_GUID_SYSMOUSE _T("SysMouse")
|
||||
|
||||
// Query API - pass in command #, returns 0xB0CAB0CA if supported
|
||||
#define ADAPT_TEST 0x7834BB00
|
||||
// Send command to rumble pack (DWORD 0=stop, 1=go)
|
||||
#define ADAPT_RUMBLE 0x7834BB08
|
||||
// Initialize pak (returns pak status bit flags)
|
||||
#define ADAPT_INIT 0x7834BB0C
|
||||
// Read from pak (reads 32 bytes of data)
|
||||
#define ADAPT_READPAK 0x7834BB0D
|
||||
// Write to pak (writes 32 bytes of data)
|
||||
#define ADAPT_WRITEPAK 0x7834BB0E
|
||||
// Send command directly to controller - synchronous
|
||||
#define ADAPT_DIRECTCOMMAND 0x7834BB28
|
||||
|
||||
// The following inline functions are all overloads for existing functions
|
||||
inline bool CreateEffectHandle( int iDevice, BYTE bRumbleTyp, long lStrength )
|
||||
{
|
||||
return CreateEffectHandle( g_strEmuInfo.hMainWindow, g_apFFDevice[iDevice], g_apdiEffect[iDevice], bRumbleTyp, lStrength );
|
||||
}
|
||||
|
||||
// this used to exist, but it was only used once and makes things more confusing. Removed. --rabid
|
||||
//inline void ReleaseEffect( int iEffect )
|
||||
//{
|
||||
// ReleaseEffect( g_apdiEffect[iEffect] );
|
||||
//}
|
||||
|
||||
inline BYTE GetAdaptoidStatus( int iDevice )
|
||||
{
|
||||
return GetAdaptoidStatus( g_apFFDevice[iDevice] );
|
||||
}
|
||||
inline HRESULT WriteAdaptoidPak( int iDevice, DWORD addr, LPBYTE data )
|
||||
{
|
||||
return WriteAdaptoidPak( g_apFFDevice[iDevice], addr, data );
|
||||
}
|
||||
inline HRESULT ReadAdaptoidPak( int iDevice, DWORD addr, LPBYTE data )
|
||||
{
|
||||
return ReadAdaptoidPak( g_apFFDevice[iDevice], addr, data );
|
||||
}
|
||||
inline HRESULT InitializeAdaptoid( int iDevice, LPBYTE status )
|
||||
{
|
||||
return InitializeAdaptoid( g_apFFDevice[iDevice], status );
|
||||
}
|
||||
inline HRESULT DirectRumbleCommand( int iDevice, DWORD cmd )
|
||||
{
|
||||
return DirectRumbleCommand( g_apFFDevice[iDevice], cmd );
|
||||
}
|
||||
inline bool IsAdaptoidCommandSupported( int iDevice, DWORD cmd )
|
||||
{
|
||||
return IsAdaptoidCommandSupported( g_apFFDevice[iDevice], cmd );
|
||||
}
|
||||
|
||||
|
||||
#endif // #ifndef _DIRECTINPUT_H_
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,227 @@
|
|||
/*
|
||||
N-Rage`s Dinput8 Plugin
|
||||
(C) 2002, 2006 Norbert Wladyka
|
||||
|
||||
Author`s Email: norbert.wladyka@chello.at
|
||||
Website: http://go.to/nrage
|
||||
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef _FILEACCESS_H_
|
||||
#define _FILEACCESS_H_
|
||||
|
||||
#include "NRagePluginV2.h"
|
||||
#include <string>
|
||||
using std::string;
|
||||
|
||||
bool GetDirectory( LPTSTR pszDirectory, WORD wDirID );
|
||||
bool CheckFileExists( LPCTSTR FileName );
|
||||
void GetAbsoluteFileName( LPTSTR szAbsolute, LPCTSTR szFileName, const WORD wDirID );
|
||||
|
||||
BOOL SendFilestoList( HWND hDlgItem, WORD wType );
|
||||
bool StoreConfigToINI();
|
||||
bool LoadConfigFromINI();
|
||||
LANGID GetLanguageFromINI();
|
||||
|
||||
bool LoadProfileFile( LPCTSTR pszFileName, int iController, LPTSTR pszGameDevice, LPBYTE bGameDeviceNr );
|
||||
bool LoadShortcutsFile( LPCTSTR pszFileName );
|
||||
void FormatProfileBlock( FILE * fFile, const int iController );
|
||||
void FormatShortcutsBlock( FILE * fFile, bool bIsINI );
|
||||
bool BrowseFolders( HWND hwndParent, LPTSTR pszHeader, LPTSTR pszDirectory );
|
||||
bool BrowseFile( HWND hDlg, LPTSTR pszFileName, DWORD dwType, bool fSave );
|
||||
bool ReadMemPakFile( LPTSTR pszMemPakFile, BYTE *aMemPak, bool fCreate );
|
||||
bool WriteMemPakFile( LPTSTR pszMemPakFile, BYTE *aMemPak, bool fCreate );
|
||||
bool LoadProfileFromResource( int indexController, bool bIsInterface );
|
||||
bool LoadShortcutsFromResource( bool bIsInterface );
|
||||
inline void GUIDtoStringA( char * szGUIDbuf, const GUID guid );
|
||||
inline bool StringtoGUIDA( LPGUID guid, const char * szGUIDbuf );
|
||||
unsigned long djbHash(const char *str);
|
||||
|
||||
#ifdef _UNICODE
|
||||
#define TCHAR_TO_CHAR(x,y,z) wcstombs(x,y,z)
|
||||
#define CHAR_TO_TCHAR(x,y,z) mbstowcs(x,y,z)
|
||||
#else
|
||||
#define TCHAR_TO_CHAR(x,y,z) strncpy(x,y,z)
|
||||
#define CHAR_TO_TCHAR(x,y,z) strncpy(x,y,z)
|
||||
#endif
|
||||
|
||||
#define STRING_DEF_MEMPAKFILE _T("MemPaks")
|
||||
#define STRING_DEF_GBROMFILE _T("GBxRoms")
|
||||
#define STRING_DEF_GBROMSAVE _T("GBxSaves")
|
||||
|
||||
#define STRING_INI_HEADER "# Generated by NRage input plugin V2 version " VERSIONNUMBER "\n"
|
||||
// We use these names for loading from INI files and NRage config files
|
||||
#define STRING_INI_GENERAL "General"
|
||||
#define STRING_INI_CONTROLLER "Controller"
|
||||
#define STRING_INI_FOLDERS "Folders"
|
||||
#define STRING_INI_BROWSER "lastBrowserDir"
|
||||
#define STRING_INI_CONTROLS "Controls"
|
||||
#define STRING_INI_SHORTCUTS "Shortcuts"
|
||||
#define STRING_INI_MODIFIERS "Modifiers"
|
||||
|
||||
#define STRING_INI_LANGUAGE "Language"
|
||||
#define STRING_INI_SHOWMESSAGES "ShowMessages"
|
||||
|
||||
#define STRING_INI_BRPROFILE "Profile"
|
||||
#define STRING_INI_BRNOTE "Note"
|
||||
#define STRING_INI_BRMEMPAK "Mempak"
|
||||
#define STRING_INI_BRGBROM "GBxRom"
|
||||
#define STRING_INI_BRGBSAVE "GBxSave"
|
||||
// #define STRING_INI_BRSHORTCUTS STRING_INI_SHORTCUTS
|
||||
|
||||
#define STRING_INI_PLUGGED "Plugged"
|
||||
#define STRING_INI_XINPUT "xInput"
|
||||
#define STRING_INI_RAWDATA "RawData"
|
||||
#define STRING_INI_PAKTYPE "PakType"
|
||||
#define STRING_INI_REALN64RANGE "RealN64Range"
|
||||
#define STRING_INI_RAPIDFIREENABLED "RapidFireEnabled"
|
||||
#define STRING_INI_RAPIDFIRERATE "RapidFireRate"
|
||||
#define STRING_INI_STICKRANGE "StickRange"
|
||||
#define STRING_INI_MOUSEMOVEX "MouseMoveX"
|
||||
#define STRING_INI_MOUSEMOVEY "MouseMoveY"
|
||||
#define STRING_INI_AXISSET "AxisSet"
|
||||
#define STRING_INI_KEYABSOLUTEX "KeyAbsoluteX"
|
||||
#define STRING_INI_KEYABSOLUTEY "KeyAbsoluteY"
|
||||
#define STRING_INI_PADDEADZONE "PadDeadZone"
|
||||
#define STRING_INI_MOUSESENSX "MouseSensitivityX"
|
||||
#define STRING_INI_MOUSESENSY "MouseSensitivityY"
|
||||
#define STRING_INI_RUMBLETYPE "RumbleType"
|
||||
#define STRING_INI_RUMBLESTRENGTH "RumbleStrength"
|
||||
#define STRING_INI_VISUALRUMBLE "VisualRumble"
|
||||
#define STRING_INI_FFDEVICEGUID "FFDeviceGUID"
|
||||
#define STRING_INI_MEMPAKFILE "MemPakFile"
|
||||
#define STRING_INI_GBROMFILE "GBRomFile"
|
||||
#define STRING_INI_GBROMSAVE "GBRomSave"
|
||||
|
||||
#define STRING_INI_DINPUTGUID "DInputGUID"
|
||||
#define STRING_INI_BUTTON "Button"
|
||||
#define STRING_INI_MODIFIER "Modifier"
|
||||
|
||||
// The following are not found in INI files; only profile and shortcuts files
|
||||
#define STRING_PROFILEVERSION22 "Controller Profile 2.2"
|
||||
#define STRING_PROFILEVERSION STRING_PROFILEVERSION22
|
||||
|
||||
#define STRING_INI_FFDEVICENAME "FFDeviceName"
|
||||
#define STRING_INI_FFDEVICENR "FFDeviceNr"
|
||||
#define STRING_INI_DINPUTNAME "DInputName"
|
||||
#define STRING_INI_DINPUTNR "DInputNr"
|
||||
|
||||
|
||||
// the following are hashes for the string values above
|
||||
|
||||
// version strings, including the @ in front
|
||||
#define CHK_PROFILEVERSION20 2278962538
|
||||
#define CHK_PROFILEVERSION21 2278962539
|
||||
#define CHK_PROFILEVERSION22 2278962540
|
||||
|
||||
// categories
|
||||
#define CHK_GENERAL 63249731
|
||||
#define CHK_FOLDERS 3455681620
|
||||
#define CHK_LASTBROWSERDIR 2659654652
|
||||
#define CHK_CONTROLLER_1 3910856026
|
||||
#define CHK_CONTROLLER_2 3910856027
|
||||
#define CHK_CONTROLLER_3 3910856028
|
||||
#define CHK_CONTROLLER_4 3910856029
|
||||
#define CHK_CONTROLS 3459743001
|
||||
#define CHK_SHORTCUTS 2945387732
|
||||
#define CHK_MODIFIERS 95935975
|
||||
|
||||
// assignments (to the left of the '=' sign)
|
||||
#define CHK_LANGUAGE 3857633481
|
||||
#define CHK_SHOWMESSAGES 638097246
|
||||
|
||||
#define CHK_MEMPAK 3230166560
|
||||
#define CHK_GBXROM 2992194388
|
||||
#define CHK_GBXSAVE 4253155349
|
||||
|
||||
#define CHK_PROFILE 3606499382
|
||||
#define CHK_NOTE 2089365563
|
||||
|
||||
#define CHK_PLUGGED 3378836077
|
||||
#define CHK_XINPUT 3665436173
|
||||
#define CHK_RAWDATA 1238573385
|
||||
#define CHK_PAKTYPE 2936974691
|
||||
#define CHK_REALN64RANGE 1279831790
|
||||
#define CHK_RAPIDFIREENABLED 1491009894
|
||||
#define CHK_RAPIDFIRERATE 1576165031
|
||||
#define CHK_STICKRANGE 4145501776
|
||||
#define CHK_MOUSEMOVEX 1825694205
|
||||
#define CHK_MOUSEMOVEY 1825694206
|
||||
#define CHK_AXISSET 1642523718
|
||||
#define CHK_KEYABSOLUTEX 958566277
|
||||
#define CHK_KEYABSOLUTEY 958566278
|
||||
#define CHK_PADDEADZONE 2913910084
|
||||
#define CHK_MOUSESENSITIVITYX 1513071697
|
||||
#define CHK_MOUSESENSITIVITYY 1513071698
|
||||
#define CHK_RUMBLETYPE 3440038446
|
||||
#define CHK_RUMBLESTRENGTH 3038086267
|
||||
#define CHK_VISUALRUMBLE 1795686016
|
||||
#define CHK_FFDEVICEGUID 2645316746
|
||||
#define CHK_MEMPAKFILE 2373591360
|
||||
#define CHK_GBROMFILE 2409678172
|
||||
#define CHK_GBROMSAVE 2410136971
|
||||
|
||||
#define CHK_DINPUTGUID 1452894242
|
||||
#define CHK_BUTTON 2818908353
|
||||
#define CHK_MODIFIER 4037573396
|
||||
|
||||
|
||||
// The following are not found in INI files; only profile and shortcuts files
|
||||
#define CHK_FFDEVICENAME 2645546658
|
||||
#define CHK_FFDEVICENR 2037510273
|
||||
#define CHK_DINPUTNAME 1453124154
|
||||
#define CHK_DINPUTNR 3965009433
|
||||
|
||||
|
||||
// If any of the following values conflict with djbHash return values (such as a blank string), there will be problems!
|
||||
|
||||
// nothing
|
||||
#define PL_NOHIT 0
|
||||
// [Category]
|
||||
#define PL_CATEGORY 1
|
||||
// @STRING_PROFILEVERSION
|
||||
#define PL_VERSIONSTRING 10
|
||||
|
||||
// resets the static vars in ProcessKey
|
||||
#define PL_RESET 200
|
||||
|
||||
|
||||
#define DIRECTORY_MEMPAK 0
|
||||
#define DIRECTORY_GBROMS 1
|
||||
#define DIRECTORY_GBSAVES 2
|
||||
#define DIRECTORY_DLL 254
|
||||
#define DIRECTORY_APPLICATION 255
|
||||
#define DIRECTORY_INVALID 256
|
||||
|
||||
|
||||
#define FILIST_MEM 1
|
||||
#define FILIST_TRANSFER 2
|
||||
|
||||
#define BF_LOAD false
|
||||
#define BF_SAVE true
|
||||
|
||||
#define BF_MEMPAK 0
|
||||
#define BF_GBROM 1
|
||||
#define BF_GBSAVE 2
|
||||
#define BF_PROFILE 3
|
||||
#define BF_NOTE 4
|
||||
#define BF_SHORTCUTS 5
|
||||
|
||||
// 32 hex characters, 4 hyphens, 2 end braces
|
||||
#define GUID_STRINGLENGTH 32+4+2
|
||||
|
||||
#endif // #ifndef _FILEACCESS_H_
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,78 @@
|
|||
#ifndef _GBCART_H_
|
||||
#define _GBCART_H_
|
||||
|
||||
#include <windows.h>
|
||||
#include <time.h>
|
||||
|
||||
typedef struct _gbCartRTC {
|
||||
UINT mapperSeconds;
|
||||
UINT mapperMinutes;
|
||||
UINT mapperHours;
|
||||
UINT mapperDays;
|
||||
UINT mapperControl;
|
||||
UINT mapperLSeconds;
|
||||
UINT mapperLMinutes;
|
||||
UINT mapperLHours;
|
||||
UINT mapperLDays;
|
||||
UINT mapperLControl;
|
||||
time_t mapperLastTime;
|
||||
} gbCartRTC, *lpgbCartRTC;
|
||||
|
||||
typedef struct _GBCART
|
||||
{
|
||||
unsigned int iCurrentRomBankNo;
|
||||
unsigned int iCurrentRamBankNo;
|
||||
int iCartType;
|
||||
bool bHasRam;
|
||||
bool bHasBattery;
|
||||
bool bHasTimer;
|
||||
bool bHasRumble;
|
||||
bool bRamEnableState;
|
||||
bool bMBC1RAMbanking; // if false, use 2 magic bits for Most Significant Bits of ROM banking (default); if true, use the 2 magic bits for RAM banking
|
||||
unsigned int iNumRomBanks;
|
||||
unsigned int iNumRamBanks;
|
||||
BYTE TimerData[5];
|
||||
BYTE LatchedTimerData[5];
|
||||
time_t timerLastUpdate;
|
||||
bool TimerDataLatched;
|
||||
HANDLE hRomFile; // a file mapping handle
|
||||
HANDLE hRamFile; // a file mapping handle, must be NULL if malloc'd ram is being used instead of a valid memory mapped file
|
||||
const unsigned char * RomData; // max [0x200 * 0x4000];
|
||||
LPBYTE RamData; // max [0x10 * 0x2000];
|
||||
bool (*ptrfnReadCart)(_GBCART * Cart, WORD dwAddress, BYTE *Data); // ReadCart handler
|
||||
bool (*ptrfnWriteCart)(_GBCART * Cart, WORD dwAddress, BYTE *Data); // WriteCart handler
|
||||
} GBCART, *LPGBCART;
|
||||
|
||||
bool LoadCart(LPGBCART Cart, LPCTSTR RomFile, LPCTSTR RamFile, LPCTSTR TdfFile);
|
||||
// bool ReadCart(LPGBCART Cart, WORD dwAddress, BYTE *Data);
|
||||
// bool WriteCart(LPGBCART Cart, WORD dwAddress, BYTE *Data);
|
||||
bool SaveCart(LPGBCART Cart, LPTSTR SaveFile, LPTSTR TimeFile);
|
||||
bool UnloadCart(LPGBCART Cart);
|
||||
|
||||
/*
|
||||
iCartType values:
|
||||
0 = no MBC
|
||||
1 = MBC1
|
||||
2 = MBC2
|
||||
3 = MMMO1
|
||||
4 = MBC3
|
||||
5 = MBC5
|
||||
6 = Pocket Camera
|
||||
7 = TAMA 5
|
||||
8 = HuC 3
|
||||
9 = HuC 1
|
||||
Note, that 6 and up are not implemented yet.
|
||||
*/
|
||||
|
||||
#define GB_NORM 0x00
|
||||
#define GB_MBC1 0x01
|
||||
#define GB_MBC2 0x02
|
||||
#define GB_MMMO1 0x03
|
||||
#define GB_MBC3 0x04
|
||||
#define GB_MBC5 0x05
|
||||
#define GB_CAMERA 0x06
|
||||
#define GB_TAMA5 0x07
|
||||
#define GB_HUC3 0x08
|
||||
#define GB_HUC1 0x09
|
||||
|
||||
#endif // #ifndef _GBCART_H_
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,93 @@
|
|||
/*
|
||||
N-Rage`s Dinput8 Plugin
|
||||
(C) 2002, 2006 Norbert Wladyka
|
||||
|
||||
Author`s Email: norbert.wladyka@chello.at
|
||||
Website: http://go.to/nrage
|
||||
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef _NRINTERFACE_
|
||||
#define _NRINTERFACE_
|
||||
|
||||
BOOL CALLBACK MainDlgProc( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam );
|
||||
void SetModifier( CONTROLLER *pcController );
|
||||
void SetControllerDefaults( CONTROLLER *pcController );
|
||||
|
||||
// application internal message
|
||||
#define WM_USER_UPDATE WM_USER + 1
|
||||
// application internal message
|
||||
#define WM_USER_READVALUES WM_USER + 2
|
||||
|
||||
#define CONFIGTHRESHOLD 50
|
||||
#define MOUSE_THRESHOLD 10
|
||||
|
||||
#define SC_SCANSUCCEED 0x01
|
||||
#define SC_SCANESCAPE 0x10
|
||||
|
||||
#define TIMER_BUTTON 1
|
||||
|
||||
#define INTERVAL_BUTTON 20
|
||||
#define INTERVAL_RUMBLETEST 20
|
||||
|
||||
#define MPAK_FORMATABLE 0x01
|
||||
#define MPAK_READABLE 0x02
|
||||
#define MPAK_WRITEABLE 0x04
|
||||
|
||||
#define MPAK_OK 0x07
|
||||
#define MPAK_INUSE 0x12
|
||||
#define MPAK_WRONGSIZE 0x27
|
||||
#define MPAK_DAMAGED 0x71
|
||||
#define MPAK_ERROR 0x81
|
||||
#define MPAK_NOSELECTION 0xF0
|
||||
|
||||
|
||||
#define BSET_CONTROLS 1
|
||||
#define BSET_SHORTCUTS 2
|
||||
|
||||
|
||||
typedef struct _IFDEVICE
|
||||
{
|
||||
TCHAR szProductName[MAX_PATH+1];
|
||||
BYTE bProductCounter;
|
||||
} IFDEVICE, *LPIFDEVICE;
|
||||
|
||||
typedef struct _INTERFACEVALUES
|
||||
{
|
||||
BYTE ChosenTab;
|
||||
CONTROLLER Controllers[4];
|
||||
IFDEVICE FFDevices[4];
|
||||
SHORTCUTS Shortcuts;
|
||||
LANGID Language;
|
||||
bool fDisplayShortPop;
|
||||
} INTERFACEVALUES, *LPINTERFACEVALUES;
|
||||
|
||||
#define TAB_CONTROLLER1 0
|
||||
#define TAB_CONTROLLER2 1
|
||||
#define TAB_CONTROLLER3 2
|
||||
#define TAB_CONTROLLER4 3
|
||||
#define TAB_SHORTCUTS 4
|
||||
#define TAB_FOLDERS 5
|
||||
|
||||
#define TAB_CONTROLS 0
|
||||
#define TAB_DEVICES 1
|
||||
#define TAB_MODIFIERS 2
|
||||
#define TAB_PAK 3
|
||||
|
||||
extern INTERFACEVALUES *g_ivConfig;
|
||||
|
||||
#endif // _NRINTERFACE_
|
|
@ -0,0 +1,192 @@
|
|||
/*
|
||||
N-Rage`s Dinput8 Plugin
|
||||
(C) 2002, 2006 Norbert Wladyka
|
||||
|
||||
Author`s Email: norbert.wladyka@chello.at
|
||||
Website: http://go.to/nrage
|
||||
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
// Internationalization routines go in this file.
|
||||
|
||||
#include "International.h"
|
||||
#include <windows.h>
|
||||
#include <tchar.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "debug.h"
|
||||
|
||||
LANGID GetNTDLLNativeLangID();
|
||||
BOOL IsHongKongVersion();
|
||||
BOOL CALLBACK EnumLangProc(HANDLE hModule, LPCTSTR lpszType, LPCTSTR lpszName, WORD wIDLanguage, LONG_PTR lParam);
|
||||
|
||||
// The following routines are ripped straight from the SatDLL sample project on the Visual Studio .NET CDs.
|
||||
// Props to the MS coders for making this solid piece of work. --rabid
|
||||
// "If it ain't broke, don't fix it."
|
||||
|
||||
// Loads the satellite DLL specified for the language DesiredLanguage
|
||||
HMODULE LoadLanguageDLL(LANGID DesiredLanguage)
|
||||
{
|
||||
TCHAR SatellitePath[MAX_PATH];
|
||||
HMODULE hDLL;
|
||||
|
||||
// First try to load the library with the fully specified language
|
||||
_stprintf(SatellitePath, _T("NRage-Language-%u.dll"), DesiredLanguage);
|
||||
hDLL = LoadLibraryEx(SatellitePath, 0, 0);
|
||||
if( hDLL )
|
||||
return hDLL;
|
||||
else { // try the primary language ID
|
||||
DesiredLanguage = PRIMARYLANGID(DesiredLanguage);
|
||||
_stprintf(SatellitePath, _T("NRage-Language-%u.dll"), DesiredLanguage);
|
||||
hDLL = LoadLibraryEx(SatellitePath, 0, 0);
|
||||
if( hDLL )
|
||||
return hDLL;
|
||||
else
|
||||
{
|
||||
DebugWrite(_T("Couldn't load library: %s\n"), SatellitePath);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// The following functions contain code to
|
||||
// detect the language in which the initial
|
||||
// user interface should be displayed
|
||||
|
||||
BOOL CALLBACK EnumLangProc(HANDLE hModule, LPCTSTR lpszType, LPCTSTR lpszName,
|
||||
WORD wIDLanguage, LONG_PTR lParam)
|
||||
{
|
||||
PLANGINFO LangInfo;
|
||||
|
||||
LangInfo = (PLANGINFO) lParam;
|
||||
LangInfo->Count++;
|
||||
LangInfo->LangID = wIDLanguage;
|
||||
|
||||
return (TRUE); // continue enumeration
|
||||
}
|
||||
|
||||
// Detects the language of ntdll.dll with some specific processing for
|
||||
// the Hongkong SAR version
|
||||
LANGID GetNTDLLNativeLangID()
|
||||
{
|
||||
|
||||
LANGINFO LangInfo;
|
||||
LPCTSTR Type = (LPCTSTR) ((LPVOID)((WORD)16));
|
||||
LPCTSTR Name = (LPCTSTR) 1;
|
||||
|
||||
ZeroMemory(&LangInfo,sizeof(LangInfo));
|
||||
|
||||
// Get the HModule for ntdll.
|
||||
HMODULE hMod = GetModuleHandle(_T("ntdll.dll"));
|
||||
if (hMod==NULL) {
|
||||
return(0);
|
||||
}
|
||||
|
||||
BOOL result = EnumResourceLanguages(hMod, Type, Name, (ENUMRESLANGPROC)EnumLangProc, (LONG_PTR) &LangInfo);
|
||||
|
||||
if (!result || (LangInfo.Count > 2) || (LangInfo.Count < 1) ) {
|
||||
return (0);
|
||||
}
|
||||
|
||||
return (LangInfo.LangID);
|
||||
}
|
||||
|
||||
// Checks if NT4 system is Hongkong SAR version
|
||||
BOOL IsHongKongVersion()
|
||||
{
|
||||
HMODULE hMod;
|
||||
BOOL bRet=FALSE;
|
||||
typedef BOOL (WINAPI *IMMRELEASECONTEXT)(HWND,HIMC);
|
||||
IMMRELEASECONTEXT pImmReleaseContext;
|
||||
|
||||
hMod = LoadLibrary(_T("imm32.dll"));
|
||||
if (hMod) {
|
||||
pImmReleaseContext = (IMMRELEASECONTEXT)GetProcAddress(hMod,"ImmReleaseContext");
|
||||
if (pImmReleaseContext) {
|
||||
bRet = pImmReleaseContext(NULL,0);
|
||||
}
|
||||
FreeLibrary(hMod);
|
||||
}
|
||||
return (bRet);
|
||||
}
|
||||
|
||||
// This function detects a correct initial UI language for all
|
||||
// platforms (Win9x, ME, NT4, Windows 2000, Windows XP)
|
||||
LANGID DetectLanguage()
|
||||
{
|
||||
|
||||
#define MAX_KEY_BUFFER 80
|
||||
|
||||
OSVERSIONINFO VersionInfo;
|
||||
LANGID uiLangID = 0;
|
||||
HKEY hKey;
|
||||
DWORD Type, BuffLen = MAX_KEY_BUFFER;
|
||||
TCHAR LangKeyValue[MAX_KEY_BUFFER];
|
||||
|
||||
|
||||
VersionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
|
||||
if( !GetVersionEx(&VersionInfo) )
|
||||
return(0);
|
||||
|
||||
switch( VersionInfo.dwPlatformId ) {
|
||||
// On Windows NT, Windows 2000 or higher
|
||||
case VER_PLATFORM_WIN32_NT:
|
||||
if( VersionInfo.dwMajorVersion >= 5) // Windows 2000 or higher
|
||||
{
|
||||
// we need to dynamically link the GetUserDefaultUILanguage func
|
||||
HMODULE hmKernDLL = LoadLibrary(_T("kernel32.dll"));
|
||||
if (hmKernDLL)
|
||||
{
|
||||
LANGID (*fpGetLang)() = NULL;
|
||||
fpGetLang = (LANGID(*)(void))GetProcAddress(hmKernDLL, "GetUserDefaultUILanguage");
|
||||
uiLangID = fpGetLang();
|
||||
} // and if we couldn't load kernel32.dll, just fall back to default language
|
||||
}
|
||||
else { // for NT4 check the language of ntdll.dll
|
||||
uiLangID = GetNTDLLNativeLangID();
|
||||
if (uiLangID == 1033) { // special processing for Honkong SAR version of NT4
|
||||
if (IsHongKongVersion()) {
|
||||
uiLangID = 3076;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
// On Windows 95, Windows 98 or Windows ME
|
||||
case VER_PLATFORM_WIN32_WINDOWS:
|
||||
// Open the registry key for the UI language
|
||||
if( RegOpenKeyEx(HKEY_CURRENT_USER,_T("Default\\Control Panel\\Desktop\\ResourceLocale"), 0,
|
||||
KEY_QUERY_VALUE, &hKey) == ERROR_SUCCESS ) {
|
||||
// Get the type of the default key
|
||||
if( RegQueryValueEx(hKey, NULL, NULL, &Type, NULL, NULL) == ERROR_SUCCESS
|
||||
&& Type == REG_SZ ) {
|
||||
// Read the key value
|
||||
if( RegQueryValueEx(hKey, NULL, NULL, &Type, (LPBYTE)LangKeyValue, &BuffLen)
|
||||
== ERROR_SUCCESS ) {
|
||||
uiLangID = _ttoi(LangKeyValue);
|
||||
}
|
||||
}
|
||||
RegCloseKey(hKey);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (uiLangID == 0) {
|
||||
uiLangID = GetUserDefaultLangID();
|
||||
}
|
||||
// Return the found language ID.
|
||||
return (uiLangID);
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
N-Rage`s Dinput8 Plugin
|
||||
(C) 2002, 2006 Norbert Wladyka
|
||||
|
||||
Author`s Email: norbert.wladyka@chello.at
|
||||
Website: http://go.to/nrage
|
||||
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "settings.h"
|
||||
#include <windows.h>
|
||||
|
||||
#ifndef _NRINTERNATIONAL_
|
||||
#define _NRINTERNATIONAL_
|
||||
|
||||
typedef struct LANGINFO_DEF {
|
||||
int Count;
|
||||
LANGID LangID;
|
||||
} LANGINFO;
|
||||
typedef LANGINFO *PLANGINFO;
|
||||
|
||||
// only export these functions if UNICODE support is enabled
|
||||
#ifdef _UNICODE
|
||||
LANGID DetectLanguage();
|
||||
HMODULE LoadLanguageDLL(LANGID DesiredLanguage);
|
||||
#endif // #ifdef _UNICODE
|
||||
|
||||
#endif // #ifndef _NRINTERNATIONAL_
|
|
@ -0,0 +1,340 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,394 @@
|
|||
/*
|
||||
N-Rage`s Dinput8 Plugin
|
||||
(C) 2002, 2006 Norbert Wladyka
|
||||
|
||||
Author`s Email: norbert.wladyka@chello.at
|
||||
Website: http://go.to/nrage
|
||||
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef _NRAGEPLUGIN_
|
||||
#define _NRAGEPLUGIN_
|
||||
|
||||
#include <dinput.h>
|
||||
#include "XInputController.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//General Plugin
|
||||
|
||||
#define STRING_PLUGINNAME "N-Rage Input Plugin V2"
|
||||
|
||||
#define TIMER_MESSAGEWINDOW 123
|
||||
|
||||
// maximum number of devices other than SysMouse
|
||||
#define MAX_DEVICES 32
|
||||
// maximum number of modifiers
|
||||
#define MAX_MODIFIERS 256
|
||||
|
||||
#define DEFAULT_STICKRANGE 66
|
||||
#define DEFAULT_DEADZONE 5
|
||||
#define DEFAULT_RUMBLETYP RUMBLE_EFF1
|
||||
#define DEFAULT_RUMBLESTRENGTH 80
|
||||
#define DEFAULT_MOUSESENSIVITY 100
|
||||
#define DEFAULT_PAKTYPE PAK_NONE
|
||||
#define DEFAULT_MOUSEMOVE MM_BUFF
|
||||
|
||||
#define PAK_NONE 0
|
||||
#define PAK_MEM 1
|
||||
#define PAK_RUMBLE 2
|
||||
#define PAK_TRANSFER 3
|
||||
#define PAK_VOICE 4
|
||||
#define PAK_ADAPTOID 7
|
||||
|
||||
// just used to display text in GUI
|
||||
#define PAK_NONRAW 16
|
||||
|
||||
|
||||
|
||||
typedef struct _EMULATOR_INFO
|
||||
{
|
||||
bool fInitialisedPlugin;
|
||||
HWND hMainWindow;
|
||||
HINSTANCE hinst;
|
||||
LANGID Language;
|
||||
bool fDisplayShortPop; // do we display shortcut message popups?
|
||||
|
||||
// BOOL MemoryBswaped; // If this is set to TRUE, then the memory has been pre
|
||||
// bswap on a dword (32 bits) boundry, only effects header.
|
||||
// eg. the first 8 bytes are stored like this:
|
||||
// 4 3 2 1 8 7 6 5
|
||||
// BYTE * HEADER; // This is the rom header (first 40h bytes of the rom)
|
||||
} EMULATOR_INFO, *LPEMULATOR_INFO;
|
||||
|
||||
typedef struct _DEVICE
|
||||
{
|
||||
LPDIRECTINPUTDEVICE8 didHandle;
|
||||
TCHAR szProductName[MAX_PATH];
|
||||
BYTE bProductCounter;
|
||||
GUID guidInstance;
|
||||
DWORD dwDevType; // can be DI8DEVTYPE_KEYBOARD, DI8DEVTYPE_MOUSE, etc
|
||||
BYTE bEffType; // What rumble effects does this device support?
|
||||
union INPUTSTATE { // the last polled data from this device
|
||||
DIJOYSTATE joyState;
|
||||
DIMOUSESTATE2 mouseState;
|
||||
BYTE rgbButtons[256]; // keyboard state
|
||||
} stateAs;
|
||||
} DEVICE, *LPDEVICE;
|
||||
|
||||
typedef struct _BUTTON
|
||||
{
|
||||
bool fPrevPressed; // Was this button pressed last time we checked? (not to be saved in config)
|
||||
BYTE bOffset; // Offset in the DirectInput data structure
|
||||
BYTE bAxisID; // Tells which range of the Axe/POV is important (see AI_AXE_P, AI_POV_UP, etc)
|
||||
BYTE bBtnType; // Type of device/button: Keyboard key, Joystick axis, Joystick button, Mouse axis, etc
|
||||
LPDEVICE parentDevice; // pointer to the DEVICE this assignment came from
|
||||
} BUTTON, *LPBUTTON;
|
||||
|
||||
// Modifiers are a feature built into NRage. Emulator turbo buttons, macros, stuff like that.
|
||||
typedef struct _MODIFIER
|
||||
{
|
||||
BUTTON btnButton; // button to associate with
|
||||
BYTE bModType; // Type of modifier (None, Movement, Macro, Config)
|
||||
BOOL fToggle; // false if you have to hold the button down to activate, true if the modifier toggles on button press
|
||||
BOOL fStatus; // if true, control defaults to ACTIVE, and deactivates on button press
|
||||
DWORD32 dwSpecific; // will be cast to MODSPEC_MOVE, MODSPEC_MACRO, or MODSPEC_CONFIG
|
||||
} MODIFIER, *LPMODIFIER;
|
||||
|
||||
// bModType (modifiers)
|
||||
#define MDT_NONE 0
|
||||
#define MDT_MOVE 1
|
||||
#define MDT_MACRO 2
|
||||
#define MDT_CONFIG 3
|
||||
|
||||
// buffered
|
||||
#define MM_BUFF 0
|
||||
// absolute
|
||||
#define MM_ABS 1
|
||||
// deadpan
|
||||
#define MM_DEAD 2
|
||||
|
||||
// Number of analog axes. Standard N64 controller has just 2: X and Y joystick.
|
||||
#define PF_AXESETS 2
|
||||
|
||||
typedef struct _CONTROLLER // AN N64 CONTROLLER
|
||||
{
|
||||
unsigned fPlugged; // is the controller "plugged" (i.e. does the emulator see a controller on this port?)
|
||||
unsigned fXInput; // is the controller an xInput device?
|
||||
unsigned fRawData; // are we using RAW mode for this controller?
|
||||
unsigned fIsAdaptoid; // is it an adaptoid?
|
||||
|
||||
unsigned fKeyboard; // does it use a keyboard?
|
||||
unsigned fMouse; // does it use a mouse?
|
||||
unsigned fGamePad; // does it use a gamepad/joystick?
|
||||
|
||||
unsigned fRealN64Range; // does it have the "Real N64 Range" flag set?
|
||||
unsigned bAxisSet; // which set of axes are we using? (Control 1, Control 2)
|
||||
unsigned bMouseMoveX; // does it use buffered/absolute mouse for X? MM_BUFF, MM_ABS, MM_DEAD
|
||||
unsigned bMouseMoveY; // does it use buffered/absolute mouse for Y?
|
||||
unsigned fKeyAbsoluteX; // does it use absolute key for X?
|
||||
unsigned fKeyAbsoluteY; // does it use absolute key for Y?
|
||||
|
||||
unsigned fPakInitialized; // Has our pak been initialized? Used to make sure we don't try to write to a mempak that doesn't point to anything.
|
||||
unsigned fPakCRCError; // The ROM sends CRC data when it tries to write to a mempak. Is the CRC incorrect? Usually indicates a bad ROM.
|
||||
unsigned PakType; // what type of controller pak? mempak? rumble? transfer? etc
|
||||
unsigned fVisualRumble; // is visual rumble enabled for this controller?
|
||||
|
||||
BYTE bRumbleTyp; // what type of rumble effect? none, constant, ramp, or direct?
|
||||
|
||||
GUID guidFFDevice; // GUID of the device that rumble gets sent to
|
||||
|
||||
BYTE bStickRange; // our "range modifier".
|
||||
|
||||
long wAxeBuffer[4]; // makes pseudo-relative Movement possible through keyboard or buttons
|
||||
// also acts as a mouse buffer
|
||||
|
||||
WORD wMouseSensitivityX; // set per N64 controller, that's OK
|
||||
WORD wMouseSensitivityY;
|
||||
BYTE bPadDeadZone; // our manual dead zone, set per N64 controller
|
||||
BYTE bRumbleStrength; // set per N64 controller
|
||||
unsigned short nModifiers; // number of modifiers
|
||||
|
||||
bool bRapidFireEnabled;
|
||||
BYTE bRapidFireRate;
|
||||
BYTE bRapidFireCounter;
|
||||
|
||||
TCHAR szMempakFile[MAX_PATH+1]; // MemPak-FileName
|
||||
TCHAR szTransferRom[MAX_PATH+1]; // GameBoyRom-Filename
|
||||
TCHAR szTransferSave[MAX_PATH+1]; // GameBoyEEPRom-Filename
|
||||
|
||||
BUTTON aButton[14+PF_AXESETS*4]; // Ten buttons, 4 d-pad directions times two (for Config 1 and Config 2)
|
||||
|
||||
MODIFIER *pModifiers; // Array of Modifiers
|
||||
|
||||
void *pPakData; // Pointer to Pak Data (specific): see PakIO.h
|
||||
// pPakData->bPakType will always be a BYTE indicating what the current pak type is
|
||||
|
||||
XCONTROLLER xiController; // To handle an XInput enabled controller --tecnicors
|
||||
} CONTROLLER, *LPCONTROLLER;
|
||||
|
||||
// This is the Index of WORD PROFILE.Button[X]
|
||||
// Buttons:
|
||||
#define PF_DPADR 0
|
||||
#define PF_DPADL 1
|
||||
#define PF_DPADD 2
|
||||
#define PF_DPADU 3
|
||||
#define PF_START 4
|
||||
#define PF_TRIGGERZ 5
|
||||
#define PF_BBUTTON 6
|
||||
#define PF_ABUTTON 7
|
||||
#define PF_CBUTTONR 8
|
||||
#define PF_CBUTTONL 9
|
||||
#define PF_CBUTTOND 10
|
||||
#define PF_CBUTTONU 11
|
||||
#define PF_TRIGGERR 12
|
||||
#define PF_TRIGGERL 13
|
||||
|
||||
// Analog Stick
|
||||
// cause you can assign Buttons to it, I need 4 of 'em
|
||||
#define PF_APADR 14
|
||||
#define PF_APADL 15
|
||||
#define PF_APADD 16
|
||||
#define PF_APADU 17
|
||||
|
||||
// second Set
|
||||
// #define PF_APADR 18
|
||||
// #define PF_APADL 19
|
||||
// #define PF_APADD 20
|
||||
// #define PF_APADU 21
|
||||
|
||||
|
||||
|
||||
|
||||
// Data Format of DWORD Controller.Button:
|
||||
//
|
||||
|
||||
// BYTE bBtnType : Determines the Device and general Type of Control
|
||||
// BYTE bAxisID : AxeIndentifier, Tells which range of the Axe/POV is important
|
||||
// BYTE bOffset : Offset in the DirectInput data structure
|
||||
|
||||
// BYTE bBtnType : Determines the Device and general Type of Control
|
||||
#define DT_UNASSIGNED 0
|
||||
// Joystick
|
||||
#define DT_JOYBUTTON 1
|
||||
#define DT_JOYAXE 2
|
||||
#define DT_JOYPOV 3
|
||||
#define DT_JOYSLIDER 4
|
||||
|
||||
// Keyboard
|
||||
#define DT_KEYBUTTON 5
|
||||
|
||||
// Mouse
|
||||
#define DT_MOUSEBUTTON 6
|
||||
#define DT_MOUSEAXE 7
|
||||
|
||||
// BYTE bAxisID : AxeIndentifier, Tells which range of the Axe/POV is important
|
||||
|
||||
// Positive Range of an Axe
|
||||
#define AI_AXE_P 0
|
||||
// Negative Range
|
||||
#define AI_AXE_N 1
|
||||
|
||||
// Applies to POVs obviously
|
||||
#define AI_POV_UP 0
|
||||
#define AI_POV_RIGHT 1
|
||||
#define AI_POV_DOWN 2
|
||||
#define AI_POV_LEFT 3
|
||||
|
||||
// BYTE bOffset : Offset in the DirectInput data structure
|
||||
|
||||
|
||||
typedef union _MODSPEC_MOVE
|
||||
{
|
||||
DWORD dwValue;
|
||||
struct
|
||||
{
|
||||
short XModification;
|
||||
short YModification;
|
||||
};
|
||||
} MODSPEC_MOVE, *LPMODSPEC_MOVE;
|
||||
|
||||
typedef union _MODSPEC_MACRO
|
||||
{
|
||||
DWORD dwValue;
|
||||
struct
|
||||
{
|
||||
unsigned short aButtons;
|
||||
unsigned short aFlags;
|
||||
};
|
||||
struct
|
||||
{
|
||||
unsigned fDigitalRight :1;
|
||||
unsigned fDigitalLeft :1;
|
||||
unsigned fDigitalDown :1;
|
||||
unsigned fDigitalUp :1;
|
||||
unsigned fStart :1;
|
||||
unsigned fTriggerZ :1;
|
||||
unsigned fBButton :1;
|
||||
unsigned fAButton :1;
|
||||
unsigned fCRight :1;
|
||||
unsigned fCLeft :1;
|
||||
unsigned fCDown :1;
|
||||
unsigned fCUp :1;
|
||||
unsigned fTriggerR :1;
|
||||
unsigned fTriggerL :1;
|
||||
unsigned :2;
|
||||
|
||||
unsigned fAnalogRight :1;
|
||||
unsigned fAnalogLeft :1;
|
||||
unsigned fAnalogDown :1;
|
||||
unsigned fAnalogUp :1;
|
||||
unsigned fRapidFire :1;
|
||||
unsigned fRapidFireRate :1;
|
||||
unsigned fPrevFireState :1;
|
||||
unsigned fPrevFireState2 :1;
|
||||
};
|
||||
} MODSPEC_MACRO, *LPMODSPEC_MACRO;
|
||||
|
||||
typedef union _MODSPEC_CONFIG
|
||||
{
|
||||
DWORD dwValue;
|
||||
struct
|
||||
{
|
||||
BYTE bAnalogStick;
|
||||
BYTE bMouse;
|
||||
BYTE bKeyboard;
|
||||
};
|
||||
struct
|
||||
{
|
||||
unsigned fChangeAnalogConfig :1;
|
||||
unsigned fAnalogStickMode :7;
|
||||
unsigned fChangeMouseXAxis :1;
|
||||
unsigned fChangeMouseYAxis :1;
|
||||
unsigned :6;
|
||||
unsigned fChangeKeyboardXAxis :1;
|
||||
unsigned fChangeKeyboardYAxis :1;
|
||||
unsigned :6;
|
||||
|
||||
};
|
||||
} MODSPEC_CONFIG, *LPMODSPEC_CONFIG;
|
||||
|
||||
#define SC_NOPAK 0
|
||||
#define SC_MEMPAK 1
|
||||
#define SC_RUMBPAK 2
|
||||
#define SC_TRANSPAK 3
|
||||
#define SC_VOICEPAK 4
|
||||
#define SC_ADAPTPAK 5
|
||||
#define SC_SWMEMRUMB 6
|
||||
#define SC_SWMEMADAPT 7
|
||||
|
||||
// total arraysize of aButtons in SHORTCUTSPL;
|
||||
// make sure you update this if you change the list above
|
||||
#define SC_TOTAL 8
|
||||
|
||||
typedef struct _SHORTCUTSPL
|
||||
{
|
||||
BUTTON aButtons[SC_TOTAL];
|
||||
//BUTTON NoPakButton;
|
||||
//BUTTON MemPakButton;
|
||||
//BUTTON RumblePakButton;
|
||||
//BUTTON TransferPakButton;
|
||||
//BUTTON VoicePakButton;
|
||||
//BUTTON AdaptoidPakButton;
|
||||
//BUTTON SwMemRumbleButton;
|
||||
//BUTTON SwMemAdaptoidButton;
|
||||
} SHORTCUTSPL, *LPSHORTCUTSPL;
|
||||
|
||||
typedef struct _SHORTCUTS
|
||||
{
|
||||
SHORTCUTSPL Player[4];
|
||||
BUTTON bMouseLock;
|
||||
} SHORTCUTS, *LPSHORTCUTS;
|
||||
|
||||
typedef struct _MSHORTCUT {
|
||||
int iControl;
|
||||
int iShortcut;
|
||||
} MSHORTCUT, *LPMSHORTCUT; // shortcut message
|
||||
|
||||
|
||||
#define CHECK_WHITESPACES( str ) ( str == '\r' || str == '\n' || str == '\t' )
|
||||
|
||||
|
||||
extern HANDLE g_hHeap;
|
||||
extern HMODULE g_hDirectInputDLL;
|
||||
extern HMODULE g_hResourceDLL;
|
||||
extern EMULATOR_INFO g_strEmuInfo;
|
||||
extern TCHAR g_aszDefFolders[3][MAX_PATH];
|
||||
extern TCHAR g_aszLastBrowse[6][MAX_PATH];
|
||||
extern int g_nDevices;
|
||||
extern DEVICE g_devList[MAX_DEVICES];
|
||||
extern DEVICE g_sysMouse;
|
||||
extern CONTROLLER g_pcControllers[4];
|
||||
extern SHORTCUTS g_scShortcuts;
|
||||
extern LPDIRECTINPUTDEVICE8 g_apFFDevice[4];
|
||||
extern LPDIRECTINPUTEFFECT g_apdiEffect[4];
|
||||
extern CRITICAL_SECTION g_critical;
|
||||
|
||||
extern bool g_bRunning;
|
||||
extern bool g_bConfiguring;
|
||||
extern bool g_bExclusiveMouse;
|
||||
|
||||
extern int g_iFirstController;
|
||||
|
||||
int WarningMessage( UINT uTextID, UINT uType );
|
||||
int FindDeviceinList( const TCHAR *pszProductName, BYTE bProductCounter, bool fFindSimilar );
|
||||
int FindDeviceinList( REFGUID rGUID );
|
||||
void freePakData( CONTROLLER *pcController );
|
||||
void freeModifiers( CONTROLLER *pcController );
|
||||
void CheckShortcuts();
|
||||
bool ErrorMessage( UINT uID, DWORD dwError, bool fUserChoose );
|
||||
|
||||
#endif
|
|
@ -0,0 +1,885 @@
|
|||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Neutral resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU)
|
||||
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||
#pragma code_page(1252)
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO
|
||||
BEGIN
|
||||
IDD_MAINCFGDIALOG, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 389
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 279
|
||||
END
|
||||
|
||||
IDD_CONTROLLER, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 371
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 227
|
||||
END
|
||||
|
||||
IDD_SHORTCUT, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 369
|
||||
VERTGUIDE, 83
|
||||
VERTGUIDE, 146
|
||||
VERTGUIDE, 157
|
||||
VERTGUIDE, 219
|
||||
VERTGUIDE, 229
|
||||
VERTGUIDE, 292
|
||||
VERTGUIDE, 303
|
||||
VERTGUIDE, 365
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 228
|
||||
HORZGUIDE, 25
|
||||
HORZGUIDE, 131
|
||||
HORZGUIDE, 195
|
||||
END
|
||||
|
||||
IDD_CONTROLS, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 363
|
||||
VERTGUIDE, 14
|
||||
VERTGUIDE, 176
|
||||
VERTGUIDE, 182
|
||||
VERTGUIDE, 188
|
||||
VERTGUIDE, 194
|
||||
VERTGUIDE, 356
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 173
|
||||
END
|
||||
|
||||
IDD_CONTROLLERPAK, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 363
|
||||
TOPMARGIN, 6
|
||||
BOTTOMMARGIN, 173
|
||||
END
|
||||
|
||||
IDD_MODIFIER, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 363
|
||||
VERTGUIDE, 203
|
||||
VERTGUIDE, 356
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 173
|
||||
END
|
||||
|
||||
IDD_PAK_MEMPAK, DIALOG
|
||||
BEGIN
|
||||
VERTGUIDE, 8
|
||||
VERTGUIDE, 143
|
||||
VERTGUIDE, 166
|
||||
VERTGUIDE, 347
|
||||
HORZGUIDE, 11
|
||||
HORZGUIDE, 29
|
||||
HORZGUIDE, 140
|
||||
END
|
||||
|
||||
IDD_PAK_TRANSFER, DIALOG
|
||||
BEGIN
|
||||
VERTGUIDE, 8
|
||||
VERTGUIDE, 348
|
||||
HORZGUIDE, 8
|
||||
HORZGUIDE, 140
|
||||
END
|
||||
|
||||
IDD_DEVICES, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 363
|
||||
VERTGUIDE, 16
|
||||
VERTGUIDE, 169
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 173
|
||||
END
|
||||
|
||||
IDD_MOD_MOVE, DIALOG
|
||||
BEGIN
|
||||
BOTTOMMARGIN, 45
|
||||
END
|
||||
|
||||
IDD_FOLDERS, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 288
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 199
|
||||
END
|
||||
|
||||
"IDD_MAINCFGDIALOG$(_DEBUG)", DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 6
|
||||
RIGHTMARGIN, 389
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 344
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
#if defined(APSTUDIO_INVOKED) || !defined(_DEBUG)
|
||||
IDD_MAINCFGDIALOG DIALOGEX 0, 0, 396, 286
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "N-Rage Input V2 - Configuration"
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
CONTROL "PLACEHOLDER",IDC_UPPERTAB,"SysTabControl32",WS_GROUP | WS_TABSTOP,7,7,382,251
|
||||
LTEXT "VERSION PLACEHOLDER",IDC_VERSIONSTRING,7,265,82,14,SS_CENTERIMAGE | NOT WS_GROUP
|
||||
COMBOBOX IDC_LANGUAGE,103,265,112,30,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
||||
DEFPUSHBUTTON "Save",IDSAVE,223,265,50,14,WS_GROUP
|
||||
PUSHBUTTON "Use",IDUSE,281,265,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,339,265,50,14
|
||||
END
|
||||
#endif
|
||||
|
||||
IDD_CONTROLLER DIALOGEX 0, 0, 378, 234
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
|
||||
EXSTYLE WS_EX_CONTROLPARENT
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
CONTROL "Plugged",IDC_PLUGGED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,7,45,13
|
||||
PUSHBUTTON "Clear Controller",IDC_CLEARCONTROLLER,63,7,67,13
|
||||
PUSHBUTTON "Default Config",IDC_SETDEFAULT,63,21,67,13
|
||||
PUSHBUTTON "Load Profile",IDC_LOADPROFILE,191,7,67,13
|
||||
PUSHBUTTON "Save Profile",IDC_SAVEPROFILE,272,7,67,13
|
||||
CONTROL "PLACEHOLDER",IDC_CONTROLLERTAB,"SysTabControl32",WS_GROUP | WS_TABSTOP,0,38,375,196
|
||||
CONTROL "XInput",IDC_XINPUT_ENABLER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,22,37,10
|
||||
END
|
||||
|
||||
IDD_SHORTCUT DIALOGEX 0, 0, 376, 235
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
|
||||
EXSTYLE WS_EX_CONTROLPARENT
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
PUSHBUTTON "Load Shortcuts",IDC_LOADSHORTCUTS,142,7,67,13
|
||||
PUSHBUTTON "Save Shortcuts",IDC_SAVESHORTCUTS,221,7,67,13
|
||||
PUSHBUTTON "Default Config",IDC_SETDEFAULTSC,301,7,67,13
|
||||
LTEXT "Unplug ControllerPak",IDC_STATIC,7,38,68,18
|
||||
LTEXT "Insert MemPak",IDC_STATIC,7,59,68,18
|
||||
LTEXT "Insert RumblePak",IDC_STATIC,7,80,68,18
|
||||
LTEXT "Insert TransferPak",IDC_STATIC,7,101,68,18
|
||||
LTEXT "Direct AdaptoidPak",IDC_STATIC,7,122,68,18
|
||||
LTEXT "MemP <-> RumbleP",IDC_STATIC,7,143,68,18
|
||||
LTEXT "MemP <-> AdaptoidP",IDC_STATIC,7,164,68,18
|
||||
GROUPBOX "Player 1",IDC_STATIC,80,25,70,160
|
||||
PUSHBUTTON "PLACEHOLDER",IDC_SETNOPAK_P1,83,38,63,18,BS_MULTILINE
|
||||
PUSHBUTTON "PLACEHOLDER",IDC_SETMEMPAK_P1,83,59,63,18,BS_MULTILINE
|
||||
PUSHBUTTON "PLACEHOLDER",IDC_SETRUMBLEPAK_P1,83,80,63,18,BS_MULTILINE
|
||||
PUSHBUTTON "PLACEHOLDER",IDC_SETTRANSFERPAK_P1,83,101,63,18,BS_MULTILINE
|
||||
PUSHBUTTON "PLACEHOLDER",IDC_SETADAPTOIDPAK_P1,83,122,63,18,BS_MULTILINE
|
||||
PUSHBUTTON "PLACEHOLDER",IDC_SWMEMRUMBLE_P1,83,143,63,18,BS_MULTILINE
|
||||
PUSHBUTTON "PLACEHOLDER",IDC_SWMEMADAPTOID_P1,83,164,63,18,BS_MULTILINE
|
||||
GROUPBOX "Player 2",IDC_STATIC,153,25,70,160
|
||||
PUSHBUTTON "PLACEHOLDER",IDC_SETNOPAK_P2,157,38,62,18,BS_MULTILINE
|
||||
PUSHBUTTON "PLACEHOLDER",IDC_SETMEMPAK_P2,157,59,62,18,BS_MULTILINE
|
||||
PUSHBUTTON "PLACEHOLDER",IDC_SETRUMBLEPAK_P2,157,80,62,18,BS_MULTILINE
|
||||
PUSHBUTTON "PLACEHOLDER",IDC_SETTRANSFERPAK_P2,157,101,62,18,BS_MULTILINE
|
||||
PUSHBUTTON "PLACEHOLDER",IDC_SETADAPTOIDPAK_P2,157,122,62,18,BS_MULTILINE
|
||||
PUSHBUTTON "PLACEHOLDER",IDC_SWMEMRUMBLE_P2,157,143,62,18,BS_MULTILINE
|
||||
PUSHBUTTON "PLACEHOLDER",IDC_SWMEMADAPTOID_P2,157,164,62,18,BS_MULTILINE
|
||||
GROUPBOX "Player 3",IDC_STATIC,226,25,70,160
|
||||
PUSHBUTTON "PLACEHOLDER",IDC_SETNOPAK_P3,229,38,63,18,BS_MULTILINE
|
||||
PUSHBUTTON "PLACEHOLDER",IDC_SETMEMPAK_P3,229,59,63,18,BS_MULTILINE
|
||||
PUSHBUTTON "PLACEHOLDER",IDC_SETRUMBLEPAK_P3,229,80,63,18,BS_MULTILINE
|
||||
PUSHBUTTON "PLACEHOLDER",IDC_SETTRANSFERPAK_P3,229,101,63,18,BS_MULTILINE
|
||||
PUSHBUTTON "PLACEHOLDER",IDC_SETADAPTOIDPAK_P3,229,122,63,18,BS_MULTILINE
|
||||
PUSHBUTTON "PLACEHOLDER",IDC_SWMEMRUMBLE_P3,229,143,63,18,BS_MULTILINE
|
||||
PUSHBUTTON "PLACEHOLDER",IDC_SWMEMADAPTOID_P3,229,164,63,18,BS_MULTILINE
|
||||
GROUPBOX "Player 4",IDC_STATIC,299,25,70,160
|
||||
PUSHBUTTON "PLACEHOLDER",IDC_SETNOPAK_P4,303,38,62,18,BS_MULTILINE
|
||||
PUSHBUTTON "PLACEHOLDER",IDC_SETMEMPAK_P4,303,59,62,18,BS_MULTILINE
|
||||
PUSHBUTTON "PLACEHOLDER",IDC_SETRUMBLEPAK_P4,303,80,62,18,BS_MULTILINE
|
||||
PUSHBUTTON "PLACEHOLDER",IDC_SETTRANSFERPAK_P4,303,101,62,18,BS_MULTILINE
|
||||
PUSHBUTTON "PLACEHOLDER",IDC_SETADAPTOIDPAK_P4,303,122,62,18,BS_MULTILINE
|
||||
PUSHBUTTON "PLACEHOLDER",IDC_SWMEMRUMBLE_P4,303,143,62,18,BS_MULTILINE
|
||||
PUSHBUTTON "PLACEHOLDER",IDC_SWMEMADAPTOID_P4,303,164,62,18,BS_MULTILINE
|
||||
LTEXT "Lock/Unlock Mouse",IDC_STATIC,7,195,68,18,NOT WS_GROUP
|
||||
PUSHBUTTON "PLACEHOLDER",IDC_LOCKMOUSE,83,195,63,18,BS_MULTILINE
|
||||
CONTROL "Show messages",IDC_SHOWMESSAGES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,256,195,109,11
|
||||
END
|
||||
|
||||
IDD_CONTROLS DIALOGEX 0, 0, 370, 180
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
GROUPBOX "Digital Pad",IDC_STATIC,7,7,175,62
|
||||
PUSHBUTTON "Up",IDC_DUP,13,21,24,10,BS_NOTIFY | WS_GROUP
|
||||
PUSHBUTTON "Left",IDC_DLEFT,13,32,24,10,BS_NOTIFY
|
||||
PUSHBUTTON "Right",IDC_DRIGHT,13,43,24,10,BS_NOTIFY
|
||||
PUSHBUTTON "Down",IDC_DDOWN,13,54,24,10,BS_NOTIFY
|
||||
CTEXT "PLACEHOLDER",IDT_DUP,39,21,137,10,SS_CENTERIMAGE,WS_EX_STATICEDGE
|
||||
CTEXT "PLACEHOLDER",IDT_DLEFT,39,32,137,10,SS_CENTERIMAGE,WS_EX_STATICEDGE
|
||||
CTEXT "PLACEHOLDER",IDT_DRIGHT,39,43,137,10,SS_CENTERIMAGE,WS_EX_STATICEDGE
|
||||
CTEXT "PLACEHOLDER",IDT_DDOWN,39,54,137,10,SS_CENTERIMAGE,WS_EX_STATICEDGE
|
||||
GROUPBOX "Buttons",IDC_STATIC,7,70,175,97
|
||||
PUSHBUTTON "Start",IDC_SBUTTON,14,82,24,10,BS_NOTIFY | WS_GROUP
|
||||
PUSHBUTTON "A",IDC_ABUTTON,14,93,24,10,BS_NOTIFY
|
||||
PUSHBUTTON "B",IDC_BBUTTON,14,104,24,10,BS_NOTIFY
|
||||
PUSHBUTTON "L-Trig",IDC_LEFTTRIGGER,14,115,24,10,BS_NOTIFY
|
||||
PUSHBUTTON "R-Trig",IDC_RIGHTTRIGGER,14,126,24,10,BS_NOTIFY
|
||||
PUSHBUTTON "Z-Trig",IDC_ZTRIGGER,14,137,24,10,BS_NOTIFY
|
||||
CTEXT "PLACEHOLDER",IDT_SBUTTON,39,82,137,10,SS_CENTERIMAGE,WS_EX_STATICEDGE
|
||||
CTEXT "PLACEHOLDER",IDT_ABUTTON,39,93,137,10,SS_CENTERIMAGE,WS_EX_STATICEDGE
|
||||
CTEXT "PLACEHOLDER",IDT_BBUTTON,39,104,137,10,SS_CENTERIMAGE,WS_EX_STATICEDGE
|
||||
CTEXT "PLACEHOLDER",IDT_LEFTTRIGGER,39,115,137,10,SS_CENTERIMAGE,WS_EX_STATICEDGE
|
||||
CTEXT "PLACEHOLDER",IDT_RIGHTTRIGGER,39,126,137,10,SS_CENTERIMAGE,WS_EX_STATICEDGE
|
||||
CTEXT "PLACEHOLDER",IDT_ZTRIGGER,39,137,137,10,SS_CENTERIMAGE,WS_EX_STATICEDGE
|
||||
CONTROL "Rapid Fire",IDC_RAPIDFIREENABLE,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,14,150,47,12
|
||||
CONTROL "PLACEHOLDER",IDC_RAPIDFIRERATE,"msctls_trackbar32",TBS_AUTOTICKS | WS_GROUP | WS_TABSTOP,61,150,115,12
|
||||
GROUPBOX "C Buttons",IDC_STATIC,188,7,175,62
|
||||
PUSHBUTTON "Up",IDC_CUP,193,21,24,10,BS_NOTIFY | WS_GROUP
|
||||
PUSHBUTTON "Left",IDC_CLEFT,193,32,24,10,BS_NOTIFY
|
||||
PUSHBUTTON "Right",IDC_CRIGHT,193,43,24,10,BS_NOTIFY
|
||||
PUSHBUTTON "Down",IDC_CDOWN,193,54,24,10,BS_NOTIFY
|
||||
CTEXT "PLACEHOLDER",IDT_CUP,219,21,137,10,SS_CENTERIMAGE,WS_EX_STATICEDGE
|
||||
CTEXT "PLACEHOLDER",IDT_CLEFT,219,32,137,10,SS_CENTERIMAGE | NOT WS_GROUP,WS_EX_STATICEDGE
|
||||
CTEXT "PLACEHOLDER",IDT_CRIGHT,219,43,137,10,SS_CENTERIMAGE | NOT WS_GROUP,WS_EX_STATICEDGE
|
||||
CTEXT "PLACEHOLDER",IDT_CDOWN,219,54,137,10,SS_CENTERIMAGE | NOT WS_GROUP,WS_EX_STATICEDGE
|
||||
GROUPBOX "Analog Stick",IDC_STATIC,188,70,175,97
|
||||
CTEXT "R PLACEHOLDER",IDT_RANGE,194,81,110,8
|
||||
CONTROL "PLACEHOLDER",IDC_CTRRANGE,"msctls_trackbar32",TBS_AUTOTICKS | WS_GROUP | WS_TABSTOP,194,89,113,11
|
||||
CONTROL "Real N64 Range",IDC_N64RANGE,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_GROUP | WS_TABSTOP,312,82,44,19
|
||||
CONTROL "Config 1",IDC_CONFIG1,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,194,103,42,10
|
||||
CONTROL "Config 2",IDC_CONFIG2,"Button",BS_AUTORADIOBUTTON,254,103,42,10
|
||||
PUSHBUTTON "Up",IDC_AUP,194,119,24,10,BS_NOTIFY | WS_GROUP
|
||||
PUSHBUTTON "Left",IDC_ALEFT,194,130,24,10,BS_NOTIFY
|
||||
PUSHBUTTON "Right",IDC_ARIGHT,194,141,24,10,BS_NOTIFY
|
||||
PUSHBUTTON "Down",IDC_ADOWN,194,152,24,10,BS_NOTIFY
|
||||
CTEXT "PLACEHOLDER",IDT_AUP,219,119,137,10,SS_CENTERIMAGE,WS_EX_STATICEDGE
|
||||
CTEXT "PLACEHOLDER",IDT_ALEFT,219,130,137,10,SS_CENTERIMAGE | NOT WS_GROUP,WS_EX_STATICEDGE
|
||||
CTEXT "PLACEHOLDER",IDT_ARIGHT,219,141,137,10,SS_CENTERIMAGE | NOT WS_GROUP,WS_EX_STATICEDGE
|
||||
CTEXT "PLACEHOLDER",IDT_ADOWN,219,152,137,10,SS_CENTERIMAGE | NOT WS_GROUP,WS_EX_STATICEDGE
|
||||
END
|
||||
|
||||
IDD_CONTROLLERPAK DIALOGEX 0, 0, 370, 180
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
CONTROL "RawData",IDC_RAWMODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,6,46,12
|
||||
COMBOBOX IDC_PAKTYPE,70,6,109,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
CTEXT "PLACEHOLDER",IDC_PAKAREA,7,25,356,148
|
||||
END
|
||||
|
||||
IDD_MODIFIER DIALOGEX 0, 0, 370, 180
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
PUSHBUTTON "New Modifier",IDC_NEWMODIFIER,7,7,54,14,WS_GROUP
|
||||
PUSHBUTTON "Delete Modifier",IDC_KILLMODIFIER,69,7,54,14
|
||||
CONTROL "PLACEHOLDER",IDC_MODIFIERLIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,7,27,183,146
|
||||
GROUPBOX "Adjust Modifier",IDC_STATIC,197,7,166,166
|
||||
PUSHBUTTON "Assign Mod",IDC_ASSIGNMOD,203,20,42,11
|
||||
LTEXT "B",IDT_ASSIGNMOD,245,20,111,11,SS_SUNKEN
|
||||
CTEXT "Mod Type",IDT_MODTYP,203,35,42,12,SS_CENTERIMAGE
|
||||
COMBOBOX IDC_MODTYP,245,35,57,98,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "Toggle",IDC_TOGGLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,305,35,36,12
|
||||
CONTROL "",IDC_STATE,"Button",BS_AUTOCHECKBOX | BS_FLAT | WS_TABSTOP,345,35,10,12
|
||||
LTEXT "Prop modifier PLACEHOLDER",IDC_PROPWINDOW,203,52,153,99,NOT WS_VISIBLE | WS_TABSTOP
|
||||
PUSHBUTTON "Apply Changes",IDC_APPCHANGES,205,157,73,11
|
||||
PUSHBUTTON "Reset",IDC_RESET,311,157,45,11
|
||||
END
|
||||
|
||||
IDD_PAK_MEMPAK DIALOGEX 0, 0, 356, 148
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
GROUPBOX "Current MemPak Directory",IDC_STATIC,0,0,151,148
|
||||
PUSHBUTTON "Change MemPak Directory",IDC_CHGDIR,8,12,135,11,WS_GROUP
|
||||
LISTBOX IDC_MEMPAKLIST,8,29,135,91,LBS_SORT | LBS_NOINTEGRALHEIGHT | NOT WS_BORDER | WS_VSCROLL | WS_GROUP | WS_TABSTOP,WS_EX_CLIENTEDGE
|
||||
PUSHBUTTON "New MemPak / Browse",IDC_BROWSE,8,123,54,20,BS_MULTILINE | WS_GROUP
|
||||
PUSHBUTTON "Delete MemPak",IDC_DELMEMPAK,99,123,44,20,BS_MULTILINE
|
||||
GROUPBOX "MemPak Content",IDC_STATIC,158,0,198,148
|
||||
PUSHBUTTON "Format MemPak",IDC_FORMATMEMPAK,167,11,35,18,BS_MULTILINE | WS_GROUP
|
||||
PUSHBUTTON "Save Note",IDC_SAVENOTE,215,11,35,18,BS_MULTILINE
|
||||
PUSHBUTTON "Insert Note",IDC_INSERTNOTE,263,11,35,18,BS_MULTILINE
|
||||
PUSHBUTTON "Delete Note",IDC_DELETENOTE,311,11,35,18,BS_MULTILINE
|
||||
CONTROL "PLACEHOLDER",IDC_MEMPAKBROWSER,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | LVS_NOLABELWRAP | LVS_NOSORTHEADER | WS_GROUP | WS_TABSTOP,166,29,181,91,WS_EX_CLIENTEDGE
|
||||
CTEXT "Static",IDT_MEMPAKSTATE,166,120,181,20,NOT WS_GROUP,WS_EX_CLIENTEDGE
|
||||
END
|
||||
|
||||
IDD_PAK_TRANSFER DIALOGEX 0, 0, 356, 148
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
PUSHBUTTON "Change GB-Directories",IDC_CHGDIR,0,0,94,11,WS_GROUP
|
||||
GROUPBOX "GB Rom File",IDC_STATIC,0,18,355,63
|
||||
EDITTEXT IDC_GBROM_EDIT,8,44,291,12,ES_AUTOHSCROLL
|
||||
PUSHBUTTON "Browse",IDC_GBROM_BROWSE,309,43,39,14,BS_MULTILINE
|
||||
GROUPBOX "GB Rom Save",IDC_STATIC,0,86,355,62
|
||||
EDITTEXT IDC_GBSAVE_EDIT,8,111,291,12,ES_AUTOHSCROLL
|
||||
PUSHBUTTON "Browse",IDC_GBSAVE_BROWSE,309,110,39,14,BS_MULTILINE
|
||||
END
|
||||
|
||||
IDD_PAK_ADAPTOID DIALOGEX 0, 0, 356, 148
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
CTEXT "Adaptoid Pak will communicate directly with any Pak you insert into the Controller. ",IDT_PAKDESC,95,34,165,19
|
||||
LTEXT "If you want to use regular DirectInput force-feedback, choose RumblePak instead.",IDC_STATIC,95,90,165,22
|
||||
END
|
||||
|
||||
IDD_DEVICES DIALOGEX 0, 0, 370, 180
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x0
|
||||
BEGIN
|
||||
GROUPBOX "Mouse",IDC_STATIC,7,7,171,85
|
||||
LTEXT "MSX PLACEHOLDER",IDT_MSSENSITIVITY_X,16,18,153,8,NOT WS_GROUP
|
||||
CONTROL "Slider3",IDC_MSSENSITIVITY_X,"msctls_trackbar32",WS_GROUP | WS_TABSTOP,16,26,153,11
|
||||
CONTROL "Deadpan",IDC_DEADPANMOUSEX,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,32,39,45,10
|
||||
CONTROL "Buffered",IDC_BUFFEREDMOUSEX,"Button",BS_AUTORADIOBUTTON,80,39,43,10
|
||||
CONTROL "Absolute",IDC_ABSOLUTEMOUSEX,"Button",BS_AUTORADIOBUTTON,126,39,43,10
|
||||
LTEXT "MSY PLACEHOLDER",IDT_MSSENSITIVITY_Y,16,56,153,8,NOT WS_GROUP
|
||||
CONTROL "",IDC_MSSENSITIVITY_Y,"msctls_trackbar32",WS_TABSTOP,16,65,153,11
|
||||
CONTROL "Deadpan",IDC_DEADPANMOUSEY,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,32,78,45,10
|
||||
CONTROL "Buffered",IDC_BUFFEREDMOUSEY,"Button",BS_AUTORADIOBUTTON,80,78,43,10
|
||||
CONTROL "Absolute",IDC_ABSOLUTEMOUSEY,"Button",BS_AUTORADIOBUTTON,126,78,43,10
|
||||
GROUPBOX "Keyboard",IDC_STATIC,7,96,171,27
|
||||
CONTROL "Absolute X",IDC_ACCELERATEX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,107,50,10
|
||||
CONTROL "Absolute Y",IDC_ACCELERATEY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,92,107,50,10
|
||||
GROUPBOX "GamePad",IDC_STATIC,7,124,171,38
|
||||
CTEXT "Deadzone PLACEHOLDER",IDT_DEADZONE,16,134,153,8
|
||||
CONTROL "PLACEHOLDER",IDC_DEADZONE,"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP,16,144,153,11
|
||||
END
|
||||
|
||||
IDD_PAK_TEXT DIALOGEX 0, 0, 356, 148
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
CTEXT "PLACEHOLDER",IDT_PAKDESC,56,45,243,57
|
||||
END
|
||||
|
||||
IDD_MOD_MOVE DIALOGEX 0, 0, 153, 99
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
GROUPBOX "X-Axis",IDC_STATIC,0,4,153,40
|
||||
LTEXT "MOV_PLACEHOLDER",IDT_XMODIFIER,8,15,89,8
|
||||
CONTROL "Invert",IDC_XNEGATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,110,15,34,10
|
||||
CONTROL "PLACEHOLDER",IDC_XMODIFIER,"msctls_trackbar32",WS_TABSTOP,8,26,136,12
|
||||
GROUPBOX "Y-Axis",IDC_STATIC,0,53,153,40
|
||||
LTEXT "MOV_PLACEHOLDER",IDT_YMODIFIER,8,64,89,8
|
||||
CONTROL "Invert",IDC_YNEGATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,110,64,34,10
|
||||
CONTROL "PLACEHOLDER",IDC_YMODIFIER,"msctls_trackbar32",WS_TABSTOP,8,75,136,12
|
||||
END
|
||||
|
||||
IDD_FOLDERS DIALOGEX 50, 50, 295, 206
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
GROUPBOX "MemPak Directory",IDC_MEMPAKPANEL,7,7,281,49
|
||||
CONTROL "$AppPath\\",IDC_MEMPAK_REL,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,13,19,54,12
|
||||
CONTROL "",IDC_MEMPAK_ABS,"Button",BS_AUTORADIOBUTTON,13,36,16,12
|
||||
EDITTEXT IDC_MEMPAK_REL_EDIT,67,19,199,12,ES_AUTOHSCROLL | WS_GROUP
|
||||
PUSHBUTTON "...",IDC_MEMPAK_BROWSE_REL,269,19,11,12
|
||||
EDITTEXT IDC_MEMPAK_ABS_EDIT,30,36,236,12,ES_AUTOHSCROLL | WS_GROUP
|
||||
PUSHBUTTON "...",IDC_MEMPAK_BROWSE_ABS,269,36,11,12
|
||||
GROUPBOX "GameBoy Rom Directory",IDC_GBROMPANEL,7,60,281,49
|
||||
CONTROL "$AppPath\\",IDC_GBROM_REL,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,13,73,54,12
|
||||
CONTROL "",IDC_GBROM_ABS,"Button",BS_AUTORADIOBUTTON,13,90,16,12
|
||||
EDITTEXT IDC_GBROM_REL_EDIT,67,73,199,12,ES_AUTOHSCROLL | WS_GROUP
|
||||
PUSHBUTTON "...",IDC_GBROM_BROWSE_REL,269,73,11,12
|
||||
EDITTEXT IDC_GBROM_ABS_EDIT,30,90,236,12,ES_AUTOHSCROLL | WS_GROUP
|
||||
PUSHBUTTON "...",IDC_GBROM_BROWSE_ABS,269,90,11,12
|
||||
GROUPBOX "GameBoy Save Directory",IDC_GBSAVEPANEL,7,114,281,67
|
||||
CONTROL "Same Directory as GameBoy Roms",IDC_GBSAVE_SAME,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,13,127,128,12
|
||||
CONTROL "$AppPath\\",IDC_GBSAVE_REL,"Button",BS_AUTORADIOBUTTON,13,144,54,12
|
||||
CONTROL "",IDC_GBSAVE_ABS,"Button",BS_AUTORADIOBUTTON,13,161,16,12
|
||||
EDITTEXT IDC_GBSAVE_REL_EDIT,67,144,199,12,ES_AUTOHSCROLL | WS_GROUP
|
||||
PUSHBUTTON "...",IDC_GBSAVE_BROWSE_REL,269,144,11,12
|
||||
EDITTEXT IDC_GBSAVE_ABS_EDIT,30,161,236,12,ES_AUTOHSCROLL | WS_GROUP
|
||||
PUSHBUTTON "...",IDC_GBSAVE_BROWSE_ABS,269,161,11,12
|
||||
DEFPUSHBUTTON "OK",IDOK,181,185,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,238,185,50,14
|
||||
END
|
||||
|
||||
IDD_MOD_MACRO DIALOGEX 0, 0, 153, 98
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
CONTROL "L-Trigger",IDC_LTRIG,"Button",BS_AUTOCHECKBOX | BS_FLAT | WS_TABSTOP,15,3,45,10
|
||||
CONTROL "",IDC_ZTRIG,"Button",BS_AUTOCHECKBOX | BS_FLAT | WS_TABSTOP,71,5,16,8
|
||||
CONTROL "R-Trigger",IDC_RTRIG,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | BS_FLAT | WS_TABSTOP,91,3,45,10
|
||||
GROUPBOX "D-Pad",IDC_STATIC,15,14,40,41
|
||||
CONTROL "",IDC_DUP,"Button",BS_AUTOCHECKBOX | BS_FLAT | WS_TABSTOP,31,27,9,8
|
||||
CONTROL "",IDC_DLEFT,"Button",BS_AUTOCHECKBOX | BS_FLAT | WS_TABSTOP,21,35,9,8
|
||||
CONTROL "",IDC_DRIGHT,"Button",BS_AUTOCHECKBOX | BS_FLAT | WS_TABSTOP,41,35,9,8
|
||||
CONTROL "",IDC_DDOWN,"Button",BS_AUTOCHECKBOX | BS_FLAT | WS_TABSTOP,31,43,9,8
|
||||
CTEXT "Z-Trigger",IDC_STATIC,56,14,38,10
|
||||
CONTROL "Start",IDC_SBUTTON,"Button",BS_AUTOCHECKBOX | BS_FLAT | WS_TABSTOP,60,28,31,10
|
||||
GROUPBOX "Analog",IDC_STATIC,55,38,40,41
|
||||
CONTROL "",IDC_AUP,"Button",BS_AUTOCHECKBOX | BS_FLAT | WS_TABSTOP,71,51,9,8
|
||||
CONTROL "",IDC_ALEFT,"Button",BS_AUTOCHECKBOX | BS_FLAT | WS_TABSTOP,61,59,9,8
|
||||
CONTROL "",IDC_ARIGHT,"Button",BS_AUTOCHECKBOX | BS_FLAT | WS_TABSTOP,81,59,9,8
|
||||
CONTROL "",IDC_ADOWN,"Button",BS_AUTOCHECKBOX | BS_FLAT | WS_TABSTOP,71,67,9,8
|
||||
GROUPBOX "C-Buttons",IDC_STATIC,95,14,40,41
|
||||
CONTROL "",IDC_CUP,"Button",BS_AUTOCHECKBOX | BS_FLAT | WS_TABSTOP,111,27,9,8
|
||||
CONTROL "",IDC_CLEFT,"Button",BS_AUTOCHECKBOX | BS_FLAT | WS_TABSTOP,101,35,9,8
|
||||
CONTROL "",IDC_CRIGHT,"Button",BS_AUTOCHECKBOX | BS_FLAT | WS_TABSTOP,121,35,9,8
|
||||
CONTROL "",IDC_CDOWN,"Button",BS_AUTOCHECKBOX | BS_FLAT | WS_TABSTOP,111,43,9,8
|
||||
CONTROL "B",IDC_BBUTTON,"Button",BS_AUTOCHECKBOX | BS_FLAT | WS_TABSTOP,101,59,21,10
|
||||
CONTROL "A",IDC_ABUTTON,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | BS_FLAT | WS_TABSTOP,101,70,21,10
|
||||
CONTROL "Rapid Fire",IDC_RAPIDFIREMODE,"Button",BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_MULTILINE | WS_TABSTOP,15,57,38,22
|
||||
CONTROL "Slow Rapid Fire (Paper Mario, etc..)",IDC_RAPIDFIREMODERATE,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,82,120,11
|
||||
END
|
||||
|
||||
IDD_MOD_CONFIG DIALOGEX 0, 0, 153, 99
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
GROUPBOX "Analog Stick",IDC_STATIC,0,0,153,37
|
||||
RADIOBUTTON "Config 1",IDC_CONFIG1,7,10,42,10,WS_GROUP | WS_TABSTOP
|
||||
RADIOBUTTON "Config 2",IDC_CONFIG2,55,10,42,10
|
||||
RADIOBUTTON "Cycle through Configurations",IDC_CONFIGCYCLE,7,22,106,10
|
||||
GROUPBOX "Mouse",IDC_STATIC,0,39,153,28
|
||||
CONTROL "Switch X-Mode",IDC_MOUSEX,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,7,50,64,10
|
||||
CONTROL "Switch Y-Mode",IDC_MOUSEY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,81,50,64,10
|
||||
GROUPBOX "Keyboard",IDC_STATIC,0,71,153,28
|
||||
CONTROL "Switch X-Mode",IDC_KEYX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,82,64,10
|
||||
CONTROL "Switch Y-Mode",IDC_KEYY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,81,82,64,10
|
||||
END
|
||||
|
||||
#if defined(APSTUDIO_INVOKED) || defined(_DEBUG)
|
||||
#if defined(APSTUDIO_INVOKED)
|
||||
IDD_MAINCFGDIALOG$(_DEBUG) DIALOGEX 0, 0, 396, 351
|
||||
#else
|
||||
IDD_MAINCFGDIALOG DIALOGEX 0, 0, 396, 351
|
||||
#endif
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "N-Rage Input V2 - Configuration"
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
LTEXT "RomID:",IDC_ROMID,6,7,66,8,NOT WS_GROUP
|
||||
LTEXT "Description:",-1,82,7,38,8,NOT WS_GROUP
|
||||
EDITTEXT IDC_ROMDESC,138,7,121,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP
|
||||
RTEXT "VERSION PLACEHOLDER",IDC_VERSIONSTRING,274,7,115,10,SS_CENTERIMAGE
|
||||
COMBOBOX IDC_LANGUAGE,6,25,125,30,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "PLACEHOLDER",IDC_UPPERTAB,"SysTabControl32",WS_GROUP | WS_TABSTOP,6,93,383,251
|
||||
PUSHBUTTON "Save",IDSAVE,339,36,50,14,WS_GROUP
|
||||
PUSHBUTTON "Use",IDUSE,339,55,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,339,73,50,14
|
||||
END
|
||||
#endif
|
||||
|
||||
IDD_PAK_RUMBLE DIALOGEX 0, 0, 356, 148
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
LTEXT "Force-Feedback Device",IDC_STATIC,22,18,124,8,NOT WS_GROUP
|
||||
COMBOBOX IDC_CTRDEVICE,27,29,127,119,CBS_DROPDOWNLIST | WS_VSCROLL | WS_GROUP | WS_TABSTOP
|
||||
CONTROL "Constant Force",IDC_RUMBLE1,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,29,58,64,10
|
||||
CONTROL "Ramp Force",IDC_RUMBLE2,"Button",BS_AUTORADIOBUTTON,29,70,55,10
|
||||
CONTROL "Direct Rumble",IDC_RUMBLE3,"Button",BS_AUTORADIOBUTTON,29,82,61,10
|
||||
CONTROL "Visual Rumble",IDC_VISUALRUMBLE,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,99,58,61,10
|
||||
CTEXT "Rumble Strength PLACEHOLDER",IDT_RUMBLESTRENGTH,29,100,127,8,NOT WS_GROUP
|
||||
CONTROL "",IDC_RUMBLESTRENGTH,"msctls_trackbar32",TBS_AUTOTICKS | WS_GROUP | WS_TABSTOP,29,112,127,11
|
||||
PUSHBUTTON "Test Rumble",IDC_RUMBLETEST,221,59,73,28,WS_DISABLED | WS_GROUP
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 2,3,0,2
|
||||
PRODUCTVERSION 2,3,0,2
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x40004L
|
||||
FILETYPE 0x2L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "000004b0"
|
||||
BEGIN
|
||||
VALUE "Comments", "Release Version"
|
||||
VALUE "FileDescription", "Zilmar Spec Plugin for N64 Emulators"
|
||||
VALUE "FileVersion", "2.3c"
|
||||
VALUE "InternalName", "NRage_Input_V2"
|
||||
VALUE "LegalCopyright", "Copyright © 2001-2011 N-Rage, compiled under GPL licensing"
|
||||
VALUE "OriginalFilename", "NRage_Input_V2.dll"
|
||||
VALUE "ProductName", "NRage_Input_V2"
|
||||
VALUE "ProductVersion", "2.3c"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x0, 1200
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// PROFILE
|
||||
//
|
||||
|
||||
IDR_PROFILE_DEFAULT1 PROFILE "configs\\Controller1.cpf"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// SHORTCUT
|
||||
//
|
||||
|
||||
IDR_SHORTCUTS_DEFAULT SHORTCUT "configs\\Shortcuts.sc"
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// String Table
|
||||
//
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_ERR_DINOTFOUND "dinput8.dll could not be found.\nPlease reinstall the latest version of DirectX."
|
||||
IDS_ERR_DICREATE "Could not create DirectInput object."
|
||||
IDS_DLG_MPCHOOSE "Choose a MemPak or type a new name to create one."
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_ERR_MPREAD "Couldn't read MemPak."
|
||||
IDS_ERR_GBROM "Can't open GB ROM file!"
|
||||
IDS_ERR_GBSRAMERR "Can't open SRAM file!\nContinuing with null savedata."
|
||||
IDS_VERSTRING "Version %s"
|
||||
IDS_TAB_CONTROLLER "Controller %i"
|
||||
IDS_TAB_SHORTCUTS "Shortcuts"
|
||||
IDS_TAB_CONTROLS "Controls"
|
||||
IDS_TAB_DEVICES "Devices"
|
||||
IDS_TAB_MODIFIERS "Modifiers"
|
||||
IDS_TAB_CONTROLLERPAK "Controller Pak"
|
||||
IDS_DLG_CLEAR "The current controller configuration will be discarded.\nAre you sure?"
|
||||
IDS_DLG_CLEAR_TITLE "Clear Controller"
|
||||
IDS_DLG_CONTROLRESTORE "The default controller configuration will be restored.\nAre you sure?"
|
||||
IDS_DLG_CONTROLRESTORE_TITLE "Restore Default"
|
||||
IDS_ERR_PROFWRITE "Couldn't write profile."
|
||||
IDS_ERR_PROFREAD "Couldn't read profile."
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_C_POLLING "...Awaiting Input %i..."
|
||||
IDS_C_RANGE "Range: %i%%"
|
||||
IDS_D_MSX "Mouse Sensitivity X: %i%%"
|
||||
IDS_D_MSY "Mouse Sensitivity Y: %i%%"
|
||||
IDS_D_DEADZONE "Deadzone: %i%%"
|
||||
IDS_D_RUMBLESTR "Rumble Strength: %i%%"
|
||||
IDS_M_MOVEVALUE "Movement Value: %i%%"
|
||||
IDS_M_TAB_NONE "None"
|
||||
IDS_M_TAB_MOVE "Move"
|
||||
IDS_M_TAB_MACRO "Macro"
|
||||
IDS_M_TAB_CONFIG "Config"
|
||||
IDS_M_MOUSE_PREFIX "Ms-"
|
||||
IDS_M_KB_PREFIX "Kb-"
|
||||
IDS_M_NONE "None"
|
||||
IDS_M_MOVE "Movement"
|
||||
IDS_M_MACRO "Macro"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_M_CONFIG "Configuration"
|
||||
IDS_M_ASSIGNED "Assigned to"
|
||||
IDS_M_TYPE "Type"
|
||||
IDS_M_PARAM "Parameter"
|
||||
IDS_P_NONE "None"
|
||||
IDS_P_MEMPAK "Mem Pak"
|
||||
IDS_P_RUMBLEPAK "Rumble Pak"
|
||||
IDS_P_TRANSFERPAK "Transfer Pak"
|
||||
IDS_P_VOICEPAK "Voice Pak"
|
||||
IDS_P_ADAPTOIDPAK "Adaptoid Pak"
|
||||
IDS_P_MEM_NORAW "The MemPak will be handled by the emulator."
|
||||
IDS_P_RUMBLE_NORAW "The RumblePak will be handled by the emulator.\n\nYou won't get force-feedback;\n the emulator may use its own method (i.e. visual), or it might do nothing at all."
|
||||
IDS_P_RUMBLE_RAW "You can choose different rumble types\n and adjust rumble strength in the Devices tab."
|
||||
IDS_P_TRANSFER_NORAW "The TransferPak will be handled by the emulator.\n\nWill very likely do nothing (no emulator can handle this yet)."
|
||||
IDS_P_VOICE_RAW "Isn't emulated by this plugin\n and likely won't ever be."
|
||||
IDS_P_ADAPTOID_NORAW "The AdaptoidPak needs RawMode to be activated."
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_P_NONE_RAWNORAW "No Pak inserted."
|
||||
IDS_P_MEM_NOCHANGE "Can't change dir while running."
|
||||
IDS_P_MEM_NAME "Name"
|
||||
IDS_P_MEM_REGION "Region"
|
||||
IDS_P_MEM_BLOCKS "Blocks"
|
||||
IDS_DLG_DELETEPAK "Do you really want to delete that MemPak?"
|
||||
IDS_DLG_FORMATPAK "Do you really want to format the MemPak?"
|
||||
IDS_DLG_DELETENOTE "Do you really want to delete this note?"
|
||||
IDS_P_MEM_BLOCKSFREE "%i blocks free."
|
||||
IDS_P_MEM_INUSE "%i blocks free.\nMemPak is currently in use by the emulator."
|
||||
IDS_P_MEM_WRONGSIZE "%i blocks free.\nMemPak has wrong filesize and may be damaged."
|
||||
IDS_P_MEM_NONESELECTED "No MemPak selected."
|
||||
IDS_P_MEM_DAMAGED "MemPak is damaged.\nFormat is necessary."
|
||||
IDS_BUTTON_UNASSIGNED "Unassigned"
|
||||
IDS_ERR_SHORTREAD "Couldn't read shortcuts file."
|
||||
IDS_DLG_SHORTCUTRESTORE "The shortcut configuration will be restored.\nAre you sure?"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_DLG_SHORTCUTRESTORE_TITLE "Restore default"
|
||||
IDS_C_GAMEPAD "Gamepad: "
|
||||
IDS_C_KEYBOARD "Keyboard: "
|
||||
IDS_C_MOUSE "Mouse: "
|
||||
IDS_C_XAXIS "X-axis"
|
||||
IDS_C_YAXIS "Y-axis"
|
||||
IDS_C_ZAXIS "Z-axis"
|
||||
IDS_C_XROT "X-rotation"
|
||||
IDS_C_YROT "Y-rotation"
|
||||
IDS_C_ZROT "Z-rotation"
|
||||
IDS_C_SLIDER "Slider %i"
|
||||
IDS_C_POV "PoV %i"
|
||||
IDS_C_BUTTON "Button "
|
||||
IDS_C_WHEEL "Wheel"
|
||||
IDS_C_UNKNOWN "???"
|
||||
IDS_DLG_ABOUT "Help us translate N-Rage Input V2 into your language!"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_DLG_ABOUT_TITLE "About N-Rage Input V2"
|
||||
IDS_ERR_NOINIT "Plugin didn't get initialized!"
|
||||
IDS_POP_MOUSEUNLOCKED "Mouse Unlocked"
|
||||
IDS_POP_MOUSELOCKED "Mouse Locked"
|
||||
IDS_POP_CHANGEPAK "Player %i:\nPak changed to %s"
|
||||
IDS_ERR_MAPVIEW "Couldn't MapViewOfFile"
|
||||
IDS_DLG_CPF "Controller Profile (*.cpf)\0*.cpf"
|
||||
IDS_DLG_MPKN64 "MemPak (*.mpk)\0*.mpk\0Dexdrive Save (*.n64)\0*.n64"
|
||||
IDS_DLG_A64 "MemPak Note (*.a64)\0*.a64"
|
||||
IDS_DLG_GBGBC "GameBoy ROM (*.gb;*.gbc)\0*.gb;*.gbc"
|
||||
IDS_DLG_SVSAV "GameBoy Save (*.sv;*.sav)\0*.sv;*.sav"
|
||||
IDS_ERR_HANDLER "%s\n\n Error description: "
|
||||
IDS_ERR_MEM_NOSPEC "No MemPak specified; please configure plugin."
|
||||
IDS_DLG_MEM_READONLY "Mempak %s opened with read-only access.\nAfter exiting the game, the MemPak will NOT be saved."
|
||||
IDS_ERR_MEMOPEN "Unable to read or create MemPak file %s ; please configure plugin."
|
||||
IDS_DLG_MEM_BADADDRESSCRC
|
||||
"Bad AddressCRC detected!\nThis usually indicates a bad ROM.\n\nIgnore it and continue?"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_P_MEM_NOREGION "None"
|
||||
IDS_P_MEM_BETA "Beta"
|
||||
IDS_P_MEM_NTSC "NTSC"
|
||||
IDS_P_MEM_GERMANY "Germany"
|
||||
IDS_P_MEM_USA "USA"
|
||||
IDS_P_MEM_FRANCE "France"
|
||||
IDS_P_MEM_ITALY "Italy"
|
||||
IDS_P_MEM_JAPAN "Japan"
|
||||
IDS_P_MEM_EUROPE "Europe"
|
||||
IDS_P_MEM_SPAIN "Spain"
|
||||
IDS_P_MEM_AUSTRALIA "Australia"
|
||||
IDS_P_MEM_PAL "PAL"
|
||||
IDS_P_MEM_UNKNOWNREGION "Unknown(%02X)"
|
||||
IDS_ERR_NOTEWRITE "Couldn't write note file."
|
||||
IDS_ERR_MEMPAK_SPACE "Not enough space on MemPak."
|
||||
IDS_ERR_MEMPAK_NONOTES "No free notes on MemPak (only 16 notes available per pak)."
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_ERR_NOTEEOF "Error reading note file: unexpected end of file or read error."
|
||||
IDS_ERR_NOTEREAD "Couldn't read note file."
|
||||
IDS_ERR_TITLE "N-Rage Input V2 Error"
|
||||
IDS_DLG_MSG_TITLE "N-Rage Input V2 Message"
|
||||
IDS_DLG_WARN_TITLE "N-Rage Input V2 Warning"
|
||||
IDS_PLUGIN_TITLE "N-Rage Input V2"
|
||||
IDS_ERR_MPCREATE "Couldn't create MemPak."
|
||||
IDS_DLG_SC "Shortcuts File (*.sc)\0*.sc"
|
||||
IDS_P_MEM_ERROR "ErrorCode %lu: "
|
||||
IDS_P_R_NODEVICE "None"
|
||||
IDS_P_TRANS_NOCHANGE "Can't change paks while running"
|
||||
IDS_DLG_TPAK_READONLY "SRAM opened with read-only access.\nAfter exiting the game, the SRAM will NOT be saved."
|
||||
IDS_P_SWITCHING "Switching paks..."
|
||||
END
|
||||
|
||||
#endif // Neutral resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Spanish (Chile) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ESL)
|
||||
LANGUAGE LANG_SPANISH, SUBLANG_SPANISH_CHILE
|
||||
#pragma code_page(1252)
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO
|
||||
BEGIN
|
||||
IDD_XCONTROLS, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 363
|
||||
VERTGUIDE, 14
|
||||
VERTGUIDE, 50
|
||||
VERTGUIDE, 56
|
||||
VERTGUIDE, 95
|
||||
VERTGUIDE, 101
|
||||
VERTGUIDE, 137
|
||||
VERTGUIDE, 143
|
||||
VERTGUIDE, 182
|
||||
VERTGUIDE, 188
|
||||
VERTGUIDE, 194
|
||||
VERTGUIDE, 256
|
||||
VERTGUIDE, 262
|
||||
VERTGUIDE, 356
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 173
|
||||
HORZGUIDE, 27
|
||||
HORZGUIDE, 35
|
||||
HORZGUIDE, 41
|
||||
HORZGUIDE, 53
|
||||
HORZGUIDE, 59
|
||||
HORZGUIDE, 71
|
||||
HORZGUIDE, 77
|
||||
HORZGUIDE, 88
|
||||
HORZGUIDE, 95
|
||||
HORZGUIDE, 107
|
||||
HORZGUIDE, 112
|
||||
HORZGUIDE, 124
|
||||
HORZGUIDE, 130
|
||||
HORZGUIDE, 142
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_XCONTROLS DIALOGEX 0, 0, 370, 180
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
LTEXT "XInput Controller (X360 Controllers) configuration",IDC_XINPUT_TITLE,7,7,160,8
|
||||
CTEXT "N64",IDC_STATIC,56,27,39,8
|
||||
CTEXT "A",IDC_STATIC,14,41,36,12,SS_CENTERIMAGE,WS_EX_CLIENTEDGE
|
||||
COMBOBOX IDC_XC_A,56,41,39,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
CTEXT "B",IDC_STATIC,14,59,36,12,SS_CENTERIMAGE,WS_EX_CLIENTEDGE
|
||||
COMBOBOX IDC_XC_B,56,59,39,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
CTEXT "X",IDC_STATIC,14,77,36,11,SS_CENTERIMAGE,WS_EX_CLIENTEDGE
|
||||
COMBOBOX IDC_XC_X,56,77,39,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
CTEXT "Y",IDC_STATIC,14,95,36,12,SS_CENTERIMAGE,WS_EX_CLIENTEDGE
|
||||
COMBOBOX IDC_XC_Y,56,95,39,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
CTEXT "Back",IDC_STATIC,14,112,36,12,SS_CENTERIMAGE,WS_EX_CLIENTEDGE
|
||||
COMBOBOX IDC_XC_BACK,56,112,39,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
CTEXT "Start",IDC_STATIC,14,130,36,12,SS_CENTERIMAGE,WS_EX_CLIENTEDGE
|
||||
COMBOBOX IDC_XC_START,56,130,39,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
CTEXT "LB",IDC_STATIC,101,41,36,12,SS_CENTERIMAGE,WS_EX_CLIENTEDGE
|
||||
COMBOBOX IDC_XC_LB,143,41,39,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
CTEXT "RB",IDC_STATIC,101,59,36,12,SS_CENTERIMAGE,WS_EX_CLIENTEDGE
|
||||
COMBOBOX IDC_XC_RB,143,59,39,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
CTEXT "XControl",IDC_STATIC,101,27,36,8
|
||||
CTEXT "N64",IDC_STATIC,143,27,39,8
|
||||
CTEXT "LThSB",IDC_STATIC,101,76,36,12,SS_CENTERIMAGE,WS_EX_CLIENTEDGE
|
||||
COMBOBOX IDC_XC_LTSB,143,77,39,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
CTEXT "RThSB",IDC_STATIC,101,94,36,12,SS_CENTERIMAGE,WS_EX_CLIENTEDGE
|
||||
COMBOBOX IDC_XC_RTSB,143,95,39,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
CTEXT "LT",IDC_STATIC,101,112,36,12,SS_CENTERIMAGE,WS_EX_CLIENTEDGE
|
||||
COMBOBOX IDC_XC_LT,143,112,39,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
CTEXT "RT",IDC_STATIC,101,130,36,12,SS_CENTERIMAGE,WS_EX_CLIENTEDGE
|
||||
COMBOBOX IDC_XC_RT,143,130,39,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
GROUPBOX "D-Pad and Thumbsticks configuration",IDC_STATIC,188,27,175,115
|
||||
CTEXT "Left Thumbstick",IDC_STATIC,194,65,62,12,SS_CENTERIMAGE,WS_EX_CLIENTEDGE
|
||||
CTEXT "Right Thumbstick",IDC_STATIC,194,89,62,12,SS_CENTERIMAGE,WS_EX_CLIENTEDGE
|
||||
CTEXT "D-Pad",IDC_STATIC,194,112,62,12,SS_CENTERIMAGE,WS_EX_CLIENTEDGE
|
||||
COMBOBOX IDC_XC_LTS,262,65,94,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDC_XC_RTS,262,88,94,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDC_XC_DPAD,262,112,94,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
CTEXT "XControl",IDC_STATIC,194,45,62,8
|
||||
CTEXT "N64",IDC_STATIC,262,45,94,8
|
||||
LTEXT "NOTE: LThSB and RThSB stands for Left/Right Thumbstick button respectively.",IDC_STATIC,14,155,349,18
|
||||
CTEXT "XControl",IDC_STATIC,14,27,36,8
|
||||
PUSHBUTTON "Save",IDC_XC_USE,306,159,50,14
|
||||
END
|
||||
|
||||
#endif // Spanish (Chile) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
|
@ -0,0 +1,275 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="NRage_Input_V2"
|
||||
ProjectGUID="{FD617E80-9E40-4138-85DA-B94633972E6A}"
|
||||
TargetFrameworkVersion="131072"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(SolutionDir)PropertySheets/Win32.Debug.vsprops"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""$(Root)Source\3rd Party\directx\include""
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="xinput.lib dinput8.lib dxguid.lib Comctl32.lib"
|
||||
OutputFile="$(Root)Plugin/Input/NRage_Input_V2_d.dll"
|
||||
AdditionalLibraryDirectories=""$(Root)Source\3rd Party\directx\lib""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(SolutionDir)PropertySheets/Win32.Release.vsprops"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""$(Root)Source\3rd Party\directx\include""
|
||||
UsePrecompiledHeader="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="xinput.lib dinput8.lib dxguid.lib Comctl32.lib"
|
||||
OutputFile="$(Root)Plugin/Input/NRage_Input_V2.dll"
|
||||
AdditionalLibraryDirectories=""$(Root)Source\3rd Party\directx\lib""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
>
|
||||
<File
|
||||
RelativePath="Debug.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="DirectInput.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="FileAccess.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="GBCart.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="Interface.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="International.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="NRagePluginV2.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="PakIO.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="XInputController.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="XInputController.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl"
|
||||
>
|
||||
<File
|
||||
RelativePath="commonIncludes.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="ControllerSpecs\Controller #1.0.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="ControllerSpecs\Controller #1.1.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="Debug.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="DirectInput.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="FileAccess.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="GBCart.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="Interface.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="International.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="NRagePluginV2.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\PakIO.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="resource.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="settings.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
>
|
||||
<File
|
||||
RelativePath="configs\Controller1.cpf"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="NRagePluginV2.rc"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="configs\Shortcuts.sc"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,173 @@
|
|||
/*
|
||||
N-Rage`s Dinput8 Plugin
|
||||
(C) 2002, 2006 Norbert Wladyka
|
||||
|
||||
Author`s Email: norbert.wladyka@chello.at
|
||||
Website: http://go.to/nrage
|
||||
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef _PAKIO_H_
|
||||
#define _PAKIO_H_
|
||||
|
||||
bool InitControllerPak( const int iControl );
|
||||
void SaveControllerPak( const int iControl );
|
||||
BYTE ReadControllerPak( const int iControl, LPBYTE Command );
|
||||
BYTE WriteControllerPak( const int iControl, LPBYTE Command );
|
||||
void CloseControllerPak( const int iControl );
|
||||
WORD ShowMemPakContent( const unsigned char * bMemPakBinary, HWND hListWindow );
|
||||
int TranslateNotesA( const unsigned char * bNote, LPSTR Text, const int iChars );
|
||||
int TranslateNotesW( const unsigned char * bNote, LPWSTR Text, const int iChars );
|
||||
void FormatMemPak( LPBYTE aMemPak );
|
||||
bool SaveNoteFileA( const unsigned char * aMemPak, const int iNote, LPCTSTR pszFileName );
|
||||
bool InsertNoteFile( LPBYTE aMemPak, LPCTSTR pszFileName );
|
||||
bool RemoveNote( LPBYTE aMemPak, const int iNote );
|
||||
|
||||
void TexttoHexA( LPCSTR szText, LPBYTE Data, const int nBytes );
|
||||
void HextoTextA( const unsigned char * Data, LPSTR szText, const int nBytes );
|
||||
|
||||
#ifdef _UNICODE
|
||||
#define TranslateNotes(x,y,z) TranslateNotesW(x,y,z)
|
||||
#define ReverseNotes(x,y,z) ReverseNotesW(x,y,z)
|
||||
#else
|
||||
#define TranslateNotes(x,y,z) TranslateNotesA(x,y,z)
|
||||
#define ReverseNotes(x,y,z) ReverseNotesA(x,y,z)
|
||||
#endif
|
||||
|
||||
|
||||
//************Raw Data***********//
|
||||
//byte 1 = number of bytes to send
|
||||
//byte 2 = number of bytes to recieve
|
||||
//byte 3 = Command Type
|
||||
|
||||
// get status
|
||||
#define RD_GETSTATUS 0x00
|
||||
// read button values
|
||||
#define RD_READKEYS 0x01
|
||||
// read from controllerpak
|
||||
#define RD_READPAK 0x02
|
||||
// write to controllerpack
|
||||
#define RD_WRITEPAK 0x03
|
||||
// reset controller
|
||||
#define RD_RESETCONTROLLER 0xff
|
||||
// read eeprom
|
||||
#define RD_READEEPROM 0x04
|
||||
// write eeprom
|
||||
#define RD_WRITEEPROM 0x05
|
||||
|
||||
// Codes for retrieving status
|
||||
// 0x010300 - A1B2C3FF
|
||||
|
||||
//A1
|
||||
// Default GamePad
|
||||
#define RD_ABSOLUTE 0x01
|
||||
#define RD_RELATIVE 0x02
|
||||
// Default GamePad
|
||||
#define RD_GAMEPAD 0x04
|
||||
|
||||
//B2
|
||||
#define RD_EEPROM 0x80
|
||||
#define RD_NOEEPROM 0x00
|
||||
|
||||
//C3
|
||||
// No Plugin in Controller
|
||||
#define RD_NOPLUGIN 0x00
|
||||
// Plugin in Controller (Mempack, RumblePack etc)
|
||||
#define RD_PLUGIN 0x01
|
||||
// Pak interface was uninitialized before the call
|
||||
#define RD_NOTINITIALIZED 0x02
|
||||
// Address of last Pak I/O was invalid
|
||||
#define RD_ADDRCRCERR 0x04
|
||||
// eeprom busy
|
||||
#define RD_EEPROMBUSY 0x80
|
||||
|
||||
// The Error values are as follows:
|
||||
// 0x01ER00 - ........
|
||||
|
||||
//ER
|
||||
// no error, operation successful.
|
||||
#define RD_OK 0x00
|
||||
// error, device not present for specified command.
|
||||
#define RD_ERROR 0x80
|
||||
// error, unable to send/recieve the number bytes for command type.
|
||||
#define RD_WRONGSIZE 0x40
|
||||
|
||||
// the address where rumble-commands are sent to
|
||||
// this is really 0xC01B but our addressing code truncates the last several bits.
|
||||
#define PAK_IO_RUMBLE 0xC000
|
||||
|
||||
// 32 KB mempak
|
||||
#define PAK_MEM_SIZE 32*1024
|
||||
#define PAK_MEM_DEXOFFSET 0x1040
|
||||
|
||||
// Pak Specific Data //
|
||||
// First BYTE always determines current Paktype
|
||||
// this can be different to the paktype in the Controller-structure.
|
||||
// that makes sure to corectly handle/close the pak.
|
||||
|
||||
//PAK_NONE
|
||||
//pPakData = NULL;
|
||||
|
||||
//PAK_MEM
|
||||
typedef struct _MEMPAK
|
||||
{
|
||||
BYTE bPakType; // set to PAK_MEM
|
||||
HANDLE hMemPakHandle; // a file mapping handle
|
||||
bool fDexSave; // true if .n64 file, false if .mpk file
|
||||
bool fReadonly; // set if we can't open mempak file in "write" mode
|
||||
LPBYTE aMemPakData; //[PAK_MEM_SIZE];
|
||||
BYTE aMemPakTemp[0x100]; // some extra on the top for "test" (temporary) data
|
||||
} MEMPAK, *LPMEMPAK;
|
||||
|
||||
//PAK_RUMBLE
|
||||
typedef struct _RUMBLEPAK
|
||||
{
|
||||
BYTE bPakType;
|
||||
// BYTE bRumbleTyp; // obsolete: use g_pcControllers[i].xyz instead --rabid
|
||||
// BYTE bRumbleStrength;
|
||||
// bool fVisualRumble;
|
||||
bool fLastData; // true if the last data sent to block 0x8000 was nonzero
|
||||
} RUMBLEPAK, *LPRUMBLEPAK;
|
||||
|
||||
#include "GBCart.h"
|
||||
//PAK_TRANSFER
|
||||
typedef struct _TRANSFERPAK
|
||||
{
|
||||
BYTE bPakType;
|
||||
int iCurrentBankNo;
|
||||
int iCurrentAccessMode;
|
||||
int iAccessModeChanged;
|
||||
bool iEnableState;
|
||||
bool bPakInserted;
|
||||
GBCART gbCart;
|
||||
} TRANSFERPAK, *LPTRANSFERPAK;
|
||||
|
||||
//PAK_VOICE
|
||||
typedef struct _VOICEPAK //not supported
|
||||
{
|
||||
BYTE bPakType;
|
||||
} VOICEPAK, *LPVOICEPAK;
|
||||
|
||||
//PAK_ADAPTOID
|
||||
typedef struct _ADAPTOIDPAK
|
||||
{
|
||||
BYTE bPakType;
|
||||
BYTE bIdentifier;
|
||||
bool fRumblePak;
|
||||
} ADAPTOIDPAK, *LPADAPTOIDPAK;
|
||||
|
||||
#endif // #ifndef _PAKIO_H_
|
|
@ -0,0 +1,210 @@
|
|||
RELEASE Version 2.3c
|
||||
|
||||
Disclaimer:
|
||||
This software is distributed as is, without any guarantees of
|
||||
merchantability or fitness for a particular purpose. Basically,
|
||||
you can't sue us if you screw up your own computer.
|
||||
This program is freeware released under the GPL. It's freely
|
||||
distributable, as long as you follow the GPL. You are free to modify it,
|
||||
but of course we ask that you tell us so we can incorporate bugfixes
|
||||
in the next version.
|
||||
Finally, don't try to earn money by distributing it.
|
||||
|
||||
What is it?
|
||||
This plugin is for use with an N64 emulator that supports input plugins
|
||||
through Zilmar's input spec.
|
||||
Some emulators that support it are: Project64, Apollo, 1964, TR64
|
||||
|
||||
Main Features
|
||||
Up to four N64 controllers supported
|
||||
Handles as many game controllers as you can plug in (you may have to tweak
|
||||
the compile options for huge numbers), plus 1 keyboard and 1 mouse.
|
||||
Full support of any controls you can see through DirectInput
|
||||
Emulation of MemPaks, Rumble Paks (via DirectInput Force Feedback),
|
||||
and Transfer Paks (except GB Tower in Pokemon Stadium games)
|
||||
Complete Adaptoid support
|
||||
Up to 256 Configurable "modifiers", in 3 different flavors
|
||||
System-independent controller profiles
|
||||
As released, this plugin is compatible with Zilmar's Input Plugin Specs 1.0
|
||||
and will work with all emulators that support this spec
|
||||
|
||||
Requirements:
|
||||
A computer with Windows & DirectX9.0 or higher installed.
|
||||
An emulator
|
||||
Some games wouldn't hurt
|
||||
You need the Microsoft Visual C++ 2010 SP1 Redistributable Package (x86)
|
||||
|
||||
Installation:
|
||||
Consult your emulator documentation as to where to place the DLL file
|
||||
(usually its the "plugins" folder or something similar)
|
||||
Choose the plugin from within the emulator; again, consult the documentation
|
||||
if you don't know how.
|
||||
If you have a language .dll, place it in the same directory as your emulator
|
||||
e.g. project64.exe
|
||||
|
||||
Thanks go out to
|
||||
Azimer for his help with MemPaks
|
||||
Zilmar & Jabo for their awesome Project64.
|
||||
Smiff, Bodie, Cyber, Hotshitu, Gannonboy, Harlay, squall_leonhart, Poobah, Legend
|
||||
for testing.
|
||||
MadManMark for adding Transferpaks
|
||||
RabidDeity for tweaks and additions
|
||||
aTomIC, Harlay, NaSeR, Siskoo for translations
|
||||
|
||||
|
||||
Known Issues:
|
||||
Old Profiles won't work, this is on purpose.
|
||||
GB Tower doesn't work in Pokemon Stadium games (not likely to be fixed; just use
|
||||
a GB emulator to play the games)
|
||||
No voice pak emulation (only one game supports it anyway)
|
||||
|
||||
For the latest SOURCE CODE please check out trunk from the Subversion server:
|
||||
https://nragev20.svn.sourceforge.net/svnroot/nragev20/trunk
|
||||
(you can also find some useful information in the docs directory)
|
||||
For now, you'll need a copy of Visual Studio... but we're working on a Makefile.
|
||||
|
||||
#---------------------------------------------------------------------#
|
||||
History:
|
||||
|
||||
+ means fixed/added
|
||||
/ means changed
|
||||
|
||||
Release 2.3c
|
||||
/Xinput Rumble and Deadzone fixed (Thanks KrossX)
|
||||
/Some potential crash and buffer overruns? fixed by kidkat
|
||||
/Some UI changes to improve readability for high dpi setups
|
||||
|
||||
Release 2.3b
|
||||
/Xinput config loading fixed
|
||||
+No longer crashes if an assigned device is removed or not present when starting emulation.
|
||||
/RC files saved from visual studio break the file lister, reverted and edited with notepad.
|
||||
|
||||
Release 2.2:
|
||||
+Resolved file browsers not displaying supported file types
|
||||
+Improved Xinput support by backporting changes from 1964input
|
||||
|
||||
Release 2.2 beta:
|
||||
+ Experimental Xinput support
|
||||
+ Fixes to GB Battery support
|
||||
|
||||
Release 2.1 rc3:
|
||||
+ The last of the shortcut bugs should be fixed. Switching paks should work
|
||||
just fine; the plugin now inserts a 1 second delay so that the game
|
||||
can detect the change properly.
|
||||
+ Message window no longer sucks CPU cycles
|
||||
|
||||
|
||||
Release 2.1 rc2:
|
||||
+ Incorporated koolsmoky's message window patch. The message window should
|
||||
work perfectly now.
|
||||
|
||||
Release 2.1 rc1:
|
||||
+ Many many little bugs fixed, and minor tweaks. This should bring the
|
||||
release versions in line with the tweaks from the DEBUG line.
|
||||
|
||||
Release 2.00b:
|
||||
+ fixed several problems with Win98; plugin should work under Win98 now
|
||||
+ fixed several bugs with memory mapped file handles. Solves several crash
|
||||
issues with mempak or transferpaks
|
||||
+ changed transfer pak MBC5 code to use proper MBC5 rom bank switching, and
|
||||
also fixed up MBC3 rom bank switching. This may fix some lingering
|
||||
transfer pak issues. Also did several tpak speed optimizations
|
||||
(thanks guille007)
|
||||
|
||||
Release 2.00a:
|
||||
+ Fixed mouse assignment in Interface. Again.
|
||||
|
||||
Release 2.00 (rabid goes crazy):
|
||||
/ Large portions of the code completely rewritten.
|
||||
+ Better detection of devices; more joysticks should work now, as well as steering
|
||||
wheels and things that aren't strictly "gamepads"
|
||||
+ .a64 notefile import and export works much better now
|
||||
+ N64 controllers can now get input from multiple gamepad type devices
|
||||
+ Now able to assign a key, mouse, or gamepad control to as many N64 control
|
||||
surfaces as you like
|
||||
+ international language support
|
||||
/ device selection for keybinding no longer needed; devices list now shown as
|
||||
"Force-Feedback Devices" under ControllerPak selection (pick Rumble, and
|
||||
tick the "RawMode" box)
|
||||
/ no longer possible to send FF events from multiple controllers to the same FF
|
||||
device (this shouldn't have worked anyway)
|
||||
+ capture mouseclicks properly in Controllers tab (disable button clicks while
|
||||
polling)
|
||||
+ release exclusive mouse while in config menu (fixes a mouse bind while locked
|
||||
issue)
|
||||
+ add independent X/Y mouse sensitivity
|
||||
+ changed absolute mouse support: now choose between Buffered (default from before),
|
||||
Absolute, and Deadpan (control only moves while you move the mouse)
|
||||
+ various optimizations, bugfixes, and spelling fixes
|
||||
+ LOTS of documentation added to the source; it should be more legible now
|
||||
+ rewrote controller save and restore (underlying CONTROLLER and BUTTON structs
|
||||
changed...)
|
||||
/ Button mappings and modifiers will need to be reset on first load
|
||||
+ now rewrites mempak and transferpak RAM data to disk almost immediately after
|
||||
writing to controller (1.83 and previous didn't save the mempak until RomClose)
|
||||
+ now possible to map shortcuts to buttons and axes as well as keys (be careful)
|
||||
+ tabbing within the config window actually works now
|
||||
+ can save and load shortcuts to a file
|
||||
+ Transferpak MBC5 support fixed (Pokemon Yellow, Perfect Dark), also ROM files should
|
||||
load much faster now
|
||||
+ several crash bugs and memory leaks squashed
|
||||
|
||||
Release 1.83:
|
||||
Changed: Rewrote GB Cart emulation (Now supports ROM-only, MBC1, MBC2, MBC3 and MBC5 carts)
|
||||
Added: support for GB Cart RTC based on VisualBoy Advance save format.
|
||||
Added: option for slower rapid-fire in macros. Fixes problems with some games like Paper Mario.
|
||||
Added: optional and adjustable rapid fire to standard input keys.
|
||||
|
||||
Release 1.82a:
|
||||
Fixed: Correct handling POV Controls again.. DOH
|
||||
|
||||
Release 1.82:
|
||||
Added: Transferpak-Emulation - done by MadManMark, so hes the one to thank for this.
|
||||
Changed: Various cleanups&optimizations, recompiled with VC++ 7.0
|
||||
|
||||
Release 1.81a:
|
||||
Fixed a bug introduced by the last version.
|
||||
|
||||
Release 1.81:
|
||||
Added: Default Profile & default Shortcuts.
|
||||
Changed: can now open read-only Files, some old & unecessary checks removed
|
||||
Interface tweaked a bit.
|
||||
|
||||
Release 1.80:
|
||||
Fixed: another Access Violation, crash within Rumble emulation
|
||||
Added: MouseLock Shortcut
|
||||
Changed: Code-Cleanups, "save" and "use" Buttons instead of "Ok"
|
||||
|
||||
Beta 1.79:
|
||||
Fixed: Access Violations
|
||||
Added: saving/loading Profiles, visual Rumble, DexDrive support
|
||||
|
||||
Beta 1.78:
|
||||
Added: MemPak Manager Functions, 2 switchable Analog Stick settings, Config Modifier, absolute KeyBoard setting
|
||||
Changed: KeyBoard & Mouse Handling
|
||||
|
||||
Beta 1.76:
|
||||
Only a small Part is based on older Plugins, new gui, new features.
|
||||
New: Direct Adaptoid support, up to 256 Modifiers, different Rumble settings, Shortcuts
|
||||
Missing: saving/loading Profiles, Config Modifier, alternate Controlset
|
||||
Changed: about everything else ;)
|
||||
|
||||
Release 1.61:
|
||||
Fixed: a small MemPak issue( Perfect Dark )
|
||||
|
||||
Release 1.60:
|
||||
Fixed: crashes in Config-Dialog, crashes when a used GamePad isnt available, Toggle-Modifiers now get reset each time a rom is loaded or the configuration changed, now games that reported "no Controller" in RAW Mode will work, multiple Controllers of the same name now get enumerated and detected right.
|
||||
Changes: Mouse-Axis can now be assigned by moving it. Now all Devices are scaned at once in Config-Window. "Default Axe-Movement" is now replaced by "Default Analog-Stick Range", which means it sets maximum range of the virtual Stick.
|
||||
Added seperate X/Y Modes for Mouse
|
||||
|
||||
Beta 1.53: Fixed yet more Bugs. Changed Profile-Format, old Profiles wont work( The new Format leaves some Space for future Functions, so they should stay compatible now)
|
||||
Beta 1.52: Fixed a bunch of bugs, some cleanups, gave the Status-Line a life.
|
||||
Beta 1.51: Fixed Issues when more than one Pak is used. MemPak is workin now( was alot easier than i thought ). RAW-Handling tweaked.
|
||||
Beta 1.50b: Finally fixed Rumble Issues, with feedback from bodie & hotshi again.
|
||||
Beta 1.50: Added Rapid-Fire for Macro-Modifiers, seperate option for negating X/Y Axis. Rumble doesnt works with all gamepads, no clue why not. Thanx to bodie, cyber and hotshitu who gave me allota feedback about Rumble.
|
||||
Beta 1.49b-d: small Bugfixes, tried to get Rumble working on all GamePads.
|
||||
Beta 1.49a: fixed some Controllers(including Adaptoid) not working ingame & hopefully the Controllers that dint Rumble
|
||||
Beta 1.49: some Bugfixes with POV and RRRRRumble is working now!
|
||||
Beta 1.48: Configuration Routines written from scratch, extended Modifiers, much better Mouse Support, tweaked the whole Code. Almost a new Plugin ;)
|
||||
|
||||
Beta 1.42: This was the last Release before i rewritten the Configuration Stuff, I dint kept track of the Versions before 1.48, many of em were just internal Releases. And I totally messed it up with the Versions-Numbers anyway.
|
|
@ -0,0 +1,774 @@
|
|||
/*
|
||||
XInput Controller support for N-Rage`s Dinput8 Plugin by tecnicors
|
||||
(C) 2009 Daniel Rehren - XInput Controller support
|
||||
|
||||
Author's Email: rehren_007@hotmail.com
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "XInputController.h"
|
||||
#include "FileAccess.h"
|
||||
#include <wchar.h>
|
||||
#include <tchar.h>
|
||||
#include "resource.h"
|
||||
#include <stdio.h>
|
||||
|
||||
BOOL IsXInputDevice( const GUID* pGuidProductFromDirectInput )
|
||||
{
|
||||
IWbemLocator* pIWbemLocator = NULL;
|
||||
IEnumWbemClassObject* pEnumDevices = NULL;
|
||||
IWbemClassObject* pDevices[20] = {0};
|
||||
IWbemServices* pIWbemServices = NULL;
|
||||
BSTR bstrNamespace = NULL;
|
||||
BSTR bstrDeviceID = NULL;
|
||||
BSTR bstrClassName = NULL;
|
||||
DWORD uReturned = 0;
|
||||
bool bIsXinputDevice= false;
|
||||
UINT iDevice = 0;
|
||||
VARIANT var;
|
||||
HRESULT hr;
|
||||
|
||||
// CoInit if needed
|
||||
hr = CoInitialize(NULL);
|
||||
bool bCleanupCOM = SUCCEEDED(hr);
|
||||
|
||||
// Create WMI
|
||||
hr = CoCreateInstance( __uuidof(WbemLocator),
|
||||
NULL,
|
||||
CLSCTX_INPROC_SERVER,
|
||||
__uuidof(IWbemLocator),
|
||||
(LPVOID*) &pIWbemLocator);
|
||||
if( FAILED(hr) || pIWbemLocator == NULL )
|
||||
goto LCleanup;
|
||||
|
||||
bstrNamespace = SysAllocString( L"\\\\.\\root\\cimv2" );if( bstrNamespace == NULL ) goto LCleanup;
|
||||
bstrClassName = SysAllocString( L"Win32_PNPEntity" ); if( bstrClassName == NULL ) goto LCleanup;
|
||||
bstrDeviceID = SysAllocString( L"DeviceID" ); if( bstrDeviceID == NULL ) goto LCleanup;
|
||||
|
||||
// Connect to WMI
|
||||
hr = pIWbemLocator->ConnectServer( bstrNamespace, NULL, NULL, 0L,
|
||||
0L, NULL, NULL, &pIWbemServices );
|
||||
if( FAILED(hr) || pIWbemServices == NULL )
|
||||
goto LCleanup;
|
||||
|
||||
// Switch security level to IMPERSONATE.
|
||||
CoSetProxyBlanket( pIWbemServices, RPC_C_AUTHN_WINNT, RPC_C_AUTHZ_NONE, NULL,
|
||||
RPC_C_AUTHN_LEVEL_CALL, RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOAC_NONE );
|
||||
|
||||
hr = pIWbemServices->CreateInstanceEnum( bstrClassName, 0, NULL, &pEnumDevices );
|
||||
if( FAILED(hr) || pEnumDevices == NULL )
|
||||
goto LCleanup;
|
||||
|
||||
// Loop over all devices
|
||||
for( ;; )
|
||||
{
|
||||
// Get 20 at a time
|
||||
hr = pEnumDevices->Next( 10000, 20, pDevices, &uReturned );
|
||||
if( FAILED(hr) )
|
||||
goto LCleanup;
|
||||
if( uReturned == 0 )
|
||||
break;
|
||||
|
||||
for( iDevice=0; iDevice<uReturned; iDevice++ )
|
||||
{
|
||||
// For each device, get its device ID
|
||||
hr = pDevices[iDevice]->Get( bstrDeviceID, 0L, &var, NULL, NULL );
|
||||
if( SUCCEEDED( hr ) )
|
||||
{
|
||||
if(var.vt == VT_BSTR && var.bstrVal != NULL)
|
||||
{
|
||||
// Check if the device ID contains "IG_". If it does, then it's an XInput device
|
||||
// This information can not be found from DirectInput
|
||||
if( wcsstr( var.bstrVal, L"IG_" ) )
|
||||
{
|
||||
// If it does, then get the VID/PID from var.bstrVal
|
||||
DWORD dwPid = 0, dwVid = 0;
|
||||
WCHAR* strVid = wcsstr( var.bstrVal, L"VID_" );
|
||||
if( strVid && wscanf_s( strVid, L"VID_%4X", &dwVid ) != 1 )
|
||||
dwVid = 0;
|
||||
WCHAR* strPid = wcsstr( var.bstrVal, L"PID_" );
|
||||
if( strPid && wscanf_s( strPid, L"PID_%4X", &dwPid ) != 1 )
|
||||
dwPid = 0;
|
||||
|
||||
// Compare the VID/PID to the DInput device
|
||||
DWORD dwVidPid = MAKELONG( dwVid, dwPid );
|
||||
if( dwVidPid == pGuidProductFromDirectInput->Data1 )
|
||||
{
|
||||
bIsXinputDevice = true;
|
||||
goto LCleanup;
|
||||
}
|
||||
}
|
||||
}
|
||||
VariantClear(&var);
|
||||
}
|
||||
SAFE_RELEASE( pDevices[iDevice] );
|
||||
}
|
||||
}
|
||||
|
||||
LCleanup:
|
||||
if(bstrNamespace)
|
||||
SysFreeString(bstrNamespace);
|
||||
if(bstrDeviceID)
|
||||
SysFreeString(bstrDeviceID);
|
||||
if(bstrClassName)
|
||||
SysFreeString(bstrClassName);
|
||||
for( iDevice=0; iDevice<20; iDevice++ )
|
||||
SAFE_RELEASE( pDevices[iDevice] );
|
||||
SAFE_RELEASE( pEnumDevices );
|
||||
SAFE_RELEASE( pIWbemLocator );
|
||||
SAFE_RELEASE( pIWbemServices );
|
||||
|
||||
if( bCleanupCOM )
|
||||
CoUninitialize();
|
||||
|
||||
return bIsXinputDevice;
|
||||
}
|
||||
|
||||
void AxisDeadzone( SHORT &AxisValue, long lDeadZoneValue, float fDeadZoneRelation )
|
||||
{
|
||||
short sign = AxisValue < 0 ? -1 : 1;
|
||||
float value = AxisValue < 0 ? -AxisValue : AxisValue;
|
||||
|
||||
if(value < lDeadZoneValue)
|
||||
value = 0;
|
||||
else
|
||||
{
|
||||
value = (value - lDeadZoneValue) * fDeadZoneRelation;
|
||||
value = value > 32767.0f ? 32767.0f : value;
|
||||
}
|
||||
|
||||
AxisValue = (SHORT)(value * sign);
|
||||
}
|
||||
|
||||
void GetXInputControllerKeys( const int indexController, LPDWORD Keys )
|
||||
{
|
||||
using namespace N64_BUTTONS;
|
||||
|
||||
LPCONTROLLER pcController = &g_pcControllers[indexController];
|
||||
LPXCONTROLLER gController = &g_pcControllers[indexController].xiController;
|
||||
|
||||
*Keys = 0;
|
||||
|
||||
if ( !gController->bConfigured )
|
||||
return;
|
||||
|
||||
DWORD result;
|
||||
XINPUT_STATE state;
|
||||
|
||||
result = XInputGetState(gController->nControl, &state);
|
||||
|
||||
if( result != ERROR_SUCCESS )
|
||||
return;
|
||||
|
||||
DWORD wButtons = state.Gamepad.wButtons;
|
||||
|
||||
if( pcController->bPadDeadZone > 0 )
|
||||
{
|
||||
const int RANGERELATIVE = 32767;
|
||||
long lDeadZoneValue = pcController->bPadDeadZone * RANGERELATIVE / 100;
|
||||
float fDeadZoneRelation = (float)RANGERELATIVE / (float)( RANGERELATIVE - lDeadZoneValue );
|
||||
|
||||
AxisDeadzone(state.Gamepad.sThumbLX, lDeadZoneValue, fDeadZoneRelation);
|
||||
AxisDeadzone(state.Gamepad.sThumbLY, lDeadZoneValue, fDeadZoneRelation);
|
||||
AxisDeadzone(state.Gamepad.sThumbRX, lDeadZoneValue, fDeadZoneRelation);
|
||||
AxisDeadzone(state.Gamepad.sThumbRY, lDeadZoneValue, fDeadZoneRelation);
|
||||
}
|
||||
|
||||
short LY = state.Gamepad.sThumbLY * N64_ANALOG_MAX / XC_ANALOG_MAX;
|
||||
short LX = state.Gamepad.sThumbLX * N64_ANALOG_MAX / XC_ANALOG_MAX;
|
||||
|
||||
short RY = state.Gamepad.sThumbRY * N64_ANALOG_MAX / XC_ANALOG_MAX;
|
||||
short RX = state.Gamepad.sThumbRX * N64_ANALOG_MAX / XC_ANALOG_MAX;
|
||||
|
||||
short XAx = 0, XAxc = 0;
|
||||
short YAx = 0, YAxc = 0;
|
||||
|
||||
WORD valButtons = 0;
|
||||
valButtons |= ( wButtons & gController->stButtons.iDRight ) ? DRight : 0;
|
||||
valButtons |= ( wButtons & gController->stButtons.iDLeft ) ? DLeft : 0;
|
||||
valButtons |= ( wButtons & gController->stButtons.iDDown ) ? DDown : 0;
|
||||
valButtons |= ( wButtons & gController->stButtons.iDUp ) ? DUp : 0;
|
||||
valButtons |= ( wButtons & gController->stButtons.iStart ) ? Start : 0;
|
||||
valButtons |= ( wButtons & gController->stButtons.iZ ) ? Z : 0;
|
||||
valButtons |= ( wButtons & gController->stButtons.iB ) ? B : 0;
|
||||
valButtons |= ( wButtons & gController->stButtons.iA ) ? A : 0;
|
||||
valButtons |= ( wButtons & gController->stButtons.iCRight ) ? CRight : 0;
|
||||
valButtons |= ( wButtons & gController->stButtons.iCLeft ) ? CLeft : 0;
|
||||
valButtons |= ( wButtons & gController->stButtons.iCDown ) ? CDown : 0;
|
||||
valButtons |= ( wButtons & gController->stButtons.iCUp ) ? CUp : 0;
|
||||
valButtons |= ( wButtons & gController->stButtons.iR ) ? R : 0;
|
||||
valButtons |= ( wButtons & gController->stButtons.iL ) ? L : 0;
|
||||
|
||||
valButtons |= state.Gamepad.bLeftTrigger > 30 ? gController->stAnalogs.iLeftTrigger : 0;
|
||||
valButtons |= state.Gamepad.bRightTrigger > 30 ? gController->stAnalogs.iRightTrigger : 0;
|
||||
|
||||
if (LX >= BUTTON_ANALOG_VALUE)
|
||||
valButtons |= gController->stAnalogs.iLXAxis & ((CRight | DRight) << 16) ? gController->stAnalogs.iLXAxis >> 16 : 0;
|
||||
if (LX <= -BUTTON_ANALOG_VALUE)
|
||||
valButtons |= gController->stAnalogs.iLXAxis & (CLeft | DLeft) ? gController->stAnalogs.iLXAxis : 0;
|
||||
if (LY >= BUTTON_ANALOG_VALUE)
|
||||
valButtons |= gController->stAnalogs.iLYAxis & ((CUp | DUp) << 16) ? gController->stAnalogs.iLYAxis >> 16 : 0;
|
||||
if (LY <= -BUTTON_ANALOG_VALUE)
|
||||
valButtons |= gController->stAnalogs.iLYAxis & (CDown | DDown) ? gController->stAnalogs.iLYAxis : 0;
|
||||
|
||||
if (RX >= BUTTON_ANALOG_VALUE)
|
||||
valButtons |= gController->stAnalogs.iRXAxis & ((CRight | DRight) << 16) ? gController->stAnalogs.iRXAxis >> 16 : 0;
|
||||
if (RX <= -BUTTON_ANALOG_VALUE)
|
||||
valButtons |= gController->stAnalogs.iRXAxis & (CLeft | DLeft) ? gController->stAnalogs.iRXAxis : 0;
|
||||
if (RY >= BUTTON_ANALOG_VALUE)
|
||||
valButtons |= gController->stAnalogs.iRYAxis & ((CUp | DUp) << 16) ? gController->stAnalogs.iRYAxis >> 16 : 0;
|
||||
if (RY <= -BUTTON_ANALOG_VALUE)
|
||||
valButtons |= gController->stAnalogs.iRYAxis & (CDown | DDown) ? gController->stAnalogs.iRYAxis : 0;
|
||||
|
||||
if (gController->stAnalogs.iLXAxis == XAxis)
|
||||
{
|
||||
XAx += LX;
|
||||
XAxc += LX > 0 ? 1 : 0;
|
||||
}
|
||||
if (gController->stAnalogs.iRXAxis == XAxis)
|
||||
{
|
||||
XAx += RX;
|
||||
XAxc += RX > 0 ? 1 : 0;
|
||||
}
|
||||
if( XAxc )
|
||||
XAx /= XAxc;
|
||||
|
||||
if (gController->stAnalogs.iLYAxis == YAxis)
|
||||
{
|
||||
YAx += LY;
|
||||
YAxc += LY > 0 ? 1 : 0;
|
||||
}
|
||||
if (gController->stAnalogs.iRYAxis == YAxis)
|
||||
{
|
||||
YAx += RY;
|
||||
YAxc += RY > 0 ? 1 : 0;
|
||||
}
|
||||
if( YAxc )
|
||||
YAx /= YAxc;
|
||||
|
||||
*Keys = MAKELONG(valButtons, MAKEWORD(XAx, YAx));
|
||||
}
|
||||
|
||||
void DefaultXInputControllerKeys( LPXCONTROLLER gController)
|
||||
{
|
||||
using namespace N64_BUTTONS;
|
||||
|
||||
gController->stButtons.iA = XINPUT_GAMEPAD_A | XINPUT_GAMEPAD_Y;
|
||||
gController->stButtons.iB = XINPUT_GAMEPAD_B | XINPUT_GAMEPAD_X;
|
||||
gController->stButtons.iStart = XINPUT_GAMEPAD_START | XINPUT_GAMEPAD_BACK;
|
||||
gController->stButtons.iDDown = XINPUT_GAMEPAD_DPAD_DOWN;
|
||||
gController->stButtons.iDLeft = XINPUT_GAMEPAD_DPAD_LEFT;
|
||||
gController->stButtons.iDRight = XINPUT_GAMEPAD_DPAD_RIGHT;
|
||||
gController->stButtons.iDUp = XINPUT_GAMEPAD_DPAD_UP;
|
||||
gController->stButtons.iL = XINPUT_GAMEPAD_LEFT_SHOULDER;
|
||||
gController->stButtons.iR = XINPUT_GAMEPAD_RIGHT_SHOULDER;
|
||||
gController->stAnalogs.iLeftTrigger = Z;
|
||||
gController->stAnalogs.iRightTrigger = R;
|
||||
gController->stAnalogs.iRXAxis = (CRight << 16) | CLeft;
|
||||
gController->stAnalogs.iRYAxis = (CUp << 16) | CDown;
|
||||
gController->stAnalogs.iLXAxis = XAxis;
|
||||
gController->stAnalogs.iLYAxis = YAxis;
|
||||
gController->bConfigured = true;
|
||||
}
|
||||
|
||||
void VibrateXInputController( DWORD nController, int LeftMotorVal, int RightMotorVal )
|
||||
{
|
||||
XINPUT_VIBRATION vibration;
|
||||
|
||||
ZeroMemory( &vibration, sizeof( XINPUT_VIBRATION ) );
|
||||
|
||||
vibration.wLeftMotorSpeed = LeftMotorVal;
|
||||
vibration.wRightMotorSpeed = RightMotorVal;
|
||||
|
||||
XInputSetState( nController, &vibration );
|
||||
}
|
||||
|
||||
bool InitiateXInputController( LPXCONTROLLER gController, int nControl )
|
||||
{
|
||||
DWORD result;
|
||||
XINPUT_STATE state;
|
||||
|
||||
ZeroMemory( &state, sizeof( XINPUT_STATE ) );
|
||||
result = XInputGetState( nControl, &state );
|
||||
|
||||
gController->bConnected = result == ERROR_SUCCESS;
|
||||
gController->nControl = nControl;
|
||||
|
||||
TCHAR buffer[MAX_PATH];
|
||||
GetDirectory( buffer, DIRECTORY_DLL );
|
||||
_stprintf_s( buffer, _T("%sXInput Controller %d Config.xcc"), buffer, gController->nControl + 1 );
|
||||
FILE *file = _tfopen( buffer, _T("rS") );
|
||||
if( file )
|
||||
{
|
||||
LoadXInputConfigFromFile( file, gController );
|
||||
fclose( file );
|
||||
}
|
||||
|
||||
if( !gController->bConfigured )
|
||||
DefaultXInputControllerKeys( gController );
|
||||
|
||||
return gController->bConnected;
|
||||
}
|
||||
|
||||
TCHAR * GetN64ButtonNameFromButtonCode( int Button )
|
||||
{
|
||||
using namespace N64_BUTTONS;
|
||||
|
||||
TCHAR *btnName;
|
||||
btnName = new TCHAR[10];
|
||||
|
||||
switch( Button )
|
||||
{
|
||||
case A: _tcscpy_s( btnName, 10, _T( "A" )); break;
|
||||
case B: _tcscpy_s( btnName, 10, _T( "B" )); break;
|
||||
case Z: _tcscpy_s( btnName, 10, _T( "Z" )); break;
|
||||
case L: _tcscpy_s( btnName, 10, _T( "L" )); break;
|
||||
case R: _tcscpy_s( btnName, 10, _T( "R" )); break;
|
||||
case Start: _tcscpy_s( btnName, 10, _T( "Start" )); break;
|
||||
case CUp: _tcscpy_s( btnName, 10, _T( "CUp" )); break;
|
||||
case CDown: _tcscpy_s( btnName, 10, _T( "CDown" )); break;
|
||||
case CRight: _tcscpy_s( btnName, 10, _T( "CRight" )); break;
|
||||
case CLeft: _tcscpy_s( btnName, 10, _T( "CLeft" )); break;
|
||||
case DUp: _tcscpy_s( btnName, 10, _T( "DUp" )); break;
|
||||
case DDown: _tcscpy_s( btnName, 10, _T( "DDown" )); break;
|
||||
case DRight: _tcscpy_s( btnName, 10, _T( "DRight" )); break;
|
||||
case DLeft: _tcscpy_s( btnName, 10, _T( "DLeft" )); break;
|
||||
default: _tcscpy_s( btnName, 10, _T( "None" ));
|
||||
}
|
||||
return btnName;
|
||||
}
|
||||
|
||||
TCHAR * GetN64ButtonFromXInputControl( LPXCONTROLLER gController, int XInputButton )
|
||||
{
|
||||
using namespace N64_BUTTONS;
|
||||
|
||||
if( !gController || !gController->bConfigured )
|
||||
return GetN64ButtonNameFromButtonCode( 0 );
|
||||
|
||||
int N64ButtonCode = 0;
|
||||
|
||||
N64ButtonCode |= gController->stButtons.iA & XInputButton ? A : 0;
|
||||
N64ButtonCode |= gController->stButtons.iB & XInputButton ? B : 0;
|
||||
N64ButtonCode |= gController->stButtons.iCDown & XInputButton ? CDown : 0;
|
||||
N64ButtonCode |= gController->stButtons.iCLeft & XInputButton ? CLeft : 0;
|
||||
N64ButtonCode |= gController->stButtons.iCRight & XInputButton ? CRight : 0;
|
||||
N64ButtonCode |= gController->stButtons.iCUp & XInputButton ? CUp : 0;
|
||||
N64ButtonCode |= gController->stButtons.iDDown & XInputButton ? DDown : 0;
|
||||
N64ButtonCode |= gController->stButtons.iDLeft & XInputButton ? DLeft : 0;
|
||||
N64ButtonCode |= gController->stButtons.iDRight & XInputButton ? DRight : 0;
|
||||
N64ButtonCode |= gController->stButtons.iDUp & XInputButton ? DUp : 0;
|
||||
N64ButtonCode |= gController->stButtons.iL & XInputButton ? L : 0;
|
||||
N64ButtonCode |= gController->stButtons.iR & XInputButton ? R : 0;
|
||||
N64ButtonCode |= gController->stButtons.iStart & XInputButton ? Start : 0;
|
||||
N64ButtonCode |= gController->stButtons.iZ & XInputButton ? Z : 0;
|
||||
|
||||
return GetN64ButtonNameFromButtonCode( N64ButtonCode );
|
||||
}
|
||||
|
||||
TCHAR * GetN64ButtonArrayFromXAnalog( LPXCONTROLLER gController, int XThStickOrXDpad )
|
||||
{
|
||||
using namespace N64_BUTTONS;
|
||||
|
||||
if( !gController || !gController->bConfigured )
|
||||
return NULL;
|
||||
|
||||
TCHAR *name;
|
||||
name = new TCHAR[15];
|
||||
|
||||
switch( XThStickOrXDpad )
|
||||
{
|
||||
case XC_LTBS:
|
||||
if( gController->stAnalogs.iLXAxis == XAxis )
|
||||
_tcscpy_s( name, 15, _T( "Analog Stick" ));
|
||||
else if( gController->stAnalogs.iLXAxis & CLeft )
|
||||
_tcscpy_s( name, 15, _T( "C Buttons" ));
|
||||
else if( gController->stAnalogs.iLXAxis & DLeft )
|
||||
_tcscpy_s( name, 15, _T( "DPad" ));
|
||||
else
|
||||
_tcscpy_s( name, 15, _T( "None" ));
|
||||
break;
|
||||
|
||||
case XC_RTBS:
|
||||
if( gController->stAnalogs.iRXAxis == XAxis )
|
||||
_tcscpy_s( name, 15, _T( "Analog Stick" ));
|
||||
else if( gController->stAnalogs.iRXAxis & CLeft )
|
||||
_tcscpy_s( name, 15, _T( "C Buttons" ));
|
||||
else if( gController->stAnalogs.iRXAxis & DLeft )
|
||||
_tcscpy_s( name, 15, _T( "DPad" ));
|
||||
else
|
||||
_tcscpy_s( name, 15, _T( "None" ));
|
||||
break;
|
||||
|
||||
case XC_DPAD:
|
||||
if( gController->stButtons.iCDown == XINPUT_GAMEPAD_DPAD_DOWN )
|
||||
_tcscpy_s( name, 15, _T( "C Button" ));
|
||||
else if( gController->stButtons.iDDown == XINPUT_GAMEPAD_DPAD_DOWN )
|
||||
_tcscpy_s( name, 15, _T( "DPad" ));
|
||||
else
|
||||
_tcscpy_s( name, 15, _T( "None" ));
|
||||
break;
|
||||
|
||||
default:
|
||||
_tcscpy_s( name, 15, _T( "None" ));
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
bool ReadXInputControllerKeys( HWND hDlg, LPXCONTROLLER gController )
|
||||
{
|
||||
if( hDlg == NULL || gController == NULL || !gController->bConfigured)
|
||||
return false;
|
||||
|
||||
SendDlgItemMessage( hDlg, IDC_XC_A, CB_SELECTSTRING, -1, (LPARAM)GetN64ButtonFromXInputControl( gController, XINPUT_GAMEPAD_A ));
|
||||
SendDlgItemMessage( hDlg, IDC_XC_B, CB_SELECTSTRING, -1, (LPARAM)GetN64ButtonFromXInputControl( gController, XINPUT_GAMEPAD_B ));
|
||||
SendDlgItemMessage( hDlg, IDC_XC_X, CB_SELECTSTRING, -1, (LPARAM)GetN64ButtonFromXInputControl( gController, XINPUT_GAMEPAD_X ));
|
||||
SendDlgItemMessage( hDlg, IDC_XC_Y, CB_SELECTSTRING, -1, (LPARAM)GetN64ButtonFromXInputControl( gController, XINPUT_GAMEPAD_Y ));
|
||||
SendDlgItemMessage( hDlg, IDC_XC_BACK, CB_SELECTSTRING, -1, (LPARAM)GetN64ButtonFromXInputControl( gController, XINPUT_GAMEPAD_BACK ));
|
||||
SendDlgItemMessage( hDlg, IDC_XC_START, CB_SELECTSTRING, -1, (LPARAM)GetN64ButtonFromXInputControl( gController, XINPUT_GAMEPAD_START ));
|
||||
SendDlgItemMessage( hDlg, IDC_XC_LB, CB_SELECTSTRING, -1, (LPARAM)GetN64ButtonFromXInputControl( gController, XINPUT_GAMEPAD_LEFT_SHOULDER ));
|
||||
SendDlgItemMessage( hDlg, IDC_XC_RB, CB_SELECTSTRING, -1, (LPARAM)GetN64ButtonFromXInputControl( gController, XINPUT_GAMEPAD_RIGHT_SHOULDER ));
|
||||
SendDlgItemMessage( hDlg, IDC_XC_LTSB, CB_SELECTSTRING, -1, (LPARAM)GetN64ButtonFromXInputControl( gController, XINPUT_GAMEPAD_LEFT_THUMB ));
|
||||
SendDlgItemMessage( hDlg, IDC_XC_RTSB, CB_SELECTSTRING, -1, (LPARAM)GetN64ButtonFromXInputControl( gController, XINPUT_GAMEPAD_RIGHT_THUMB ));
|
||||
|
||||
SendDlgItemMessage( hDlg, IDC_XC_LT, CB_SELECTSTRING, -1, (LPARAM)GetN64ButtonNameFromButtonCode( gController->stAnalogs.iLeftTrigger ));
|
||||
SendDlgItemMessage( hDlg, IDC_XC_RT, CB_SELECTSTRING, -1, (LPARAM)GetN64ButtonNameFromButtonCode( gController->stAnalogs.iRightTrigger ));
|
||||
|
||||
SendDlgItemMessage( hDlg, IDC_XC_DPAD, CB_SELECTSTRING, -1, (LPARAM)GetN64ButtonArrayFromXAnalog( gController, XC_DPAD ));
|
||||
SendDlgItemMessage( hDlg, IDC_XC_LTS, CB_SELECTSTRING, -1, (LPARAM)GetN64ButtonArrayFromXAnalog( gController, XC_LTBS ));
|
||||
SendDlgItemMessage( hDlg, IDC_XC_RTS, CB_SELECTSTRING, -1, (LPARAM)GetN64ButtonArrayFromXAnalog( gController, XC_RTBS ));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
int GetComboBoxXInputKey( int ComboBox )
|
||||
{
|
||||
switch( ComboBox )
|
||||
{
|
||||
case IDC_XC_A: return XINPUT_GAMEPAD_A;
|
||||
case IDC_XC_B: return XINPUT_GAMEPAD_B;
|
||||
case IDC_XC_X: return XINPUT_GAMEPAD_X;
|
||||
case IDC_XC_Y: return XINPUT_GAMEPAD_Y;
|
||||
case IDC_XC_BACK: return XINPUT_GAMEPAD_BACK;
|
||||
case IDC_XC_START: return XINPUT_GAMEPAD_START;
|
||||
case IDC_XC_LB: return XINPUT_GAMEPAD_LEFT_SHOULDER;
|
||||
case IDC_XC_RB: return XINPUT_GAMEPAD_RIGHT_SHOULDER;
|
||||
case IDC_XC_LT: return -1; // triggers don't use these macros
|
||||
case IDC_XC_RT: return -1;
|
||||
case IDC_XC_LTSB: return XINPUT_GAMEPAD_LEFT_THUMB;
|
||||
case IDC_XC_RTSB: return XINPUT_GAMEPAD_RIGHT_THUMB;
|
||||
case IDC_XC_DPAD: return -2; // to handle analogs and dpad
|
||||
case IDC_XC_LTS: return -2;
|
||||
case IDC_XC_RTS: return -2;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
|
||||
int GetN64ButtonCode( TCHAR *btnName ) //esta wea esta muy fea, hay que buscar una mejor manera definitivamente..
|
||||
{
|
||||
using namespace N64_BUTTONS;
|
||||
|
||||
int value = 0;
|
||||
|
||||
if( !_tcscmp( btnName, _T( "A" )))
|
||||
value = A;
|
||||
else if( !_tcscmp( btnName, _T( "B" )))
|
||||
value = B;
|
||||
else if( !_tcscmp( btnName, _T( "R" )))
|
||||
value = R;
|
||||
else if( !_tcscmp( btnName, _T( "L" )))
|
||||
value = L;
|
||||
else if( !_tcscmp( btnName, _T( "Z" )))
|
||||
value = Z;
|
||||
else if( !_tcscmp( btnName, _T( "Start" )))
|
||||
value = Start;
|
||||
else if( !_tcscmp( btnName, _T( "CUp" )))
|
||||
value = CUp;
|
||||
else if( !_tcscmp( btnName, _T( "CDown" )))
|
||||
value = CDown;
|
||||
else if( !_tcscmp( btnName, _T( "CLeft" )))
|
||||
value = CLeft;
|
||||
else if( !_tcscmp( btnName, _T( "CRight" )))
|
||||
value = CRight;
|
||||
else if( !_tcscmp( btnName, _T( "DUp" )))
|
||||
value = DUp;
|
||||
else if( !_tcscmp( btnName, _T( "DDown" )))
|
||||
value = DDown;
|
||||
else if( !_tcscmp( btnName, _T( "DLeft" )))
|
||||
value = DLeft;
|
||||
else if( !_tcscmp( btnName, _T( "DRight" )))
|
||||
value = DRight;
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
void ResetXInputControllerKeys( LPXCONTROLLER gController )
|
||||
{
|
||||
gController->stButtons.iA = 0;
|
||||
gController->stButtons.iB = 0;
|
||||
gController->stButtons.iZ = 0;
|
||||
gController->stButtons.iL = 0;
|
||||
gController->stButtons.iR = 0;
|
||||
gController->stButtons.iStart = 0;
|
||||
gController->stButtons.iCUp = 0;
|
||||
gController->stButtons.iCLeft = 0;
|
||||
gController->stButtons.iCDown = 0;
|
||||
gController->stButtons.iCRight = 0;
|
||||
gController->stButtons.iDUp = 0;
|
||||
gController->stButtons.iDLeft = 0;
|
||||
gController->stButtons.iDDown = 0;
|
||||
gController->stButtons.iDRight = 0;
|
||||
|
||||
gController->stAnalogs.iLeftTrigger = 0;
|
||||
gController->stAnalogs.iLXAxis = 0;
|
||||
gController->stAnalogs.iLYAxis = 0;
|
||||
gController->stAnalogs.iRightTrigger = 0;
|
||||
gController->stAnalogs.iRXAxis = 0;
|
||||
gController->stAnalogs.iRYAxis = 0;
|
||||
}
|
||||
|
||||
void StoreAnalogConfig( LPXCONTROLLER gController, int ComboBox, int index )
|
||||
{
|
||||
using namespace N64_BUTTONS;
|
||||
|
||||
switch( index )
|
||||
{
|
||||
case 1: // DPAD
|
||||
switch( ComboBox )
|
||||
{
|
||||
case IDC_XC_DPAD:
|
||||
gController->stButtons.iDDown |= XINPUT_GAMEPAD_DPAD_DOWN;
|
||||
gController->stButtons.iDUp |= XINPUT_GAMEPAD_DPAD_UP;
|
||||
gController->stButtons.iDLeft |= XINPUT_GAMEPAD_DPAD_LEFT;
|
||||
gController->stButtons.iDRight |= XINPUT_GAMEPAD_DPAD_RIGHT;
|
||||
break;
|
||||
case IDC_XC_LTS:
|
||||
gController->stAnalogs.iLXAxis = ( DRight << 16 ) | DLeft;
|
||||
gController->stAnalogs.iLYAxis = ( DUp << 16 ) | DDown;
|
||||
break;
|
||||
case IDC_XC_RTS:
|
||||
gController->stAnalogs.iRXAxis = ( DRight << 16 ) | DLeft;
|
||||
gController->stAnalogs.iRYAxis = ( DUp << 16 ) | DDown;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 2: // C Buttons
|
||||
switch( ComboBox )
|
||||
{
|
||||
case IDC_XC_DPAD:
|
||||
gController->stButtons.iCDown |= XINPUT_GAMEPAD_DPAD_DOWN;
|
||||
gController->stButtons.iCUp |= XINPUT_GAMEPAD_DPAD_UP;
|
||||
gController->stButtons.iCLeft |= XINPUT_GAMEPAD_DPAD_LEFT;
|
||||
gController->stButtons.iCRight |= XINPUT_GAMEPAD_DPAD_RIGHT;
|
||||
break;
|
||||
case IDC_XC_LTS:
|
||||
gController->stAnalogs.iLXAxis = ( CRight << 16 ) | CLeft;
|
||||
gController->stAnalogs.iLYAxis = ( CUp << 16 ) | CDown;
|
||||
break;
|
||||
case IDC_XC_RTS:
|
||||
gController->stAnalogs.iRXAxis = ( CRight << 16 ) | CLeft;
|
||||
gController->stAnalogs.iRYAxis = ( CUp << 16 ) | CDown;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 3: // Analog
|
||||
switch( ComboBox )
|
||||
{
|
||||
case IDC_XC_LTS:
|
||||
gController->stAnalogs.iLXAxis = XAxis;
|
||||
gController->stAnalogs.iLYAxis = YAxis;
|
||||
break;
|
||||
case IDC_XC_RTS:
|
||||
gController->stAnalogs.iRXAxis = XAxis;
|
||||
gController->stAnalogs.iRYAxis = YAxis;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void StoreXInputControllerKeys( HWND hDlg, LPXCONTROLLER gController )
|
||||
{
|
||||
LRESULT index = -1;
|
||||
DWORD value = 0;
|
||||
|
||||
ResetXInputControllerKeys( gController );
|
||||
|
||||
for( int i = IDC_XC_A; i <= IDC_XC_RTS; i++ )
|
||||
{
|
||||
index = SendDlgItemMessage( hDlg, i, CB_GETCURSEL, 0, 0 );
|
||||
value = GetComboBoxXInputKey( i );
|
||||
if( value == 0 )
|
||||
continue;
|
||||
else if ( value == -1 )
|
||||
{
|
||||
TCHAR btnName[10] = _T( "\0" );
|
||||
SendDlgItemMessage( hDlg, i, CB_GETLBTEXT, index, (LPARAM)(LPTSTR)btnName );
|
||||
switch( i )
|
||||
{
|
||||
case IDC_XC_LT:
|
||||
gController->stAnalogs.iLeftTrigger = GetN64ButtonCode( btnName );
|
||||
break;
|
||||
case IDC_XC_RT:
|
||||
gController->stAnalogs.iRightTrigger = GetN64ButtonCode( btnName );
|
||||
break;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
else if ( value == -2 )
|
||||
{
|
||||
StoreAnalogConfig( gController, i, index);
|
||||
continue;
|
||||
}
|
||||
|
||||
switch( index )
|
||||
{
|
||||
case 1: gController->stButtons.iA |= value; break;
|
||||
case 2: gController->stButtons.iB |= value; break;
|
||||
case 3: gController->stButtons.iZ |= value; break;
|
||||
case 4: gController->stButtons.iL |= value; break;
|
||||
case 5: gController->stButtons.iR |= value; break;
|
||||
case 6: gController->stButtons.iStart |= value; break;
|
||||
case 7: gController->stButtons.iCUp |= value; break;
|
||||
case 8: gController->stButtons.iCLeft |= value; break;
|
||||
case 9: gController->stButtons.iCDown |= value; break;
|
||||
case 10: gController->stButtons.iCRight |= value; break;
|
||||
case 11: gController->stButtons.iDUp |= value; break;
|
||||
case 12: gController->stButtons.iDLeft |= value; break;
|
||||
case 13: gController->stButtons.iDDown |= value; break;
|
||||
case 14: gController->stButtons.iDRight |= value; break;
|
||||
}
|
||||
}
|
||||
gController->bConfigured = true;
|
||||
}
|
||||
|
||||
void SaveXInputConfigToFile( FILE *file, LPXCONTROLLER gController )
|
||||
{
|
||||
// fprintf( file, "[XInput Controller %d]\n", gController->nControl );
|
||||
fprintf( file, "A=%lu\n", gController->stButtons.iA );
|
||||
fprintf( file, "B=%lu\n", gController->stButtons.iB );
|
||||
fprintf( file, "CDown=%lu\n", gController->stButtons.iCDown );
|
||||
fprintf( file, "CLeft=%lu\n", gController->stButtons.iCLeft );
|
||||
fprintf( file, "CRight=%lu\n", gController->stButtons.iCRight );
|
||||
fprintf( file, "CUp=%lu\n", gController->stButtons.iCUp );
|
||||
fprintf( file, "DDown=%lu\n", gController->stButtons.iDDown );
|
||||
fprintf( file, "DLeft=%lu\n", gController->stButtons.iDLeft );
|
||||
fprintf( file, "DRight=%lu\n", gController->stButtons.iDRight );
|
||||
fprintf( file, "DUp=%lu\n", gController->stButtons.iDUp );
|
||||
fprintf( file, "L=%lu\n", gController->stButtons.iL );
|
||||
fprintf( file, "R=%lu\n", gController->stButtons.iR );
|
||||
fprintf( file, "Start=%lu\n", gController->stButtons.iStart );
|
||||
fprintf( file, "Z=%lu\n", gController->stButtons.iZ );
|
||||
fprintf( file, "XAxis=%lu\n", gController->stButtons.iXAxis );
|
||||
fprintf( file, "YAxis=%lu\n", gController->stButtons.iYAxis );
|
||||
fprintf( file, "LeftTrigger=%lu\n", gController->stAnalogs.iLeftTrigger );
|
||||
fprintf( file, "RightTrigger=%lu\n", gController->stAnalogs.iRightTrigger );
|
||||
fprintf( file, "LeftXAxis=%lu\n", gController->stAnalogs.iLXAxis );
|
||||
fprintf( file, "LeftYAxis=%lu\n", gController->stAnalogs.iLYAxis );
|
||||
fprintf( file, "RightXAxis=%lu\n", gController->stAnalogs.iRXAxis );
|
||||
fprintf( file, "RightYAxis=%lu\n\n", gController->stAnalogs.iRYAxis );
|
||||
}
|
||||
|
||||
void LoadXInputConfigFromFile( FILE *file, LPXCONTROLLER gController )
|
||||
{
|
||||
char buffer[4096];
|
||||
int c = 0;
|
||||
|
||||
while( fgets( buffer, 4096, file ))
|
||||
{
|
||||
if( strlen( buffer ) == 1 ) // means end of controller config
|
||||
break;
|
||||
c++;
|
||||
switch( buffer[0] )
|
||||
{
|
||||
case 'A':
|
||||
sscanf_s( buffer, "A=%lu", &gController->stButtons.iA ); break;
|
||||
case 'B':
|
||||
sscanf_s( buffer, "B=%lu", &gController->stButtons.iB ); break;
|
||||
case 'C':
|
||||
switch( buffer[1] )
|
||||
{
|
||||
case 'U':
|
||||
sscanf_s( buffer, "CUp=%lu", &gController->stButtons.iCUp ); break;
|
||||
case 'D':
|
||||
sscanf_s( buffer, "CDown=%lu", &gController->stButtons.iCDown ); break;
|
||||
case 'L':
|
||||
sscanf_s( buffer, "CLeft=%lu", &gController->stButtons.iCLeft ); break;
|
||||
case 'R':
|
||||
sscanf_s( buffer, "CRight=%lu", &gController->stButtons.iCRight ); break;
|
||||
}
|
||||
break;
|
||||
case 'D':
|
||||
switch( buffer[1] )
|
||||
{
|
||||
case 'U':
|
||||
sscanf_s( buffer, "DUp=%lu", &gController->stButtons.iDUp ); break;
|
||||
case 'D':
|
||||
sscanf_s( buffer, "DDown=%lu", &gController->stButtons.iDDown ); break;
|
||||
case 'L':
|
||||
sscanf_s( buffer, "DLeft=%lu", &gController->stButtons.iDLeft ); break;
|
||||
case 'R':
|
||||
sscanf_s( buffer, "DRight=%lu", &gController->stButtons.iDRight ); break;
|
||||
}
|
||||
break;
|
||||
case 'L':
|
||||
switch( buffer[1] )
|
||||
{
|
||||
case '=':
|
||||
sscanf_s( buffer, "L=%lu", &gController->stButtons.iL ); break;
|
||||
case 'e':
|
||||
switch( buffer[4] )
|
||||
{
|
||||
case 'T':
|
||||
sscanf_s( buffer, "LeftTrigger=%lu", &gController->stAnalogs.iLeftTrigger ); break;
|
||||
case 'X':
|
||||
sscanf_s( buffer, "LeftXAxis=%lu", &gController->stAnalogs.iLXAxis ); break;
|
||||
case 'Y':
|
||||
sscanf_s( buffer, "LeftYAxis=%lu", &gController->stAnalogs.iLYAxis ); break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 'R':
|
||||
switch( buffer[1] )
|
||||
{
|
||||
case '=':
|
||||
sscanf_s( buffer, "R=%lu", &gController->stButtons.iR ); break;
|
||||
case 'i':
|
||||
switch( buffer[5] )
|
||||
{
|
||||
case 'T':
|
||||
sscanf_s( buffer, "RightTrigger=%lu", &gController->stAnalogs.iRightTrigger ); break;
|
||||
case 'X':
|
||||
sscanf_s( buffer, "RightXAxis=%lu", &gController->stAnalogs.iRXAxis ); break;
|
||||
case 'Y':
|
||||
sscanf_s( buffer, "RightYAxis=%lu", &gController->stAnalogs.iRYAxis ); break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 'Z':
|
||||
sscanf_s( buffer, "Z=%lu", &gController->stButtons.iZ ); break;
|
||||
case 'S':
|
||||
sscanf_s( buffer, "Start=%lu", &gController->stButtons.iStart ); break;
|
||||
case 'X':
|
||||
sscanf_s( buffer, "XAxis=%lu", &gController->stButtons.iXAxis ); break;
|
||||
case 'Y':
|
||||
sscanf_s( buffer, "YAxis=%lu", &gController->stButtons.iYAxis ); break;
|
||||
}
|
||||
}
|
||||
|
||||
gController->bConfigured = c > 20 ;
|
||||
}
|
|
@ -0,0 +1,160 @@
|
|||
/*
|
||||
XInput Controller support for N-Rage`s Dinput8 Plugin
|
||||
(C) 2002, 2006 Norbert Wladyka - N-Rage`s Dinput8 Plugin
|
||||
(C) 2009 Daniel Rehren - XInput Controller support
|
||||
|
||||
N-Rage`s Dinput8 Plugin:
|
||||
Author`s Email: norbert.wladyka@chello.at
|
||||
Website: http://go.to/nrage
|
||||
|
||||
XInput Controller support:
|
||||
Author's Email: rehren_007@hotmail.com
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef _XINPUTCONTROLLER_H
|
||||
#define _XINPUTCONTROLLER_H
|
||||
|
||||
//code from http://msdn.microsoft.com/en-us/library/ee417014(VS.85).aspx
|
||||
#include <wbemidl.h>
|
||||
#include <oleauto.h>
|
||||
//#include <wmsstd.h> <-- only needed for SAFE_RELEASE(x)
|
||||
|
||||
#ifndef SAFE_RELEASE // when Windows Media Device M? is not present
|
||||
#define SAFE_RELEASE(x) \
|
||||
if(x != NULL) \
|
||||
{ \
|
||||
x->Release(); \
|
||||
x = NULL; \
|
||||
}
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Enum each PNP device using WMI and check each device ID to see if it contains
|
||||
// "IG_" (ex. "VID_045E&PID_028E&IG_00"). If it does, then it's an XInput device
|
||||
// Unfortunately this information can not be found by just using DirectInput
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL IsXInputDevice( const GUID* pGuidProductFromDirectInput );
|
||||
//END conde from ...
|
||||
|
||||
/*
|
||||
Xinput header for NRage Plugin, by tecnicors.
|
||||
|
||||
XInput Controller is going to take over the N64 control that matches its
|
||||
number, ie. first XInput controller is first N64 player, etc.
|
||||
*/
|
||||
|
||||
#include "commonIncludes.h"
|
||||
#include <xinput.h>
|
||||
|
||||
//defines
|
||||
#define N64_ANALOG_MAX 127
|
||||
#define XC_ANALOG_MAX 32767
|
||||
#define BUTTON_ANALOG_VALUE 107
|
||||
|
||||
//enums
|
||||
namespace N64_BUTTONS
|
||||
{
|
||||
// Whith this we can asign buttons to the xinput struct
|
||||
enum _N64_BUTTONS { A = 0x0080, B = 0x0040, Z = 0x0020, R = 0x1000, L = 0x2000, XAxis = 0x4000,
|
||||
Start = 0x0010, DUp = 0x0008, DDown = 0x0004, DLeft = 0x0002, YAxis = 0x8000,
|
||||
DRight = 0x0001, CUp = 0x0800, CDown = 0x0400, CLeft = 0x0200, CRight = 0x0100,
|
||||
None = 0x0 };
|
||||
}
|
||||
|
||||
//structures
|
||||
typedef struct _XCONTROLLER // XInput controller struct
|
||||
{
|
||||
int nControl;
|
||||
bool bConnected;
|
||||
bool bConfigured;
|
||||
|
||||
struct _N64_BUTTONS // For button configurations
|
||||
{
|
||||
int iA, iB;
|
||||
int iStart;
|
||||
int iL, iR, iZ;
|
||||
int iXAxis, iYAxis;
|
||||
int iDUp, iDDown, iDLeft, iDRight;
|
||||
int iCUp, iCDown, iCLeft, iCRight;
|
||||
}stButtons;
|
||||
|
||||
struct _XINPUT_ANALOGS // For analog configurations
|
||||
{
|
||||
int iLeftTrigger, iRightTrigger;
|
||||
unsigned int iRXAxis, iRYAxis, iLXAxis, iLYAxis;
|
||||
}stAnalogs;
|
||||
|
||||
}XCONTROLLER;
|
||||
|
||||
typedef XCONTROLLER *LPXCONTROLLER;
|
||||
|
||||
// Sets the keys pressed for Xinput controller gController, into keys.
|
||||
void GetXInputControllerKeys( const int indexController, LPDWORD Keys );
|
||||
// Sets the default keys for Xinput controller gController.
|
||||
void DefaultXInputControllerKeys( LPXCONTROLLER gController);
|
||||
// Vibrates the XInput Control
|
||||
void VibrateXInputController( DWORD nController, int LeftMotorVal = 65535, int RightMotorVal = 65535 );
|
||||
// Initialize nControl XInput enabled controller
|
||||
bool InitiateXInputController( LPXCONTROLLER gController, int nControl );
|
||||
|
||||
// XController dialog
|
||||
|
||||
#define XC_DPAD 1
|
||||
#define XC_LTBS 2
|
||||
#define XC_RTBS 3
|
||||
|
||||
// Reads current XInput controller key config, and shows it in the dialog.
|
||||
bool ReadXInputControllerKeys( HWND hDlg, LPXCONTROLLER gController );
|
||||
// Stores dialog's button configuration into the XCONTROLLER struct.
|
||||
void StoreXInputControllerKeys( HWND hDlg, LPXCONTROLLER gController );
|
||||
// Fills N64 button comobox with its buttons.
|
||||
inline void FillN64ButtonComboBox( HWND hDlg, int ComboBox )
|
||||
{
|
||||
SendDlgItemMessage( hDlg, ComboBox, CB_ADDSTRING, 0, ( LPARAM )_T( "None" ));
|
||||
SendDlgItemMessage( hDlg, ComboBox, CB_ADDSTRING, 0, ( LPARAM )_T( "A" ));
|
||||
SendDlgItemMessage( hDlg, ComboBox, CB_ADDSTRING, 0, ( LPARAM )_T( "B" ));
|
||||
SendDlgItemMessage( hDlg, ComboBox, CB_ADDSTRING, 0, ( LPARAM )_T( "Z" ));
|
||||
SendDlgItemMessage( hDlg, ComboBox, CB_ADDSTRING, 0, ( LPARAM )_T( "L" ));
|
||||
SendDlgItemMessage( hDlg, ComboBox, CB_ADDSTRING, 0, ( LPARAM )_T( "R" ));
|
||||
SendDlgItemMessage( hDlg, ComboBox, CB_ADDSTRING, 0, ( LPARAM )_T( "Start" ));
|
||||
SendDlgItemMessage( hDlg, ComboBox, CB_ADDSTRING, 0, ( LPARAM )_T( "C-Up" ));
|
||||
SendDlgItemMessage( hDlg, ComboBox, CB_ADDSTRING, 0, ( LPARAM )_T( "C-Left" ));
|
||||
SendDlgItemMessage( hDlg, ComboBox, CB_ADDSTRING, 0, ( LPARAM )_T( "C-Down" ));
|
||||
SendDlgItemMessage( hDlg, ComboBox, CB_ADDSTRING, 0, ( LPARAM )_T( "C-Right" ));
|
||||
SendDlgItemMessage( hDlg, ComboBox, CB_ADDSTRING, 0, ( LPARAM )_T( "D-Up" ));
|
||||
SendDlgItemMessage( hDlg, ComboBox, CB_ADDSTRING, 0, ( LPARAM )_T( "D-Left" ));
|
||||
SendDlgItemMessage( hDlg, ComboBox, CB_ADDSTRING, 0, ( LPARAM )_T( "D-Down" ));
|
||||
SendDlgItemMessage( hDlg, ComboBox, CB_ADDSTRING, 0, ( LPARAM )_T( "D-Right" ));
|
||||
SendDlgItemMessage( hDlg, ComboBox, CB_SETCURSEL, 0, ( LPARAM )0 );
|
||||
}
|
||||
|
||||
inline void FillN64AnalogComboBox( HWND hDlg, int ComboBox )
|
||||
{
|
||||
SendDlgItemMessage( hDlg, ComboBox, CB_ADDSTRING, 0, ( LPARAM )_T( "None" ));
|
||||
SendDlgItemMessage( hDlg, ComboBox, CB_ADDSTRING, 0, ( LPARAM )_T( "DPad" ));
|
||||
SendDlgItemMessage( hDlg, ComboBox, CB_ADDSTRING, 0, ( LPARAM )_T( "C Buttons" ));
|
||||
if( ComboBox != IDC_XC_DPAD )
|
||||
SendDlgItemMessage( hDlg, ComboBox, CB_ADDSTRING, 0, ( LPARAM )_T( "Analog Stick" ));
|
||||
SendDlgItemMessage( hDlg, ComboBox, CB_SETCURSEL, 0, ( LPARAM )0);
|
||||
}
|
||||
|
||||
// Save/Load Keys from own config file
|
||||
|
||||
void SaveXInputConfigToFile( FILE *file, LPXCONTROLLER gController );
|
||||
void LoadXInputConfigFromFile( FILE *file, LPXCONTROLLER gController );
|
||||
|
||||
#endif //_XINPUTCONTROLLER_H
|
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
N-Rage`s Dinput8 Plugin
|
||||
(C) 2002, 2006 Norbert Wladyka
|
||||
|
||||
Author`s Email: norbert.wladyka@chello.at
|
||||
Website: http://go.to/nrage
|
||||
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef _COMMONINCLUDES_H_
|
||||
#define _COMMONINCLUDES_H_
|
||||
|
||||
#undef WIN32_LEAN_AND_MEAN
|
||||
#pragma warning(disable:4201)
|
||||
|
||||
#include "settings.h"
|
||||
#include <tchar.h>
|
||||
#include <wtypes.h>
|
||||
#include "resource.h"
|
||||
#include "Debug.h"
|
||||
|
||||
#if SPECS_VERSION == 0x0100
|
||||
#include "./ControllerSpecs/Controller #1.0.h"
|
||||
#endif // #if SPECS_VERSION == 0x0100
|
||||
|
||||
#if SPECS_VERSION >= 0x0101
|
||||
#include "./ControllerSpecs/Controller #1.1.h"
|
||||
#endif // #if SPECS_VERSION == 0x0100
|
||||
|
||||
|
||||
#define P_malloc( size ) HeapAlloc( g_hHeap, 0, size )
|
||||
#define P_free( memory ) HeapFree( g_hHeap, 0, memory )
|
||||
#define P_realloc( memory, size ) \
|
||||
( (memory == NULL) ? P_malloc(size) : HeapReAlloc( g_hHeap, 0, memory, size ) )
|
||||
|
||||
#ifdef ARRAYSIZE
|
||||
#undef ARRAYSIZE
|
||||
#define ARRAYSIZE( array ) (sizeof(array) / sizeof(array[0]))
|
||||
#endif //ARRAYSIZE
|
||||
|
||||
#endif // #ifndef _COMMONINCLUDES_H_
|
|
@ -0,0 +1,37 @@
|
|||
Plugged=1
|
||||
RawData=1
|
||||
PakType=0
|
||||
RealN64Range=1
|
||||
RapidFireEnabled=0
|
||||
RapidFireRate=3
|
||||
StickRange=66
|
||||
MouseMoveX=0
|
||||
MouseMoveY=0
|
||||
AxisSet=0
|
||||
KeyAbsoluteX=0
|
||||
KeyAbsoluteY=0
|
||||
PadDeadZone=5
|
||||
MouseSensitivityX=100
|
||||
MouseSensitivityY=100
|
||||
RumbleType=1
|
||||
RumbleStrength=80
|
||||
VisualRumble=0
|
||||
MemPakFile=Mempak1.mpk
|
||||
Button=0 0 4D 0 5
|
||||
Button=0 1 4B 0 5
|
||||
Button=0 2 50 0 5
|
||||
Button=0 3 48 0 5
|
||||
Button=0 4 1C 0 5
|
||||
Button=0 5 39 0 5
|
||||
Button=0 6 2E 0 5
|
||||
Button=0 7 2D 0 5
|
||||
Button=0 8 20 0 5
|
||||
Button=0 9 1E 0 5
|
||||
Button=0 10 1F 0 5
|
||||
Button=0 11 11 0 5
|
||||
Button=0 12 12 0 5
|
||||
Button=0 13 10 0 5
|
||||
Button=0 14 CD 0 5
|
||||
Button=0 15 CB 0 5
|
||||
Button=0 16 D0 0 5
|
||||
Button=0 17 C8 0 5
|
|
@ -0,0 +1,3 @@
|
|||
Button=0 1 4E 0 5
|
||||
Button=0 2 4A 0 5
|
||||
Button=-1 0 0F 0 5
|
|
@ -0,0 +1,374 @@
|
|||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by NRagePluginV2.rc
|
||||
//
|
||||
#define IDC_STATIC -1
|
||||
#define IDC_STOREINDB 3
|
||||
#define IDC_ERASEFROMDB 4
|
||||
#define IDC_SAVEPROFILE 5
|
||||
#define IDC_UPDATEDB 6
|
||||
#define IDC_SAVEBINARY 6
|
||||
#define IDC_LOADPROFILE 7
|
||||
#define IDC_LOADSHORTCUTS 7
|
||||
#define IDUSE 8
|
||||
#define IDD_MAINCFGDIALOG 101
|
||||
#define IDD_CONTROLLER 104
|
||||
#define IDD_SHORTCUT 106
|
||||
#define IDD_CONTROLS 108
|
||||
#define IDD_CONTROLLERPAK 109
|
||||
#define IDD_MODIFIER 111
|
||||
#define IDD_PAK_MEMPAK 112
|
||||
#define IDD_PAK_TRANSFER 113
|
||||
#define IDD_PAK_ADAPTOID 115
|
||||
#define IDD_DEVICES 117
|
||||
#define IDD_PAK_TEXT 118
|
||||
#define IDD_MOD_MOVE 119
|
||||
#define IDD_FOLDERS 120
|
||||
#define IDD_MOD_MACRO 121
|
||||
#define IDD_MOD_CONFIG 122
|
||||
#define IDD_PAK_RUMBLE 123
|
||||
#define IDR_PROFILE_DEFAULT1 139
|
||||
#define IDS_ERR_DINOTFOUND 141
|
||||
#define IDS_ERR_DICREATE 142
|
||||
#define IDS_DLG_MPCHOOSE 143
|
||||
#define IDS_ERR_MPREAD 144
|
||||
#define IDR_SHORTCUT1 144
|
||||
#define IDR_SHORTCUTS_DEFAULT 144
|
||||
#define IDS_ERR_GBROM 145
|
||||
#define IDD_XCONTROLS 145
|
||||
#define IDS_ERR_GBSRAMERR 146
|
||||
#define IDS_VERSTRING 147
|
||||
#define IDS_TAB_CONTROLLER 148
|
||||
#define IDS_TAB_SHORTCUTS 149
|
||||
#define IDS_TAB_CONTROLS 150
|
||||
#define IDS_TAB_DEVICES 151
|
||||
#define IDS_TAB_MODIFIERS 152
|
||||
#define IDS_TAB_CONTROLLERPAK 153
|
||||
#define IDS_DLG_CLEAR 154
|
||||
#define IDS_DLG_CLEAR_TITLE 155
|
||||
#define IDS_DLG_CONTROLRESTORE 156
|
||||
#define IDS_DLG_CONTROLRESTORE_TITLE 157
|
||||
#define IDS_ERR_PROFWRITE 158
|
||||
#define IDS_ERR_PROFREAD 159
|
||||
#define IDS_C_POLLING 160
|
||||
#define IDS_C_RANGE 161
|
||||
#define IDS_D_MSX 162
|
||||
#define IDS_D_MSY 163
|
||||
#define IDS_D_DEADZONE 164
|
||||
#define IDS_D_RUMBLESTR 165
|
||||
#define IDS_M_MOVEVALUE 166
|
||||
#define IDS_M_TAB_NONE 167
|
||||
#define IDS_M_TAB_MOVE 168
|
||||
#define IDS_M_TAB_MACRO 169
|
||||
#define IDS_M_TAB_CONFIG 170
|
||||
#define IDS_M_MOUSE_PREFIX 171
|
||||
#define IDS_M_KB_PREFIX 172
|
||||
#define IDS_M_NONE 173
|
||||
#define IDS_M_MOVE 174
|
||||
#define IDS_M_MACRO 175
|
||||
#define IDS_M_CONFIG 176
|
||||
#define IDS_M_ASSIGNED 177
|
||||
#define IDS_M_TYPE 178
|
||||
#define IDS_M_PARAM 179
|
||||
#define IDS_P_NONE 180
|
||||
#define IDS_P_MEMPAK 181
|
||||
#define IDS_P_RUMBLEPAK 182
|
||||
#define IDS_P_TRANSFERPAK 183
|
||||
#define IDS_P_VOICEPAK 184
|
||||
#define IDS_P_ADAPTOIDPAK 185
|
||||
#define IDS_P_MEM_NORAW 186
|
||||
#define IDS_P_RUMBLE_NORAW 187
|
||||
#define IDS_P_RUMBLE_RAW 188
|
||||
#define IDS_P_TRANSFER_NORAW 189
|
||||
#define IDS_P_VOICE_RAW 190
|
||||
#define IDS_P_ADAPTOID_NORAW 191
|
||||
#define IDS_P_NONE_RAWNORAW 192
|
||||
#define IDS_P_MEM_NOCHANGE 193
|
||||
#define IDS_P_MEM_NAME 194
|
||||
#define IDS_P_MEM_REGION 195
|
||||
#define IDS_P_MEM_BLOCKS 196
|
||||
#define IDS_DLG_DELETEPAK 197
|
||||
#define IDS_DLG_FORMATPAK 198
|
||||
#define IDS_DLG_DELETENOTE 199
|
||||
#define IDS_P_MEM_BLOCKSFREE 200
|
||||
#define IDS_P_MEM_INUSE 201
|
||||
#define IDS_P_MEM_WRONGSIZE 202
|
||||
#define IDS_P_MEM_NONESELECTED 203
|
||||
#define IDS_P_MEM_DAMAGED 204
|
||||
#define IDS_BUTTON_UNASSIGNED 205
|
||||
#define IDS_STRING206 206
|
||||
#define IDS_ERR_SHORTREAD 206
|
||||
#define IDS_DLG_SHORTCUTRESTORE 207
|
||||
#define IDS_DLG_SHORTCUTRESTORE_TITLE 208
|
||||
#define IDS_C_GAMEPAD 209
|
||||
#define IDS_C_KEYBOARD 210
|
||||
#define IDS_C_MOUSE 211
|
||||
#define IDS_C_XAXIS 212
|
||||
#define IDS_C_YAXIS 213
|
||||
#define IDS_C_ZAXIS 214
|
||||
#define IDS_C_XROT 215
|
||||
#define IDS_C_YROT 216
|
||||
#define IDS_C_ZROT 217
|
||||
#define IDS_C_SLIDER 218
|
||||
#define IDS_C_POV 219
|
||||
#define IDS_C_BUTTON 220
|
||||
#define IDS_C_WHEEL 221
|
||||
#define IDS_C_UNKNOWN 222
|
||||
#define IDS_DLG_ABOUT 223
|
||||
#define IDS_DLG_ABOUT_TITLE 224
|
||||
#define IDS_ERR_NOINIT 225
|
||||
#define IDS_POP_MOUSEUNLOCKED 226
|
||||
#define IDS_POP_MOUSELOCKED 227
|
||||
#define IDS_POP_CHANGEPAK 228
|
||||
#define IDS_ERR_MAPVIEW 229
|
||||
#define IDS_DLG_CPF 230
|
||||
#define IDS_DLG_MPKN64 231
|
||||
#define IDS_DLG_A64 232
|
||||
#define IDS_DLG_GBGBC 233
|
||||
#define IDS_DLG_SVSAV 234
|
||||
#define IDS_ERR_HANDLER 235
|
||||
#define IDS_ERR_MEM_NOSPEC 236
|
||||
#define IDS_DLG_MEM_READONLY 237
|
||||
#define IDS_ERR_MEMOPEN 238
|
||||
#define IDS_DLG_MEM_BADADDRESSCRC 239
|
||||
#define IDS_P_MEM_NOREGION 240
|
||||
#define IDS_P_MEM_BETA 241
|
||||
#define IDS_P_MEM_NTSC 242
|
||||
#define IDS_P_MEM_GERMANY 243
|
||||
#define IDS_P_MEM_USA 244
|
||||
#define IDS_P_MEM_FRANCE 245
|
||||
#define IDS_P_MEM_ITALY 246
|
||||
#define IDS_P_MEM_JAPAN 247
|
||||
#define IDS_P_MEM_EUROPE 248
|
||||
#define IDS_P_MEM_SPAIN 249
|
||||
#define IDS_P_MEM_AUSTRALIA 250
|
||||
#define IDS_P_MEM_PAL 251
|
||||
#define IDS_P_MEM_UNKNOWNREGION 252
|
||||
#define IDS_ERR_NOTEWRITE 253
|
||||
#define IDS_ERR_MEMPAK_SPACE 254
|
||||
#define IDS_ERR_MEMPAK_NONOTES 255
|
||||
#define IDS_ERR_NOTEEOF 256
|
||||
#define IDS_ERR_NOTEREAD 257
|
||||
#define IDS_ERR_TITLE 258
|
||||
#define IDS_DLG_MSG_TITLE 259
|
||||
#define IDS_DLG_WARN_TITLE 260
|
||||
#define IDS_PLUGIN_TITLE 261
|
||||
#define IDS_ERR_MPCREATE 262
|
||||
#define IDS_DLG_SC 263
|
||||
#define IDS_P_MEM_ERROR 264
|
||||
#define IDS_P_R_NODEVICE 265
|
||||
#define IDS_STRING266 266
|
||||
#define IDS_P_TRANS_NOCHANGE 266
|
||||
#define IDS_STRING267 267
|
||||
#define IDS_DLG_TPAK_READONLY 267
|
||||
#define IDS_STRING268 268
|
||||
#define IDS_P_SWITCHING 268
|
||||
#define IDC_ROMDESC 1003
|
||||
#define IDC_ROMCONFIG 1004
|
||||
#define IDC_AUTOCONFIG 1005
|
||||
#define IDC_CONTROLLERTAB 1006
|
||||
#define IDC_DDOWN 1006
|
||||
#define IDC_CURRENTCONFIG 1007
|
||||
#define IDC_DLEFT 1007
|
||||
#define IDC_ROMID 1008
|
||||
#define IDC_DRIGHT 1008
|
||||
#define IDC_DUP 1009
|
||||
#define IDC_ADOWN 1010
|
||||
#define IDC_ALEFT 1011
|
||||
#define IDC_ARIGHT 1012
|
||||
#define IDC_UPPERTAB 1013
|
||||
#define IDC_AUP 1013
|
||||
#define IDC_CDOWN 1014
|
||||
#define IDC_CLEFT 1015
|
||||
#define IDC_CRIGHT 1016
|
||||
#define IDC_PAKTYPE 1017
|
||||
#define IDC_CUP 1017
|
||||
#define IDC_RIGHTTRIGGER 1018
|
||||
#define IDC_LEFTTRIGGER 1019
|
||||
#define IDC_PAKAREA 1020
|
||||
#define IDC_SBUTTON 1020
|
||||
#define IDC_ABUTTON 1021
|
||||
#define IDC_BBUTTON 1022
|
||||
#define IDC_ZTRIGGER 1023
|
||||
#define IDC_MEMPAKLIST 1025
|
||||
#define IDC_BROWSE 1026
|
||||
#define IDC_APPCHANGES 1026
|
||||
#define IDC_MEMPAK_BROWSE_ABS 1027
|
||||
#define IDC_RESET 1027
|
||||
#define IDC_GBSAVE_BROWSE 1027
|
||||
#define IDC_GBROM_BROWSE_REL 1028
|
||||
#define IDC_MEMPAKBROWSER 1029
|
||||
#define IDC_GBROM_BROWSE_ABS 1029
|
||||
#define IDC_GBSAVE_BROWSE_ABS 1030
|
||||
#define IDC_GBSAVE_BROWSE_REL 1031
|
||||
#define IDC_CTRDEVICE 1032
|
||||
#define IDC_DEADZONE 1033
|
||||
#define IDC_RUMBLE1 1034
|
||||
#define IDC_YMODIFIER 1034
|
||||
#define IDC_RUMBLE2 1035
|
||||
#define IDC_RUMBLE3 1036
|
||||
#define IDC_RUMBLESTRENGTH 1037
|
||||
#define IDC_MSSENSITIVITY_X 1038
|
||||
#define IDC_N64RANGE 1039
|
||||
#define IDC_MSSENSITIVITY_Y 1039
|
||||
#define IDC_PLUGGED 1040
|
||||
#define IDC_CTRRANGE 1041
|
||||
#define IDC_RAWMODE 1042
|
||||
#define IDT_MSSENSITIVITY_X 1043
|
||||
#define IDT_DEADZONE 1044
|
||||
#define IDT_RUMBLESTRENGTH 1045
|
||||
#define IDT_MSSENSITIVITY_Y 1046
|
||||
#define IDT_MEMPAKSTATE 1048
|
||||
#define IDT_RANGE 1049
|
||||
#define IDC_CLEARCONTROLLER 1050
|
||||
#define IDC_MODIFIERLIST 1054
|
||||
#define IDC_PROPWINDOW 1055
|
||||
#define IDC_KILLMODIFIER 1056
|
||||
#define IDC_NEWMODIFIER 1057
|
||||
#define IDC_XMODIFIER 1059
|
||||
#define IDT_XMODIFIER 1060
|
||||
#define IDT_YMODIFIER 1061
|
||||
#define IDC_ASSIGNMOD 1063
|
||||
#define IDT_ASSIGNMOD 1064
|
||||
#define IDC_MODTYP 1065
|
||||
#define IDC_MEMPAK_REL 1067
|
||||
#define IDC_MEMPAK_ABS 1068
|
||||
#define IDC_MEMPAK_REL_EDIT 1069
|
||||
#define IDC_MEMPAK_ABS_EDIT 1070
|
||||
#define IDC_GBROM_REL 1071
|
||||
#define IDC_GBROM_ABS 1072
|
||||
#define IDC_GBROM_REL_EDIT 1073
|
||||
#define IDC_GBROM_ABS_EDIT 1074
|
||||
#define IDC_GBSAVE_REL 1075
|
||||
#define IDC_GBSAVE_ABS 1076
|
||||
#define IDC_GBSAVE_REL_EDIT 1077
|
||||
#define IDC_GBSAVE_ABS_EDIT 1078
|
||||
#define IDC_GBSAVE_SAME 1079
|
||||
#define IDC_MEMPAK_BROWSE_REL 1081
|
||||
#define IDC_CHGDIR 1082
|
||||
#define IDT_PAKDESC 1084
|
||||
#define IDC_TOGGLE 1085
|
||||
#define IDC_XNEGATE 1086
|
||||
#define IDC_YNEGATE 1087
|
||||
#define IDC_ZTRIG 1090
|
||||
#define IDC_RAPIDFIREMODE 1091
|
||||
#define IDC_LTRIG 1092
|
||||
#define IDC_RTRIG 1093
|
||||
#define IDC_SETNOPAK_P1 1096
|
||||
#define IDC_LOCKMOUSE 1097
|
||||
#define IDT_LEFTTRIGGER 1100
|
||||
#define IDT_MODTYP 1100
|
||||
#define IDT_RIGHTTRIGGER 1101
|
||||
#define IDT_ABUTTON 1102
|
||||
#define IDC_SETMEMPAK_P1 1102
|
||||
#define IDC_ACCELERATEX 1102
|
||||
#define IDT_BBUTTON 1103
|
||||
#define IDC_ACCELERATEY 1103
|
||||
#define IDT_CDOWN 1104
|
||||
#define IDC_SETRUMBLEPAK_P1 1104
|
||||
#define IDT_CRIGHT 1105
|
||||
#define IDT_CLEFT 1106
|
||||
#define IDC_SETTRANSFERPAK_P1 1106
|
||||
#define IDT_CUP 1107
|
||||
#define IDT_DUP 1108
|
||||
#define IDC_SETADAPTOIDPAK_P1 1108
|
||||
#define IDT_DLEFT 1109
|
||||
#define IDT_DRIGHT 1110
|
||||
#define IDC_SWMEMRUMBLE_P1 1110
|
||||
#define IDT_DDOWN 1111
|
||||
#define IDT_SBUTTON 1112
|
||||
#define IDC_SWMEMADAPTOID_P1 1112
|
||||
#define IDT_ZTRIGGER 1113
|
||||
#define IDT_ADOWN 1114
|
||||
#define IDC_SETNOPAK_P2 1114
|
||||
#define IDT_ALEFT 1115
|
||||
#define IDT_ARIGHT 1116
|
||||
#define IDC_SETMEMPAK_P2 1116
|
||||
#define IDT_AUP 1117
|
||||
#define IDC_SETRUMBLEPAK_P2 1118
|
||||
#define IDC_CONFIG1 1119
|
||||
#define IDC_SETTRANSFERPAK_P2 1120
|
||||
#define IDC_CONFIG2 1120
|
||||
#define IDC_CONFIG3 1121
|
||||
#define IDC_SETADAPTOIDPAK_P2 1122
|
||||
#define IDC_CONFIGCYCLE 1122
|
||||
#define IDC_SWMEMRUMBLE_P2 1124
|
||||
#define IDC_MOUSEX 1124
|
||||
#define IDC_MOUSEY 1125
|
||||
#define IDC_SWMEMADAPTOID_P2 1126
|
||||
#define IDC_KEYX 1126
|
||||
#define IDC_KEYY 1127
|
||||
#define IDC_DELMEMPAK 1127
|
||||
#define IDC_SETNOPAK_P3 1128
|
||||
#define IDC_FORMATMEMPAK 1128
|
||||
#define IDC_SAVENOTE 1129
|
||||
#define IDC_VISUALRUMBLE 1129
|
||||
#define IDC_SETMEMPAK_P3 1130
|
||||
#define IDC_INSERTNOTE 1130
|
||||
#define IDC_STATE 1130
|
||||
#define IDC_DELETENOTE 1131
|
||||
#define IDC_SETRUMBLEPAK_P3 1132
|
||||
#define IDSAVE 1132
|
||||
#define IDC_GBSAVEPANEL 1133
|
||||
#define IDC_SETTRANSFERPAK_P3 1134
|
||||
#define IDC_MEMPAKPANEL 1134
|
||||
#define IDC_GBROMPANEL 1135
|
||||
#define IDC_SETADAPTOIDPAK_P3 1136
|
||||
#define IDC_SETDEFAULT 1136
|
||||
#define IDC_SWMEMRUMBLE_P3 1138
|
||||
#define IDC_GBROM_EDIT 1138
|
||||
#define IDC_SWMEMADAPTOID_P3 1140
|
||||
#define IDC_GBROM_BROWSE 1140
|
||||
#define IDC_GBSAVE_EDIT 1141
|
||||
#define IDC_SETNOPAK_P4 1142
|
||||
#define IDC_VERSIONSTRING 1142
|
||||
#define IDC_RAPIDFIREENABLE 1143
|
||||
#define IDC_SETMEMPAK_P4 1144
|
||||
#define IDC_RAPIDFIRERATE 1145
|
||||
#define IDC_SETRUMBLEPAK_P4 1146
|
||||
#define IDC_RAPIDFIREMODERATE 1146
|
||||
#define IDC_SETTRANSFERPAK_P4 1148
|
||||
#define IDC_DEADPANMOUSEY 1148
|
||||
#define IDC_BUFFEREDMOUSEY 1149
|
||||
#define IDC_SETADAPTOIDPAK_P4 1150
|
||||
#define IDC_ABSOLUTEMOUSEY 1150
|
||||
#define IDC_DEADPANMOUSEX 1151
|
||||
#define IDC_SWMEMRUMBLE_P4 1152
|
||||
#define IDC_BUFFEREDMOUSEX 1152
|
||||
#define IDC_ABSOLUTEMOUSEX 1153
|
||||
#define IDC_SWMEMADAPTOID_P4 1154
|
||||
#define IDC_RUMBLETEST 1154
|
||||
#define IDC_SETDEFAULTSC 1156
|
||||
#define IDC_SAVESHORTCUTS 1157
|
||||
#define IDC_COMBO1 1158
|
||||
#define IDC_LANGUAGE 1160
|
||||
#define IDC_SHOWMESSAGES 1162
|
||||
#define IDC_XC_USE 1178
|
||||
#define IDC_XINPUT_ENABLER 1179
|
||||
#define IDC_XINPUT_TITLE 1180
|
||||
#define IDC_XC_A 1181
|
||||
#define IDC_XC_B 1182
|
||||
#define IDC_XC_X 1183
|
||||
#define IDC_XC_Y 1184
|
||||
#define IDC_XC_LB 1185
|
||||
#define IDC_XC_RB 1186
|
||||
#define IDC_XC_LTSB 1187
|
||||
#define IDC_XC_RTSB 1188
|
||||
#define IDC_XC_LT 1189
|
||||
#define IDC_XC_RT 1190
|
||||
#define IDC_XC_BACK 1191
|
||||
#define IDC_XC_START 1192
|
||||
#define IDC_XC_DPAD 1193
|
||||
#define IDC_XC_LTS 1194
|
||||
#define IDC_XC_RTS 1195
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 147
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1196
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
|
@ -0,0 +1,139 @@
|
|||
/*
|
||||
N-Rage`s Dinput8 Plugin
|
||||
(C) 2002, 2006 Norbert Wladyka
|
||||
|
||||
Author`s Email: norbert.wladyka@chello.at
|
||||
Website: http://go.to/nrage
|
||||
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef _SETTINGS_H_
|
||||
#define _SETTINGS_H_
|
||||
|
||||
#define DIRECTINPUT_VERSION 0x0800
|
||||
#define VERSIONNUMBER "2.3c"
|
||||
|
||||
// hacks for GNU C compilers
|
||||
#ifdef __GNUC__
|
||||
|
||||
#ifndef WINVER
|
||||
#define WINVER 0x0500
|
||||
#endif // #ifndef WINVER
|
||||
|
||||
#ifndef _WIN32_IE
|
||||
#define _WIN32_IE 0x0300
|
||||
#endif // #ifndef _WIN32_IE
|
||||
|
||||
#ifndef _const unsigned char *_DEFINED
|
||||
#define _const unsigned char *_DEFINED
|
||||
typedef const unsigned char *const unsigned char *;
|
||||
#endif // #ifndef _const unsigned char *_DEFINED
|
||||
|
||||
#endif // #ifdef __GNUC__
|
||||
|
||||
// Our default buffer size for TCHAR arrays (resources get loaded through here)
|
||||
// MAKE SURE localized resources do not exceed this limit, or they will be cut off.
|
||||
#define DEFAULT_BUFFER 256
|
||||
|
||||
// conform to Plugin Specs 1.0
|
||||
#define SPECS_VERSION 0x0100
|
||||
// conform to Plugin Specs 1.1
|
||||
// #define SPECS_VERSION 0x0101
|
||||
|
||||
// use default settings for Release and Debugbuild
|
||||
#define STDCONFIG
|
||||
|
||||
#ifndef STDCONFIG
|
||||
// ----------------------------------------------------------------------------
|
||||
// custom (nonstandard) settings here
|
||||
// workaround for a Adaptoiddriver bug;
|
||||
// basically if the Adaptoid USB driver doesn't respond that there's a pak, say there is one anyway
|
||||
#define ADAPTOIDPAK_RUMBLEFIX
|
||||
|
||||
// remove unimplemented Elements of the GUI
|
||||
// #define HIDEUNIMPLEMENTED
|
||||
|
||||
// check controllercommands for valid CRC
|
||||
// #define MAKEADRESSCRCCHECK
|
||||
// display Button for writing Shortcuts binary
|
||||
// #define RAWPROFILEWRITE
|
||||
|
||||
// enable selection of Transferpak
|
||||
// #define V_TRANSFERPAK
|
||||
// enable selection of VoicePak
|
||||
// #define V_VOICEPAK
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#else
|
||||
// Standard Settings
|
||||
|
||||
#ifdef _DEBUG
|
||||
// ----------------------------------------------------------------------------
|
||||
// Standard Debug Settings
|
||||
// workaround for a Adaptoiddriver bug
|
||||
#define ADAPTOIDPAK_RUMBLEFIX
|
||||
|
||||
// remove unimplemented Elements of the GUI
|
||||
// #define HIDEUNIMPLEMENTED
|
||||
|
||||
// check controllercommands for valid CRC
|
||||
#define MAKEADRESSCRCCHECK
|
||||
// display Button for writing Shortcuts binary
|
||||
#define RAWPROFILEWRITE
|
||||
|
||||
// enable selection of Transferpak
|
||||
#define V_TRANSFERPAK
|
||||
// enable selection of VoicePak
|
||||
#define V_VOICEPAK
|
||||
|
||||
// spits out loads of extra info for ControllerCommand and ReadController
|
||||
// #define ENABLE_RAWPAK_DEBUG
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#else
|
||||
// ----------------------------------------------------------------------------
|
||||
// Standard Release Settings
|
||||
// workaround for a Adaptoiddriver bug
|
||||
#define ADAPTOIDPAK_RUMBLEFIX
|
||||
|
||||
// remove unimplemented Elements of the GUI
|
||||
#define HIDEUNIMPLEMENTED
|
||||
|
||||
// check controllercommands for valid CRC
|
||||
// #define MAKEADRESSCRCCHECK
|
||||
// display Button for writing Shortcuts binary
|
||||
// #define RAWPROFILEWRITE
|
||||
|
||||
// enable selection of Transferpak
|
||||
#define V_TRANSFERPAK
|
||||
// enable selection of VoicePak
|
||||
// #define V_VOICEPAK
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#endif // #ifdef _DEBUG
|
||||
#endif // #ifndef STDCONFIG
|
||||
#undef STDCONFIG
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define VERSIONINFO _T(VERSIONNUMBER) _T("-Debugbuild")
|
||||
#else
|
||||
#define VERSIONINFO _T(VERSIONNUMBER)
|
||||
#endif // #ifdef _DEBUG
|
||||
|
||||
#endif // #ifndef _SETTINGS_H_
|
Loading…
Reference in New Issue