From f5d4fe0bfe13937fa3736aa6b78974ceb6e190ad Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Sat, 3 Mar 2012 20:07:20 +0100 Subject: Fix some minor bugs pointed out by PVS Studio (thanks!) --- Source/Core/Common/Src/SysConf.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/Common') diff --git a/Source/Core/Common/Src/SysConf.cpp b/Source/Core/Common/Src/SysConf.cpp index ed8a4953e5..97170e5ff1 100644 --- a/Source/Core/Common/Src/SysConf.cpp +++ b/Source/Core/Common/Src/SysConf.cpp @@ -387,7 +387,7 @@ bool SysConf::SaveToFile(const char *filename) } else if (i->type == Type_SmallArray) { - const u8 len = i->dataLength; + const u8 len = (u8)(i->dataLength); f.WriteArray(&len, 1); } -- cgit v1.2.3 From b0f75f17ae19484735675fea348f7e95740f597f Mon Sep 17 00:00:00 2001 From: marcosvitali Date: Mon, 5 Mar 2012 02:40:10 -0300 Subject: This release still fixed the hangs produced by fifo overflow without sacrifice performance. For example you can test Tutorial moves at the beginning of The last history now is fluid 30/60. Shuffle2: I've delete the hacky line, I think is not necessary anymore. Additional some clean in CommandProcessor. Please test The Last Story and others games affected in the previous commits and give me a feedback. --- Source/Core/Common/Src/VideoBackendBase.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Source/Core/Common') diff --git a/Source/Core/Common/Src/VideoBackendBase.h b/Source/Core/Common/Src/VideoBackendBase.h index 28c8f23246..96f639832b 100644 --- a/Source/Core/Common/Src/VideoBackendBase.h +++ b/Source/Core/Common/Src/VideoBackendBase.h @@ -119,6 +119,7 @@ public: virtual void Video_GatherPipeBursted() = 0; virtual bool Video_IsPossibleWaitingSetDrawDone() = 0; + virtual bool Video_IsHiWatermarkActive() = 0; virtual void Video_AbortFrame() = 0; virtual readFn16 Video_CPRead16() = 0; @@ -159,6 +160,7 @@ class VideoBackendHardware : public VideoBackend void Video_GatherPipeBursted(); bool Video_IsPossibleWaitingSetDrawDone(); + bool Video_IsHiWatermarkActive(); void Video_AbortFrame(); readFn16 Video_CPRead16(); -- cgit v1.2.3 From 8ed6ea3b076a3d1aec2a170d0c71dc1a12122371 Mon Sep 17 00:00:00 2001 From: skidau Date: Thu, 15 Mar 2012 21:48:19 +1100 Subject: Sped up the Dolphin debugger in JIT mode by splitting a block only while stepping or when it contains a breakpoint. The block is invalidated when a breakpoint is set or cleared. Fixed a bug in the JitCache where the JIT icache was not being invalidated when a block containing the instruction was destroyed. --- Source/Core/Common/Src/BreakPoints.cpp | 23 +++++++++++++++++++++-- Source/Core/Common/Src/BreakPoints.h | 2 +- 2 files changed, 22 insertions(+), 3 deletions(-) (limited to 'Source/Core/Common') diff --git a/Source/Core/Common/Src/BreakPoints.cpp b/Source/Core/Common/Src/BreakPoints.cpp index 45a0b52daf..9164312f82 100644 --- a/Source/Core/Common/Src/BreakPoints.cpp +++ b/Source/Core/Common/Src/BreakPoints.cpp @@ -19,6 +19,7 @@ #include "DebugInterface.h" #include "BreakPoints.h" #include +#include "..\..\Core\Src\PowerPC\JitCommon\JitBase.h" bool BreakPoints::IsAddressBreakPoint(u32 _iAddress) { @@ -70,7 +71,11 @@ void BreakPoints::AddFromStrings(const TBreakPointsStr& bps) void BreakPoints::Add(const TBreakPoint& bp) { if (!IsAddressBreakPoint(bp.iAddress)) + { m_BreakPoints.push_back(bp); + if (jit) + jit->GetBlockCache()->InvalidateICache(bp.iAddress, 4); + } } void BreakPoints::Add(u32 em_address, bool temp) @@ -83,21 +88,35 @@ void BreakPoints::Add(u32 em_address, bool temp) pt.iAddress = em_address; m_BreakPoints.push_back(pt); + + if (jit) + jit->GetBlockCache()->InvalidateICache(em_address, 4); } } -void BreakPoints::Remove(u32 _iAddress) +void BreakPoints::Remove(u32 em_address) { for (TBreakPoints::iterator i = m_BreakPoints.begin(); i != m_BreakPoints.end(); ++i) { - if (i->iAddress == _iAddress) + if (i->iAddress == em_address) { m_BreakPoints.erase(i); + if (jit) + jit->GetBlockCache()->InvalidateICache(em_address, 4); return; } } } +void BreakPoints::Clear() +{ + for (TBreakPoints::iterator i = m_BreakPoints.begin(); i != m_BreakPoints.end(); ++i) + { + if (jit) + jit->GetBlockCache()->InvalidateICache(i->iAddress, 4); + m_BreakPoints.erase(i); + } +} MemChecks::TMemChecksStr MemChecks::GetStrings() const { diff --git a/Source/Core/Common/Src/BreakPoints.h b/Source/Core/Common/Src/BreakPoints.h index a97452cde6..c742f812a7 100644 --- a/Source/Core/Common/Src/BreakPoints.h +++ b/Source/Core/Common/Src/BreakPoints.h @@ -78,7 +78,7 @@ public: // Remove Breakpoint void Remove(u32 _iAddress); - void Clear() { m_BreakPoints.clear(); }; + void Clear(); void DeleteByAddress(u32 _Address); -- cgit v1.2.3 From cfbcaa2cc6d2c990b907747298ad012aa1c6c2fd Mon Sep 17 00:00:00 2001 From: skidau Date: Sun, 18 Mar 2012 23:37:38 +1100 Subject: Linux build fix --- Source/Core/Common/Src/BreakPoints.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/Common') diff --git a/Source/Core/Common/Src/BreakPoints.cpp b/Source/Core/Common/Src/BreakPoints.cpp index 9164312f82..1700276d85 100644 --- a/Source/Core/Common/Src/BreakPoints.cpp +++ b/Source/Core/Common/Src/BreakPoints.cpp @@ -18,8 +18,8 @@ #include "Common.h" #include "DebugInterface.h" #include "BreakPoints.h" +#include "../../Core/Src/PowerPC/JitCommon/JitBase.h" #include -#include "..\..\Core\Src\PowerPC\JitCommon\JitBase.h" bool BreakPoints::IsAddressBreakPoint(u32 _iAddress) { -- cgit v1.2.3 From 483d15a9c3fcc6615ecd0d8e50c6fde759a4abfe Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Sun, 18 Mar 2012 05:47:55 -0700 Subject: fix Common lib re-linking all the time rename wxBase28 project to wxWidgets --- Source/Core/Common/Common.vcxproj | 25 +- Source/Core/Common/Common.vcxproj.filters | 1 - Source/Core/Common/SVNRevGen.vcxproj | 26 +- Source/Core/Common/Src/MemoryUtil.cpp | 410 +++++++++++++++--------------- 4 files changed, 215 insertions(+), 247 deletions(-) (limited to 'Source/Core/Common') diff --git a/Source/Core/Common/Common.vcxproj b/Source/Core/Common/Common.vcxproj index 732fc7258c..0128a75a09 100644 --- a/Source/Core/Common/Common.vcxproj +++ b/Source/Core/Common/Common.vcxproj @@ -108,27 +108,21 @@ - - .\Src;..\..\..\Externals/CLRun/include;%(AdditionalIncludeDirectories) - + true - - .\Src;..\..\..\Externals/CLRun/include;%(AdditionalIncludeDirectories) - + true - - .\Src;..\..\..\Externals/CLRun/include;%(AdditionalIncludeDirectories) - + true true @@ -137,9 +131,7 @@ - - .\Src;..\..\..\Externals/CLRun/include;%(AdditionalIncludeDirectories) - + true true @@ -148,9 +140,7 @@ - - .\Src;..\..\..\Externals/CLRun/include;%(AdditionalIncludeDirectories) - + true true @@ -159,9 +149,7 @@ - - .\Src;..\..\..\Externals/CLRun/include;%(AdditionalIncludeDirectories) - + true true @@ -268,7 +256,6 @@ - diff --git a/Source/Core/Common/Common.vcxproj.filters b/Source/Core/Common/Common.vcxproj.filters index 0922d00196..8b05ecbba4 100644 --- a/Source/Core/Common/Common.vcxproj.filters +++ b/Source/Core/Common/Common.vcxproj.filters @@ -124,7 +124,6 @@ - diff --git a/Source/Core/Common/SVNRevGen.vcxproj b/Source/Core/Common/SVNRevGen.vcxproj index 61e3aedb7b..803e059d19 100644 --- a/Source/Core/Common/SVNRevGen.vcxproj +++ b/Source/Core/Common/SVNRevGen.vcxproj @@ -7,13 +7,11 @@ - - cscript /nologo /E:JScript "make_scmrev.h.js" - Updating scmrev.h - dummy - + + + @@ -37,25 +35,9 @@ - - Level3 - MaxSpeed - true - true - - - true - true - true - - - + cscript /nologo /E:JScript "make_scmrev.h.js" - - - - diff --git a/Source/Core/Common/Src/MemoryUtil.cpp b/Source/Core/Common/Src/MemoryUtil.cpp index 3e3cafa335..ebfa380be4 100644 --- a/Source/Core/Common/Src/MemoryUtil.cpp +++ b/Source/Core/Common/Src/MemoryUtil.cpp @@ -1,207 +1,207 @@ -// Copyright (C) 2003 Dolphin Project. - -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, version 2.0. - -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License 2.0 for more details. - -// A copy of the GPL 2.0 should have been included with the program. -// If not, see http://www.gnu.org/licenses/ - -// Official SVN repository and contact information can be found at -// http://code.google.com/p/dolphin-emu/ - -#include "Common.h" -#include "MemoryUtil.h" -#include "StringUtil.h" - -#ifdef _WIN32 -#include -#include -#else -#include -#include -#endif - -#if !defined(_WIN32) && defined(__x86_64__) && !defined(MAP_32BIT) -#include -#define PAGE_MASK (getpagesize() - 1) -#define round_page(x) ((((unsigned long)(x)) + PAGE_MASK) & ~(PAGE_MASK)) -#endif - -// This is purposely not a full wrapper for virtualalloc/mmap, but it -// provides exactly the primitive operations that Dolphin needs. - -void* AllocateExecutableMemory(size_t size, bool low) -{ +// Copyright (C) 2003 Dolphin Project. + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, version 2.0. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official SVN repository and contact information can be found at +// http://code.google.com/p/dolphin-emu/ + +#include "Common.h" +#include "MemoryUtil.h" +#include "StringUtil.h" + +#ifdef _WIN32 +#include +#include +#else +#include +#include +#endif + +#if !defined(_WIN32) && defined(__x86_64__) && !defined(MAP_32BIT) +#include +#define PAGE_MASK (getpagesize() - 1) +#define round_page(x) ((((unsigned long)(x)) + PAGE_MASK) & ~(PAGE_MASK)) +#endif + +// This is purposely not a full wrapper for virtualalloc/mmap, but it +// provides exactly the primitive operations that Dolphin needs. + +void* AllocateExecutableMemory(size_t size, bool low) +{ #if defined(_WIN32) void* ptr = VirtualAlloc(0, size, MEM_COMMIT, PAGE_EXECUTE_READWRITE); -#else - static char *map_hint = 0; -#if defined(__x86_64__) && !defined(MAP_32BIT) - // This OS has no flag to enforce allocation below the 4 GB boundary, - // but if we hint that we want a low address it is very likely we will - // get one. - // An older version of this code used MAP_FIXED, but that has the side - // effect of discarding already mapped pages that happen to be in the - // requested virtual memory range (such as the emulated RAM, sometimes). - if (low && (!map_hint)) - map_hint = (char*)round_page(512*1024*1024); /* 0.5 GB rounded up to the next page */ -#endif - void* ptr = mmap(map_hint, size, PROT_READ | PROT_WRITE | PROT_EXEC, - MAP_ANON | MAP_PRIVATE -#if defined(__x86_64__) && defined(MAP_32BIT) - | (low ? MAP_32BIT : 0) -#endif - , -1, 0); -#endif /* defined(_WIN32) */ - - // printf("Mapped executable memory at %p (size %ld)\n", ptr, - // (unsigned long)size); - -#if defined(__FreeBSD__) - if (ptr == MAP_FAILED) - { - ptr = NULL; -#else - if (ptr == NULL) - { -#endif - PanicAlert("Failed to allocate executable memory"); - } -#if !defined(_WIN32) && defined(__x86_64__) && !defined(MAP_32BIT) - else - { - if (low) - { - map_hint += size; - map_hint = (char*)round_page(map_hint); /* round up to the next page */ - // printf("Next map will (hopefully) be at %p\n", map_hint); - } - } -#endif - -#if defined(_M_X64) - if ((u64)ptr >= 0x80000000 && low == true) - PanicAlert("Executable memory ended up above 2GB!"); -#endif - - return ptr; -} - -void* AllocateMemoryPages(size_t size) -{ -#ifdef _WIN32 - void* ptr = VirtualAlloc(0, size, MEM_COMMIT, PAGE_READWRITE); -#else - void* ptr = mmap(0, size, PROT_READ | PROT_WRITE, - MAP_ANON | MAP_PRIVATE, -1, 0); -#endif - - // printf("Mapped memory at %p (size %ld)\n", ptr, - // (unsigned long)size); - - if (ptr == NULL) - PanicAlert("Failed to allocate raw memory"); - - return ptr; -} - -void* AllocateAlignedMemory(size_t size,size_t alignment) -{ -#ifdef _WIN32 - void* ptr = _aligned_malloc(size,alignment); -#else - void* ptr = NULL; - posix_memalign(&ptr, alignment, size); -; -#endif - - // printf("Mapped memory at %p (size %ld)\n", ptr, - // (unsigned long)size); - - if (ptr == NULL) - PanicAlert("Failed to allocate aligned memory"); - - return ptr; -} - -void FreeMemoryPages(void* ptr, size_t size) -{ - if (ptr) - { -#ifdef _WIN32 - - if (!VirtualFree(ptr, 0, MEM_RELEASE)) - PanicAlert("FreeMemoryPages failed!\n%s", GetLastErrorMsg()); - ptr = NULL; // Is this our responsibility? - -#else - munmap(ptr, size); -#endif - } -} - -void FreeAlignedMemory(void* ptr) -{ - if (ptr) - { -#ifdef _WIN32 - - _aligned_free(ptr); - -#else - free(ptr); -#endif - } -} - -void WriteProtectMemory(void* ptr, size_t size, bool allowExecute) -{ -#ifdef _WIN32 - DWORD oldValue; - if (!VirtualProtect(ptr, size, allowExecute ? PAGE_EXECUTE_READ : PAGE_READONLY, &oldValue)) - PanicAlert("WriteProtectMemory failed!\n%s", GetLastErrorMsg()); -#else - mprotect(ptr, size, allowExecute ? (PROT_READ | PROT_EXEC) : PROT_READ); -#endif -} - -void UnWriteProtectMemory(void* ptr, size_t size, bool allowExecute) -{ -#ifdef _WIN32 - DWORD oldValue; - if (!VirtualProtect(ptr, size, allowExecute ? PAGE_EXECUTE_READWRITE : PAGE_READWRITE, &oldValue)) - PanicAlert("UnWriteProtectMemory failed!\n%s", GetLastErrorMsg()); -#else - mprotect(ptr, size, allowExecute ? (PROT_READ | PROT_WRITE | PROT_EXEC) : PROT_WRITE | PROT_READ); -#endif -} - -std::string MemUsage() -{ -#ifdef _WIN32 -#pragma comment(lib, "psapi") - DWORD processID = GetCurrentProcessId(); - HANDLE hProcess; - PROCESS_MEMORY_COUNTERS pmc; - std::string Ret; - - // Print information about the memory usage of the process. - - hProcess = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, processID); - if (NULL == hProcess) return "MemUsage Error"; - - if (GetProcessMemoryInfo(hProcess, &pmc, sizeof(pmc))) - Ret = StringFromFormat("%s K", ThousandSeparate(pmc.WorkingSetSize / 1024, 7).c_str()); - - CloseHandle(hProcess); - return Ret; -#else - return ""; -#endif -} +#else + static char *map_hint = 0; +#if defined(__x86_64__) && !defined(MAP_32BIT) + // This OS has no flag to enforce allocation below the 4 GB boundary, + // but if we hint that we want a low address it is very likely we will + // get one. + // An older version of this code used MAP_FIXED, but that has the side + // effect of discarding already mapped pages that happen to be in the + // requested virtual memory range (such as the emulated RAM, sometimes). + if (low && (!map_hint)) + map_hint = (char*)round_page(512*1024*1024); /* 0.5 GB rounded up to the next page */ +#endif + void* ptr = mmap(map_hint, size, PROT_READ | PROT_WRITE | PROT_EXEC, + MAP_ANON | MAP_PRIVATE +#if defined(__x86_64__) && defined(MAP_32BIT) + | (low ? MAP_32BIT : 0) +#endif + , -1, 0); +#endif /* defined(_WIN32) */ + + // printf("Mapped executable memory at %p (size %ld)\n", ptr, + // (unsigned long)size); + +#if defined(__FreeBSD__) + if (ptr == MAP_FAILED) + { + ptr = NULL; +#else + if (ptr == NULL) + { +#endif + PanicAlert("Failed to allocate executable memory"); + } +#if !defined(_WIN32) && defined(__x86_64__) && !defined(MAP_32BIT) + else + { + if (low) + { + map_hint += size; + map_hint = (char*)round_page(map_hint); /* round up to the next page */ + // printf("Next map will (hopefully) be at %p\n", map_hint); + } + } +#endif + +#if defined(_M_X64) + if ((u64)ptr >= 0x80000000 && low == true) + PanicAlert("Executable memory ended up above 2GB!"); +#endif + + return ptr; +} + +void* AllocateMemoryPages(size_t size) +{ +#ifdef _WIN32 + void* ptr = VirtualAlloc(0, size, MEM_COMMIT, PAGE_READWRITE); +#else + void* ptr = mmap(0, size, PROT_READ | PROT_WRITE, + MAP_ANON | MAP_PRIVATE, -1, 0); +#endif + + // printf("Mapped memory at %p (size %ld)\n", ptr, + // (unsigned long)size); + + if (ptr == NULL) + PanicAlert("Failed to allocate raw memory"); + + return ptr; +} + +void* AllocateAlignedMemory(size_t size,size_t alignment) +{ +#ifdef _WIN32 + void* ptr = _aligned_malloc(size,alignment); +#else + void* ptr = NULL; + posix_memalign(&ptr, alignment, size); +; +#endif + + // printf("Mapped memory at %p (size %ld)\n", ptr, + // (unsigned long)size); + + if (ptr == NULL) + PanicAlert("Failed to allocate aligned memory"); + + return ptr; +} + +void FreeMemoryPages(void* ptr, size_t size) +{ + if (ptr) + { +#ifdef _WIN32 + + if (!VirtualFree(ptr, 0, MEM_RELEASE)) + PanicAlert("FreeMemoryPages failed!\n%s", GetLastErrorMsg()); + ptr = NULL; // Is this our responsibility? + +#else + munmap(ptr, size); +#endif + } +} + +void FreeAlignedMemory(void* ptr) +{ + if (ptr) + { +#ifdef _WIN32 + + _aligned_free(ptr); + +#else + free(ptr); +#endif + } +} + +void WriteProtectMemory(void* ptr, size_t size, bool allowExecute) +{ +#ifdef _WIN32 + DWORD oldValue; + if (!VirtualProtect(ptr, size, allowExecute ? PAGE_EXECUTE_READ : PAGE_READONLY, &oldValue)) + PanicAlert("WriteProtectMemory failed!\n%s", GetLastErrorMsg()); +#else + mprotect(ptr, size, allowExecute ? (PROT_READ | PROT_EXEC) : PROT_READ); +#endif +} + +void UnWriteProtectMemory(void* ptr, size_t size, bool allowExecute) +{ +#ifdef _WIN32 + DWORD oldValue; + if (!VirtualProtect(ptr, size, allowExecute ? PAGE_EXECUTE_READWRITE : PAGE_READWRITE, &oldValue)) + PanicAlert("UnWriteProtectMemory failed!\n%s", GetLastErrorMsg()); +#else + mprotect(ptr, size, allowExecute ? (PROT_READ | PROT_WRITE | PROT_EXEC) : PROT_WRITE | PROT_READ); +#endif +} + +std::string MemUsage() +{ +#ifdef _WIN32 +#pragma comment(lib, "psapi") + DWORD processID = GetCurrentProcessId(); + HANDLE hProcess; + PROCESS_MEMORY_COUNTERS pmc; + std::string Ret; + + // Print information about the memory usage of the process. + + hProcess = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, processID); + if (NULL == hProcess) return "MemUsage Error"; + + if (GetProcessMemoryInfo(hProcess, &pmc, sizeof(pmc))) + Ret = StringFromFormat("%s K", ThousandSeparate(pmc.WorkingSetSize / 1024, 7).c_str()); + + CloseHandle(hProcess); + return Ret; +#else + return ""; +#endif +} -- cgit v1.2.3 From 56b1373baff6f152e51fda96d8d7c0296bff2a70 Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Sun, 25 Mar 2012 12:55:02 -0700 Subject: Remove scons-related files --- Source/Core/Common/SConscript | 60 ----------------------------------------- Source/Core/Common/Src/Common.h | 4 --- 2 files changed, 64 deletions(-) delete mode 100644 Source/Core/Common/SConscript (limited to 'Source/Core/Common') diff --git a/Source/Core/Common/SConscript b/Source/Core/Common/SConscript deleted file mode 100644 index f26dfc044c..0000000000 --- a/Source/Core/Common/SConscript +++ /dev/null @@ -1,60 +0,0 @@ -# -*- python -*- - -Import('env') -import os -import sys - -out_contents =\ - '#define SCM_REV_STR "' + env['gitrev'] + '"\n' +\ - '#define SCM_DESC_STR "' + env['gitdesc'] + '"\n' +\ - '#define SCM_BRANCH_STR "' + env['gitbranch'] + '"\n' +\ - '#define SCM_IS_MASTER ' + ('1' if env['gitbranch'] == 'master' else '0') + '\n\n' - -Execute(Delete('Src/scmrev.h')) -outfile = open('Src/scmrev.h', 'w') -outfile.write(out_contents) -outfile.close() - -files = [ - 'Src/ABI.cpp', - 'Src/BreakPoints.cpp', - 'Src/CDUtils.cpp', - 'Src/CPUDetect.cpp', - 'Src/ColorUtil.cpp', - 'Src/ConsoleListener.cpp', - 'Src/Crypto/aes_cbc.cpp', - 'Src/Crypto/aes_core.cpp', - 'Src/Crypto/bn.cpp', - 'Src/Crypto/ec.cpp', - 'Src/Crypto/md5.cpp', - 'Src/Crypto/sha1.cpp', - 'Src/FileSearch.cpp', - 'Src/FileUtil.cpp', - 'Src/Hash.cpp', - 'Src/IniFile.cpp', - 'Src/LogManager.cpp', - 'Src/MathUtil.cpp', - 'Src/MemArena.cpp', - 'Src/MemoryUtil.cpp', - 'Src/Misc.cpp', - 'Src/MsgHandler.cpp', - 'Src/NandPaths.cpp', - 'Src/SDCardUtil.cpp', - 'Src/StringUtil.cpp', - 'Src/SymbolDB.cpp', - 'Src/SysConf.cpp', - 'Src/Thread.cpp', - 'Src/Thunk.cpp', - 'Src/Timer.cpp', - 'Src/Version.cpp', - 'Src/VideoBackendBase.cpp', - 'Src/x64Analyzer.cpp', - 'Src/x64Emitter.cpp', - ] - -if sys.platform == 'win32': - files += ['Src/ExtendedTrace.cpp'] - files += ['Src/stdafx.cpp'] - -env['CPPPATH'] += ['Src'] -env['LIBS'] += env.StaticLibrary('common', files) diff --git a/Source/Core/Common/Src/Common.h b/Source/Core/Common/Src/Common.h index db889f7ddf..a6beb79ef2 100644 --- a/Source/Core/Common/Src/Common.h +++ b/Source/Core/Common/Src/Common.h @@ -103,10 +103,6 @@ private: //CrtDebugBreak breakAt(614); #endif // end DEBUG/FAST -#elif defined HAVE_CONFIG_H -#include "config.h" // SCons autoconfiguration defines -#endif - // Windows compatibility #ifndef _WIN32 #include -- cgit v1.2.3 From 36f3962551272c1c1352d178a31b40ee73834a5c Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Thu, 22 Mar 2012 18:57:30 -0700 Subject: small fix for last commit - didn't notice that was an #elif instead of #if --- Source/Core/Common/Src/Common.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Source/Core/Common') diff --git a/Source/Core/Common/Src/Common.h b/Source/Core/Common/Src/Common.h index a6beb79ef2..960bf75559 100644 --- a/Source/Core/Common/Src/Common.h +++ b/Source/Core/Common/Src/Common.h @@ -103,6 +103,8 @@ private: //CrtDebugBreak breakAt(614); #endif // end DEBUG/FAST +#endif + // Windows compatibility #ifndef _WIN32 #include -- cgit v1.2.3 From fee98b426b5a0c4d78042a2db3b352c4fe79ef56 Mon Sep 17 00:00:00 2001 From: NeoBrainX Date: Sat, 24 Mar 2012 04:47:28 +0100 Subject: Revert r41bcf657f89d, r3a9fed0ba285, r9adc119e3c2f and re58692653afd (all of them are wrong). --- Source/Core/Common/Src/LinearDiskCache.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/Common') diff --git a/Source/Core/Common/Src/LinearDiskCache.h b/Source/Core/Common/Src/LinearDiskCache.h index f6e0d95f8c..ac10b5ef20 100644 --- a/Source/Core/Common/Src/LinearDiskCache.h +++ b/Source/Core/Common/Src/LinearDiskCache.h @@ -24,7 +24,7 @@ // Increment this every time you change shader generation code. enum { - LINEAR_DISKCACHE_VER = 6972 + LINEAR_DISKCACHE_VER = 6969 }; // On disk format: -- cgit v1.2.3 From 7a1744575d7569dd52739836685b6e6643ace61a Mon Sep 17 00:00:00 2001 From: NeoBrainX Date: Sat, 24 Mar 2012 16:30:00 +0100 Subject: D3D9: Fix texel to pixel mapping when sampling textures properly. --- Source/Core/Common/Src/LinearDiskCache.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/Common') diff --git a/Source/Core/Common/Src/LinearDiskCache.h b/Source/Core/Common/Src/LinearDiskCache.h index ac10b5ef20..582eebbd22 100644 --- a/Source/Core/Common/Src/LinearDiskCache.h +++ b/Source/Core/Common/Src/LinearDiskCache.h @@ -24,7 +24,7 @@ // Increment this every time you change shader generation code. enum { - LINEAR_DISKCACHE_VER = 6969 + LINEAR_DISKCACHE_VER = 6973 }; // On disk format: -- cgit v1.2.3 From c662b8ee2f55f28a14c51dfe44309a6dcf3710d8 Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Sat, 24 Mar 2012 20:46:40 +0100 Subject: Bump the shader cache version --- Source/Core/Common/Src/LinearDiskCache.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/Common') diff --git a/Source/Core/Common/Src/LinearDiskCache.h b/Source/Core/Common/Src/LinearDiskCache.h index 582eebbd22..eae60885b7 100644 --- a/Source/Core/Common/Src/LinearDiskCache.h +++ b/Source/Core/Common/Src/LinearDiskCache.h @@ -24,7 +24,7 @@ // Increment this every time you change shader generation code. enum { - LINEAR_DISKCACHE_VER = 6973 + LINEAR_DISKCACHE_VER = 6974 }; // On disk format: -- cgit v1.2.3 From 9ed83765e69f81ae1799e8e8ff8cfada2f53e9a2 Mon Sep 17 00:00:00 2001 From: rodolfoosvaldobogado Date: Sun, 25 Mar 2012 00:01:47 -0300 Subject: long time no commits :) a little code cleaning to avoid duplicated execution of AlphaPreTest and a little correction to some comments from the previous commits. this change must behave exactly like last revision, if something is broken please let me know --- Source/Core/Common/Src/LinearDiskCache.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/Common') diff --git a/Source/Core/Common/Src/LinearDiskCache.h b/Source/Core/Common/Src/LinearDiskCache.h index eae60885b7..4c746e9b75 100644 --- a/Source/Core/Common/Src/LinearDiskCache.h +++ b/Source/Core/Common/Src/LinearDiskCache.h @@ -24,7 +24,7 @@ // Increment this every time you change shader generation code. enum { - LINEAR_DISKCACHE_VER = 6974 + LINEAR_DISKCACHE_VER = 6975 }; // On disk format: -- cgit v1.2.3 From 450dcc9d2cd874f6ab40d4a339afc29f55751319 Mon Sep 17 00:00:00 2001 From: rodolfoosvaldobogado Date: Tue, 27 Mar 2012 15:44:58 -0300 Subject: As requested, this is my implementation of zcomploc using a multi-pass algorithm. My apologize to the others devs for committing in the main branch but is the only way to get this tested as soon as possible. please test for regressions, speed and for other issues fixed, as a example, the black color in water splash in super mario galaxy are fixed with this rev. please as soon as yo find a bug let me know. --- Source/Core/Common/Src/LinearDiskCache.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/Common') diff --git a/Source/Core/Common/Src/LinearDiskCache.h b/Source/Core/Common/Src/LinearDiskCache.h index 4c746e9b75..11d0a2ced8 100644 --- a/Source/Core/Common/Src/LinearDiskCache.h +++ b/Source/Core/Common/Src/LinearDiskCache.h @@ -24,7 +24,7 @@ // Increment this every time you change shader generation code. enum { - LINEAR_DISKCACHE_VER = 6975 + LINEAR_DISKCACHE_VER = 6984 }; // On disk format: -- cgit v1.2.3 From 402006a83a89bc0f790934096e915f0e8c23f808 Mon Sep 17 00:00:00 2001 From: rodolfoosvaldobogado Date: Thu, 29 Mar 2012 18:26:58 -0300 Subject: more fixes to zcomplock and opengl implementation --- Source/Core/Common/Src/LinearDiskCache.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/Common') diff --git a/Source/Core/Common/Src/LinearDiskCache.h b/Source/Core/Common/Src/LinearDiskCache.h index 11d0a2ced8..2327caecd2 100644 --- a/Source/Core/Common/Src/LinearDiskCache.h +++ b/Source/Core/Common/Src/LinearDiskCache.h @@ -24,7 +24,7 @@ // Increment this every time you change shader generation code. enum { - LINEAR_DISKCACHE_VER = 6984 + LINEAR_DISKCACHE_VER = 6989 }; // On disk format: -- cgit v1.2.3 From 460610ea0e0d5083e261ed9d137048f2a5fc7e59 Mon Sep 17 00:00:00 2001 From: NeoBrainX Date: Fri, 30 Mar 2012 01:56:24 +0200 Subject: Revert Rodolfo's recent zcomploc commits until they actually work correctly. This reverts commit 402006a83a89bc0f790934096e915f0e8c23f808. This reverts commit 48d8d71391fc2cc40d85732680eb6421164bf87c. This reverts commit 450dcc9d2cd874f6ab40d4a339afc29f55751319. --- Source/Core/Common/Src/LinearDiskCache.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/Common') diff --git a/Source/Core/Common/Src/LinearDiskCache.h b/Source/Core/Common/Src/LinearDiskCache.h index 2327caecd2..4c746e9b75 100644 --- a/Source/Core/Common/Src/LinearDiskCache.h +++ b/Source/Core/Common/Src/LinearDiskCache.h @@ -24,7 +24,7 @@ // Increment this every time you change shader generation code. enum { - LINEAR_DISKCACHE_VER = 6989 + LINEAR_DISKCACHE_VER = 6975 }; // On disk format: -- cgit v1.2.3 From 722480cb2e864ea7dd03427e509470ec09ce6f40 Mon Sep 17 00:00:00 2001 From: Jordan Woyak Date: Sat, 7 Apr 2012 14:45:12 -0500 Subject: Fix compilation with g++ 4.7 and some warnings. Fixes issue 5347. --- Source/Core/Common/Src/CommonFuncs.h | 1 + 1 file changed, 1 insertion(+) (limited to 'Source/Core/Common') diff --git a/Source/Core/Common/Src/CommonFuncs.h b/Source/Core/Common/Src/CommonFuncs.h index 74d317d95f..585fe0999a 100644 --- a/Source/Core/Common/Src/CommonFuncs.h +++ b/Source/Core/Common/Src/CommonFuncs.h @@ -21,6 +21,7 @@ #ifdef _WIN32 #define SLEEP(x) Sleep(x) #else +#include #define SLEEP(x) usleep(x*1000) #endif -- cgit v1.2.3 From 0fc390b552260a66ba9670e66971340cf02d42cc Mon Sep 17 00:00:00 2001 From: Matthew Parlane Date: Sat, 21 Apr 2012 16:21:13 +1200 Subject: Modify state.dat before launching wads. Fixes Liight, maybe others. If in doubt, install the wad to the nand. --- Source/Core/Common/Src/CommonPaths.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Source/Core/Common') diff --git a/Source/Core/Common/Src/CommonPaths.h b/Source/Core/Common/Src/CommonPaths.h index d319fb541e..4441cfb8d7 100644 --- a/Source/Core/Common/Src/CommonPaths.h +++ b/Source/Core/Common/Src/CommonPaths.h @@ -121,6 +121,8 @@ #define GC_MEMCARDA "MemoryCardA" #define GC_MEMCARDB "MemoryCardB" +#define WII_STATE "state.dat" + #define WII_SETTING "setting.txt" #define WII_EUR_SETTING "setting-eur.txt" #define WII_USA_SETTING "setting-usa.txt" -- cgit v1.2.3 From 26521aa66af52594f97633f991a467bd37100362 Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Mon, 23 Apr 2012 00:38:58 -0700 Subject: force VolumeDirectory to align files to 32KB (only streaming audio files really need to be aligned...) --- Source/Core/Common/Src/MathUtil.h | 1 + 1 file changed, 1 insertion(+) (limited to 'Source/Core/Common') diff --git a/Source/Core/Common/Src/MathUtil.h b/Source/Core/Common/Src/MathUtil.h index ecace1fb4a..a6290ff602 100644 --- a/Source/Core/Common/Src/MathUtil.h +++ b/Source/Core/Common/Src/MathUtil.h @@ -161,6 +161,7 @@ void LoadDefaultSSEState(); float MathFloatVectorSum(const std::vector&); #define ROUND_UP(x, a) (((x) + (a) - 1) & ~((a) - 1)) +#define ROUND_DOWN(x, a) ((x) & ~((a) - 1)) // Tiny matrix/vector library. -- cgit v1.2.3