summaryrefslogtreecommitdiff
path: root/Source/Plugins/Plugin_VideoSoftware/Src/XFMemLoader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Plugins/Plugin_VideoSoftware/Src/XFMemLoader.cpp')
-rw-r--r--Source/Plugins/Plugin_VideoSoftware/Src/XFMemLoader.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/Source/Plugins/Plugin_VideoSoftware/Src/XFMemLoader.cpp b/Source/Plugins/Plugin_VideoSoftware/Src/XFMemLoader.cpp
index 081967a484..7bbfa5f0fe 100644
--- a/Source/Plugins/Plugin_VideoSoftware/Src/XFMemLoader.cpp
+++ b/Source/Plugins/Plugin_VideoSoftware/Src/XFMemLoader.cpp
@@ -12,7 +12,7 @@
// 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
+// Official Git repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
#include "VideoCommon.h"
@@ -26,15 +26,15 @@ XFRegisters swxfregs;
void InitXFMemory()
{
- memset(&swxfregs, 0, sizeof(swxfregs));
+ memset(&swxfregs, 0, sizeof(swxfregs));
}
void XFWritten(u32 transferSize, u32 baseAddress)
{
- u32 topAddress = baseAddress + transferSize;
+ u32 topAddress = baseAddress + transferSize;
- if (baseAddress <= 0x1026 && topAddress >= 0x1020)
- Clipper::SetViewOffset();
+ if (baseAddress <= 0x1026 && topAddress >= 0x1020)
+ Clipper::SetViewOffset();
// fix lights so invalid values don't trash the lighting computations
if (baseAddress <= 0x067f && topAddress >= 0x0604)
@@ -63,32 +63,32 @@ void XFWritten(u32 transferSize, u32 baseAddress)
void SWLoadXFReg(u32 transferSize, u32 baseAddress, u32 *pData)
{
- u32 size = transferSize;
+ u32 size = transferSize;
- // do not allow writes past registers
- if (baseAddress + transferSize > 0x1058)
- {
- INFO_LOG(VIDEO, "xf load exceeds address space: %x %d bytes\n", baseAddress, transferSize);
-
- if (baseAddress >= 0x1058)
- size = 0;
- else
- size = 0x1058 - baseAddress;
- }
+ // do not allow writes past registers
+ if (baseAddress + transferSize > 0x1058)
+ {
+ INFO_LOG(VIDEO, "xf load exceeds address space: %x %d bytes\n", baseAddress, transferSize);
- if (size > 0) {
- memcpy_gc( &((u32*)&swxfregs)[baseAddress], pData, size * 4);
- XFWritten(transferSize, baseAddress);
- }
+ if (baseAddress >= 0x1058)
+ size = 0;
+ else
+ size = 0x1058 - baseAddress;
+ }
+ if (size > 0)
+ {
+ memcpy_gc( &((u32*)&swxfregs)[baseAddress], pData, size * 4);
+ XFWritten(transferSize, baseAddress);
+ }
}
void SWLoadIndexedXF(u32 val, int array)
{
- int index = val >> 16;
- int address = val & 0xFFF; //check mask
- int size = ((val >> 12) & 0xF) + 1;
- //load stuff from array to address in xf mem
+ int index = val >> 16;
+ int address = val & 0xFFF; //check mask
+ int size = ((val >> 12) & 0xF) + 1;
+ //load stuff from array to address in xf mem
u32 *pData = (u32*)Memory::GetPointer(arraybases[array] + arraystrides[array]*index);