From e1ff498a8e1a39781fcce9e808878264f0b2f028 Mon Sep 17 00:00:00 2001 From: Gauvain 'GovanifY' Roussel-Tarbouriech Date: Sat, 19 Sep 2020 22:52:28 +0200 Subject: [PATCH] FW: fix FWirq callback bug --- pcsx2/FW.cpp | 12 ++---------- pcsx2/FW.h | 3 --- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/pcsx2/FW.cpp b/pcsx2/FW.cpp index 3d3bafa22b..2599589aee 100644 --- a/pcsx2/FW.cpp +++ b/pcsx2/FW.cpp @@ -14,7 +14,7 @@ */ #include "PrecompiledHeader.h" - +#include "IopCommon.h" #include #include using namespace std; @@ -24,8 +24,6 @@ using namespace std; u8 phyregs[16]; s8* fwregs; -void (*FWirq)(); - s32 FWopen() { memset(phyregs, 0, sizeof(phyregs)); @@ -67,7 +65,7 @@ void PHYRead() if (fwRu32(0x8424) & 0x40000000) //RRx interrupt mask { 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); } - -void FWirqCallback(void (*callback)()) -{ - // Register FWirq, so we can trigger an interrupt with it later. - FWirq = callback; -} diff --git a/pcsx2/FW.h b/pcsx2/FW.h index ca84028274..f0d5e19200 100644 --- a/pcsx2/FW.h +++ b/pcsx2/FW.h @@ -27,12 +27,9 @@ extern s8* fwregs; //PHY Access Address for ease of use :P #define PHYACC fwRu32(0x8414) -extern void (*FWirq)(); - s32 FWopen(); void FWclose(); void PHYWrite(); void PHYRead(); u32 FWread32(u32 addr); void FWwrite32(u32 addr, u32 value); -void FWirqCallback(void (*callback)());