Game RAM modification automation - Printable Version

+- (
+-- Forum: PPSSPP - Playstation Portable Simulator Suitable for Playing Portably (/forumdisplay.php?fid=1)
+--- Forum: Development (/forumdisplay.php?fid=3)
+--- Thread: Game RAM modification automation (/showthread.php?tid=27771)

Game RAM modification automation - mk_modrzew - 07-02-2021 12:14 PM

Hey everyone,
I have an idea for writing an autobot for Disgaea 1 that would work fully unmanned. On the first try I want to check if I can avoid game display scanning and make everything work basing solely on information I can gather from running game memory. The easiest solution for scanning and modifying values inside is probably using Cheat Engine with MEM_MAPPED setting turned on, however I would like to try achieve similar outcome without using third party software. I decided to write my own set of scripts that could read and change values in memory, but I couldn't find on the internet nor in the PPSSPP itself any way to access same values I can find on Disassembly...->Memory window. I assume there is no API that can work like I described, because it is quite specific use case and probably not so useful in development and testing emulator, but maybe you know any other solution for memory access than implement that feature on my own or connect through GDB and receive the same result like with Cheat Engine, but with additional struggle to achieve it. Do you know any approachable solution for getting access to game memory and being able to monitor it through my own program, beside using Cheat Engine as middleman?

RE: Game RAM modification automation - LunaMoo - 07-02-2021 09:05 PM

We have:
- plugin support, see this,
- websocket based debugger interface, see it's PR and some samples,
- CWCheats(if you know MIPS, it's actually easy to automate games by just patching them, just write your own function, place it in some code cave and hook to some existing function, you could either do it "bot" way that is with lots of checks and then push input or just modify various functions to activate in a way you want without ever waiting for button presses, CWCheat is then really used as a way to soft-patch the game so you only really use simple write codes and 1 check code to avoid re-injecting the code every tick),
- PPSSPP might support scripting based of python or lua at some point in the future, but nothing final yet, it'll probably share similarities to current websocket based debugger interface mentioned above.

IMO if you want to avoid writing a separate tool and make it usable on every platform without hassle, writing it as game's plugin or cwcheat are best options, through if you never did either, you'll have to google and self learn a lot.