Update Controller_1.1.h
Change multi-line comments into single line comments, fix some typos, remove some title case, improve grammar, update some things for consistency, fix abbreviations
This commit is contained in:
parent
e6fc59d7d7
commit
27e0080393
|
@ -1,13 +1,13 @@
|
||||||
/**********************************************************************************
|
// Common controller plugin specification, version 1.1
|
||||||
Common Controller plugin spec, version #1.1
|
|
||||||
**********************************************************************************/
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <Common/stdtypes.h>
|
#include <Common/stdtypes.h>
|
||||||
|
|
||||||
enum { PLUGIN_TYPE_CONTROLLER = 4 };
|
enum { PLUGIN_TYPE_CONTROLLER = 4 };
|
||||||
|
|
||||||
/*** Conteroller plugin's ****/
|
// Controller plugins
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
PLUGIN_NONE = 1,
|
PLUGIN_NONE = 1,
|
||||||
|
@ -25,12 +25,13 @@ enum
|
||||||
#define CALL
|
#define CALL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/***** Structures *****/
|
// Structures
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
uint16_t Version; /* Should be set to 0x0101 */
|
uint16_t Version; // Should be set to 0x0101
|
||||||
uint16_t Type; /* Set to PLUGIN_TYPE_CONTROLLER */
|
uint16_t Type; // Set to PLUGIN_TYPE_CONTROLLER
|
||||||
char Name[100]; /* Name of the DLL */
|
char Name[100]; // Name of the DLL
|
||||||
int32_t Reserved1;
|
int32_t Reserved1;
|
||||||
int32_t Reserved2;
|
int32_t Reserved2;
|
||||||
} PLUGIN_INFO;
|
} PLUGIN_INFO;
|
||||||
|
@ -80,26 +81,27 @@ typedef struct
|
||||||
void * hMainWindow;
|
void * hMainWindow;
|
||||||
void * hinst;
|
void * hinst;
|
||||||
|
|
||||||
int32_t MemoryBswaped; // memory in client- or server-native endian
|
int32_t MemoryBswaped; // Memory in client or server-native endian
|
||||||
uint8_t * HEADER; // the ROM header (first 40h bytes of the ROM)
|
uint8_t * HEADER; // The ROM header (first 40h bytes of the ROM)
|
||||||
CONTROL * Controls; // pointer to array of 4 controllers, i.e.: CONTROL Controls[4];
|
CONTROL * Controls; // Pointer to array of 4 controllers, i.e.: CONTROL Controls[4];
|
||||||
} CONTROL_INFO;
|
} CONTROL_INFO;
|
||||||
|
|
||||||
/******************************************************************
|
/*
|
||||||
Function: CloseDLL
|
Function: CloseDLL
|
||||||
Purpose: This function is called when the emulator is closing
|
Purpose: This function is called when the emulator is closing
|
||||||
down allowing the dll to de-initialise.
|
down allowing the DLL to de-initialize.
|
||||||
input: none
|
input: none
|
||||||
output: none
|
output: none
|
||||||
*******************************************************************/
|
*/
|
||||||
|
|
||||||
EXPORT void CALL CloseDLL(void);
|
EXPORT void CALL CloseDLL(void);
|
||||||
|
|
||||||
/******************************************************************
|
/*
|
||||||
Function: ControllerCommand
|
Function: ControllerCommand
|
||||||
Purpose: To process the raw data that has just been sent to a
|
Purpose: To process the raw data that has just been sent to a
|
||||||
specific controller.
|
specific controller.
|
||||||
input: - Controller Number (0 to 3) and -1 signalling end of
|
input: - Controller Number (0 to 3) and -1 signaling end of
|
||||||
processing the pif ram.
|
processing the PIF RAM.
|
||||||
- Pointer of data to be processed.
|
- Pointer of data to be processed.
|
||||||
output: none
|
output: none
|
||||||
|
|
||||||
|
@ -107,113 +109,125 @@ note: This function is only needed if the DLL is allowing raw
|
||||||
data, or the plugin is set to raw
|
data, or the plugin is set to raw
|
||||||
|
|
||||||
the data that is being processed looks like this:
|
the data that is being processed looks like this:
|
||||||
initilize controller: 01 03 00 FF FF FF
|
initialize controller: 01 03 00 FF FF FF
|
||||||
read controller: 01 04 01 FF FF FF FF
|
read controller: 01 04 01 FF FF FF FF
|
||||||
*******************************************************************/
|
*/
|
||||||
|
|
||||||
EXPORT void CALL ControllerCommand(int Control, uint8_t * Command);
|
EXPORT void CALL ControllerCommand(int Control, uint8_t * Command);
|
||||||
|
|
||||||
/******************************************************************
|
/*
|
||||||
Function: DllAbout
|
Function: DllAbout
|
||||||
Purpose: This function is optional function that is provided
|
Purpose: This function is optional function that is provided
|
||||||
to give further information about the DLL.
|
to give further information about the DLL.
|
||||||
input: a handle to the window that calls this function
|
input: a handle to the window that calls this function
|
||||||
output: none
|
output: none
|
||||||
*******************************************************************/
|
*/
|
||||||
|
|
||||||
EXPORT void CALL DllAbout(void * hParent);
|
EXPORT void CALL DllAbout(void * hParent);
|
||||||
|
|
||||||
/******************************************************************
|
/*
|
||||||
Function: DllConfig
|
Function: DllConfig
|
||||||
Purpose: This function is optional function that is provided
|
Purpose: This function is optional function that is provided
|
||||||
to allow the user to configure the dll
|
to allow the user to configure the DLL
|
||||||
input: a handle to the window that calls this function
|
input: a handle to the window that calls this function
|
||||||
output: none
|
output: none
|
||||||
*******************************************************************/
|
*/
|
||||||
|
|
||||||
EXPORT void CALL DllConfig(void * hParent);
|
EXPORT void CALL DllConfig(void * hParent);
|
||||||
|
|
||||||
/******************************************************************
|
/*
|
||||||
Function: DllTest
|
Function: DllTest
|
||||||
Purpose: This function is optional function that is provided
|
Purpose: This function is optional function that is provided
|
||||||
to allow the user to test the dll
|
to allow the user to test the DLL
|
||||||
input: a handle to the window that calls this function
|
input: a handle to the window that calls this function
|
||||||
output: none
|
output: none
|
||||||
*******************************************************************/
|
*/
|
||||||
|
|
||||||
EXPORT void CALL DllTest(void * hParent);
|
EXPORT void CALL DllTest(void * hParent);
|
||||||
|
|
||||||
/******************************************************************
|
/*
|
||||||
Function: GetDllInfo
|
Function: GetDllInfo
|
||||||
Purpose: This function allows the emulator to gather information
|
Purpose: This function allows the emulator to gather information
|
||||||
about the dll by filling in the PluginInfo structure.
|
about the DLL by filling in the PluginInfo structure.
|
||||||
input: a pointer to a PLUGIN_INFO stucture that needs to be
|
input: a pointer to a PLUGIN_INFO structure that needs to be
|
||||||
filled by the function. (see def above)
|
filled by the function. (see def above)
|
||||||
output: none
|
output: none
|
||||||
*******************************************************************/
|
*/
|
||||||
|
|
||||||
EXPORT void CALL GetDllInfo(PLUGIN_INFO * PluginInfo);
|
EXPORT void CALL GetDllInfo(PLUGIN_INFO * PluginInfo);
|
||||||
|
|
||||||
/******************************************************************
|
/*
|
||||||
Function: GetKeys
|
Function: GetKeys
|
||||||
Purpose: To get the current state of the controllers buttons.
|
Purpose: To get the current state of the controllers buttons.
|
||||||
input: - Controller Number (0 to 3)
|
input: - Controller Number (0 to 3)
|
||||||
- A pointer to a BUTTONS structure to be filled with
|
- A pointer to a BUTTONS structure to be filled with
|
||||||
the controller state.
|
the controller state.
|
||||||
output: none
|
output: none
|
||||||
*******************************************************************/
|
*/
|
||||||
|
|
||||||
EXPORT void CALL GetKeys(int32_t Control, BUTTONS * Keys);
|
EXPORT void CALL GetKeys(int32_t Control, BUTTONS * Keys);
|
||||||
|
|
||||||
/******************************************************************
|
/*
|
||||||
Function: InitiateControllers
|
Function: InitiateControllers
|
||||||
Purpose: This function initialises how each of the controllers
|
Purpose: This function initializes how each of the controllers
|
||||||
should be handled.
|
should be handled.
|
||||||
input: - The handle to the main window.
|
input: - The handle to the main window.
|
||||||
- A controller structure that needs to be filled for
|
- A controller structure that needs to be filled for
|
||||||
the emulator to know how to handle each controller.
|
the emulator to know how to handle each controller.
|
||||||
output: none
|
output: none
|
||||||
*******************************************************************/
|
*/
|
||||||
|
|
||||||
EXPORT void CALL InitiateControllers(CONTROL_INFO ControlInfo);
|
EXPORT void CALL InitiateControllers(CONTROL_INFO ControlInfo);
|
||||||
|
|
||||||
/******************************************************************
|
/*
|
||||||
Function: ReadController
|
Function: ReadController
|
||||||
Purpose: To process the raw data in the pif ram that is about to
|
Purpose: To process the raw data in the PIF RAM that is about to
|
||||||
be read.
|
be read.
|
||||||
input: - Controller Number (0 to 3) and -1 signalling end of
|
input: - Controller Number (0 to 3) and -1 signaling end of
|
||||||
processing the pif ram.
|
processing the PIF RAM.
|
||||||
- Pointer of data to be processed.
|
- Pointer of data to be processed.
|
||||||
output: none
|
output: none
|
||||||
note: This function is only needed if the DLL is allowing raw
|
note: This function is only needed if the DLL is allowing raw
|
||||||
data.
|
data.
|
||||||
*******************************************************************/
|
*/
|
||||||
|
|
||||||
EXPORT void CALL ReadController(int Control, uint8_t * Command);
|
EXPORT void CALL ReadController(int Control, uint8_t * Command);
|
||||||
|
|
||||||
/******************************************************************
|
/*
|
||||||
Function: RomClosed
|
Function: RomClosed
|
||||||
Purpose: This function is called when a rom is closed.
|
Purpose: This function is called when a ROM is closed.
|
||||||
input: none
|
input: none
|
||||||
output: none
|
output: none
|
||||||
*******************************************************************/
|
*/
|
||||||
|
|
||||||
EXPORT void CALL RomClosed(void);
|
EXPORT void CALL RomClosed(void);
|
||||||
|
|
||||||
/******************************************************************
|
/*
|
||||||
Function: RomOpen
|
Function: RomOpen
|
||||||
Purpose: This function is called when a rom is open. (from the
|
Purpose: This function is called when a ROM is open. (from the
|
||||||
emulation thread)
|
emulation thread)
|
||||||
input: none
|
input: none
|
||||||
output: none
|
output: none
|
||||||
*******************************************************************/
|
*/
|
||||||
|
|
||||||
EXPORT void CALL RomOpen(void);
|
EXPORT void CALL RomOpen(void);
|
||||||
|
|
||||||
/******************************************************************
|
/*
|
||||||
Function: WM_KeyDown
|
Function: WM_KeyDown
|
||||||
Purpose: To pass the WM_KeyDown message from the emulator to the
|
Purpose: To pass the WM_KeyDown message from the emulator to the
|
||||||
plugin.
|
plugin.
|
||||||
input: wParam and lParam of the WM_KEYDOWN message.
|
input: wParam and lParam of the WM_KEYDOWN message.
|
||||||
output: none
|
output: none
|
||||||
*******************************************************************/
|
*/
|
||||||
|
|
||||||
EXPORT void CALL WM_KeyDown(uint32_t wParam, uint32_t lParam);
|
EXPORT void CALL WM_KeyDown(uint32_t wParam, uint32_t lParam);
|
||||||
|
|
||||||
/******************************************************************
|
/*
|
||||||
Function: WM_KeyUp
|
Function: WM_KeyUp
|
||||||
Purpose: To pass the WM_KEYUP message from the emulator to the
|
Purpose: To pass the WM_KEYUP message from the emulator to the
|
||||||
plugin.
|
plugin.
|
||||||
input: wParam and lParam of the WM_KEYDOWN message.
|
input: wParam and lParam of the WM_KEYDOWN message.
|
||||||
output: none
|
output: none
|
||||||
*******************************************************************/
|
*/
|
||||||
|
|
||||||
EXPORT void CALL WM_KeyUp(uint32_t wParam, uint32_t lParam);
|
EXPORT void CALL WM_KeyUp(uint32_t wParam, uint32_t lParam);
|
Loading…
Reference in New Issue