Merge branch 'master' of https://github.com/project64/project64
This commit is contained in:
commit
fcc3a0fa8b
|
@ -1,6 +1,6 @@
|
|||
#include "stdafx.h"
|
||||
#include <Common/path.h>
|
||||
#include <Common/trace.h>
|
||||
#include <Common/Trace.h>
|
||||
#include <Common/Util.h>
|
||||
#include <Project64-core/N64System/Mips/MemoryVirtualMem.h>
|
||||
#include <Project64-core/N64System/SystemGlobals.h>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
* *
|
||||
****************************************************************************/
|
||||
#include "stdafx.h"
|
||||
#include "logging.h"
|
||||
#include "Logging.h"
|
||||
#include <Common/path.h>
|
||||
#include <Project64-core/N64System/SystemGlobals.h>
|
||||
#include <Project64-core/N64System/Mips/TranslateVaddr.h>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include <string> //stl string
|
||||
#include <map> //stl map
|
||||
#include <list> //stl list
|
||||
#include <common/stdtypes.h>
|
||||
#include <Common/stdtypes.h>
|
||||
|
||||
typedef std::map<int32_t, std::wstring, std::less<int32_t> > LANG_STRINGS;
|
||||
typedef LANG_STRINGS::value_type LANG_STR;
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
#include "CheatClass.h"
|
||||
#include <Project64-core/Settings/SettingType/SettingsType-Cheats.h>
|
||||
#include <Project64-core/Plugins/GFXplugin.h>
|
||||
#include <Project64-core/Plugins/GFXPlugin.h>
|
||||
#include <Project64-core/Plugins/AudioPlugin.h>
|
||||
#include <Project64-core/Plugins/RSPPlugin.h>
|
||||
#include <Project64-core/Plugins/ControllerPlugin.h>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include "stdafx.h"
|
||||
#include <Project64-core/N64System/N64Class.h>
|
||||
#include <Project64-core/Notification.h>
|
||||
#include <common/Util.h>
|
||||
#include <Common/Util.h>
|
||||
#include <Windows.h>
|
||||
#include <Objbase.h>
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include <Project64-core/N64System/Mips/OpcodeName.h>
|
||||
#include <Project64-core/N64System/Interpreter/InterpreterOps32.h>
|
||||
#include <Project64-core/Plugins/PluginClass.h>
|
||||
#include <Project64-core/Plugins/GFXplugin.h>
|
||||
#include <Project64-core/Plugins/GFXPlugin.h>
|
||||
#include <Project64-core/ExceptionHandler.h>
|
||||
|
||||
R4300iOp::Func * CInterpreterCPU::m_R4300i_Opcode = NULL;
|
||||
|
@ -301,22 +301,20 @@ void CInterpreterCPU::ExecuteCPU()
|
|||
m_R4300i_Opcode[Opcode.op]();
|
||||
NextTimer -= CountPerOp;
|
||||
|
||||
PROGRAM_COUNTER += 4;
|
||||
switch (R4300iOp::m_NextInstruction)
|
||||
{
|
||||
case NORMAL:
|
||||
PROGRAM_COUNTER += 4;
|
||||
break;
|
||||
case DELAY_SLOT:
|
||||
R4300iOp::m_NextInstruction = JUMP;
|
||||
PROGRAM_COUNTER += 4;
|
||||
break;
|
||||
case PERMLOOP_DO_DELAY:
|
||||
R4300iOp::m_NextInstruction = PERMLOOP_DELAY_DONE;
|
||||
PROGRAM_COUNTER += 4;
|
||||
break;
|
||||
case JUMP:
|
||||
{
|
||||
bool CheckTimer = (JumpToLocation < PROGRAM_COUNTER || TestTimer);
|
||||
bool CheckTimer = (JumpToLocation < PROGRAM_COUNTER - 4 || TestTimer);
|
||||
PROGRAM_COUNTER = JumpToLocation;
|
||||
R4300iOp::m_NextInstruction = NORMAL;
|
||||
if (CheckTimer)
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
****************************************************************************/
|
||||
#include "stdafx.h"
|
||||
#include "Mempak.H"
|
||||
#include <common/path.h>
|
||||
#include <Common/path.h>
|
||||
#include <Windows.h>
|
||||
|
||||
static uint8_t Mempaks[4][0x8000];
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include <common/CriticalSection.h>
|
||||
#include <Common/CriticalSection.h>
|
||||
|
||||
enum SystemEvent
|
||||
{
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
* *
|
||||
****************************************************************************/
|
||||
#include "stdafx.h"
|
||||
#include "N64class.h"
|
||||
#include "N64Class.h"
|
||||
#include <Project64-core/3rdParty/zip.h>
|
||||
#include <Project64-core/N64System/Recompiler/x86CodeLog.h>
|
||||
#include <Project64-core/N64System/SystemGlobals.h>
|
||||
|
@ -61,7 +61,7 @@ m_CheatsSlectionChanged(false)
|
|||
{
|
||||
gameHertz = (SystemType() == SYSTEM_PAL) ? 50 : 60;
|
||||
}
|
||||
m_Limitor.SetHertz(gameHertz);
|
||||
m_Limiter.SetHertz(gameHertz);
|
||||
g_Settings->SaveDword(GameRunning_ScreenHertz, gameHertz);
|
||||
m_Cheats.LoadCheats(!g_Settings->LoadDword(Setting_RememberCheats), Plugins);
|
||||
}
|
||||
|
@ -1868,7 +1868,7 @@ void CN64System::RefreshScreen()
|
|||
{
|
||||
if (bShowCPUPer()) { m_CPU_Usage.StartTimer(Timer_Idel); }
|
||||
uint32_t FrameRate;
|
||||
if (m_Limitor.Timer_Process(&FrameRate) && bDisplayFrameRate())
|
||||
if (m_Limiter.Timer_Process(&FrameRate) && bDisplayFrameRate())
|
||||
{
|
||||
m_FPS.DisplayViCounter(FrameRate);
|
||||
m_bCleanFrameBox = true;
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "ProfilingClass.h"
|
||||
#include "CheatClass.h"
|
||||
#include "FramePerSecondClass.h"
|
||||
#include "SpeedLimitorClass.h"
|
||||
#include "SpeedLimiterClass.h"
|
||||
|
||||
typedef std::list<SystemEvent> EVENT_LIST;
|
||||
|
||||
|
@ -64,8 +64,8 @@ public:
|
|||
void ExternalEvent(SystemEvent action); //covers gui interacting and timers etc..
|
||||
void StartEmulation(bool NewThread);
|
||||
void SyncToAudio();
|
||||
void IncreaseSpeed() { m_Limitor.IncreaseSpeed(); }
|
||||
void DecreaseSpeed() { m_Limitor.DecreaseSpeed(); }
|
||||
void IncreaseSpeed() { m_Limiter.IncreaseSpeed(); }
|
||||
void DecreaseSpeed() { m_Limiter.DecreaseSpeed(); }
|
||||
void Reset(bool bInitReg, bool ClearMenory);
|
||||
void GameReset();
|
||||
void PluginReset();
|
||||
|
@ -147,7 +147,7 @@ private:
|
|||
CProfiling m_CPU_Usage; //used to track the cpu usage
|
||||
CRecompiler * m_Recomp;
|
||||
CAudio m_Audio;
|
||||
CSpeedLimitor m_Limitor;
|
||||
CSpeedLimiter m_Limiter;
|
||||
bool m_InReset;
|
||||
int32_t m_NextTimer;
|
||||
CSystemTimer m_SystemTimer;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
* *
|
||||
****************************************************************************/
|
||||
#pragma once
|
||||
#include <common/md5.h>
|
||||
#include <Common/md5.h>
|
||||
#include "RecompilerOps.h"
|
||||
#include "ExitInfo.h"
|
||||
#include "CodeSection.h"
|
||||
|
|
|
@ -9,14 +9,14 @@
|
|||
* *
|
||||
****************************************************************************/
|
||||
#include "stdafx.h"
|
||||
#include "SpeedLimitorClass.h"
|
||||
#include <common/util.h>
|
||||
#include "SpeedLimiterClass.h"
|
||||
#include <Common/Util.h>
|
||||
#include <Windows.h>
|
||||
#include <Mmsystem.h>
|
||||
|
||||
#pragma comment(lib, "winmm.lib")
|
||||
|
||||
CSpeedLimitor::CSpeedLimitor()
|
||||
CSpeedLimiter::CSpeedLimiter()
|
||||
{
|
||||
m_Frames = 0;
|
||||
m_LastTime = 0;
|
||||
|
@ -32,28 +32,28 @@ CSpeedLimitor::CSpeedLimitor()
|
|||
}
|
||||
}
|
||||
|
||||
CSpeedLimitor::~CSpeedLimitor()
|
||||
CSpeedLimiter::~CSpeedLimiter()
|
||||
{
|
||||
TIMECAPS Caps;
|
||||
timeGetDevCaps(&Caps, sizeof(Caps));
|
||||
timeEndPeriod(Caps.wPeriodMin);
|
||||
}
|
||||
|
||||
void CSpeedLimitor::SetHertz(uint32_t Hertz)
|
||||
void CSpeedLimiter::SetHertz(uint32_t Hertz)
|
||||
{
|
||||
m_Speed = Hertz;
|
||||
m_BaseSpeed = Hertz;
|
||||
FixSpeedRatio();
|
||||
}
|
||||
|
||||
void CSpeedLimitor::FixSpeedRatio()
|
||||
void CSpeedLimiter::FixSpeedRatio()
|
||||
{
|
||||
m_Ratio = 1000.0f / static_cast<double>(m_Speed);
|
||||
m_Frames = 0;
|
||||
m_LastTime = timeGetTime();
|
||||
}
|
||||
|
||||
bool CSpeedLimitor::Timer_Process(uint32_t * FrameRate)
|
||||
bool CSpeedLimiter::Timer_Process(uint32_t * FrameRate)
|
||||
{
|
||||
m_Frames += 1;
|
||||
uint32_t CurrentTime = timeGetTime();
|
||||
|
@ -87,7 +87,7 @@ bool CSpeedLimitor::Timer_Process(uint32_t * FrameRate)
|
|||
}
|
||||
}
|
||||
|
||||
void CSpeedLimitor::IncreaseSpeed()
|
||||
void CSpeedLimiter::IncreaseSpeed()
|
||||
{
|
||||
if (m_Speed >= 60)
|
||||
{
|
||||
|
@ -105,7 +105,7 @@ void CSpeedLimitor::IncreaseSpeed()
|
|||
FixSpeedRatio();
|
||||
}
|
||||
|
||||
void CSpeedLimitor::DecreaseSpeed()
|
||||
void CSpeedLimiter::DecreaseSpeed()
|
||||
{
|
||||
if (m_Speed > 60)
|
||||
{
|
|
@ -12,12 +12,12 @@
|
|||
|
||||
#include "../Settings/GameSettings.h"
|
||||
|
||||
class CSpeedLimitor :
|
||||
class CSpeedLimiter :
|
||||
private CGameSettings
|
||||
{
|
||||
public:
|
||||
CSpeedLimitor();
|
||||
~CSpeedLimitor();
|
||||
CSpeedLimiter();
|
||||
~CSpeedLimiter();
|
||||
|
||||
void SetHertz(const uint32_t Hertz);
|
||||
bool Timer_Process(uint32_t* const FrameRate);
|
||||
|
@ -25,8 +25,8 @@ public:
|
|||
void DecreaseSpeed();
|
||||
|
||||
private:
|
||||
CSpeedLimitor(const CSpeedLimitor&); // Disable copy constructor
|
||||
CSpeedLimitor& operator=(const CSpeedLimitor&); // Disable assignment
|
||||
CSpeedLimiter(const CSpeedLimiter&); // Disable copy constructor
|
||||
CSpeedLimiter& operator=(const CSpeedLimiter&); // Disable assignment
|
||||
|
||||
void FixSpeedRatio();
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
#include <Project64-core/N64System/N64RomClass.h>
|
||||
#include <Project64-core/N64System/Mips/MemoryClass.h>
|
||||
#include <Project64-core/N64System/Mips/RegisterClass.h>
|
||||
#include "GFXplugin.h"
|
||||
#include "GFXPlugin.h"
|
||||
#include <Windows.h>
|
||||
|
||||
CGfxPlugin::CGfxPlugin() :
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include <Project64-core/N64System/Mips/MemoryClass.h>
|
||||
#include <Project64-core/N64System/Mips/RegisterClass.h>
|
||||
#include "RSPPlugin.h"
|
||||
#include "GFXplugin.h"
|
||||
#include "GFXPlugin.h"
|
||||
#include "AudioPlugin.h"
|
||||
#include <Windows.h>
|
||||
|
||||
|
|
|
@ -330,7 +330,7 @@
|
|||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\N64System\SpeedLimitorClass.cpp"
|
||||
RelativePath=".\N64System\SpeedLimiterClass.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
|
@ -552,7 +552,7 @@
|
|||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\N64System\SpeedLimitorClass.h"
|
||||
RelativePath=".\N64System\SpeedLimiterClass.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
<ClCompile Include="N64System\Recompiler\SectionInfo.cpp" />
|
||||
<ClCompile Include="N64System\Recompiler\x86CodeLog.cpp" />
|
||||
<ClCompile Include="N64System\Recompiler\X86ops.cpp" />
|
||||
<ClCompile Include="N64System\SpeedLimitorClass.cpp" />
|
||||
<ClCompile Include="N64System\SpeedLimiterClass.cpp" />
|
||||
<ClCompile Include="N64System\SystemGlobals.cpp" />
|
||||
<ClCompile Include="Plugins\AudioPlugin.cpp" />
|
||||
<ClCompile Include="Plugins\ControllerPlugin.cpp" />
|
||||
|
@ -161,7 +161,7 @@
|
|||
<ClInclude Include="N64System\Recompiler\SectionInfo.h" />
|
||||
<ClInclude Include="N64System\Recompiler\X86CodeLog.h" />
|
||||
<ClInclude Include="N64System\Recompiler\X86ops.h" />
|
||||
<ClInclude Include="N64System\SpeedLimitorClass.h" />
|
||||
<ClInclude Include="N64System\SpeedLimiterClass.h" />
|
||||
<ClInclude Include="N64System\SystemGlobals.h" />
|
||||
<ClInclude Include="Notification.h" />
|
||||
<ClInclude Include="Plugin.h" />
|
||||
|
|
|
@ -201,7 +201,7 @@
|
|||
<ClCompile Include="N64System\ProfilingClass.cpp">
|
||||
<Filter>Source Files\N64 System</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="N64System\SpeedLimitorClass.cpp">
|
||||
<ClCompile Include="N64System\SpeedLimiterClass.cpp">
|
||||
<Filter>Source Files\N64 System</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="N64System\SystemGlobals.cpp">
|
||||
|
@ -560,7 +560,7 @@
|
|||
<ClInclude Include="Settings\SettingsClass.h">
|
||||
<Filter>Header Files\Settings</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="N64System\SpeedLimitorClass.h">
|
||||
<ClInclude Include="N64System\SpeedLimiterClass.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="TraceModulesProject64.h">
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include <common/IniFileClass.h>
|
||||
#include <Common/IniFileClass.h>
|
||||
#include "SettingsType-Base.h"
|
||||
|
||||
class CSettingTypeApplication :
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include "stdafx.h"
|
||||
#include "SettingsType-Application.h"
|
||||
#include "SettingsType-ApplicationPath.h"
|
||||
#include <common/path.h>
|
||||
#include <Common/path.h>
|
||||
|
||||
CSettingTypeApplicationPath::CSettingTypeApplicationPath(const char * Section, const char * Name, SettingID DefaultSetting ) :
|
||||
CSettingTypeApplication(Section,Name,DefaultSetting)
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "SettingsType-Base.h"
|
||||
#include <common/IniFileClass.h>
|
||||
#include <Common/IniFileClass.h>
|
||||
|
||||
class CSettingTypeCheats :
|
||||
public CSettingType
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include <common/IniFileClass.h>
|
||||
#include <Common/IniFileClass.h>
|
||||
#include "SettingsType-Base.h"
|
||||
|
||||
class CSettingTypeRomDatabase :
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
|
||||
#include "Multilanguage.h"
|
||||
#include "Notification.h"
|
||||
#include "version.h"
|
||||
#include "Version.h"
|
||||
#include "Settings/SettingsClass.h"
|
||||
#include "TraceModulesProject64.h"
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
//General Mips Information
|
||||
#include <Project64-core/N64System/N64RomClass.h>
|
||||
#include "N64System/RomInformationClass.h"
|
||||
#include <Project64-core/N64System/SpeedLimitorClass.h>
|
||||
#include <Project64-core/N64System/SpeedLimiterClass.h>
|
||||
#include <Project64-core/N64System/Mips/OpCode.h>
|
||||
#include <Project64-core/N64System/Recompiler/X86ops.h>
|
||||
#include <Project64-core/N64System/Mips/Mempak.h>
|
||||
|
|
|
@ -71,7 +71,7 @@ DWORD CALLBACK RomInfoProc (HWND hDlg, DWORD uMsg, DWORD wParam, DWORD lParam) {
|
|||
SetDlgItemTextW(hDlg, IDC_CIC_CHIP, GS(INFO_CIC_CHIP_TEXT));
|
||||
SetDlgItemTextW(hDlg, IDC_CLOSE_BUTTON, GS(BOTTOM_CLOSE));
|
||||
|
||||
SetDlgItemText(hDlg,IDC_INFO_ROMNAME,_this->m_pRomInfo->GetRomName().c_str());
|
||||
SetDlgItemTextW(hDlg, IDC_INFO_ROMNAME, _this->m_pRomInfo->GetRomName().ToUTF16(stdstr::CODEPAGE_932).c_str());
|
||||
|
||||
char path[_MAX_PATH], drive[_MAX_DRIVE],dir[_MAX_DIR], fname[_MAX_FNAME],ext[_MAX_EXT];
|
||||
_splitpath(_this->m_pRomInfo->GetFileName().c_str(), drive, dir, fname, ext);
|
||||
|
|
|
@ -539,7 +539,7 @@ SOURCE="N64 System\Rom Information Class.cpp"
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE="N64 System\Speed Limitor Class.cpp"
|
||||
SOURCE="N64 System\Speed Limiter Class.cpp"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
|
@ -1224,7 +1224,7 @@ SOURCE="N64 System\Rom Information Class.h"
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE="N64 System\Speed Limitor Class.h"
|
||||
SOURCE="N64 System\Speed Limiter Class.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
|
|
Loading…
Reference in New Issue