by Bart » Thu Oct 06, 2011 1:57 am
No, the RAM begins at offset 0x81 in the save state file (that's right, it's not word-aligned). In the future it may change. Save state blocks don't have to be in any particular order. To locate the RAM in a Supermodel save state, look for the string "Model 3". Following it will be a 0 byte (terminator), then a comment string (currently, I just output the source file name of the module that generates the block, so Src/Model3/Model3.cpp for the Model 3 block), followed by another terminator byte (at offset 0x70 in 0.2a save states). Then, there are 16 bytes of misc. Model 3 system state (input regs, bank reg, security pointer, and stuff like that). So, for now, at 0x81, RAM begins.
There is only one RAM region allocated by Supermodel. The other one you are seeing is ROM. All games copy their program code from ROM (which is slow) into RAM for execution. fvipers2 is the only game I know of that does some sort of decompression, so you will not see two copies.
The lower of the two addresses you find in the executable's address space is the RAM (Supermodel allocates everything in large gigantic buffers, and I place RAM right in front of CROM).