Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save states not compatible between 32 and 64 bit #47

Open
andres-asm opened this issue Nov 26, 2017 · 3 comments
Open

Save states not compatible between 32 and 64 bit #47

andres-asm opened this issue Nov 26, 2017 · 3 comments

Comments

@andres-asm
Copy link

What the title says.

This prevents the core to work for netplay or to share states between PC and WiiU / Android

@roflcopter777
Copy link

roflcopter777 commented Nov 26, 2017

Edit - Never mind

@keithbowes
Copy link

It's weird, because Snes9x, Snes9x 2002, and Snes9x 2010 have portable save states, but Snes9x 2005 doesn't. I wonder if the code from one of the other versions could be used (of course, if that happened, existing save states would break). (I personally like Snes9x 2005, because it's the only SNES core in which the brick walls in Super Mario Kart castle rounds actually look like bricks.)

I was testing out the various cores in 32-bit Linux/64-bit Linux/64-bit Windows, and while most of the cores had save states that could be used between them, some didn't. At least though Snes9x 2005 behaves better than some; it merely doesn't load a state, but doesn't crash like some other cores do. (One odd core was Mesen, in which I could use the save state from 64-bit Linux on 32-bit Linux but not on 64-bit Windows.)

@jSTE0
Copy link

jSTE0 commented Mar 11, 2022

One culprit is:

typedef struct
{
   uint8_t reg[16];
   int16_t index;
   uint8_t control;
   bool    init;
   time_t  last_used;
} S7RTC;

where time_t is platform-dependent and is 32-bits on most 32-bit platforms. There are endian issues as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants