Learning PSP assembly
|
01-15-2017, 05:30 AM
Post: #25
|
|||
|
|||
RE: Learning PSP assembly
Nah, syscalls are as the name suggests functions of the system, there are usually stubs for all syscalls grouped together in small functions after other code and each of those functions look alike:
Code: zz_sceKernelWakeupThread: Now we have stuff like "jal zz_sceKernelWakeupThread" which is not a syscall, but simply Jump-and-link instruction leading to the start of that small function by label. Also note that RA is just register storing return address, it's set by "link" instructions like JAL. Another fun fact, syscalls are executed from delay slot, so it's not really followed by, but it starts from "jr ra". If you never heard about it, maybe you should google for "delay slot" as it can be confusing especially with "likely" instructions like bnel where delay slot is only executed when branch is taken, it's pretty easy to understand by just observing game disassembly through. You'll never see what syscall does by looking at it's function in game, that is unless you guess by observing everything which can be impossible in many cases;p. To see what syscall exactly does as mentioned you need to check it in SDK(aka use google) or search for it in ppsspp code on github ie like this. You have no means of affecting those system functions from in-game aside from calling them and using different arguments and again not all are known/emulated, most games will show some unimplemented syscalls in the log which we have no idea about, but most of these as long as everything is ok should just return 0 and that's exactly what emulators do with them.;] As for labels, they mark the start of a function, they can be: - named after syscalls, - loaded from game's debug data if it exist(I would guess it's rare;p), - assigned by ppsspp function replacement(mostly common functions like memcopy or some trigonometry stuff etc., replaced for compatibility, so they might behave weirdly in disassembly, but it shows when they're replaced), - assigned by user who's into symbols ~ never really bother using it myself since I'm too impatient for longer projects(;p) and reasonably good memory for weird stuff like asm, right click menu in disassembly has some options for creating/renaming functions, probably best used with ini-only setting "AutoSaveSymbolMap" which set to "true" should save them, - neither of the above, will just have that generic name with address. http://forums.ppsspp.org/showthread.php?tid=6594 - Custom PPSSPP Shaders! http://forums.ppsspp.org/showthread.php?tid=3590&pid=117172#pid117172 - simple CE scripts to help creating CWCheats, https://github.com/LunaMoo/PPSSPP_workarounds - CWCheat workarounds. |
|||
« Next Oldest | Next Newest »
|