Add support for mapping emulated RAM to address 0x0
authorPaul Cercueil <paul@crapouillou.net>
Wed, 11 May 2022 15:24:03 +0000 (16:24 +0100)
committerPaul Cercueil <paul@crapouillou.net>
Wed, 11 May 2022 18:03:50 +0000 (19:03 +0100)
commitb012a437739802ba3f35827b17469ea7a8b7953c
treeb138cca8d4bf1a157fb7066a594d02c9ef108f7c
parent7dee1e8e9e0c5606f237e487efbd0c5fe6154b3f
Add support for mapping emulated RAM to address 0x0

This requires a few changes, since a pointer whose value is 0x0 will be
detected as a NULL pointer. The read/write LUTs are now initialized with
0xff, and all pointers are now checked against a new INVALID_PTR macro.

Mapping the emulated RAM to the address 0x0 will allow Lightrec to
generate much better code.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
libpcsxcore/cdrom.c
libpcsxcore/misc.c
libpcsxcore/psxbios.c
libpcsxcore/psxdma.c
libpcsxcore/psxinterpreter.c
libpcsxcore/psxmem.c
libpcsxcore/psxmem.h