static TCB Thread[8];
static int CurThread = 0;
static FileDesc FDesc[32];
+static u32 card_active_chan;
boolean hleSoftCall = FALSE;
PSXBIOS_LOG("psxBios_%s: %x\n", biosA0n[0xab], a0);
#endif
+ card_active_chan = a0;
+
// DeliverEvent(0x11, 0x2); // 0xf0000011, 0x0004
DeliverEvent(0x81, 0x2); // 0xf4000001, 0x0004
PSXBIOS_LOG("psxBios_%s: %x\n", biosA0n[0xac], a0);
#endif
+ card_active_chan = a0;
+
// DeliverEvent(0x11, 0x2); // 0xf0000011, 0x0004
DeliverEvent(0x81, 0x2); // 0xf4000001, 0x0004
PSXBIOS_LOG("psxBios_%s: %x,%x,%x\n", biosB0n[0x4e], a0, a1, a2);
#endif
+ card_active_chan = a0;
port = a0 >> 4;
if (port == 0) {
PSXBIOS_LOG("psxBios_%s\n", biosB0n[0x4f]);
#endif
+ card_active_chan = a0;
port = a0 >> 4;
if (port == 0) {
v0 = 0x874; pc0 = ra;
}
+void psxBios__card_chan() { // 0x58
+#ifdef PSXBIOS_LOG
+ PSXBIOS_LOG("psxBios_%s\n", biosB0n[0x58]);
+#endif
+
+ v0 = card_active_chan;
+ pc0 = ra;
+}
+
void psxBios_ChangeClearPad() { // 5b
#ifdef PSXBIOS_LOG
PSXBIOS_LOG("psxBios_%s: %x\n", biosB0n[0x5b], a0);
//biosB0[0x55] = psxBios__get_error;
biosB0[0x56] = psxBios_GetC0Table;
biosB0[0x57] = psxBios_GetB0Table;
- //biosB0[0x58] = psxBios__card_chan;
+ biosB0[0x58] = psxBios__card_chan;
//biosB0[0x59] = psxBios_sys_b0_59;
//biosB0[0x5a] = psxBios_sys_b0_5a;
biosB0[0x5b] = psxBios_ChangeClearPad;
bfreezes(Thread);
bfreezel(&CurThread);
bfreezes(FDesc);
+ bfreezel(&card_active_chan);
}