2012-12-19 09:30:18 +00:00
|
|
|
/****************************************************************************
|
|
|
|
* *
|
2015-11-10 05:21:49 +00:00
|
|
|
* Project64 - A Nintendo 64 emulator. *
|
2012-12-19 09:30:18 +00:00
|
|
|
* http://www.pj64-emu.com/ *
|
|
|
|
* Copyright (C) 2012 Project64. All rights reserved. *
|
|
|
|
* *
|
|
|
|
* License: *
|
|
|
|
* GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html *
|
|
|
|
* *
|
|
|
|
****************************************************************************/
|
|
|
|
#pragma once
|
2016-01-18 11:26:15 +00:00
|
|
|
#include <Project64-core/Plugins/PluginBase.h>
|
2012-12-19 09:30:18 +00:00
|
|
|
|
2015-01-30 21:01:21 +00:00
|
|
|
class CRSP_Plugin : public CPlugin
|
2013-02-11 08:27:00 +00:00
|
|
|
{
|
2015-11-08 06:08:15 +00:00
|
|
|
typedef struct {
|
|
|
|
/* Menu */
|
|
|
|
/* Items should have an ID between 5001 and 5100 */
|
|
|
|
void * hRSPMenu;
|
2016-01-06 02:54:42 +00:00
|
|
|
void(CALL *ProcessMenuItem) (int32_t ID);
|
2008-09-18 03:15:49 +00:00
|
|
|
|
2015-11-08 06:08:15 +00:00
|
|
|
/* Break Points */
|
|
|
|
int32_t UseBPoints;
|
|
|
|
char BPPanelName[20];
|
2016-01-06 02:54:42 +00:00
|
|
|
void(CALL *Add_BPoint) (void);
|
|
|
|
void(CALL *CreateBPPanel) (void);
|
|
|
|
void(CALL *HideBPPanel) (void);
|
|
|
|
void(CALL *PaintBPPanel) (void);
|
|
|
|
void(CALL *ShowBPPanel) (void);
|
|
|
|
void(CALL *RefreshBpoints) (void * hList);
|
|
|
|
void(CALL *RemoveBpoint) (void * hList, int32_t index);
|
|
|
|
void(CALL *RemoveAllBpoint) (void);
|
|
|
|
|
2015-11-08 06:08:15 +00:00
|
|
|
/* RSP command Window */
|
2016-01-06 02:54:42 +00:00
|
|
|
void(CALL *Enter_RSP_Commands_Window)(void);
|
2015-11-08 06:08:15 +00:00
|
|
|
} RSPDEBUG_INFO;
|
2008-09-18 03:15:49 +00:00
|
|
|
|
2015-11-08 06:08:15 +00:00
|
|
|
typedef struct {
|
2016-01-06 02:54:42 +00:00
|
|
|
void(CALL *UpdateBreakPoints)(void);
|
|
|
|
void(CALL *UpdateMemory)(void);
|
|
|
|
void(CALL *UpdateR4300iRegisters)(void);
|
|
|
|
void(CALL *Enter_BPoint_Window)(void);
|
|
|
|
void(CALL *Enter_R4300i_Commands_Window)(void);
|
|
|
|
void(CALL *Enter_R4300i_Register_Window)(void);
|
|
|
|
void(CALL *Enter_RSP_Commands_Window)(void);
|
|
|
|
void(CALL *Enter_Memory_Window)(void);
|
2015-11-08 06:08:15 +00:00
|
|
|
} DEBUG_INFO;
|
2008-09-18 03:15:49 +00:00
|
|
|
|
|
|
|
public:
|
2015-11-08 06:08:15 +00:00
|
|
|
CRSP_Plugin(void);
|
|
|
|
~CRSP_Plugin();
|
2008-09-18 03:15:49 +00:00
|
|
|
|
2015-11-08 06:08:15 +00:00
|
|
|
bool Initiate(CPlugins * Plugins, CN64System * System);
|
2008-09-18 03:15:49 +00:00
|
|
|
|
2016-01-06 02:54:42 +00:00
|
|
|
uint32_t(CALL *DoRspCycles)(uint32_t);
|
|
|
|
void(CALL *EnableDebugging)(int32_t Enable);
|
2008-09-18 03:15:49 +00:00
|
|
|
|
2015-11-08 06:08:15 +00:00
|
|
|
void * GetDebugMenu(void) { return m_RSPDebug.hRSPMenu; }
|
|
|
|
void ProcessMenuItem(int32_t id);
|
2008-09-18 03:15:49 +00:00
|
|
|
|
2013-02-11 08:27:00 +00:00
|
|
|
private:
|
2015-11-08 06:08:15 +00:00
|
|
|
CRSP_Plugin(const CRSP_Plugin&); // Disable copy constructor
|
|
|
|
CRSP_Plugin& operator=(const CRSP_Plugin&); // Disable assignment
|
2013-02-11 08:27:00 +00:00
|
|
|
|
2015-11-08 06:08:15 +00:00
|
|
|
PLUGIN_TYPE type() { return PLUGIN_TYPE_RSP; }
|
|
|
|
virtual int32_t GetDefaultSettingStartRange() const { return FirstRSPDefaultSet; }
|
|
|
|
virtual int32_t GetSettingStartRange() const { return FirstRSPSettings; }
|
2015-01-30 21:01:21 +00:00
|
|
|
|
2015-11-08 06:08:15 +00:00
|
|
|
bool LoadFunctions(void);
|
|
|
|
void UnloadPluginDetails(void);
|
2015-01-30 21:01:21 +00:00
|
|
|
|
2015-11-08 06:08:15 +00:00
|
|
|
RSPDEBUG_INFO m_RSPDebug;
|
|
|
|
uint32_t m_CycleCount;
|
2013-02-11 08:27:00 +00:00
|
|
|
|
2016-01-06 02:54:42 +00:00
|
|
|
void(CALL *GetDebugInfo) (RSPDEBUG_INFO * GFXDebugInfo);
|
|
|
|
void(CALL *InitiateDebugger)(DEBUG_INFO DebugInfo);
|
2008-09-18 03:15:49 +00:00
|
|
|
};
|