Get savestate slot number outside of PCSX2?
Hey guys!

Is there a way to read which save state slot is active outside of PCSX2? I made a little remote out of a PJRC Teensy to save, load, and switch slots, but I'd like to add a display that shows the current slot. Currently, my remote just maps some buttons to F1, F2, Shift+F2, and F3. In theory, if PCSX2 always opens at slot 0, I could add a counter, but I would run into problems if I had to close/restart PCSX2. If the program log is constantly saved, I could read it with a bit of python, but I don't know if it is. Any suggestions?

ETA: I'm using SSSPSX PAD if that matters. I know lilypad has some savestate-type stuff.

Sponsored links

Ack, maybe I should have done more digging before I posted. /Documents/PCSX2/logs/emuLog is live updated. I'll get to mucking about in Python now, but if anyone has any better suggestions please let me know.
Currently it always starts with slot 0, and you can read it (after it changes) via the log file.

However, if you can compile PCSX2 yourself, it shouldn't be hard to create a file which contains the current slot number which you can read from outside few times/sec. When PCSX2 starts, you write 0 to that file, and whenever the slot changes, you write the new slot number to that file. If you can't (modify and) compile PCSX2 yourself, maybe you could ask someone to help you with it.

And if you get it working, post a video or pictures Wink
Vsub's tool adds save state previews, check it out:
[Image: newsig.jpg]
avih: I hadn't really considered that, but since you suggested it, I did it! I ended up sending the slot number over serial since that added less overhead than using a python script or something. Plus, as far as I can tell, serial comms and file writing use the same method (WriteFile()). However, it could b=just be my imagination (or my need to defrag) but it seems like my compiled version is more laggy than the official one. Is that possible? I compiled for the release target and it somehow found all of the precompiled plugins and settings from my official install. I don't think it's my code, because it only gets called on startup or when the save slot changes (then again, I don't *actually* know C++, so it could be my fault after all).

I'll post pictures &c as soon as I have the time to compile everything, I just wanted to throw an update out. Laugh

Bositman: Thanks! That's a really cool program. I'll definitely have to make use of it.

Users browsing this thread: 1 Guest(s)