mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 09:39:46 -06:00
Cleaning up XK's mess, added a simple profiler, minor disasm fix. Too lazy to split it up into individual changes. Savestates not yet working.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@381 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -58,6 +58,11 @@ extern "C" {
|
||||
#define PLUGIN_TYPE_COMPILER 5
|
||||
#define PLUGIN_TYPE_DSP 6
|
||||
|
||||
#define STATE_MODE_READ 1
|
||||
#define STATE_MODE_WRITE 2
|
||||
#define STATE_MODE_MEASURE 3
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
WORD Version; // Set to 0x0100
|
||||
|
@ -1,98 +0,0 @@
|
||||
//__________________________________________________________________________________________________
|
||||
// Common compiler plugin spec, version #1.0 maintained by F|RES
|
||||
//
|
||||
|
||||
#ifndef _COMPILER_H_INCLUDED__
|
||||
#define _COMPILER_H_INCLUDED__
|
||||
|
||||
#include "PluginSpecs.h"
|
||||
|
||||
#include "ExportProlog.h"
|
||||
|
||||
typedef void (*TWriteBigEData)(const unsigned __int8* _pData, const unsigned __int32 _iAddress, const unsigned __int32 _iSize);
|
||||
typedef void (*TPatchFunction)(DWORD _uAddress, unsigned char* _pMachineCode);
|
||||
typedef void (*TLog)(char* _pMessage);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
HWND hWnd;
|
||||
TPatchFunction pPatchFunction;
|
||||
TLog pLog;
|
||||
} SCompilerInitialize;
|
||||
|
||||
|
||||
// __________________________________________________________________________________________________
|
||||
// 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* _PluginInfo);
|
||||
|
||||
// __________________________________________________________________________________________________
|
||||
// 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: 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:
|
||||
// Purpose:
|
||||
// input: SCompilerInitialize
|
||||
// output: none
|
||||
//
|
||||
EXPORT void CALL CompilerInitialize(SCompilerInitialize _CompilerInitialize);
|
||||
|
||||
// __________________________________________________________________________________________________
|
||||
// Function: SetupHeader
|
||||
// Purpose:
|
||||
// input:
|
||||
// output:
|
||||
//
|
||||
EXPORT void CALL SetupHeader(char* _szSourceCode);
|
||||
|
||||
// __________________________________________________________________________________________________
|
||||
// Function: CompileSourceCode
|
||||
// Purpose: This function will compile a NULL-terminated string of C
|
||||
// source code..
|
||||
// input: pDest: Pointer to address for the new machine code
|
||||
// strSourceCode: The NULL-terminated C Source Code string
|
||||
// output: Size of the Compiled Source, 0 == ERROR
|
||||
//
|
||||
EXPORT DWORD CALL CompileSourceCode(char* _szSourceCode, BYTE* _pMachineCode, DWORD _dwMaxSize);
|
||||
|
||||
// __________________________________________________________________________________________________
|
||||
// Function: InsertEventString
|
||||
// Purpose: This optional function will insert the code in
|
||||
// EventString[] immediately before every block of compiled code
|
||||
// returns. Used to check for Interrupts and cyclic tasks.
|
||||
// input: The Event's C code
|
||||
// output: TRUE/FALSE for pass or fail
|
||||
//
|
||||
EXPORT DWORD CALL InsertEventString(char* _szEventSourceCode);
|
||||
|
||||
#include "ExportEpilog.h"
|
||||
#endif
|
@ -154,5 +154,13 @@ EXPORT void CALL DSP_Update(int cycles);
|
||||
//
|
||||
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 PAD_DoState(void *ptr, int mode);
|
||||
|
||||
#include "ExportEpilog.h"
|
||||
#endif
|
||||
|
@ -124,14 +124,12 @@ EXPORT void CALL PAD_Rumble(BYTE _numPAD, unsigned int _uType, unsigned int _uSt
|
||||
EXPORT unsigned int CALL PAD_GetAttachedPads();
|
||||
|
||||
// __________________________________________________________________________________________________
|
||||
// Function: SaveLoadState
|
||||
// Function: PAD_DoState
|
||||
// Purpose: Saves/load state
|
||||
// input: pointer to a 32k scratchpad/saved state
|
||||
// output: writes or reads to the scratchpad, returning size of data
|
||||
// TODO: save format should be standardized so that save
|
||||
// states don't become plugin dependent which would suck
|
||||
// input/output: ptr
|
||||
// input: mode
|
||||
//
|
||||
EXPORT unsigned int CALL SaveLoadState(char *ptr, BOOL save);
|
||||
EXPORT void CALL PAD_DoState(void *ptr, int mode);
|
||||
|
||||
#include "ExportEpilog.h"
|
||||
#endif
|
||||
|
@ -7,8 +7,6 @@
|
||||
|
||||
#include "PluginSpecs.h"
|
||||
|
||||
#include "ChunkFile.h"
|
||||
|
||||
#include "ExportProlog.h"
|
||||
|
||||
typedef void (*TSetPEToken)(const unsigned short _token, const int _bSetTokenAcknowledge);
|
||||
@ -152,7 +150,6 @@ EXPORT void CALL Video_UpdateXFB(BYTE* _pXFB, DWORD _dwWidth, DWORD _dwHeight);
|
||||
//
|
||||
EXPORT BOOL CALL Video_Screenshot(TCHAR* _szFilename);
|
||||
|
||||
|
||||
// __________________________________________________________________________________________________
|
||||
// Function: Video_EnterLoop
|
||||
// Purpose: FIXME!
|
||||
@ -171,11 +168,11 @@ EXPORT void CALL Video_AddMessage(const char* pstr, unsigned int milliseconds);
|
||||
|
||||
// __________________________________________________________________________________________________
|
||||
// Function: Video_DoState
|
||||
// Purpose: Saves/Loads the current video data state(depends on parameter)
|
||||
// input: The chunkfile to write to? FIXME
|
||||
// output: none
|
||||
// Purpose: Saves/Loads the current video data state (depends on mode parameter)
|
||||
// input/output: ptr
|
||||
// input: mode
|
||||
//
|
||||
EXPORT void CALL Video_DoState(ChunkFile &f);
|
||||
EXPORT void CALL Video_DoState(unsigned char **ptr, int mode);
|
||||
|
||||
#include "ExportEpilog.h"
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user