+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  (PSX) Converting psv savestate RAM addresses to PlayStation RAM addresses?
Pages: [1]
Author Topic: (PSX) Converting psv savestate RAM addresses to PlayStation RAM addresses?  (Read 1 times)
FaustWolf
Guest
« on: March 11, 2010, 01:44:49 am »

I haven't been successful in finding any documentation on the .psv savestate format -- .psv is the savestate format for psxfin/pSX -- so I was wondering if anyone knows offhand how the RAM stored a .psv savestate relates to how the PlayStation itself stores RAM values. As best I can tell, .psv savestates contain uncompressed RAM, VRAM and SRAM/sound RAM.

I think knowing the starting address of RAM in a .psv savestate should be enough, though I'm not sure whether this value is consistent across games. If not, I guess the next step is to get a RAM dump from Xenogears and try to find the data there.


Specifically, I've found that a certain address in a .psv savestate controls whether the party members in Xenogears are in their Gears or on-foot*. While this is only a novelty in terms of practical usefulness, I thought it would be cool to contribute this info to anyone who's keeping a running list of Xenogears memory addresses.

*Those addresses being 0x6FB95 for the first active party member; 0x6FB96 for the second active party member; and 0x6FB97 for the third active party member. They're just on-off switches, one byte each. A value of 0x00 means the character is in his or her Gear. A value of 0x01 means the character is not.
Magil
Guest
« Reply #1 on: March 11, 2010, 02:20:51 am »

I think it can be figured out by comparing the save with a pcsx save.

Ram data start from 0x9020 in an uncompressed pcsx savestate, you can copy some bytes and search them in psv file. The first few bytes shouldn't be much different.


Oh, I think you can dump ram directly from psxfin? So just search them in psv file.
« Last Edit: March 11, 2010, 02:26:37 am by Magil »
creaothceann
Guest
« Reply #2 on: March 11, 2010, 09:50:30 am »

Quote from: FaustWolf on March 11, 2010, 01:44:49 am
I haven't been successful in finding any documentation on the .psv savestate format
You could've looked at PVV's source Wink

Code:
file
¯¯¯¯
Header    =  4 characters, should be "ARS2"
Blocks    =  variable number of block structures


block structure
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
ID        =  4 characters, can contain binary values though
DataSize  =  8 bytes, unsigned int
Data      =  [DataSize] bytes

Load a pSX savestate into PVV to see the block IDs. I'd guess the RAM is in the 'R''A''M'#0 block; it's (2 * 1024 * 1024) + 1024 bytes in size.
FaustWolf
Guest
« Reply #3 on: March 11, 2010, 01:25:35 pm »

Thanks guys! I'm now in the same position I would be if I found the appropriate address in a RAM dump, I think.

Wow, it's amazing what kind of things pop up in readme files when the user actually reads them.  :crazy: The "RAM block" starting address is exactly what I was looking for, Creao. I take it these are expressed in decimal, so I'm looking at a RAM block start at dec 688 or address 0x2B0, for Xenogears .psv savestates specifically.

That means the address I'm looking for should be 0x6FB95 - 0x2B0, or 0x6F8E5. To express this correctly as a PSX RAM address, should it be 0x8006F8E5?

-Sometime Later-
Yeah, checking with the CEP Gameshark code application that works with pSX, it checks out! RAM addresses are:

8006F8E5 - First character on/off Gear switch
8006F8E6 - Second character on/off Gear switch
8006F8E7 - Third character on/off Gear switch


Nailed it! Thanks again!
Pages: [1]  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC