summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorSonicadvance1 <sonicadvance1@gmail.com>2009-05-24 12:43:54 +0000
committerSonicadvance1 <sonicadvance1@gmail.com>2009-05-24 12:43:54 +0000
commit674f963779963fa5d776026aa9abd787a9fbcc73 (patch)
treeecaa203776dcbf15de3ac37287bfb199a1dd2bd0 /Source/Core
parentf5ee9ce8524e1336addd1edf0815304e81c3cb27 (diff)
Quick commit so I can run to the Windows side. It's a slight bugfix and some comments. The first packet is still malformed, but now only in one place, which is great
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3282 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/Src/HW/EXI_DeviceEthernet.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/Source/Core/Core/Src/HW/EXI_DeviceEthernet.cpp b/Source/Core/Core/Src/HW/EXI_DeviceEthernet.cpp
index 056798e756..18fb239264 100644
--- a/Source/Core/Core/Src/HW/EXI_DeviceEthernet.cpp
+++ b/Source/Core/Core/Src/HW/EXI_DeviceEthernet.cpp
@@ -139,14 +139,15 @@ void CEXIETHERNET::ImmWrite(u32 _uData, u32 _uSize)
if (mExpectVariableLengthImmWrite)
{
DEBUGPRINT("\t[INFO]Variable length IMM write\n");
- // TODO: Use Swapped or unswapped?
if(_uSize == 4)
{
+ // Correct
_uData = Common::swap32(_uData);
}
else if(_uSize == 2)
{
- _uData = Common::swap16(_uData);
+ // Correct
+ _uData = (u16)Common::swap32(_uData);
}
mWriteBuffer.write(_uSize, &_uData);
return;
@@ -273,6 +274,7 @@ void CEXIETHERNET::ImmWrite(u32 _uData, u32 _uSize)
}
else //size == 2
{
+ // TODO: Might be wrong
u16 SwappedData = (u16)Common::swap32(_uData >> 8);
mWriteP = (u8)getbitsw(SwappedData & ~0x4000, 16, 23); //Whinecube : Dunno about this...
}
@@ -293,11 +295,12 @@ void CEXIETHERNET::ImmWrite(u32 _uData, u32 _uSize)
}
else if ((_uSize == 4 && (_uData & 0xC0000000) == 0x80000000) || (_uSize == 2 && ((u16)Common::swap32(_uData >> 8) & 0x4000) == 0x0000))
{
- // Non-Swapped is the correct way
+
u32 SwappedData = _uData;
// Read from BBA Register!
if(_uSize == 4)
{
+ // Correct
mReadP = (u16)getbitsw(SwappedData, 8, 23);
if (mReadP >= BBAMEM_SIZE)
{
@@ -308,7 +311,10 @@ void CEXIETHERNET::ImmWrite(u32 _uData, u32 _uSize)
}
}
else
- { //size == 2
+ {
+ // TODO: Don't know if this is correct
+ // Should Be
+ //size == 2
mReadP = (u8)getbitsw(SwappedData, 16, 23);
}
DEBUGPRINT( "\t[INFO]Read from BBA register! 0x%X\n", mReadP);