summaryrefslogtreecommitdiff
path: root/libpcsxcore
diff options
context:
space:
mode:
authorSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2009-12-04 14:31:00 +0000
committerSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2009-12-04 14:31:00 +0000
commit36abf091805cf044a3a09b0909fc56a23583b756 (patch)
treef6c127b5ebbc428e0de236ceabbfadd77f7f05d8 /libpcsxcore
parent821c3db4efeef0fd6b93ceb8d1446fe94fea5a95 (diff)
downloadpcsxr-36abf091805cf044a3a09b0909fc56a23583b756.tar.gz
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@38811 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'libpcsxcore')
-rw-r--r--libpcsxcore/psxbios.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/libpcsxcore/psxbios.c b/libpcsxcore/psxbios.c
index c6a6a050..ffd1c9e7 100644
--- a/libpcsxcore/psxbios.c
+++ b/libpcsxcore/psxbios.c
@@ -263,7 +263,13 @@ static __inline void softCall(u32 pc) {
pc0 = pc;
ra = 0x80001000;
+ // Fixes crashing problems with at least Final Fantasy 7 and Xenogears.
+ // This should be considered a temporary fix; after all, we do not
+ // know how much space below sp is in use. It may be worth considering
+ // creating a new stack for interrupt handlers.
+ if ((sp >> 24) != 0x1f) sp -= 256;
while (pc0 != 0x80001000) psxCpu->ExecuteBlock();
+ if ((sp >> 24) != 0x1f) sp += 256;
}
static __inline void softCall2(u32 pc) {
@@ -271,7 +277,13 @@ static __inline void softCall2(u32 pc) {
pc0 = pc;
ra = 0x80001000;
+ // Fixes crashing problems with at least Final Fantasy 7 and Xenogears.
+ // This should be considered a temporary fix; after all, we do not
+ // know how much space below sp is in use. It may be worth considering
+ // creating a new stack for interrupt handlers.
+ if ((sp >> 24) != 0x1f) sp -= 256;
while (pc0 != 0x80001000) psxCpu->ExecuteBlock();
+ if ((sp >> 24) != 0x1f) sp += 256;
ra = sra;
}
@@ -2324,13 +2336,7 @@ void biosInterrupt() {
for (i=0; i<3; i++) {
if (psxHu32(0x1070) & (1 << (i+4))) {
if (RcEV[i][1].status == EvStACTIVE) {
- // Fixes crashing problems with at least Final Fantasy 7 and Xenogears.
- // This should be considered a temporary fix; after all, we do not
- // know how much space below sp is in use. It may be worth considering
- // creating a new stack for interrupt handlers.
- if ((sp >> 24) != 0x1f) sp -= 256;
softCall(RcEV[i][1].fhandler);
- if ((sp >> 24) != 0x1f) sp += 256;
}
psxHwWrite32(0x1f801070, ~(1 << (i+4)));
}