notaz.gp2x.de
/
pcsx_rearmed.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add compile-time option to drop psxMemRLUT, psxMemWLUT
[pcsx_rearmed.git]
/
libpcsxcore
/
psxbios.c
diff --git
a/libpcsxcore/psxbios.c
b/libpcsxcore/psxbios.c
index
bad3457
..
432b0e2
100644
(file)
--- a/
libpcsxcore/psxbios.c
+++ b/
libpcsxcore/psxbios.c
@@
-398,14
+398,17
@@
static inline void softCall(u32 pc) {
ra = 0x80001000;
psxRegs.CP0.n.SR &= ~0x404; // disable interrupts
ra = 0x80001000;
psxRegs.CP0.n.SR &= ~0x404; // disable interrupts
+ assert(psxRegs.cpuInRecursion <= 1);
+ psxRegs.cpuInRecursion++;
psxCpu->Notify(R3000ACPU_NOTIFY_AFTER_LOAD, PTR_1);
psxCpu->Notify(R3000ACPU_NOTIFY_AFTER_LOAD, PTR_1);
- while (pc0 != 0x80001000 && ++lim <
10
00000)
+ while (pc0 != 0x80001000 && ++lim <
0x1
00000)
psxCpu->ExecuteBlock(EXEC_CALLER_HLE);
psxCpu->Notify(R3000ACPU_NOTIFY_BEFORE_SAVE, PTR_1);
psxCpu->ExecuteBlock(EXEC_CALLER_HLE);
psxCpu->Notify(R3000ACPU_NOTIFY_BEFORE_SAVE, PTR_1);
+ psxRegs.cpuInRecursion--;
- if (lim ==
10
00000)
+ if (lim ==
0x1
00000)
PSXBIOS_LOG("softCall @%x hit lim\n", pc);
ra = sra;
psxRegs.CP0.n.SR |= ssr & 0x404;
PSXBIOS_LOG("softCall @%x hit lim\n", pc);
ra = sra;
psxRegs.CP0.n.SR |= ssr & 0x404;
@@
-421,14
+424,16
@@
static inline void softCallInException(u32 pc) {
return;
ra = 0x80001000;
return;
ra = 0x80001000;
+ psxRegs.cpuInRecursion++;
psxCpu->Notify(R3000ACPU_NOTIFY_AFTER_LOAD, PTR_1);
psxCpu->Notify(R3000ACPU_NOTIFY_AFTER_LOAD, PTR_1);
- while (!returned_from_exception() && pc0 != 0x80001000 && ++lim <
10
00000)
+ while (!returned_from_exception() && pc0 != 0x80001000 && ++lim <
0x1
00000)
psxCpu->ExecuteBlock(EXEC_CALLER_HLE);
psxCpu->Notify(R3000ACPU_NOTIFY_BEFORE_SAVE, PTR_1);
psxCpu->ExecuteBlock(EXEC_CALLER_HLE);
psxCpu->Notify(R3000ACPU_NOTIFY_BEFORE_SAVE, PTR_1);
+ psxRegs.cpuInRecursion--;
- if (lim ==
10
00000)
+ if (lim ==
0x1
00000)
PSXBIOS_LOG("softCallInException @%x hit lim\n", pc);
if (pc0 == 0x80001000)
ra = sra;
PSXBIOS_LOG("softCallInException @%x hit lim\n", pc);
if (pc0 == 0x80001000)
ra = sra;
@@
-4035,6
+4040,7
@@
void psxBiosException() {
sp = fp = loadRam32(A_EXC_SP);
gp = A_EXC_GP;
use_cycles(46);
sp = fp = loadRam32(A_EXC_SP);
gp = A_EXC_GP;
use_cycles(46);
+ assert(!psxRegs.cpuInRecursion);
// do the chains (always 4)
for (c = lim = 0; c < 4; c++) {
// do the chains (always 4)
for (c = lim = 0; c < 4; c++) {
@@
-4175,7
+4181,7
@@
void (* const psxHLEt[24])() = {
hleExcPadCard1, hleExcPadCard2,
};
hleExcPadCard1, hleExcPadCard2,
};
-void psxBiosCheckExe(u32 t_addr, u32 t_size)
+void psxBiosCheckExe(u32 t_addr, u32 t_size
, int loading_state
)
{
// lw $v0, 0x10($sp)
// nop
{
// lw $v0, 0x10($sp)
// nop
@@
-4213,7
+4219,8
@@
void psxBiosCheckExe(u32 t_addr, u32 t_size)
if ((SWAP32(r32[i + j]) >> 16) != 0x3c04) // lui
continue;
if ((SWAP32(r32[i + j]) >> 16) != 0x3c04) // lui
continue;
- SysPrintf("HLE vsync @%08x\n", start + i * 4);
+ if (!loading_state)
+ SysPrintf("HLE vsync @%08x\n", start + i * 4);
psxRegs.biosBranchCheck = (t_addr & 0xa01ffffc) + i * 4;
}
}
psxRegs.biosBranchCheck = (t_addr & 0xa01ffffc) + i * 4;
}
}