X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libpcsxcore%2Fpsxbios.c;h=93a40576c9f59c2a3a2d35ece72e985af26f13d6;hb=c2360853ed4794a964e972d4837a83578ac01d04;hp=3247402da1211213c415da819d975553ecb6c80b;hpb=0f598f20d1c618933ffd1a02207912915fcd454e;p=pcsx_rearmed.git diff --git a/libpcsxcore/psxbios.c b/libpcsxcore/psxbios.c index 3247402d..93a40576 100644 --- a/libpcsxcore/psxbios.c +++ b/libpcsxcore/psxbios.c @@ -1593,11 +1593,8 @@ void psxBios__card_info() { // ab break; } -// DeliverEvent(0x11, 0x2); // 0xf0000011, 0x0004 -// DeliverEvent(0x11, 0x2); // 0xf0000011, 0x0004 - DeliverEvent(0x81, 0x2); // 0xf4000001, 0x0004 + DeliverEvent(0x11, 0x2); // 0xf4000001, 0x0004 DeliverEvent(0x81, ret); // 0xf4000001, 0x0004 - v0 = 1; pc0 = ra; } @@ -1878,12 +1875,10 @@ void psxBios_CloseTh() { // 0f #ifdef PSXBIOS_LOG PSXBIOS_LOG("psxBios_%s: %x\n", biosB0n[0x0f], th); #endif - - if (Thread[th].status == 0) { - v0 = 0; - } else { + /* The return value is always 1 (even if the handle was already closed). */ + v0 = 1; + if (Thread[th].status != 0) { Thread[th].status = 0; - v0 = 1; } pc0 = ra; @@ -1899,14 +1894,11 @@ void psxBios_ChangeTh() { // 10 #ifdef PSXBIOS_LOG // PSXBIOS_LOG("psxBios_%s: %x\n", biosB0n[0x10], th); #endif - + /* The return value is always 1. */ + v0 = 1; if (Thread[th].status == 0 || CurThread == th) { - v0 = 0; - pc0 = ra; } else { - v0 = 1; - if (Thread[CurThread].status == 2) { Thread[CurThread].status = 1; Thread[CurThread].func = ra;