From a85ffa0ee71d19e297cd8bc3710d4c24330881e1 Mon Sep 17 00:00:00 2001 From: gameblabla Date: Thu, 18 Jul 2019 02:42:41 +0200 Subject: psxbios: Merge heap fix from PCSX4ALL. --- libpcsxcore/psxbios.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libpcsxcore/psxbios.c') diff --git a/libpcsxcore/psxbios.c b/libpcsxcore/psxbios.c index ebb5957..856d561 100644 --- a/libpcsxcore/psxbios.c +++ b/libpcsxcore/psxbios.c @@ -1219,8 +1219,10 @@ void psxBios_InitHeap() { // 0x39 size &= 0xfffffffc; heap_addr = (u32 *)Ra0; - heap_end = (u32 *)((u8 *)heap_addr + size); - *heap_addr = SWAP32(size | 1); + heap_size = size; + heap_end = (u32 *)((u8 *)heap_addr + heap_size); + /* HACKFIX: Commenting out this line fixes GTA2 crash */ + //*heap_addr = SWAP32(size | 1); SysPrintf("InitHeap %x,%x : %x %x\n",a0,a1, (int)((uptr)heap_addr-(uptr)psxM), size); -- cgit v1.2.3