set svn:eol-style=native for **.h

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1438 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
bushing
2008-12-08 04:46:09 +00:00
parent e6fe5ec42f
commit 30c883bcfc
334 changed files with 30407 additions and 30407 deletions

View File

@ -1,60 +1,60 @@
// Copyright (C) 2003-2008 Dolphin Project.
// 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, version 2.0.
// 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 2.0 for more details.
// A copy of the GPL 2.0 should have been included with the program.
// If not, see http://www.gnu.org/licenses/
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
// This header contains type definitions that are shared between the Dolphin
// core and the plugin specs. Any definitions that are only used by the core
// should be placed in "Common.h" instead.
#ifndef _COMMONTYPES_H
#define _COMMONTYPES_H
#ifdef _WIN32
#include <tchar.h>
typedef unsigned __int8 u8;
typedef unsigned __int16 u16;
typedef unsigned __int32 u32;
typedef unsigned __int64 u64;
typedef signed __int8 s8;
typedef signed __int16 s16;
typedef signed __int32 s32;
typedef signed __int64 s64;
#else
typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned int u32;
#if !defined(OSX64)
typedef unsigned int BOOL;
#endif
typedef unsigned long long u64;
typedef char s8;
typedef short s16;
typedef int s32;
typedef long long s64;
#define TCHAR char
#endif // _WIN32
#endif // _COMMONTYPES_H
// Copyright (C) 2003-2008 Dolphin Project.
// 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, version 2.0.
// 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 2.0 for more details.
// A copy of the GPL 2.0 should have been included with the program.
// If not, see http://www.gnu.org/licenses/
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
// This header contains type definitions that are shared between the Dolphin
// core and the plugin specs. Any definitions that are only used by the core
// should be placed in "Common.h" instead.
#ifndef _COMMONTYPES_H
#define _COMMONTYPES_H
#ifdef _WIN32
#include <tchar.h>
typedef unsigned __int8 u8;
typedef unsigned __int16 u16;
typedef unsigned __int32 u32;
typedef unsigned __int64 u64;
typedef signed __int8 s8;
typedef signed __int16 s16;
typedef signed __int32 s32;
typedef signed __int64 s64;
#else
typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned int u32;
#if !defined(OSX64)
typedef unsigned int BOOL;
#endif
typedef unsigned long long u64;
typedef char s8;
typedef short s16;
typedef int s32;
typedef long long s64;
#define TCHAR char
#endif // _WIN32
#endif // _COMMONTYPES_H

View File

@ -1,6 +1,6 @@
#undef EXPORT
#undef CALL
#if defined(__cplusplus)
}
#endif
#undef EXPORT
#undef CALL
#if defined(__cplusplus)
}
#endif

View File

@ -1,15 +1,15 @@
#ifdef _WIN32
#define EXPORT __declspec(dllexport)
#define CALL __cdecl
#else
#define EXPORT __attribute__ ((visibility("default")))
#define CALL
#endif
#if defined(__cplusplus)
extern "C" {
#endif
#ifdef _WIN32
#define EXPORT __declspec(dllexport)
#define CALL __cdecl
#else
#define EXPORT __attribute__ ((visibility("default")))
#define CALL
#endif
#if defined(__cplusplus)
extern "C" {
#endif

View File

@ -1,79 +1,79 @@
//__________________________________________________________________________________________________
// Common plugin spec, version #1.0 maintained by F|RES
//
#ifndef _PLUGINS_H_INCLUDED__
#define _PLUGINS_H_INCLUDED__
#include "CommonTypes.h"
#ifdef _WIN32
#define EXPORT __declspec(dllexport)
#define CALL __cdecl
#else
#define EXPORT __attribute__ ((visibility("default")))
#define CALL
#endif
#ifdef _WIN32
#include <windows.h>
#else
#ifndef TRUE
#define TRUE 1
#define FALSE 0
#endif
#define __cdecl
// simulate something that looks like win32
// long term, kill these
// glxew defines BOOL. evil.
#ifdef BOOL
#undef BOOL
#endif
#define BOOL unsigned int
#define HWND void*
#define HINSTANCE void*
#endif
#if defined(__cplusplus)
extern "C" {
#endif
// plugin types
#define PLUGIN_TYPE_VIDEO 1
#define PLUGIN_TYPE_DVD 2
#define PLUGIN_TYPE_PAD 3
#define PLUGIN_TYPE_AUDIO 4
#define PLUGIN_TYPE_COMPILER 5
#define PLUGIN_TYPE_DSP 6
#define PLUGIN_TYPE_WIIMOTE 7
#define STATE_MODE_READ 1
#define STATE_MODE_WRITE 2
#define STATE_MODE_MEASURE 3
typedef struct
{
u16 Version; // Set to 0x0100
u16 Type; // Set to PLUGIN_TYPE_DVD
char Name[100]; // Name of the DLL
} PLUGIN_INFO;
typedef struct
{
HWND mainWindow;
HWND displayWindow;
HINSTANCE hInstance;
} OSData;
#if defined(__cplusplus)
}
#endif
#endif
//__________________________________________________________________________________________________
// Common plugin spec, version #1.0 maintained by F|RES
//
#ifndef _PLUGINS_H_INCLUDED__
#define _PLUGINS_H_INCLUDED__
#include "CommonTypes.h"
#ifdef _WIN32
#define EXPORT __declspec(dllexport)
#define CALL __cdecl
#else
#define EXPORT __attribute__ ((visibility("default")))
#define CALL
#endif
#ifdef _WIN32
#include <windows.h>
#else
#ifndef TRUE
#define TRUE 1
#define FALSE 0
#endif
#define __cdecl
// simulate something that looks like win32
// long term, kill these
// glxew defines BOOL. evil.
#ifdef BOOL
#undef BOOL
#endif
#define BOOL unsigned int
#define HWND void*
#define HINSTANCE void*
#endif
#if defined(__cplusplus)
extern "C" {
#endif
// plugin types
#define PLUGIN_TYPE_VIDEO 1
#define PLUGIN_TYPE_DVD 2
#define PLUGIN_TYPE_PAD 3
#define PLUGIN_TYPE_AUDIO 4
#define PLUGIN_TYPE_COMPILER 5
#define PLUGIN_TYPE_DSP 6
#define PLUGIN_TYPE_WIIMOTE 7
#define STATE_MODE_READ 1
#define STATE_MODE_WRITE 2
#define STATE_MODE_MEASURE 3
typedef struct
{
u16 Version; // Set to 0x0100
u16 Type; // Set to PLUGIN_TYPE_DVD
char Name[100]; // Name of the DLL
} PLUGIN_INFO;
typedef struct
{
HWND mainWindow;
HWND displayWindow;
HINSTANCE hInstance;
} OSData;
#if defined(__cplusplus)
}
#endif
#endif

View File

@ -1,149 +1,149 @@
//__________________________________________________________________________________________________
// Common dsp plugin spec, version #1.0 maintained by F|RES
//
#ifndef _DSP_H_INCLUDED__
#define _DSP_H_INCLUDED__
#include "PluginSpecs.h"
#include "ExportProlog.h"
typedef unsigned char (*TARAM_Read_U8)(const unsigned int _uAddress);
typedef unsigned char* (*TGetMemoryPointer)(const unsigned int _uAddress);
typedef unsigned char* (*TGetARAMPointer)(void);
typedef void (*TLogv)(const char* _szMessage, int _v);
typedef char* (*TName)(void);
typedef void (*TDebuggerBreak)(void);
typedef void (*TGenerateDSPInt)(void);
typedef unsigned int(*TAudioGetStreaming)(short* _pDestBuffer, unsigned int _numSamples);
typedef struct
{
void* hWnd;
TARAM_Read_U8 pARAM_Read_U8;
TGetMemoryPointer pGetMemoryPointer;
TGetARAMPointer pGetARAMPointer;
TLogv pLog;
TName pName;
TDebuggerBreak pDebuggerBreak;
TGenerateDSPInt pGenerateDSPInterrupt;
TAudioGetStreaming pGetAudioStreaming;
} DSPInitialize;
// __________________________________________________________________________________________________
// 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 structure that needs to be
// filled by the function. (see def above)
// output: none
//
EXPORT void CALL GetDllInfo(PLUGIN_INFO* _pPluginInfo);
// __________________________________________________________________________________________________
// 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: DllDebugger
// Purpose: Open the debugger
// input: a handle to the window that calls this function
// output: none
//
EXPORT void CALL DllDebugger(HWND _hParent, bool Show);
// __________________________________________________________________________________________________
// Function: DSP_Initialize
// Purpose:
// input: DSPInitialize
// output: none
//
EXPORT void CALL DSP_Initialize(DSPInitialize _dspInitialize);
// __________________________________________________________________________________________________
// Function: DSP_Shutdown
// Purpose: This function is called when the emulator is shutting down
// a game allowing the dll to de-initialise.
// input: none
// output: none
//
EXPORT void CALL DSP_Shutdown(void);
// __________________________________________________________________________________________________
// Function: DSP_ReadMailboxHigh
// Purpose: Send mail to high DSP Mailbox
// input: none
// output: none
//
EXPORT unsigned short CALL DSP_ReadMailboxHigh(bool _CPUMailbox);
// __________________________________________________________________________________________________
// Function: DSP_ReadMailboxLow
// Purpose: Send mail to low DSP Mailbox
// input: none
// output: none
//
EXPORT unsigned short CALL DSP_ReadMailboxLow(bool _CPUMailbox);
// __________________________________________________________________________________________________
// Function: DSP_WriteMailboxHigh
// Purpose: Send mail to high CPU Mailbox
// input: none
// output: none
//
EXPORT void CALL DSP_WriteMailboxHigh(bool _CPUMailbox, unsigned short _uHighMail);
// __________________________________________________________________________________________________
// Function: DSP_WriteMailboxLow
// Purpose: Send mail to low CPU Mailbox
// input: none
// output: none
//
EXPORT void CALL DSP_WriteMailboxLow(bool _CPUMailbox, unsigned short _uLowMail);
// __________________________________________________________________________________________________
// Function: DSP_WriteControlRegister
// Purpose: This function is called if the core reads from the DSP control register
// input: Value to be written
// output: value of the control register
//
EXPORT unsigned short CALL DSP_WriteControlRegister(unsigned short _Value);
// __________________________________________________________________________________________________
// Function: DSP_ReadControlRegister
// Purpose: This function is called if the core reads from the DSP control register
// output: value of the control register
//
EXPORT unsigned short CALL DSP_ReadControlRegister(void);
// __________________________________________________________________________________________________
// Function: DSP_Update
// Purpose: This function is called from time to time from the core.
// input: cycles - run this number of DSP clock cycles.
// output: TRUE if the flag is set, else FALSE
//
EXPORT void CALL DSP_Update(int cycles);
// __________________________________________________________________________________________________
// Function: DSP_SendAIBuffer
// Purpose: This function sends the current AI Buffer to the DSP plugin
// input: _Address : Memory-Address
// input: _Size : Size of the Buffer (always 32)
//
EXPORT void CALL DSP_SendAIBuffer(unsigned int address, int sample_rate);
// __________________________________________________________________________________________________
// Function: DSP_DoState
// Purpose: Saves/load state
// input/output: ptr
// input: mode
//
EXPORT void CALL DSP_DoState(unsigned char **ptr, int mode);
#include "ExportEpilog.h"
#endif
//__________________________________________________________________________________________________
// Common dsp plugin spec, version #1.0 maintained by F|RES
//
#ifndef _DSP_H_INCLUDED__
#define _DSP_H_INCLUDED__
#include "PluginSpecs.h"
#include "ExportProlog.h"
typedef unsigned char (*TARAM_Read_U8)(const unsigned int _uAddress);
typedef unsigned char* (*TGetMemoryPointer)(const unsigned int _uAddress);
typedef unsigned char* (*TGetARAMPointer)(void);
typedef void (*TLogv)(const char* _szMessage, int _v);
typedef char* (*TName)(void);
typedef void (*TDebuggerBreak)(void);
typedef void (*TGenerateDSPInt)(void);
typedef unsigned int(*TAudioGetStreaming)(short* _pDestBuffer, unsigned int _numSamples);
typedef struct
{
void* hWnd;
TARAM_Read_U8 pARAM_Read_U8;
TGetMemoryPointer pGetMemoryPointer;
TGetARAMPointer pGetARAMPointer;
TLogv pLog;
TName pName;
TDebuggerBreak pDebuggerBreak;
TGenerateDSPInt pGenerateDSPInterrupt;
TAudioGetStreaming pGetAudioStreaming;
} DSPInitialize;
// __________________________________________________________________________________________________
// 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 structure that needs to be
// filled by the function. (see def above)
// output: none
//
EXPORT void CALL GetDllInfo(PLUGIN_INFO* _pPluginInfo);
// __________________________________________________________________________________________________
// 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: DllDebugger
// Purpose: Open the debugger
// input: a handle to the window that calls this function
// output: none
//
EXPORT void CALL DllDebugger(HWND _hParent, bool Show);
// __________________________________________________________________________________________________
// Function: DSP_Initialize
// Purpose:
// input: DSPInitialize
// output: none
//
EXPORT void CALL DSP_Initialize(DSPInitialize _dspInitialize);
// __________________________________________________________________________________________________
// Function: DSP_Shutdown
// Purpose: This function is called when the emulator is shutting down
// a game allowing the dll to de-initialise.
// input: none
// output: none
//
EXPORT void CALL DSP_Shutdown(void);
// __________________________________________________________________________________________________
// Function: DSP_ReadMailboxHigh
// Purpose: Send mail to high DSP Mailbox
// input: none
// output: none
//
EXPORT unsigned short CALL DSP_ReadMailboxHigh(bool _CPUMailbox);
// __________________________________________________________________________________________________
// Function: DSP_ReadMailboxLow
// Purpose: Send mail to low DSP Mailbox
// input: none
// output: none
//
EXPORT unsigned short CALL DSP_ReadMailboxLow(bool _CPUMailbox);
// __________________________________________________________________________________________________
// Function: DSP_WriteMailboxHigh
// Purpose: Send mail to high CPU Mailbox
// input: none
// output: none
//
EXPORT void CALL DSP_WriteMailboxHigh(bool _CPUMailbox, unsigned short _uHighMail);
// __________________________________________________________________________________________________
// Function: DSP_WriteMailboxLow
// Purpose: Send mail to low CPU Mailbox
// input: none
// output: none
//
EXPORT void CALL DSP_WriteMailboxLow(bool _CPUMailbox, unsigned short _uLowMail);
// __________________________________________________________________________________________________
// Function: DSP_WriteControlRegister
// Purpose: This function is called if the core reads from the DSP control register
// input: Value to be written
// output: value of the control register
//
EXPORT unsigned short CALL DSP_WriteControlRegister(unsigned short _Value);
// __________________________________________________________________________________________________
// Function: DSP_ReadControlRegister
// Purpose: This function is called if the core reads from the DSP control register
// output: value of the control register
//
EXPORT unsigned short CALL DSP_ReadControlRegister(void);
// __________________________________________________________________________________________________
// Function: DSP_Update
// Purpose: This function is called from time to time from the core.
// input: cycles - run this number of DSP clock cycles.
// output: TRUE if the flag is set, else FALSE
//
EXPORT void CALL DSP_Update(int cycles);
// __________________________________________________________________________________________________
// Function: DSP_SendAIBuffer
// Purpose: This function sends the current AI Buffer to the DSP plugin
// input: _Address : Memory-Address
// input: _Size : Size of the Buffer (always 32)
//
EXPORT void CALL DSP_SendAIBuffer(unsigned int address, int sample_rate);
// __________________________________________________________________________________________________
// Function: DSP_DoState
// Purpose: Saves/load state
// input/output: ptr
// input: mode
//
EXPORT void CALL DSP_DoState(unsigned char **ptr, int mode);
#include "ExportEpilog.h"
#endif

View File

@ -1,127 +1,127 @@
//__________________________________________________________________________________________________
// Common pad plugin spec, version #1.0 maintained by F|RES
//
#ifndef _PAD_H_INCLUDED__
#define _PAD_H_INCLUDED__
#include "PluginSpecs.h"
#include "ExportProlog.h"
#define PAD_ERR_NONE 0
#define PAD_ERR_NO_CONTROLLER -1
#define PAD_ERR_NOT_READY -2
#define PAD_ERR_TRANSFER -3
#define PAD_USE_ORIGIN 0x0080
#define PAD_BUTTON_LEFT 0x0001
#define PAD_BUTTON_RIGHT 0x0002
#define PAD_BUTTON_DOWN 0x0004
#define PAD_BUTTON_UP 0x0008
#define PAD_TRIGGER_Z 0x0010
#define PAD_TRIGGER_R 0x0020
#define PAD_TRIGGER_L 0x0040
#define PAD_BUTTON_A 0x0100
#define PAD_BUTTON_B 0x0200
#define PAD_BUTTON_X 0x0400
#define PAD_BUTTON_Y 0x0800
#define PAD_BUTTON_START 0x1000
typedef void (*TLog)(const char* _pMessage);
typedef struct
{
HWND hWnd;
TLog pLog;
} SPADInitialize;
typedef struct
{
unsigned short button; // Or-ed PAD_BUTTON_* bits
unsigned char stickX; // 0 <= stickX <= 255
unsigned char stickY; // 0 <= stickY <= 255
unsigned char substickX; // 0 <= substickX <= 255
unsigned char substickY; // 0 <= substickY <= 255
unsigned char triggerLeft; // 0 <= triggerLeft <= 255
unsigned char triggerRight; // 0 <= triggerRight <= 255
unsigned char analogA; // 0 <= analogA <= 255
unsigned char analogB; // 0 <= analogB <= 255
bool MicButton;
signed char err; // one of PAD_ERR_* number
} SPADStatus;
/////////////////////////////////////////////////////////////////////////////////////////////////////
// I N T E R F A C E ////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////
// __________________________________________________________________________________________________
// 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 structure that needs to be
// filled by the function. (see def above)
// output: none
//
EXPORT void CALL GetDllInfo(PLUGIN_INFO* _pPluginInfo);
// __________________________________________________________________________________________________
// 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:
// Purpose:
// input: SPADInitialize
// output: none
//
EXPORT void CALL PAD_Initialize(SPADInitialize _PADInitialize);
// __________________________________________________________________________________________________
// Function: PAD_Shutdown
// Purpose: This function is called when the emulator is closing
// down allowing the DLL to de-initialise.
// input: none
// output: none
//
EXPORT void CALL PAD_Shutdown();
// __________________________________________________________________________________________________
// Function:
// Purpose:
// input:
// output:
//
EXPORT void CALL PAD_GetStatus(u8 _numPAD, SPADStatus* _pPADStatus);
// __________________________________________________________________________________________________
// Function: PAD_Rumble
// Purpose: Pad rumble!
// input: PAD number, Command type (Stop=0, Rumble=1, Stop Hard=2) and strength of Rumble
// output: none
//
EXPORT void CALL PAD_Rumble(u8 _numPAD, unsigned int _uType, unsigned int _uStrength);
// __________________________________________________________________________________________________
// Function: PAD_GetAttachedPads
// Purpose: Get mask of attached pads (eg: controller 1 & 4 -> 0x9)
// input: none
// output: number of pads
//
EXPORT unsigned int CALL PAD_GetAttachedPads();
// __________________________________________________________________________________________________
// Function: PAD_DoState
// Purpose: Saves/load state
// input/output: ptr
// input: mode
//
EXPORT void CALL PAD_DoState(void *ptr, int mode);
#include "ExportEpilog.h"
#endif
//__________________________________________________________________________________________________
// Common pad plugin spec, version #1.0 maintained by F|RES
//
#ifndef _PAD_H_INCLUDED__
#define _PAD_H_INCLUDED__
#include "PluginSpecs.h"
#include "ExportProlog.h"
#define PAD_ERR_NONE 0
#define PAD_ERR_NO_CONTROLLER -1
#define PAD_ERR_NOT_READY -2
#define PAD_ERR_TRANSFER -3
#define PAD_USE_ORIGIN 0x0080
#define PAD_BUTTON_LEFT 0x0001
#define PAD_BUTTON_RIGHT 0x0002
#define PAD_BUTTON_DOWN 0x0004
#define PAD_BUTTON_UP 0x0008
#define PAD_TRIGGER_Z 0x0010
#define PAD_TRIGGER_R 0x0020
#define PAD_TRIGGER_L 0x0040
#define PAD_BUTTON_A 0x0100
#define PAD_BUTTON_B 0x0200
#define PAD_BUTTON_X 0x0400
#define PAD_BUTTON_Y 0x0800
#define PAD_BUTTON_START 0x1000
typedef void (*TLog)(const char* _pMessage);
typedef struct
{
HWND hWnd;
TLog pLog;
} SPADInitialize;
typedef struct
{
unsigned short button; // Or-ed PAD_BUTTON_* bits
unsigned char stickX; // 0 <= stickX <= 255
unsigned char stickY; // 0 <= stickY <= 255
unsigned char substickX; // 0 <= substickX <= 255
unsigned char substickY; // 0 <= substickY <= 255
unsigned char triggerLeft; // 0 <= triggerLeft <= 255
unsigned char triggerRight; // 0 <= triggerRight <= 255
unsigned char analogA; // 0 <= analogA <= 255
unsigned char analogB; // 0 <= analogB <= 255
bool MicButton;
signed char err; // one of PAD_ERR_* number
} SPADStatus;
/////////////////////////////////////////////////////////////////////////////////////////////////////
// I N T E R F A C E ////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////
// __________________________________________________________________________________________________
// 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 structure that needs to be
// filled by the function. (see def above)
// output: none
//
EXPORT void CALL GetDllInfo(PLUGIN_INFO* _pPluginInfo);
// __________________________________________________________________________________________________
// 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:
// Purpose:
// input: SPADInitialize
// output: none
//
EXPORT void CALL PAD_Initialize(SPADInitialize _PADInitialize);
// __________________________________________________________________________________________________
// Function: PAD_Shutdown
// Purpose: This function is called when the emulator is closing
// down allowing the DLL to de-initialise.
// input: none
// output: none
//
EXPORT void CALL PAD_Shutdown();
// __________________________________________________________________________________________________
// Function:
// Purpose:
// input:
// output:
//
EXPORT void CALL PAD_GetStatus(u8 _numPAD, SPADStatus* _pPADStatus);
// __________________________________________________________________________________________________
// Function: PAD_Rumble
// Purpose: Pad rumble!
// input: PAD number, Command type (Stop=0, Rumble=1, Stop Hard=2) and strength of Rumble
// output: none
//
EXPORT void CALL PAD_Rumble(u8 _numPAD, unsigned int _uType, unsigned int _uStrength);
// __________________________________________________________________________________________________
// Function: PAD_GetAttachedPads
// Purpose: Get mask of attached pads (eg: controller 1 & 4 -> 0x9)
// input: none
// output: number of pads
//
EXPORT unsigned int CALL PAD_GetAttachedPads();
// __________________________________________________________________________________________________
// Function: PAD_DoState
// Purpose: Saves/load state
// input/output: ptr
// input: mode
//
EXPORT void CALL PAD_DoState(void *ptr, int mode);
#include "ExportEpilog.h"
#endif

View File

@ -1,199 +1,199 @@
//__________________________________________________________________________________________________
// Common video plugin spec, version #1.0 maintained by F|RES
//
#ifndef _VIDEO_H_INCLUDED__
#define _VIDEO_H_INCLUDED__
#include "Thread.h"
#include "PluginSpecs.h"
#include "ExportProlog.h"
typedef void (*TSetPEToken)(const unsigned short _token, const int _bSetTokenAcknowledge);
typedef void (*TSetPEFinish)(void);
typedef unsigned char* (*TGetMemoryPointer)(const unsigned int _iAddress);
typedef void (*TVideoLog)(const char* _pMessage, BOOL _bBreak);
typedef void (*TSysMessage)(const char *fmt, ...);
typedef void (*TRequestWindowSize)(int _iWidth, int _iHeight, BOOL _bFullscreen);
typedef void (*TCopiedToXFB)(void);
typedef BOOL (*TPeekMessages)(void);
typedef void (*TUpdateInterrupts)(void);
typedef void (*TUpdateFPSDisplay)(const char* text); // sets the window title
typedef void (*TKeyPressed)(int keycode, BOOL shift, BOOL control); // sets the window title
typedef struct
{
// fifo registers
volatile u32 CPBase;
volatile u32 CPEnd;
u32 CPHiWatermark;
u32 CPLoWatermark;
volatile u32 CPReadWriteDistance;
volatile u32 CPWritePointer;
volatile u32 CPReadPointer;
volatile u32 CPBreakpoint;
// Super Monkey Ball Adventure require this.
// Because the read&check-PEToken-loop stays in its JITed block I suppose.
// So no possiblity to ack the Token irq by the scheduler until some sort of PPC watchdog do its mess.
volatile u16 PEToken;
volatile BOOL bFF_GPReadEnable;
volatile BOOL bFF_BPEnable;
volatile BOOL bFF_GPLinkEnable;
volatile BOOL bFF_Breakpoint;
volatile BOOL CPCmdIdle;
volatile BOOL CPReadIdle;
// for GP watchdog hack
volatile u32 Fake_GPWDToken; // cicular incrementer
} SCPFifoStruct;
typedef struct
{
void *pWindowHandle;
TSetPEToken pSetPEToken;
TSetPEFinish pSetPEFinish;
TGetMemoryPointer pGetMemoryPointer;
TVideoLog pLog;
TSysMessage pSysMessage;
TRequestWindowSize pRequestWindowSize;
TCopiedToXFB pCopiedToXFB;
TPeekMessages pPeekMessages;
TUpdateInterrupts pUpdateInterrupts;
TUpdateFPSDisplay pUpdateFPSDisplay;
TKeyPressed pKeyPress;
SCPFifoStruct *pCPFifo;
unsigned char *pVIRegs;
void *pMemoryBase;
bool bWii;
} SVideoInitialize;
/////////////////////////////////////////////////////////////////////////////////////////////////////
// I N T E R F A C E ////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////
// __________________________________________________________________________________________________
// 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 structure that needs to be
// filled by the function. (see def above)
// output: none
//
//
#ifndef _WIN32
#define _CDECLCALL
#endif
EXPORT void CALL GetDllInfo(PLUGIN_INFO* _pPluginInfo);
// __________________________________________________________________________________________________
// 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: DllDebugger
// Purpose: Open the debugger
// input: a handle to the window that calls this function
// output: none
//
EXPORT void CALL DllDebugger(HWND _hParent, bool Show);
// __________________________________________________________________________________________________
// Function: Video_Initialize
// Purpose:
// input: SVideoInitialize* - pointer because window data will be passed back
// output: none
//
EXPORT void CALL Video_Initialize(SVideoInitialize* _pvideoInitialize);
// __________________________________________________________________________________________________
// Function: Video_Prepare
// Purpose: This function is called from the EmuThread before the
// emulation has started. It is just for threadsensitive
// APIs like OpenGL.
// input: none
// output: none
//
EXPORT void CALL Video_Prepare(void);
// __________________________________________________________________________________________________
// Function: Video_Shutdown
// Purpose: This function is called when the emulator is shutting down
// a game allowing the dll to de-initialise.
// input: none
// output: none
//
EXPORT void CALL Video_Shutdown(void);
// __________________________________________________________________________________________________
// Function: Video_ExecuteFifoBuffer
// Purpose: This function is called if data is inside the fifo-buffer
// input: a data-byte (i know we have to optimize this ;-))
// output: none
//
EXPORT void CALL Video_SendFifoData(u8* _uData, u32 len);
// __________________________________________________________________________________________________
// Function: Video_UpdateXFB
// Purpose: This fucntion is called when you have to flip the yuv2
// video-buffer. You should ignore this function after you
// got the first EFB to XFB copy.
// input: pointer to the XFB, width and height of the XFB
// output: none
//
EXPORT void CALL Video_UpdateXFB(u8* _pXFB, u32 _dwWidth, u32 _dwHeight, s32 _dwYOffset);
// __________________________________________________________________________________________________
// Function: Video_Screenshot
// Purpose: This fucntion is called when you want to do a screenshot
// input: Filename
// output: TRUE if all was okay
//
EXPORT BOOL CALL Video_Screenshot(TCHAR* _szFilename);
// __________________________________________________________________________________________________
// Function: Video_EnterLoop
// Purpose: FIXME!
// input: none
// output: none
//
EXPORT void CALL Video_EnterLoop(void);
// __________________________________________________________________________________________________
// Function: Video_AddMessage
// Purpose: Adds a message to the display queue, to be shown forthe specified time
// input: pointer to the null-terminated string, time in milliseconds
// output: none
//
EXPORT void CALL Video_AddMessage(const char* pstr, unsigned int milliseconds);
// __________________________________________________________________________________________________
// Function: Video_DoState
// Purpose: Saves/Loads the current video data state (depends on mode parameter)
// input/output: ptr
// input: mode
//
EXPORT void CALL Video_DoState(unsigned char **ptr, int mode);
// __________________________________________________________________________________________________
// Function: Video_Stop
// Purpose: Stop the video plugin before shutdown
// input/output:
// input:
//
EXPORT void CALL Video_Stop();
#include "ExportEpilog.h"
#endif
//__________________________________________________________________________________________________
// Common video plugin spec, version #1.0 maintained by F|RES
//
#ifndef _VIDEO_H_INCLUDED__
#define _VIDEO_H_INCLUDED__
#include "Thread.h"
#include "PluginSpecs.h"
#include "ExportProlog.h"
typedef void (*TSetPEToken)(const unsigned short _token, const int _bSetTokenAcknowledge);
typedef void (*TSetPEFinish)(void);
typedef unsigned char* (*TGetMemoryPointer)(const unsigned int _iAddress);
typedef void (*TVideoLog)(const char* _pMessage, BOOL _bBreak);
typedef void (*TSysMessage)(const char *fmt, ...);
typedef void (*TRequestWindowSize)(int _iWidth, int _iHeight, BOOL _bFullscreen);
typedef void (*TCopiedToXFB)(void);
typedef BOOL (*TPeekMessages)(void);
typedef void (*TUpdateInterrupts)(void);
typedef void (*TUpdateFPSDisplay)(const char* text); // sets the window title
typedef void (*TKeyPressed)(int keycode, BOOL shift, BOOL control); // sets the window title
typedef struct
{
// fifo registers
volatile u32 CPBase;
volatile u32 CPEnd;
u32 CPHiWatermark;
u32 CPLoWatermark;
volatile u32 CPReadWriteDistance;
volatile u32 CPWritePointer;
volatile u32 CPReadPointer;
volatile u32 CPBreakpoint;
// Super Monkey Ball Adventure require this.
// Because the read&check-PEToken-loop stays in its JITed block I suppose.
// So no possiblity to ack the Token irq by the scheduler until some sort of PPC watchdog do its mess.
volatile u16 PEToken;
volatile BOOL bFF_GPReadEnable;
volatile BOOL bFF_BPEnable;
volatile BOOL bFF_GPLinkEnable;
volatile BOOL bFF_Breakpoint;
volatile BOOL CPCmdIdle;
volatile BOOL CPReadIdle;
// for GP watchdog hack
volatile u32 Fake_GPWDToken; // cicular incrementer
} SCPFifoStruct;
typedef struct
{
void *pWindowHandle;
TSetPEToken pSetPEToken;
TSetPEFinish pSetPEFinish;
TGetMemoryPointer pGetMemoryPointer;
TVideoLog pLog;
TSysMessage pSysMessage;
TRequestWindowSize pRequestWindowSize;
TCopiedToXFB pCopiedToXFB;
TPeekMessages pPeekMessages;
TUpdateInterrupts pUpdateInterrupts;
TUpdateFPSDisplay pUpdateFPSDisplay;
TKeyPressed pKeyPress;
SCPFifoStruct *pCPFifo;
unsigned char *pVIRegs;
void *pMemoryBase;
bool bWii;
} SVideoInitialize;
/////////////////////////////////////////////////////////////////////////////////////////////////////
// I N T E R F A C E ////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////
// __________________________________________________________________________________________________
// 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 structure that needs to be
// filled by the function. (see def above)
// output: none
//
//
#ifndef _WIN32
#define _CDECLCALL
#endif
EXPORT void CALL GetDllInfo(PLUGIN_INFO* _pPluginInfo);
// __________________________________________________________________________________________________
// 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: DllDebugger
// Purpose: Open the debugger
// input: a handle to the window that calls this function
// output: none
//
EXPORT void CALL DllDebugger(HWND _hParent, bool Show);
// __________________________________________________________________________________________________
// Function: Video_Initialize
// Purpose:
// input: SVideoInitialize* - pointer because window data will be passed back
// output: none
//
EXPORT void CALL Video_Initialize(SVideoInitialize* _pvideoInitialize);
// __________________________________________________________________________________________________
// Function: Video_Prepare
// Purpose: This function is called from the EmuThread before the
// emulation has started. It is just for threadsensitive
// APIs like OpenGL.
// input: none
// output: none
//
EXPORT void CALL Video_Prepare(void);
// __________________________________________________________________________________________________
// Function: Video_Shutdown
// Purpose: This function is called when the emulator is shutting down
// a game allowing the dll to de-initialise.
// input: none
// output: none
//
EXPORT void CALL Video_Shutdown(void);
// __________________________________________________________________________________________________
// Function: Video_ExecuteFifoBuffer
// Purpose: This function is called if data is inside the fifo-buffer
// input: a data-byte (i know we have to optimize this ;-))
// output: none
//
EXPORT void CALL Video_SendFifoData(u8* _uData, u32 len);
// __________________________________________________________________________________________________
// Function: Video_UpdateXFB
// Purpose: This fucntion is called when you have to flip the yuv2
// video-buffer. You should ignore this function after you
// got the first EFB to XFB copy.
// input: pointer to the XFB, width and height of the XFB
// output: none
//
EXPORT void CALL Video_UpdateXFB(u8* _pXFB, u32 _dwWidth, u32 _dwHeight, s32 _dwYOffset);
// __________________________________________________________________________________________________
// Function: Video_Screenshot
// Purpose: This fucntion is called when you want to do a screenshot
// input: Filename
// output: TRUE if all was okay
//
EXPORT BOOL CALL Video_Screenshot(TCHAR* _szFilename);
// __________________________________________________________________________________________________
// Function: Video_EnterLoop
// Purpose: FIXME!
// input: none
// output: none
//
EXPORT void CALL Video_EnterLoop(void);
// __________________________________________________________________________________________________
// Function: Video_AddMessage
// Purpose: Adds a message to the display queue, to be shown forthe specified time
// input: pointer to the null-terminated string, time in milliseconds
// output: none
//
EXPORT void CALL Video_AddMessage(const char* pstr, unsigned int milliseconds);
// __________________________________________________________________________________________________
// Function: Video_DoState
// Purpose: Saves/Loads the current video data state (depends on mode parameter)
// input/output: ptr
// input: mode
//
EXPORT void CALL Video_DoState(unsigned char **ptr, int mode);
// __________________________________________________________________________________________________
// Function: Video_Stop
// Purpose: Stop the video plugin before shutdown
// input/output:
// input:
//
EXPORT void CALL Video_Stop();
#include "ExportEpilog.h"
#endif

View File

@ -1,109 +1,109 @@
//__________________________________________________________________________________________________
// Common wiimote plugin spec, unversioned
//
#ifndef _WIIMOTE_H_INCLUDED__
#define _WIIMOTE_H_INCLUDED__
#include "PluginSpecs.h"
#include "ExportProlog.h"
typedef void (*TLogv)(const char* _pMessage, int _v);
// Called when the Wiimote sends input reports to the Core.
// Payload: an L2CAP packet.
typedef void (*TWiimoteInput)(u16 _channelID, const void* _pData, u32 _Size);
// This data is passed from the core on initialization.
typedef struct
{
HWND hWnd;
TLogv pLog;
TWiimoteInput pWiimoteInput;
} SWiimoteInitialize;
/////////////////////////////////////////////////////////////////////////////////////////////////////
// I N T E R F A C E ////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////
// __________________________________________________________________________________________________
// 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 structure that needs to be
// filled by the function. (see def above)
// output: none
//
EXPORT void CALL GetDllInfo(PLUGIN_INFO* _pPluginInfo);
// __________________________________________________________________________________________________
// 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:
// Purpose:
// input: WiimoteInitialize
// output: none
//
EXPORT void CALL Wiimote_Initialize(SWiimoteInitialize _WiimoteInitialize);
// __________________________________________________________________________________________________
// Function: Wiimote_Shutdown
// Purpose: This function is called when the emulator is closing
// down allowing the DLL to de-initialise.
// input: none
// output: none
//
EXPORT void CALL Wiimote_Shutdown();
// __________________________________________________________________________________________________
// Function: Wiimote_Output
// Purpose: An L2CAP packet is passed from the Core to the Wiimote,
// on the HID CONTROL channel.
// input: Da pakket.
// output: none
//
EXPORT void CALL Wiimote_ControlChannel(u16 _channelID, const void* _pData, u32 _Size);
// __________________________________________________________________________________________________
// Function: Wiimote_Input
// Purpose: An L2CAP packet is passed from the Core to the Wiimote,
// on the HID INTERRUPT channel.
// input: Da pakket.
// output: none
//
EXPORT void CALL Wiimote_InterruptChannel(u16 _channelID, const void* _pData, u32 _Size);
// __________________________________________________________________________________________________
// Function: Wiimote_Update
// Purpose: This function is called periodically by the Core.
// input: none
// output: none
//
EXPORT void CALL Wiimote_Update();
// __________________________________________________________________________________________________
// Function: PAD_GetAttachedPads
// Purpose: Get mask of attached pads (eg: controller 1 & 4 -> 0x9)
// input: none
// output: number of pads
//
EXPORT unsigned int CALL Wiimote_GetAttachedControllers();
// __________________________________________________________________________________________________
// Function: Wiimote_DoState
// Purpose: Saves/load state
// input/output: ptr
// input: mode
//
EXPORT void CALL Wiimote_DoState(void *ptr, int mode);
#include "ExportEpilog.h"
#endif //_WIIMOTE_H_INCLUDED__
//__________________________________________________________________________________________________
// Common wiimote plugin spec, unversioned
//
#ifndef _WIIMOTE_H_INCLUDED__
#define _WIIMOTE_H_INCLUDED__
#include "PluginSpecs.h"
#include "ExportProlog.h"
typedef void (*TLogv)(const char* _pMessage, int _v);
// Called when the Wiimote sends input reports to the Core.
// Payload: an L2CAP packet.
typedef void (*TWiimoteInput)(u16 _channelID, const void* _pData, u32 _Size);
// This data is passed from the core on initialization.
typedef struct
{
HWND hWnd;
TLogv pLog;
TWiimoteInput pWiimoteInput;
} SWiimoteInitialize;
/////////////////////////////////////////////////////////////////////////////////////////////////////
// I N T E R F A C E ////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////
// __________________________________________________________________________________________________
// 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 structure that needs to be
// filled by the function. (see def above)
// output: none
//
EXPORT void CALL GetDllInfo(PLUGIN_INFO* _pPluginInfo);
// __________________________________________________________________________________________________
// 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:
// Purpose:
// input: WiimoteInitialize
// output: none
//
EXPORT void CALL Wiimote_Initialize(SWiimoteInitialize _WiimoteInitialize);
// __________________________________________________________________________________________________
// Function: Wiimote_Shutdown
// Purpose: This function is called when the emulator is closing
// down allowing the DLL to de-initialise.
// input: none
// output: none
//
EXPORT void CALL Wiimote_Shutdown();
// __________________________________________________________________________________________________
// Function: Wiimote_Output
// Purpose: An L2CAP packet is passed from the Core to the Wiimote,
// on the HID CONTROL channel.
// input: Da pakket.
// output: none
//
EXPORT void CALL Wiimote_ControlChannel(u16 _channelID, const void* _pData, u32 _Size);
// __________________________________________________________________________________________________
// Function: Wiimote_Input
// Purpose: An L2CAP packet is passed from the Core to the Wiimote,
// on the HID INTERRUPT channel.
// input: Da pakket.
// output: none
//
EXPORT void CALL Wiimote_InterruptChannel(u16 _channelID, const void* _pData, u32 _Size);
// __________________________________________________________________________________________________
// Function: Wiimote_Update
// Purpose: This function is called periodically by the Core.
// input: none
// output: none
//
EXPORT void CALL Wiimote_Update();
// __________________________________________________________________________________________________
// Function: PAD_GetAttachedPads
// Purpose: Get mask of attached pads (eg: controller 1 & 4 -> 0x9)
// input: none
// output: number of pads
//
EXPORT unsigned int CALL Wiimote_GetAttachedControllers();
// __________________________________________________________________________________________________
// Function: Wiimote_DoState
// Purpose: Saves/load state
// input/output: ptr
// input: mode
//
EXPORT void CALL Wiimote_DoState(void *ptr, int mode);
#include "ExportEpilog.h"
#endif //_WIIMOTE_H_INCLUDED__