mirror of https://github.com/PCSX2/pcsx2.git
DEV9ghzdrk:
Changed the stack init hack so it is consistent on plugin resets and removed a part of it that broke OPL. Hopefully this works for all use cases, but we should fix the initial problem anyway. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5601 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
447d7152b5
commit
a6f5ac4720
|
@ -168,12 +168,15 @@ void CALLBACK DEV9shutdown() {
|
|||
#endif
|
||||
}
|
||||
|
||||
bool tx_p_first;
|
||||
s32 CALLBACK DEV9open(void *pDsp)
|
||||
{
|
||||
DEV9_LOG("DEV9open\n");
|
||||
LoadConf();
|
||||
DEV9_LOG("open r+: %s\n", config.Hdd);
|
||||
config.HddSize = 8*1024;
|
||||
|
||||
tx_p_first=false; // reset stack init hack so it works on game reboots
|
||||
|
||||
iopPC = (u32*)pDsp;
|
||||
|
||||
|
|
|
@ -107,11 +107,12 @@ void rx_process(NetPacket* pk)
|
|||
//note that this _is_ wrong since the IOP interrupt system is not thread safe.. but nothing i can do about that
|
||||
}
|
||||
|
||||
bool tx_p_first=false;
|
||||
u32 wswap(u32 d)
|
||||
{
|
||||
return (d>>16)|(d<<16);
|
||||
}
|
||||
|
||||
extern bool tx_p_first;
|
||||
void tx_process()
|
||||
{
|
||||
//we loop based on count ? or just *use* it ?
|
||||
|
@ -119,9 +120,10 @@ void tx_process()
|
|||
//spams// printf("tx_process : %d cnt frames !\n",cnt);
|
||||
|
||||
//Hack needed for GT4. Game fails to init the adapter otherwise (and notices about that via IOP kprintf on bootup).
|
||||
//Reseting SMAP_R_TXFIFO_FRAME_CNT to 0 however breaks OPL. Thankfully not doing that fixes the problem while GT4 still works.
|
||||
if (!tx_p_first)
|
||||
{
|
||||
dev9Ru8(SMAP_R_TXFIFO_FRAME_CNT)=0;
|
||||
//dev9Ru8(SMAP_R_TXFIFO_FRAME_CNT)=0;
|
||||
tx_p_first=true;
|
||||
//THIS IS A HACK.without that the stack wont init, i guess its missing e3/emac emulation ..
|
||||
emu_printf("WARN : First packet interrupt hack ..\n");
|
||||
|
|
Loading…
Reference in New Issue