Finally got my subversion working again. Fixed a swap issue that I recently found, still not sure why I'm not receiving the packets, even though Wireshark shows the OS is returning DHCP packets
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3445 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
f8d2411dc3
commit
4b5ab642cd
|
@ -67,7 +67,6 @@ bool CEXIETHERNET::activate() {
|
||||||
DEBUGPRINT("Returned Socket name is: %s\n", ifr.ifr_name);
|
DEBUGPRINT("Returned Socket name is: %s\n", ifr.ifr_name);
|
||||||
system("brctl addif pan0 Dolphin");
|
system("brctl addif pan0 Dolphin");
|
||||||
system("ifconfig Dolphin up");
|
system("ifconfig Dolphin up");
|
||||||
sleep(5);
|
|
||||||
resume();
|
resume();
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,11 @@
|
||||||
#include "EXI_Device.h"
|
#include "EXI_Device.h"
|
||||||
#include "EXI_DeviceEthernet.h"
|
#include "EXI_DeviceEthernet.h"
|
||||||
|
|
||||||
#define SONICDEBUG
|
//#define SONICDEBUG
|
||||||
|
//#define FILEDEBUG
|
||||||
|
#ifdef FILEDEBUG
|
||||||
|
FILE *ME = 0;
|
||||||
|
#endif
|
||||||
void DEBUGPRINT (const char * format, ...)
|
void DEBUGPRINT (const char * format, ...)
|
||||||
{
|
{
|
||||||
char buffer[256];
|
char buffer[256];
|
||||||
|
@ -32,6 +35,9 @@ void DEBUGPRINT (const char * format, ...)
|
||||||
va_start (args, format);
|
va_start (args, format);
|
||||||
vsprintf (buffer,format, args);
|
vsprintf (buffer,format, args);
|
||||||
#ifdef SONICDEBUG
|
#ifdef SONICDEBUG
|
||||||
|
#ifdef FILEDEBUG
|
||||||
|
fprintf(ME, "%s", buffer);
|
||||||
|
#endif
|
||||||
printf("%s", buffer);
|
printf("%s", buffer);
|
||||||
#else
|
#else
|
||||||
INFO_LOG(SP1, buffer);
|
INFO_LOG(SP1, buffer);
|
||||||
|
@ -47,7 +53,12 @@ void DEBUGPRINT (const char * format, ...)
|
||||||
int mPacketsSent = 0;
|
int mPacketsSent = 0;
|
||||||
u8 mac_address[6] = {'D', 'O', 'L', 'P', 'H', 'I'}; // Looks Appropriate
|
u8 mac_address[6] = {'D', 'O', 'L', 'P', 'H', 'I'}; // Looks Appropriate
|
||||||
unsigned int Expecting;
|
unsigned int Expecting;
|
||||||
|
CEXIETHERNET::~CEXIETHERNET()
|
||||||
|
{
|
||||||
|
#ifdef FILEDEBUG
|
||||||
|
fclose(ME);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
CEXIETHERNET::CEXIETHERNET() :
|
CEXIETHERNET::CEXIETHERNET() :
|
||||||
m_uPosition(0),
|
m_uPosition(0),
|
||||||
m_uCommand(0),
|
m_uCommand(0),
|
||||||
|
@ -75,6 +86,9 @@ CEXIETHERNET::CEXIETHERNET() :
|
||||||
|
|
||||||
Expecting = EXPECT_NONE;
|
Expecting = EXPECT_NONE;
|
||||||
mExpectVariableLengthImmWrite = false;
|
mExpectVariableLengthImmWrite = false;
|
||||||
|
#ifdef FILEDEBUG
|
||||||
|
ME = fopen("Debug.txt", "wb");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
void CyclicBufferWriter::write(void *src, size_t size)
|
void CyclicBufferWriter::write(void *src, size_t size)
|
||||||
{
|
{
|
||||||
|
@ -187,13 +201,10 @@ void CEXIETHERNET::ImmWrite(u32 _uData, u32 _uSize)
|
||||||
{
|
{
|
||||||
case BBA_IR:
|
case BBA_IR:
|
||||||
{
|
{
|
||||||
DEBUGPRINT("\t\t[INFO]BBA Interrupt reset 0x%02X & ~(0x%02X) => 0x%02X\n", mBbaMem[0x09], MAKE(u8, _uData), mBbaMem[0x09] & ~MAKE(u8, _uData));
|
|
||||||
//assert(_uSize == 1);
|
//assert(_uSize == 1);
|
||||||
// TODO: Should we swap our data?
|
// Correct, we use swapped
|
||||||
// With _uData not swapped, it becomes 0 when the data is 0xff000000
|
u32 SwappedData = Common::swap32(_uData);
|
||||||
// With _uData swapped, it becomes 0 as well. Who knows the right way?
|
DEBUGPRINT("\t\t[INFO]BBA Interrupt reset 0x%02X & ~(0x%02X) => 0x%02X\n", mBbaMem[0x09], MAKE(u8, SwappedData), mBbaMem[0x09] & ~MAKE(u8, SwappedData));
|
||||||
//u32 SwappedData = Common::swap32(_uData);
|
|
||||||
u32 SwappedData = _uData;
|
|
||||||
mBbaMem[BBA_IR] &= ~MAKE(u8, SwappedData);
|
mBbaMem[BBA_IR] &= ~MAKE(u8, SwappedData);
|
||||||
//exit(0);
|
//exit(0);
|
||||||
break;
|
break;
|
||||||
|
@ -203,8 +214,6 @@ void CEXIETHERNET::ImmWrite(u32 _uData, u32 _uSize)
|
||||||
DEBUGPRINT("\t\t[INFO]BBA_NCRA-----------------------------------------------------------\n");
|
DEBUGPRINT("\t\t[INFO]BBA_NCRA-----------------------------------------------------------\n");
|
||||||
// Correct, we use the swap here
|
// Correct, we use the swap here
|
||||||
u32 SwappedData = (u8)Common::swap32(_uData);
|
u32 SwappedData = (u8)Common::swap32(_uData);
|
||||||
//u32 SwappedData = _uData;
|
|
||||||
// TODO: Should we swap our data?
|
|
||||||
if (RISE(BBA_NCRA_RESET))
|
if (RISE(BBA_NCRA_RESET))
|
||||||
{
|
{
|
||||||
// Normal
|
// Normal
|
||||||
|
@ -477,6 +486,7 @@ void CEXIETHERNET::DMARead(u32 _uAddr, u32 _uSize)
|
||||||
mReadP >= CB_OFFSET ? 4 : 2, mReadP, _uSize);
|
mReadP >= CB_OFFSET ? 4 : 2, mReadP, _uSize);
|
||||||
//exit(0);
|
//exit(0);
|
||||||
mReadP = mReadP + (u16)_uSize;
|
mReadP = mReadP + (u16)_uSize;
|
||||||
|
exit(0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -182,6 +182,7 @@ class CEXIETHERNET : public IEXIDevice
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CEXIETHERNET();
|
CEXIETHERNET();
|
||||||
|
~CEXIETHERNET();
|
||||||
void SetCS(int _iCS);
|
void SetCS(int _iCS);
|
||||||
bool IsPresent();
|
bool IsPresent();
|
||||||
void Update();
|
void Update();
|
||||||
|
|
Loading…
Reference in New Issue