aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgameblabla2019-07-18 02:30:31 +0200
committergameblabla2019-07-18 02:30:31 +0200
commitb4ae2532030fa15ca2009eb239ab2e50b2231000 (patch)
tree9985067fcd84debeea9b6ed69f84b2a1d3638add
parenta946d159bfc8e85d5ff2bcb08fc940830d5acbf4 (diff)
downloadpcsx_rearmed-b4ae2532030fa15ca2009eb239ab2e50b2231000.tar.gz
pcsx_rearmed-b4ae2532030fa15ca2009eb239ab2e50b2231000.tar.bz2
pcsx_rearmed-b4ae2532030fa15ca2009eb239ab2e50b2231000.zip
psxbios: Callback Events should not set event status to busy in TestEvent.
We are already doing that in WaitEvent. According to nocash documentation, this also applies to TestEvent as well so let's implement it.
-rw-r--r--libpcsxcore/psxbios.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/libpcsxcore/psxbios.c b/libpcsxcore/psxbios.c
index 288e33b..829deb0 100644
--- a/libpcsxcore/psxbios.c
+++ b/libpcsxcore/psxbios.c
@@ -1762,9 +1762,15 @@ void psxBios_TestEvent() { // 0b
ev = a0 & 0xff;
spec = (a0 >> 8) & 0xff;
- if (Event[ev][spec].status == EvStALREADY) {
- Event[ev][spec].status = EvStACTIVE; v0 = 1;
- } else v0 = 0;
+ if (Event[ev][spec].status == EvStALREADY)
+ {
+ if (!(Event[ev][spec].mode == EvMdINTR)) Event[ev][spec].status = EvStACTIVE;
+ v0 = 1;
+ }
+ else
+ {
+ v0 = 0;
+ }
#ifdef PSXBIOS_LOG
PSXBIOS_LOG("psxBios_%s %x,%x: %x\n", biosB0n[0x0b], ev, spec, v0);