diff options
| author | SND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2009-06-29 18:09:39 +0000 |
|---|---|---|
| committer | SND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2009-06-29 18:09:39 +0000 |
| commit | 577028789213c01d1aab94757c18872d7ff862e3 (patch) | |
| tree | 5136101a9063b0936b11f85b75de455b57edb602 /libpcsxcore | |
| parent | b38d3b579074ff3076aadbecd77efb627f7043a8 (diff) | |
| download | pcsxr-577028789213c01d1aab94757c18872d7ff862e3.tar.gz | |
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@23849 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'libpcsxcore')
| -rw-r--r-- | libpcsxcore/psxbios.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/libpcsxcore/psxbios.c b/libpcsxcore/psxbios.c index 38e7649e..1de7e0bc 100644 --- a/libpcsxcore/psxbios.c +++ b/libpcsxcore/psxbios.c @@ -262,14 +262,23 @@ static FileDesc FDesc[32]; 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. + sp -= 128; while (pc0 != 0x80001000) psxCpu->ExecuteBlock(); + sp += 128; } static __inline void softCall2(u32 pc) { u32 sra = ra; pc0 = pc; ra = 0x80001000; + sp -= 128; while (pc0 != 0x80001000) psxCpu->ExecuteBlock(); + sp += 128; ra = sra; } @@ -611,7 +620,7 @@ void psxBios_InitHeap() { // 39 size &= 0xfffffffc; heap_addr = (u32*)Ra0; - heap_end = (u32*)((u32)heap_addr + size); + heap_end = (u32*)((void *)heap_addr + size); *heap_addr = SWAP32(size | 1); SysPrintf("InitHeap %lx,%lx : %lx %lx\n",a0,a1, (uptr)heap_addr-(uptr)psxM, size); |
