From f28bbc85ba6e473f2074c1c6f732b03b81d0f7b0 Mon Sep 17 00:00:00 2001 From: no Date: Mon, 21 Dec 2015 14:41:08 -0500 Subject: [PATCH 01/18] undeclared strcat() and strlen() --- Source/Project64-core/Logging.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/Project64-core/Logging.cpp b/Source/Project64-core/Logging.cpp index f8083a3ec..428a4ce8b 100644 --- a/Source/Project64-core/Logging.cpp +++ b/Source/Project64-core/Logging.cpp @@ -10,6 +10,8 @@ ****************************************************************************/ #include "stdafx.h" #include "Logging.h" + +#include #include #include #include From 3aaa2a6a74fad6f1cab68ba252b7df0dcefe30d6 Mon Sep 17 00:00:00 2001 From: no Date: Mon, 21 Dec 2015 14:46:04 -0500 Subject: [PATCH 02/18] undeclared vsprintf() --- Source/Project64-core/Logging.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/Project64-core/Logging.cpp b/Source/Project64-core/Logging.cpp index 428a4ce8b..ab9e76931 100644 --- a/Source/Project64-core/Logging.cpp +++ b/Source/Project64-core/Logging.cpp @@ -12,6 +12,8 @@ #include "Logging.h" #include +#include +#include #include #include #include From c4a31eb4575d002a04d1407b0e8ea9362fa0a4e1 Mon Sep 17 00:00:00 2001 From: no Date: Mon, 21 Dec 2015 14:54:02 -0500 Subject: [PATCH 03/18] undeclared fopen(), fread(), feof(), fscanf() and others --- Source/Project64-core/Multilanguage/LanguageClass.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/Project64-core/Multilanguage/LanguageClass.cpp b/Source/Project64-core/Multilanguage/LanguageClass.cpp index 61a3dba95..a5db5556e 100644 --- a/Source/Project64-core/Multilanguage/LanguageClass.cpp +++ b/Source/Project64-core/Multilanguage/LanguageClass.cpp @@ -9,6 +9,7 @@ * * ****************************************************************************/ #include "stdafx.h" +#include #include #include From beb8c4157582959a679919db696419c2ced2cff1 Mon Sep 17 00:00:00 2001 From: no Date: Mon, 21 Dec 2015 15:09:57 -0500 Subject: [PATCH 04/18] undeclared sprintf() --- Source/Common/md5.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/Common/md5.h b/Source/Common/md5.h index 0d8fd6cc6..543a131ce 100644 --- a/Source/Common/md5.h +++ b/Source/Common/md5.h @@ -43,6 +43,8 @@ documentation and/or software. #include #include + +#include #include "path.h" struct MD5Digest From 64b0635fa171cbbf432a9ce131c1cc8227b42a8f Mon Sep 17 00:00:00 2001 From: no Date: Mon, 21 Dec 2015 15:12:30 -0500 Subject: [PATCH 05/18] undeclared memcmp(), ::memset() --- Source/Common/md5.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/Common/md5.h b/Source/Common/md5.h index 543a131ce..997d5966c 100644 --- a/Source/Common/md5.h +++ b/Source/Common/md5.h @@ -45,6 +45,7 @@ documentation and/or software. #include #include +#include #include "path.h" struct MD5Digest From 9dab4b3bed64434af9f9960fd0b1c2e979213dc4 Mon Sep 17 00:00:00 2001 From: no Date: Mon, 21 Dec 2015 15:17:29 -0500 Subject: [PATCH 06/18] undeclared memcpy() --- Source/Project64-core/N64System/Recompiler/RegInfo.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/Project64-core/N64System/Recompiler/RegInfo.cpp b/Source/Project64-core/N64System/Recompiler/RegInfo.cpp index ca4428a3d..b3c46f0ad 100644 --- a/Source/Project64-core/N64System/Recompiler/RegInfo.cpp +++ b/Source/Project64-core/N64System/Recompiler/RegInfo.cpp @@ -11,6 +11,8 @@ #include "stdafx.h" #include #include + +#include #include "RegInfo.h" #include "RecompilerClass.h" #include "x86CodeLog.h" From 6a18af08a3c220d3b2e3dd40b48b686394021514 Mon Sep 17 00:00:00 2001 From: no Date: Mon, 21 Dec 2015 15:18:20 -0500 Subject: [PATCH 07/18] undeclared sprintf() --- Source/Project64-core/N64System/Recompiler/RegInfo.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/Project64-core/N64System/Recompiler/RegInfo.cpp b/Source/Project64-core/N64System/Recompiler/RegInfo.cpp index b3c46f0ad..7e44bfaa5 100644 --- a/Source/Project64-core/N64System/Recompiler/RegInfo.cpp +++ b/Source/Project64-core/N64System/Recompiler/RegInfo.cpp @@ -12,6 +12,7 @@ #include #include +#include #include #include "RegInfo.h" #include "RecompilerClass.h" From b3a6b03fb9a60d1ece940859a40ab02162d8e81e Mon Sep 17 00:00:00 2001 From: no Date: Mon, 21 Dec 2015 15:22:39 -0500 Subject: [PATCH 08/18] undeclared sprintf() --- Source/Project64-core/N64System/Recompiler/RecompilerOps.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/Project64-core/N64System/Recompiler/RecompilerOps.cpp b/Source/Project64-core/N64System/Recompiler/RecompilerOps.cpp index 3cbec5009..9cf790878 100644 --- a/Source/Project64-core/N64System/Recompiler/RecompilerOps.cpp +++ b/Source/Project64-core/N64System/Recompiler/RecompilerOps.cpp @@ -15,6 +15,8 @@ #include #include #include + +#include #include "RecompilerClass.h" #include "RecompilerOps.h" #include "CodeSection.h" From 33bbd39b99ecdbf034fe139db5cd5244664a41c4 Mon Sep 17 00:00:00 2001 From: no Date: Mon, 21 Dec 2015 15:26:44 -0500 Subject: [PATCH 09/18] undeclared memset() --- Source/Project64-core/N64System/Recompiler/LoopAnalysis.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/Project64-core/N64System/Recompiler/LoopAnalysis.cpp b/Source/Project64-core/N64System/Recompiler/LoopAnalysis.cpp index b65bb4423..1dc21f449 100644 --- a/Source/Project64-core/N64System/Recompiler/LoopAnalysis.cpp +++ b/Source/Project64-core/N64System/Recompiler/LoopAnalysis.cpp @@ -9,7 +9,9 @@ * * ****************************************************************************/ #include "stdafx.h" +#include #include "LoopAnalysis.h" + #include #include #include From 83ab2996aa62a3c2a952ded2d179cc0648c97702 Mon Sep 17 00:00:00 2001 From: no Date: Mon, 21 Dec 2015 15:28:53 -0500 Subject: [PATCH 10/18] undeclared memset() --- Source/Project64-core/N64System/Recompiler/CodeBlock.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/Project64-core/N64System/Recompiler/CodeBlock.cpp b/Source/Project64-core/N64System/Recompiler/CodeBlock.cpp index cd7f87dd0..8164fd08a 100644 --- a/Source/Project64-core/N64System/Recompiler/CodeBlock.cpp +++ b/Source/Project64-core/N64System/Recompiler/CodeBlock.cpp @@ -9,8 +9,10 @@ * * ****************************************************************************/ #include "stdafx.h" +#include #include "CodeBlock.h" #include "x86CodeLog.h" + #include #include #include From 6abb43072571a955f3850c66d94bba632ed3ae9a Mon Sep 17 00:00:00 2001 From: no Date: Mon, 21 Dec 2015 15:32:33 -0500 Subject: [PATCH 11/18] undeclared memset() --- Source/Project64-core/N64System/Mips/RegisterClass.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/Project64-core/N64System/Mips/RegisterClass.cpp b/Source/Project64-core/N64System/Mips/RegisterClass.cpp index e7608340f..e7fcfbf0e 100644 --- a/Source/Project64-core/N64System/Mips/RegisterClass.cpp +++ b/Source/Project64-core/N64System/Mips/RegisterClass.cpp @@ -9,7 +9,9 @@ * * ****************************************************************************/ #include "stdafx.h" +#include #include "RegisterClass.h" + #include #include #include From c49258420af91904f2be6c12b12e452848b83a8a Mon Sep 17 00:00:00 2001 From: no Date: Mon, 21 Dec 2015 15:34:48 -0500 Subject: [PATCH 12/18] undeclared memset() --- Source/Project64-core/N64System/Mips/PifRam.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/Project64-core/N64System/Mips/PifRam.cpp b/Source/Project64-core/N64System/Mips/PifRam.cpp index 2d7bfe1ae..2f60cf2b9 100644 --- a/Source/Project64-core/N64System/Mips/PifRam.cpp +++ b/Source/Project64-core/N64System/Mips/PifRam.cpp @@ -9,7 +9,9 @@ * * ****************************************************************************/ #include "stdafx.h" +#include #include "PifRam.h" + #include #include #include From ec23fd324d4547f10ea0fdf0f957a562167ac7c9 Mon Sep 17 00:00:00 2001 From: no Date: Mon, 21 Dec 2015 15:35:11 -0500 Subject: [PATCH 13/18] undeclared sprintf() --- Source/Project64-core/N64System/Mips/PifRam.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/Project64-core/N64System/Mips/PifRam.cpp b/Source/Project64-core/N64System/Mips/PifRam.cpp index 2f60cf2b9..0d56b94bb 100644 --- a/Source/Project64-core/N64System/Mips/PifRam.cpp +++ b/Source/Project64-core/N64System/Mips/PifRam.cpp @@ -9,6 +9,7 @@ * * ****************************************************************************/ #include "stdafx.h" +#include #include #include "PifRam.h" From a225ae2cf112b3172d962d90eba77166cb088f24 Mon Sep 17 00:00:00 2001 From: no Date: Mon, 21 Dec 2015 15:36:48 -0500 Subject: [PATCH 14/18] undeclared sprintf() --- Source/Project64-core/N64System/Mips/OpcodeName.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/Project64-core/N64System/Mips/OpcodeName.cpp b/Source/Project64-core/N64System/Mips/OpcodeName.cpp index b93695d52..4c5f672b3 100644 --- a/Source/Project64-core/N64System/Mips/OpcodeName.cpp +++ b/Source/Project64-core/N64System/Mips/OpcodeName.cpp @@ -9,6 +9,7 @@ * * ****************************************************************************/ #include "stdafx.h" +#include #include "OpCode.h" #include "RegisterClass.h" From 0d2f09a840b5847bdb484c02055e0f34ef5af520 Mon Sep 17 00:00:00 2001 From: no Date: Mon, 21 Dec 2015 15:38:52 -0500 Subject: [PATCH 15/18] undeclared strstr(), strchr(), strtoul(), atoi() and others --- Source/Project64-core/N64System/CheatClass.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Project64-core/N64System/CheatClass.cpp b/Source/Project64-core/N64System/CheatClass.cpp index 9af75a463..5905cf8fa 100644 --- a/Source/Project64-core/N64System/CheatClass.cpp +++ b/Source/Project64-core/N64System/CheatClass.cpp @@ -9,8 +9,9 @@ * * ****************************************************************************/ #include "stdafx.h" - +#include #include "CheatClass.h" + #include #include #include From 3ac1103799574b4f34ea8da8762eb4a44d5e7bbe Mon Sep 17 00:00:00 2001 From: no Date: Mon, 21 Dec 2015 15:50:25 -0500 Subject: [PATCH 16/18] undeclared int8_t and other POSIX type names --- Source/Project64-core/N64System/N64Types.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/Project64-core/N64System/N64Types.h b/Source/Project64-core/N64System/N64Types.h index f892557d9..7f682430f 100644 --- a/Source/Project64-core/N64System/N64Types.h +++ b/Source/Project64-core/N64System/N64Types.h @@ -10,6 +10,8 @@ ****************************************************************************/ #pragma once +#include + enum PauseType { PauseType_FromMenu, From caee888b23d8f61fc123c92a9e28b0c82a076980 Mon Sep 17 00:00:00 2001 From: no Date: Mon, 21 Dec 2015 16:38:56 -0500 Subject: [PATCH 17/18] [core] replaced surviving occurrences of __int64 --- Source/Project64-core/N64System/FramePerSecondClass.h | 2 +- Source/Project64-core/N64System/Mips/SystemTiming.cpp | 6 +++--- Source/Project64-core/N64System/Mips/SystemTiming.h | 2 +- Source/Project64-core/N64System/ProfilingClass.cpp | 10 +++++----- Source/Project64-core/N64System/ProfilingClass.h | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Source/Project64-core/N64System/FramePerSecondClass.h b/Source/Project64-core/N64System/FramePerSecondClass.h index 45d74a9e7..011967ab8 100644 --- a/Source/Project64-core/N64System/FramePerSecondClass.h +++ b/Source/Project64-core/N64System/FramePerSecondClass.h @@ -31,6 +31,6 @@ private: enum { NoOfFrames = 7 }; - __int64 m_Frequency, m_Frames[NoOfFrames], m_LastFrame; + int64_t m_Frequency, m_Frames[NoOfFrames], m_LastFrame; int m_CurrentFrame; }; diff --git a/Source/Project64-core/N64System/Mips/SystemTiming.cpp b/Source/Project64-core/N64System/Mips/SystemTiming.cpp index 0a08d2ff0..efa7b0557 100644 --- a/Source/Project64-core/N64System/Mips/SystemTiming.cpp +++ b/Source/Project64-core/N64System/Mips/SystemTiming.cpp @@ -55,12 +55,12 @@ void CSystemTimer::SetTimer(TimerType Type, uint32_t Cycles, bool bRelative) } else { - m_TimerDetatils[Type].CyclesToTimer = (__int64)Cycles - (__int64)m_NextTimer; //replace the new cycles + m_TimerDetatils[Type].CyclesToTimer = (int64_t)Cycles - (int64_t)m_NextTimer; //replace the new cycles } } else { - m_TimerDetatils[Type].CyclesToTimer = (__int64)Cycles - (__int64)m_NextTimer; //replace the new cycles + m_TimerDetatils[Type].CyclesToTimer = (int64_t)Cycles - (int64_t)m_NextTimer; //replace the new cycles } FixTimers(); } @@ -76,7 +76,7 @@ uint32_t CSystemTimer::GetTimer(TimerType Type) { return 0; } - __int64 CyclesToTimer = m_TimerDetatils[Type].CyclesToTimer + m_NextTimer; + int64_t CyclesToTimer = m_TimerDetatils[Type].CyclesToTimer + m_NextTimer; if (CyclesToTimer < 0) { return 0; diff --git a/Source/Project64-core/N64System/Mips/SystemTiming.h b/Source/Project64-core/N64System/Mips/SystemTiming.h index a6fec748d..9a6e8affd 100644 --- a/Source/Project64-core/N64System/Mips/SystemTiming.h +++ b/Source/Project64-core/N64System/Mips/SystemTiming.h @@ -35,7 +35,7 @@ public: struct TIMER_DETAILS { bool Active; - __int64 CyclesToTimer; + int64_t CyclesToTimer; }; public: diff --git a/Source/Project64-core/N64System/ProfilingClass.cpp b/Source/Project64-core/N64System/ProfilingClass.cpp index 7e0a83e24..7b813fad5 100644 --- a/Source/Project64-core/N64System/ProfilingClass.cpp +++ b/Source/Project64-core/N64System/ProfilingClass.cpp @@ -62,9 +62,9 @@ SPECIAL_TIMERS CProfiling::StopTimer() { g_Notify->BreakPoint(__FILE__, __LINE__); #endif - __int64 StopTime = ((unsigned __int64)HiValue << 32) + (unsigned __int64)LoValue; - __int64 StartTime = ((unsigned __int64)m_StartTimeHi << 32) + (unsigned __int64)m_StartTimeLo; - __int64 TimeTaken = StopTime - StartTime; + int64_t StopTime = ((uint64_t)HiValue << 32) + (uint64_t)LoValue; + int64_t StartTime = ((uint64_t)m_StartTimeHi << 32) + (uint64_t)m_StartTimeLo; + int64_t TimeTaken = StopTime - StartTime; PROFILE_ENRTY Entry = m_Entries.find(m_CurrentTimerAddr); if (Entry != m_Entries.end()) { @@ -79,7 +79,7 @@ SPECIAL_TIMERS CProfiling::StopTimer() { } void CProfiling::ShowCPU_Usage() { - __int64 TotalTime, CPU = 0, Alist = 0, Dlist = 0, Idle = 0; + int64_t TotalTime, CPU = 0, Alist = 0, Dlist = 0, Idle = 0; PROFILE_ENRTY Entry; if (m_CurrentDisplayCount > 0) { m_CurrentDisplayCount -= 1; return; } @@ -132,7 +132,7 @@ void CProfiling::GenerateLog() { LogFileName = Log.FileName(); //Get the total time - __int64 TotalTime = 0; + int64_t TotalTime = 0; for (PROFILE_ENRTY itemTime = m_Entries.begin(); itemTime != m_Entries.end(); itemTime++ ) { TotalTime += itemTime->second; } diff --git a/Source/Project64-core/N64System/ProfilingClass.h b/Source/Project64-core/N64System/ProfilingClass.h index 471efbf2a..5a4824ef9 100644 --- a/Source/Project64-core/N64System/ProfilingClass.h +++ b/Source/Project64-core/N64System/ProfilingClass.h @@ -11,7 +11,7 @@ #pragma once #include -typedef std::map PROFILE_ENRTIES; +typedef std::map PROFILE_ENRTIES; typedef PROFILE_ENRTIES::iterator PROFILE_ENRTY; typedef PROFILE_ENRTIES::value_type PROFILE_VALUE; From f0eef4df749162382c60341ac4799ac9263b40fa Mon Sep 17 00:00:00 2001 From: no Date: Mon, 21 Dec 2015 18:21:39 -0500 Subject: [PATCH 18/18] [core] fixed undeclared SSE2 intrinsics on non-Win32 --- Source/Project64-core/N64System/N64Types.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Source/Project64-core/N64System/N64Types.h b/Source/Project64-core/N64System/N64Types.h index 7f682430f..4bc0cee01 100644 --- a/Source/Project64-core/N64System/N64Types.h +++ b/Source/Project64-core/N64System/N64Types.h @@ -12,6 +12,17 @@ #include +/* + * The limits of COP1 extend to native SSE2 register capabilities, but for + * now this is only being included to dodge the MSVC inline asm for x86. + * + * As better cross-platform methods of handling FP precision are implemented + * for non-Intel-architecture builds, this #include may become obsolete. + */ +#if defined(__i386) || defined(__x86_64__) || defined(_M_X64) +#include +#endif + enum PauseType { PauseType_FromMenu,