From: gameblabla Date: Thu, 18 Jul 2019 00:42:41 +0000 (+0200) Subject: psxbios: Merge heap fix from PCSX4ALL. X-Git-Tag: r23~156^2~15 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a85ffa0ee71d19e297cd8bc3710d4c24330881e1;p=pcsx_rearmed.git psxbios: Merge heap fix from PCSX4ALL. --- diff --git a/libpcsxcore/psxbios.c b/libpcsxcore/psxbios.c index ebb59572..856d5614 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);