.state file spec?

Hi All. Can someone point me at a spec for the .state files that are created for save states. I was poking around at one in a hex editor hoping to hack a few values and things are a little different than I expected.

It looks like all save states are concatenated together into a single file and there is a lot more metadata about the core that’s running. There also doesn’t seem to be any trace of the values I would expect to find if it were a “normal” save state file (i.e. specific stats / character names) so I’m guessing there’s some compression involved? That’s as far as I got. Any info you can give me would be very helpful.

Thanks.