forums.PPSSPP.org
PPSSPP's default load address - Printable Version

+- forums.PPSSPP.org (https://forums.ppsspp.org)
+-- Forum: PPSSPP - Playstation Portable Simulator Suitable for Playing Portably (/forumdisplay.php?fid=1)
+--- Forum: Development (/forumdisplay.php?fid=3)
+--- Thread: PPSSPP's default load address (/showthread.php?tid=26490)



PPSSPP's default load address - JellyCandy - 05-23-2020 12:21 AM

Hello everyone. Could anyone tell me, please, why PPSSPP's default load address is located at 08804000 although User Memory starts from 08800000. Are those 16384 (4000) bytes used for something? JPCSP seems to be similar but what about a real PSP?


RE: PPSSPP's default load address - LunaMoo - 05-23-2020 09:53 AM

Those bytes aren't used for anything and can't tell you why games do that, maybe it's just sony's specs or PSP sdk, but games follows it and it's exactly same on real hardware and not just some emulation weirdness, that's why it's the most popular code cave for cheats.
You can easily see it if you look at most cwcheats which inject assembly into game code, they store longer scripts at the 0x08800000-0x08804000 range.


RE: PPSSPP's default load address - JellyCandy - 05-23-2020 10:17 AM

Thank you for clarifying this! Assembly scripts is exactly what I use this area for. I wasn't sure however if I didn't break anything by accident.


RE: PPSSPP's default load address - [Unknown] - 05-23-2020 09:46 PM

See here:
https://github.com/hrydgard/ppsspp/pull/6616

PSP firmware loads "usersystemlib" into this before actually loading the game, I assume it actually uses this library in loading the game. From my previous investigation, this code does include memcpy, lwmutex, and related code/data - though I'm not sure if games ever use it directly. I suspect it's also stack space for interrupts (which cheats won't run during an interrupt.)

In PPSSPP, it's just statically allocated to match PSP firmware memory semantics, but there's nothing in it.

-[Unknown]


RE: PPSSPP's default load address - JellyCandy - 05-24-2020 10:55 AM

Okay Thank you for replying!