FW: fix FWirq callback bug

This commit is contained in:
Gauvain 'GovanifY' Roussel-Tarbouriech 2020-09-19 22:52:28 +02:00 committed by refractionpcsx2
parent 6f98fd4b65
commit e1ff498a8e
2 changed files with 2 additions and 13 deletions

View File

@ -14,7 +14,7 @@
*/ */
#include "PrecompiledHeader.h" #include "PrecompiledHeader.h"
#include "IopCommon.h"
#include <stdlib.h> #include <stdlib.h>
#include <string> #include <string>
using namespace std; using namespace std;
@ -24,8 +24,6 @@ using namespace std;
u8 phyregs[16]; u8 phyregs[16];
s8* fwregs; s8* fwregs;
void (*FWirq)();
s32 FWopen() s32 FWopen()
{ {
memset(phyregs, 0, sizeof(phyregs)); memset(phyregs, 0, sizeof(phyregs));
@ -67,7 +65,7 @@ void PHYRead()
if (fwRu32(0x8424) & 0x40000000) //RRx interrupt mask if (fwRu32(0x8424) & 0x40000000) //RRx interrupt mask
{ {
fwRu32(0x8420) |= 0x40000000; fwRu32(0x8420) |= 0x40000000;
FWirq(); fwIrq();
} }
} }
@ -195,9 +193,3 @@ void FWwrite32(u32 addr, u32 value)
} }
DevCon.WriteLn("FW: write mem 0x%x: 0x%x", addr, value); DevCon.WriteLn("FW: write mem 0x%x: 0x%x", addr, value);
} }
void FWirqCallback(void (*callback)())
{
// Register FWirq, so we can trigger an interrupt with it later.
FWirq = callback;
}

View File

@ -27,12 +27,9 @@ extern s8* fwregs;
//PHY Access Address for ease of use :P //PHY Access Address for ease of use :P
#define PHYACC fwRu32(0x8414) #define PHYACC fwRu32(0x8414)
extern void (*FWirq)();
s32 FWopen(); s32 FWopen();
void FWclose(); void FWclose();
void PHYWrite(); void PHYWrite();
void PHYRead(); void PHYRead();
u32 FWread32(u32 addr); u32 FWread32(u32 addr);
void FWwrite32(u32 addr, u32 value); void FWwrite32(u32 addr, u32 value);
void FWirqCallback(void (*callback)());