[Project64] Clean up N64 Class.cpp
This commit is contained in:
parent
c4b11a68f5
commit
70a368a861
File diff suppressed because it is too large
Load Diff
|
@ -21,53 +21,53 @@ class CRecompiler;
|
|||
//#define TEST_SP_TRACKING //track the SP to make sure all ops pick it up fine
|
||||
|
||||
class CN64System :
|
||||
public CMipsMemory_CallBack,
|
||||
public CTLB_CB,
|
||||
private CSystemEvents,
|
||||
protected CN64SystemSettings,
|
||||
public CGameSettings,
|
||||
protected CDebugSettings
|
||||
public CMipsMemory_CallBack,
|
||||
public CTLB_CB,
|
||||
private CSystemEvents,
|
||||
protected CN64SystemSettings,
|
||||
public CGameSettings,
|
||||
protected CDebugSettings
|
||||
{
|
||||
public:
|
||||
CN64System(CPlugins * Plugins, bool SavesReadOnly);
|
||||
virtual ~CN64System(void);
|
||||
CN64System(CPlugins * Plugins, bool SavesReadOnly);
|
||||
virtual ~CN64System(void);
|
||||
|
||||
struct ThreadInfo {
|
||||
HANDLE * ThreadHandle;
|
||||
DWORD ThreadID;
|
||||
};
|
||||
|
||||
CProfiling m_Profile;
|
||||
CCheats m_Cheats;
|
||||
bool m_EndEmulation;
|
||||
SAVE_CHIP_TYPE m_SaveUsing;
|
||||
CProfiling m_Profile;
|
||||
CCheats m_Cheats;
|
||||
bool m_EndEmulation;
|
||||
SAVE_CHIP_TYPE m_SaveUsing;
|
||||
|
||||
//Methods
|
||||
static bool RunFileImage(const char * FileLoc);
|
||||
static void CloseSystem(void);
|
||||
//Methods
|
||||
static bool RunFileImage(const char * FileLoc);
|
||||
static void CloseSystem(void);
|
||||
|
||||
void CloseCpu ();
|
||||
void ExternalEvent ( SystemEvent action ); //covers gui interacting and timers etc..
|
||||
stdstr ChooseFileToOpen ( HWND hParent );
|
||||
void DisplayRomInfo ( HWND hParent );
|
||||
void StartEmulation ( bool NewThread );
|
||||
void SyncToAudio ();
|
||||
void IncreaseSpeed () { m_Limitor.IncreaseSpeed(); }
|
||||
void DecreaseSpeed () { m_Limitor.DecreaseSpeed(); }
|
||||
void Reset ( bool bInitReg, bool ClearMenory );
|
||||
void GameReset ();
|
||||
void PluginReset ();
|
||||
void CloseCpu();
|
||||
void ExternalEvent(SystemEvent action); //covers gui interacting and timers etc..
|
||||
stdstr ChooseFileToOpen(HWND hParent);
|
||||
void DisplayRomInfo(HWND hParent);
|
||||
void StartEmulation(bool NewThread);
|
||||
void SyncToAudio();
|
||||
void IncreaseSpeed() { m_Limitor.IncreaseSpeed(); }
|
||||
void DecreaseSpeed() { m_Limitor.DecreaseSpeed(); }
|
||||
void Reset(bool bInitReg, bool ClearMenory);
|
||||
void GameReset();
|
||||
void PluginReset();
|
||||
|
||||
void Pause ();
|
||||
void RunRSP ();
|
||||
bool SaveState ();
|
||||
bool LoadState ( LPCSTR FileName );
|
||||
bool LoadState ();
|
||||
void Pause();
|
||||
void RunRSP();
|
||||
bool SaveState();
|
||||
bool LoadState(LPCSTR FileName);
|
||||
bool LoadState();
|
||||
|
||||
bool DmaUsed() const { return m_DMAUsed; }
|
||||
void SetDmaUsed(bool DMAUsed) { m_DMAUsed = DMAUsed; }
|
||||
void SetCheatsSlectionChanged(bool changed) { m_CheatsSlectionChanged = changed; }
|
||||
bool HasCheatsSlectionChanged(void) const { return m_CheatsSlectionChanged; }
|
||||
void SetCheatsSlectionChanged(bool changed) { m_CheatsSlectionChanged = changed; }
|
||||
bool HasCheatsSlectionChanged(void) const { return m_CheatsSlectionChanged; }
|
||||
DWORD GetButtons(int Control) const { return m_Buttons[Control]; }
|
||||
|
||||
//Variable used to track that the SP is being handled and stays the same as the real SP in sync core
|
||||
|
@ -75,31 +75,31 @@ public:
|
|||
DWORD m_CurrentSP;
|
||||
#endif
|
||||
//For Sync CPU
|
||||
void UpdateSyncCPU ( CN64System * const SecondCPU, DWORD const Cycles );
|
||||
void SyncCPU ( CN64System * const SecondCPU );
|
||||
void SyncCPUPC ( CN64System * const SecondCPU );
|
||||
void SyncSystem ();
|
||||
void SyncSystemPC ();
|
||||
void UpdateSyncCPU(CN64System * const SecondCPU, DWORD const Cycles);
|
||||
void SyncCPU(CN64System * const SecondCPU);
|
||||
void SyncCPUPC(CN64System * const SecondCPU);
|
||||
void SyncSystem();
|
||||
void SyncSystemPC();
|
||||
private:
|
||||
//Make sure plugins can directly access this information
|
||||
friend CGfxPlugin;
|
||||
friend CAudioPlugin;
|
||||
friend CRSP_Plugin;
|
||||
friend CControl_Plugin;
|
||||
|
||||
|
||||
//Recompiler has access to manipulate and call functions
|
||||
friend CSystemTimer;
|
||||
|
||||
//Used for loading and potentially executing the CPU in its own thread.
|
||||
static void StartEmulationThread ( ThreadInfo * Info );
|
||||
static bool EmulationStarting ( HANDLE hThread, DWORD ThreadId );
|
||||
static void StartEmulationThread(ThreadInfo * Info);
|
||||
static bool EmulationStarting(HANDLE hThread, DWORD ThreadId);
|
||||
|
||||
void ExecuteCPU ();
|
||||
void RefreshScreen ();
|
||||
void DumpSyncErrors ( CN64System * SecondCPU );
|
||||
void StartEmulation2 ( bool NewThread );
|
||||
bool SetActiveSystem ( bool bActive = true );
|
||||
void InitRegisters ( bool bPostPif, CMipsMemory & MMU );
|
||||
void ExecuteCPU();
|
||||
void RefreshScreen();
|
||||
void DumpSyncErrors(CN64System * SecondCPU);
|
||||
void StartEmulation2(bool NewThread);
|
||||
bool SetActiveSystem(bool bActive = true);
|
||||
void InitRegisters(bool bPostPif, CMipsMemory & MMU);
|
||||
void DisplayRSPListCount();
|
||||
|
||||
//CPU Methods
|
||||
|
@ -118,11 +118,11 @@ private:
|
|||
void TLB_Unmaped(uint32_t VAddr, uint32_t Len);
|
||||
void TLB_Changed();
|
||||
|
||||
CPlugins * const m_Plugins; //The plugin container
|
||||
CPlugins * const m_Plugins; //The plugin container
|
||||
CN64System * m_SyncCPU;
|
||||
CPlugins * m_SyncPlugins;
|
||||
CMainGui * m_SyncWindow;
|
||||
CMipsMemoryVM m_MMU_VM; //Memory of the n64
|
||||
CMipsMemoryVM m_MMU_VM; //Memory of the n64
|
||||
CTLB m_TLB;
|
||||
CRegisters m_Reg;
|
||||
CFramePerSecond m_FPS;
|
||||
|
@ -141,10 +141,10 @@ private:
|
|||
bool m_TestTimer;
|
||||
DWORD m_NextInstruction;
|
||||
DWORD m_JumpToLocation;
|
||||
uint32_t m_TLBLoadAddress;
|
||||
uint32_t m_TLBStoreAddress;
|
||||
uint32_t m_TLBLoadAddress;
|
||||
uint32_t m_TLBStoreAddress;
|
||||
DWORD m_SyncCount;
|
||||
bool m_CheatsSlectionChanged;
|
||||
bool m_CheatsSlectionChanged;
|
||||
|
||||
//When Syncing cores this is the PC where it last Sync'ed correctly
|
||||
DWORD m_LastSuccessSyncPC[10];
|
||||
|
@ -153,7 +153,7 @@ private:
|
|||
//Handle to the cpu thread
|
||||
HANDLE m_CPU_Handle;
|
||||
DWORD m_CPU_ThreadID;
|
||||
|
||||
|
||||
//Handle to pause mutex
|
||||
void * m_hPauseEvent;
|
||||
|
||||
|
|
Loading…
Reference in New Issue