From b2ee693b256af886d521e2e45800f1d1ff4d75a5 Mon Sep 17 00:00:00 2001 From: ramapcsx2 Date: Mon, 9 May 2011 16:45:54 +0000 Subject: [PATCH] GSdx: New define "NO_CRC_HACKS", for testing how games work without hacks easily. Gets enabled together with the no cache define but can be toggled individually as well. Also I've been told to mention that these changes are not directly benefiting the end user. Gamers: This doesn't fix your DragonBall, okay? :p git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4636 96395faa-99c1-11dd-bbfe-3dabce05a288 --- plugins/GSdx/GSCrc.cpp | 4 ++-- plugins/GSdx/GSRendererHW.h | 2 +- plugins/GSdx/GSState.cpp | 2 +- plugins/GSdx/stdafx.h | 6 +++++- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/plugins/GSdx/GSCrc.cpp b/plugins/GSdx/GSCrc.cpp index 8ed356149e..a09cd48e89 100644 --- a/plugins/GSdx/GSCrc.cpp +++ b/plugins/GSdx/GSCrc.cpp @@ -252,13 +252,13 @@ CRC::Game CRC::Lookup(uint32 crc) m_map[m_games[i].crc] = &m_games[i]; } } - +#ifndef NO_CRC_HACKS hash_map::iterator i = m_map.find(crc); if(i != m_map.end()) { return *i->second; } - +#endif return m_games[0]; } diff --git a/plugins/GSdx/GSRendererHW.h b/plugins/GSdx/GSRendererHW.h index 46dafe1e2d..0e9b27fdf6 100644 --- a/plugins/GSdx/GSRendererHW.h +++ b/plugins/GSdx/GSRendererHW.h @@ -556,7 +556,7 @@ protected: void Draw() { -#ifndef HW_NO_TEXTURE_CACHE +#ifndef NO_CRC_HACKS if(IsBadFrame(m_skip, m_userhacks_skipdraw)) return; #endif diff --git a/plugins/GSdx/GSState.cpp b/plugins/GSdx/GSState.cpp index 29a0794232..50cbe27dda 100644 --- a/plugins/GSdx/GSState.cpp +++ b/plugins/GSdx/GSState.cpp @@ -25,7 +25,7 @@ //#define DISABLE_BITMASKING //#define DISABLE_COLCLAMP //#define DISABLE_DATE -//see stdafx.h for #define HW_NO_TEXTURE_CACHE +//see stdafx.h for #define HW_NO_TEXTURE_CACHE and #define NO_CRC_HACKS //#define Offset_ST // Fixes Persona3 mini map alignment which is off even in software rendering //#define Offset_UV // Fixes / breaks various titles diff --git a/plugins/GSdx/stdafx.h b/plugins/GSdx/stdafx.h index c8206e39fa..cc28f6ca91 100644 --- a/plugins/GSdx/stdafx.h +++ b/plugins/GSdx/stdafx.h @@ -329,4 +329,8 @@ extern void* vmalloc(size_t size, bool code); extern void vmfree(void* ptr, size_t size); #define USE_UPSCALE_HACKS // Hacks intended to fix upscaling / rendering glitches in HW renderers -//#define HW_NO_TEXTURE_CACHE // Slow but fixes a lot of bugs \ No newline at end of file +//#define HW_NO_TEXTURE_CACHE // Slow but fixes a lot of bugs +//#define NO_CRC_HACKS // Disable all game specific hacks +#ifdef HW_NO_TEXTURE_CACHE + #define NO_CRC_HACKS +#endif \ No newline at end of file