summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authormemberTwo.mb2 <memberTwo.mb2@gmail.com>2009-01-14 23:55:55 +0000
committermemberTwo.mb2 <memberTwo.mb2@gmail.com>2009-01-14 23:55:55 +0000
commite8edc685ba7ab3ea5b366fedeb50b4f18acac1eb (patch)
tree840420dab4fd30b608c682d52fc4f9f41452470d /Source/Core
parent1ba2708bbdfb3f9b3d90245dbfbd39493bb6b5c2 (diff)
1) fix texture caching issue (ie. MP1 "Main menu" fps drop).
2) "fix" Pokemon Coloseum font issue in SafeTextureCache mode. We should kill the unsafe one. TODO: get why it works :p 3) readjust FAKE_GP_WATCHDOG_PERIOD for omega's ZTP to boot in DC. Too late to split, sorry. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1871 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/Src/HW/SystemTimers.cpp5
-rw-r--r--Source/Core/VideoCommon/Src/TextureDecoder.cpp7
-rw-r--r--Source/Core/VideoCommon/Src/TextureDecoder.h2
3 files changed, 7 insertions, 7 deletions
diff --git a/Source/Core/Core/Src/HW/SystemTimers.cpp b/Source/Core/Core/Src/HW/SystemTimers.cpp
index 6106eb8f85..48c6bdbae9 100644
--- a/Source/Core/Core/Src/HW/SystemTimers.cpp
+++ b/Source/Core/Core/Src/HW/SystemTimers.cpp
@@ -132,11 +132,10 @@ int
IPC_HLE_PERIOD = GetTicksPerSecond() / 250,
// For DC watchdog hack
- // Once every 10 frame-period seems to be enough (arbitrary taking 60fps as the ref).
+ // Once every 4 frame-period seems to be enough (arbitrary taking 60fps as the ref).
// TODO: make it VI output frame rate compliant (30/60 and 25/50)
// Assuming game's frame-finish-watchdog wait more than 10 emulated frame-period before starting its mess.
- // Note: 1/4 sec is the very maximum for ZTP to work in DC... 1/6 for safety.
- FAKE_GP_WATCHDOG_PERIOD = GetTicksPerSecond() / 6;
+ FAKE_GP_WATCHDOG_PERIOD = GetTicksPerSecond() / 15;
///////////////////////////////////
diff --git a/Source/Core/VideoCommon/Src/TextureDecoder.cpp b/Source/Core/VideoCommon/Src/TextureDecoder.cpp
index de8e383f91..a7a5356dce 100644
--- a/Source/Core/VideoCommon/Src/TextureDecoder.cpp
+++ b/Source/Core/VideoCommon/Src/TextureDecoder.cpp
@@ -65,11 +65,12 @@ int TexDecoder_GetTextureSizeInBytes(int width, int height, int format)
return (width * height * TexDecoder_GetTexelSizeInNibbles(format)) / 2;
}
-u32 TexDecoder_GetTlutHash(const u16 *src, int len)
+u32 TexDecoder_GetTlutHash(const u8* src, int len)
{
u32 hash = 0xbeefbabe;
- for (int i = 0; i < len / 2; i += 2) {
- hash = _rotl(hash, 17) ^ ((u32 *)src)[i];
+ for (int i = 0; i < len ; i++) {
+ hash = _rotl(hash, 7) ^ src[i];
+ hash += 7;
}
return hash;
}
diff --git a/Source/Core/VideoCommon/Src/TextureDecoder.h b/Source/Core/VideoCommon/Src/TextureDecoder.h
index 9fdfd36850..ceb1d61fff 100644
--- a/Source/Core/VideoCommon/Src/TextureDecoder.h
+++ b/Source/Core/VideoCommon/Src/TextureDecoder.h
@@ -78,7 +78,7 @@ enum PC_TexFormat
PC_TexFormat TexDecoder_Decode(u8 *dst, const u8 *src, int width, int height, int texformat, int tlutaddr, int tlutfmt);
u32 TexDecoder_GetSafeTextureHash(const u8 *src, int width, int height, int texformat, u32 seed=0);
-u32 TexDecoder_GetTlutHash(const u16 *src, int len);
+u32 TexDecoder_GetTlutHash(const u8* src, int len);
void TexDecoder_SetTexFmtOverlayOptions(bool enable, bool center);