Merge 40780c7619
into 95037a4801
This commit is contained in:
commit
e8f3cee2cf
|
@ -56,7 +56,11 @@ bool CGfxPlugin::LoadFunctions(void)
|
|||
#endif
|
||||
|
||||
// Version 0x104 functions
|
||||
_LoadFunction("DrawFullScreenStatus", DrawStatus);
|
||||
LoadFunction(DrawStatus);
|
||||
if (DrawStatus == nullptr)
|
||||
{
|
||||
_LoadFunction("DrawFullScreenStatus", DrawStatus); // For Jabo D3D8 1.7
|
||||
}
|
||||
|
||||
// ROM browser
|
||||
LoadFunction(GetRomBrowserMenu);
|
||||
|
@ -110,7 +114,7 @@ bool CGfxPlugin::LoadFunctions(void)
|
|||
LoadFunction(CaptureScreen);
|
||||
LoadFunction(ShowCFB);
|
||||
LoadFunction(GetDebugInfo);
|
||||
_LoadFunction("InitiateGFXDebugger", InitiateDebugger);
|
||||
LoadFunction(InitiateDebugger);
|
||||
|
||||
if (ProcessRDPList == nullptr)
|
||||
{
|
||||
|
@ -221,7 +225,7 @@ bool CGfxPlugin::Initiate_1_4(CN64System * System, RenderWindow * Window)
|
|||
|
||||
// Get function from DLL
|
||||
int32_t(CALL * InitiateGFX)(GFX_INFO Gfx_Info);
|
||||
_LoadFunction("InitiateGFX", InitiateGFX);
|
||||
LoadFunction(InitiateGFX);
|
||||
if (InitiateGFX == nullptr)
|
||||
{
|
||||
WriteTrace(TraceVideoPlugin, TraceDebug, "Failed to find InitiateGFX");
|
||||
|
@ -392,7 +396,7 @@ bool CGfxPlugin::Initiate_1_5(CN64System * System, RenderWindow * Window)
|
|||
|
||||
// Get function from DLL
|
||||
int32_t(CALL * InitiateGFX)(GFX_INFO Gfx_Info);
|
||||
_LoadFunction("InitiateGFX", InitiateGFX);
|
||||
LoadFunction(InitiateGFX);
|
||||
if (InitiateGFX == nullptr)
|
||||
{
|
||||
WriteTrace(TraceVideoPlugin, TraceDebug, "Failed to find InitiateGFX");
|
||||
|
|
|
@ -7,12 +7,12 @@ extern "C" {
|
|||
|
||||
typedef struct
|
||||
{
|
||||
void * hWnd;
|
||||
void * hStatusBar;
|
||||
void * hWnd; // Render window
|
||||
void * hStatusBar; // If render window does not have a status bar then this is NULL
|
||||
|
||||
int32_t Reserved;
|
||||
|
||||
uint8_t * HEADER;
|
||||
uint8_t * HEADER; // This is the ROM header (first 40h bytes of the ROM)
|
||||
uint8_t * RDRAM;
|
||||
uint8_t * DMEM;
|
||||
uint8_t * IMEM;
|
||||
|
@ -89,13 +89,23 @@ Output: none
|
|||
*/
|
||||
EXPORT void CALL DrawScreen(void);
|
||||
|
||||
/*
|
||||
Function: DrawStatus
|
||||
Purpose: This function displays a status string on the screen,
|
||||
optionally right-aligned.
|
||||
Input: lpString - pointer to the status string to display
|
||||
RightAlign - nonzero to right-align the string,
|
||||
zero for left alignment
|
||||
Output: none
|
||||
*/
|
||||
EXPORT void CALL DrawStatus(const char * lpString, int32_t RightAlign);
|
||||
|
||||
/*
|
||||
Function: InitiateGFX
|
||||
Purpose: This function is called when the DLL is started to give
|
||||
information from the emulator that the n64 graphics
|
||||
information from the emulator that the N64 graphics
|
||||
uses. This is not called from the emulation thread.
|
||||
Input: Gfx_Info is passed to this function which is defined
|
||||
above.
|
||||
Input: GFX_INFO is passed to this function which is defined above.
|
||||
Output: TRUE on success
|
||||
FALSE on failure to initialise
|
||||
|
||||
|
@ -119,6 +129,18 @@ Output: none
|
|||
*/
|
||||
EXPORT void CALL MoveScreen(int xpos, int ypos);
|
||||
|
||||
/*
|
||||
Function: OnRomBrowserMenuItem
|
||||
Purpose: Callback when the ROM Browser menu supplied by the
|
||||
caller is invoked
|
||||
Input: MenuID - ID of the selected menu item
|
||||
hParent - handle to the parent window
|
||||
HEADER - pointer to the ROM header
|
||||
Output: none
|
||||
*/
|
||||
extern void (CALL * OnRomBrowserMenuItem)(int32_t MenuID, void * hParent, uint8_t * HEADER);
|
||||
extern void * (CALL * GetRomBrowserMenu)(void); // Items should have an ID between 4101 and 4200
|
||||
|
||||
/*
|
||||
Function: ProcessDList
|
||||
Purpose: This function is called when there is a Dlist to be
|
||||
|
@ -140,18 +162,26 @@ EXPORT void CALL ProcessRDPList(void);
|
|||
/*
|
||||
Function: ShowCFB
|
||||
Purpose: Useally once Dlists are started being displayed, cfb is
|
||||
ignored. This function tells the dll to start displaying
|
||||
ignored. This function tells the DLL to start displaying
|
||||
them again.
|
||||
Input: none
|
||||
Output: none
|
||||
*/
|
||||
EXPORT void CALL ShowCFB(void);
|
||||
|
||||
/*
|
||||
Function: SoftReset
|
||||
Purpose: This function is called to notify the plugin that a
|
||||
soft reset has occurred.
|
||||
Input: none
|
||||
Output: none
|
||||
*/
|
||||
EXPORT void CALL SoftReset(void);
|
||||
|
||||
/*
|
||||
Function: UpdateScreen
|
||||
Purpose: This function is called in response to a vsync of the
|
||||
screen were the VI bit in MI_INTR_REG has already been
|
||||
set
|
||||
screen were the VI bit in MI_INTR_REG has already been set
|
||||
Input: none
|
||||
Output: none
|
||||
*/
|
||||
|
@ -159,7 +189,7 @@ EXPORT void CALL UpdateScreen(void);
|
|||
|
||||
/*
|
||||
Function: ViStatusChanged
|
||||
Purpose: This function is called to notify the dll that the
|
||||
Purpose: This function is called to notify the DLL that the
|
||||
ViStatus registers value has been changed.
|
||||
Input: none
|
||||
Output: none
|
||||
|
@ -168,13 +198,86 @@ EXPORT void CALL ViStatusChanged(void);
|
|||
|
||||
/*
|
||||
Function: ViWidthChanged
|
||||
Purpose: This function is called to notify the dll that the
|
||||
Purpose: This function is called to notify the DLL that the
|
||||
ViWidth registers value has been changed.
|
||||
Input: none
|
||||
Output: none
|
||||
*/
|
||||
EXPORT void CALL ViWidthChanged(void);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
long left, top, right, bottom;
|
||||
} rectangle; // <windows.h> equivalent: RECT
|
||||
|
||||
typedef struct
|
||||
{
|
||||
void * hdc;
|
||||
int32_t fErase;
|
||||
rectangle rcPaint;
|
||||
int32_t fRestore;
|
||||
int32_t fIncUpdate;
|
||||
uint8_t rgbReserved[32];
|
||||
} window_paint; // <windows.h> equivalent: PAINTSTRUCT
|
||||
|
||||
typedef struct
|
||||
{
|
||||
// Menu
|
||||
// Items should have an ID between 5101 and 5200
|
||||
void * hGFXMenu;
|
||||
void (*ProcessMenuItem)(int32_t ID);
|
||||
|
||||
// Breakpoints
|
||||
int32_t UseBPoints;
|
||||
char BPPanelName[20];
|
||||
void (*Add_BPoint)(void);
|
||||
void (*CreateBPPanel)(void * hDlg, rectangle rcBox);
|
||||
void (*HideBPPanel)(void);
|
||||
void (*PaintBPPanel)(window_paint ps);
|
||||
void (*ShowBPPanel)(void);
|
||||
void (*RefreshBpoints)(void * hList);
|
||||
void (*RemoveBpoint)(void * hList, int index);
|
||||
void (*RemoveAllBpoint)(void);
|
||||
|
||||
// GFX command window
|
||||
void (*Enter_GFX_Commands_Window)(void);
|
||||
} GFXDEBUG_INFO;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
void (*UpdateBreakPoints)(void);
|
||||
void (*UpdateMemory)(void);
|
||||
void (*UpdateR4300iRegisters)(void);
|
||||
void (*Enter_BPoint_Window)(void);
|
||||
void (*Enter_R4300i_Commands_Window)(void);
|
||||
void (*Enter_R4300i_Register_Window)(void);
|
||||
void (*Enter_GFX_Commands_Window)(void);
|
||||
void (*Enter_Memory_Window)(void);
|
||||
} DEBUG_INFO;
|
||||
|
||||
/*
|
||||
Function: InitiateDebugger
|
||||
Purpose: This function is called when the DLL is started to be
|
||||
given information from the emulator that the N64 GFX
|
||||
interface needs to intergrate the debugger with the
|
||||
rest of the emulator.
|
||||
Input: DEBUG_INFO is passed to this function which is defined
|
||||
above.
|
||||
Output: none
|
||||
*/
|
||||
EXPORT void CALL InitiateDebugger(DEBUG_INFO DebugInfo);
|
||||
|
||||
/*
|
||||
Function: GetDebugInfo
|
||||
Purpose: This function allows the emulator to gather information
|
||||
about the debug capabilities of the DLL by filling in
|
||||
the DEBUG_INFO structure.
|
||||
Input: a pointer to a GFXDEBUG_INFO stucture that needs to be
|
||||
filled by the function. (see def above)
|
||||
Output: none
|
||||
*/
|
||||
EXPORT void CALL GetDebugInfo(GFXDEBUG_INFO * GFXDebugInfo);
|
||||
|
||||
#ifdef ANDROID
|
||||
/*
|
||||
Function: SurfaceCreated
|
||||
|
|
Loading…
Reference in New Issue