diff --git a/Source/nragev20/ControllerSpecs/Controller #1.0.h b/Source/nragev20/ControllerSpecs/Controller #1.0.h deleted file mode 100644 index 804ee8d3f..000000000 --- a/Source/nragev20/ControllerSpecs/Controller #1.0.h +++ /dev/null @@ -1,220 +0,0 @@ -/********************************************************************************** -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 - diff --git a/Source/nragev20/NRagePluginV2.cpp b/Source/nragev20/NRagePluginV2.cpp index c0165f268..333380be3 100644 --- a/Source/nragev20/NRagePluginV2.cpp +++ b/Source/nragev20/NRagePluginV2.cpp @@ -155,7 +155,7 @@ EXPORT void CALL GetDllInfo ( PLUGIN_INFO* PluginInfo ) sprintf(PluginInfo->Name,"N-Rage For PJ64: %s",VER_FILE_VERSION_STR); #endif PluginInfo->Type = PLUGIN_TYPE_CONTROLLER; - PluginInfo->Version = SPECS_VERSION; + PluginInfo->Version = 0x0101; } /****************************************************************** @@ -289,21 +289,6 @@ EXPORT void CALL DllTest ( HWND hParent ) // It's easier to maintain one version of this, as not much really changes // between versions. --rabid -#if SPECS_VERSION == 0x0100 -#pragma message("Conforming to Zilmar Spec 1.0") -/****************************************************************** - 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]) - -#elif SPECS_VERSION >= 0x0101 -#pragma message("Conforming to Zilmar Spec 1.1") /****************************************************************** Function: InitiateControllers Purpose: This function initialises how each of the controllers @@ -313,22 +298,15 @@ EXPORT void CALL InitiateControllers( HWND hMainWindow, CONTROL Controls[4]) output: none *******************************************************************/ EXPORT void CALL InitiateControllers (CONTROL_INFO * ControlInfo) - -#endif // SPECS_VERSION { DebugWriteA("CALLED: InitiateControllers\n"); if( !prepareHeap()) return; -#if SPECS_VERSION == 0x0100 - g_strEmuInfo.hMainWindow = hMainWindow; -// g_strEmuInfo.HEADER = NULL; -#elif SPECS_VERSION >= 0x0101 g_strEmuInfo.hMainWindow = ControlInfo->hMainWindow; // g_strEmuInfo.MemoryBswaped = ControlInfo->MemoryBswaped; // g_strEmuInfo.HEADER = ControlInfo->HEADER; // UNDONE: Instead of just storing the header, figure out what ROM we're running and save that information somewhere -#endif // SPECS_VERSION // The emulator expects us to tell what controllers are plugged in and what their paks are at this point. diff --git a/Source/nragev20/NRage_Input_V2.vcproj b/Source/nragev20/NRage_Input_V2.vcproj index 9dfaf9522..ec46af6f4 100644 --- a/Source/nragev20/NRage_Input_V2.vcproj +++ b/Source/nragev20/NRage_Input_V2.vcproj @@ -206,10 +206,6 @@ RelativePath="commonIncludes.h" > - - diff --git a/Source/nragev20/NRage_Input_V2.vcxproj b/Source/nragev20/NRage_Input_V2.vcxproj index ff06e2fb7..352338f6d 100644 --- a/Source/nragev20/NRage_Input_V2.vcxproj +++ b/Source/nragev20/NRage_Input_V2.vcxproj @@ -65,7 +65,6 @@ - diff --git a/Source/nragev20/NRage_Input_V2.vcxproj.filters b/Source/nragev20/NRage_Input_V2.vcxproj.filters index 26daf4d76..e8473dacf 100644 --- a/Source/nragev20/NRage_Input_V2.vcxproj.filters +++ b/Source/nragev20/NRage_Input_V2.vcxproj.filters @@ -50,9 +50,6 @@ Header Files - - Header Files - Header Files diff --git a/Source/nragev20/commonIncludes.h b/Source/nragev20/commonIncludes.h index dcfc12641..85c2aefd9 100644 --- a/Source/nragev20/commonIncludes.h +++ b/Source/nragev20/commonIncludes.h @@ -33,14 +33,7 @@ #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 ) diff --git a/Source/nragev20/settings.h b/Source/nragev20/settings.h index 328ce4d27..cac30afe8 100644 --- a/Source/nragev20/settings.h +++ b/Source/nragev20/settings.h @@ -48,11 +48,6 @@ typedef const unsigned char *const unsigned char *; // 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