From 55226f7ec47e1058b525bab42be65c8c377b267c Mon Sep 17 00:00:00 2001 From: nakeee Date: Thu, 2 Oct 2008 14:25:03 +0000 Subject: [PATCH] reverting 64 bit as it doesn't work properly. Well can't say I didn't try :-) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@743 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/VideoCommon/Src/Fifo.cpp | 21 +++++++++---------- .../Plugin_VideoOGL/Src/OpcodeDecoding.cpp | 2 +- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/Source/Core/VideoCommon/Src/Fifo.cpp b/Source/Core/VideoCommon/Src/Fifo.cpp index 22fe16bac1..af2405ff28 100644 --- a/Source/Core/VideoCommon/Src/Fifo.cpp +++ b/Source/Core/VideoCommon/Src/Fifo.cpp @@ -31,8 +31,8 @@ FifoReader fifo; // STATE_TO_SAVE static u8 *videoBuffer; -static u32 size = 0; -static u64 readptr = 0; +static int size = 0; +static int readptr = 0; void Fifo_DoState(PointerWrap &p) { p.DoArray(videoBuffer, FIFO_SIZE); @@ -53,12 +53,12 @@ void Fifo_Shutdown() FreeMemoryPages(videoBuffer, FIFO_SIZE); } -u64 FAKE_GetFifoStartPtr() +u32 FAKE_GetFifoStartPtr() { - return (u64)videoBuffer; + return (int)videoBuffer; } -u64 FAKE_GetFifoSize() +int FAKE_GetFifoSize() { if (size < readptr) { @@ -66,10 +66,9 @@ u64 FAKE_GetFifoSize() } return (size - readptr); } - -u64 FAKE_GetFifoEndAddr() +int FAKE_GetFifoEndAddr() { - return (u64)(videoBuffer+size); + return (int)(videoBuffer+size); } u8 FAKE_PeekFifo8(u32 _uOffset) @@ -97,9 +96,9 @@ int FAKE_GetPosition() return readptr; } -u64 FAKE_GetRealPtr() +int FAKE_GetRealPtr() { - return (u64)(videoBuffer+readptr); + return (int)(videoBuffer+readptr); } u16 FAKE_ReadFifo16() @@ -131,7 +130,7 @@ void Video_SendFifoData(u8* _uData) // TODO (mb2): Better and DataReader inline for DX9 #ifdef DATAREADER_INLINE if (g_pVideoData) // for DX9 plugin "compatibility" - readptr = g_pVideoData-(u64)videoBuffer; + readptr = g_pVideoData-(u32)videoBuffer; #endif if (FAKE_GetFifoSize() > readptr) { diff --git a/Source/Plugins/Plugin_VideoOGL/Src/OpcodeDecoding.cpp b/Source/Plugins/Plugin_VideoOGL/Src/OpcodeDecoding.cpp index d79d1e7e3f..fcab65c818 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/OpcodeDecoding.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/OpcodeDecoding.cpp @@ -82,7 +82,7 @@ void ExecuteDisplayList(u32 address, u32 size) #ifdef DATAREADER_INLINE u32 old_pVideoData = g_pVideoData; - const u64 startAddress = (u64)Memory_GetPtr(address); + const u32 startAddress = (u32)Memory_GetPtr(address); g_pVideoData = startAddress; #endif // temporarily swap dl and non-dl(small "hack" for the stats)