TIC-80 icon indicating copy to clipboard operation
TIC-80 copied to clipboard

libretro core should serialize entire TIC-80 state, not just persistent memory

Open MineRobber9000 opened this issue 2 years ago • 1 comments

Exactly what it says on the tin. Because the TIC-80 core only saves persistent memory, savestates are completely useless unless the game was designed with them in mind.

MineRobber9000 avatar Jun 15 '22 22:06 MineRobber9000

Agreed, but this is much easier said than done... since you have like 10 different runtimes that all have their own states, etc...

joshgoebel avatar Jun 15 '22 22:06 joshgoebel

@nesbox Would you be willing to accept a patch for this that only dealt with a single runtime? If not I think this could simply be closed as "wont fix" since I don't think anyone is likely to step up and contribute this functionality for ALL our runtimes (if it's even possible). I think it would be weird if say "full save state" was only possible with say Lua, for example - since players of the games might not even know what runtime is being used...

joshgoebel avatar Dec 17 '22 15:12 joshgoebel

Serializing the whole state would be awesome, but I'm unsure how we could actually implement it. I'd opt to closing this, as it's not even something that TIC-80 does by itself, let alone in the libretro core.

RobLoach avatar Dec 17 '22 18:12 RobLoach

I will close this as wontfix, given that I understand it won't really be possible. The inciting incident for this was attempting to get TIC-80 support in Bizhawk, and the Bizhawk devs ultimately used techniques on their end to get complete savestate support working.

MineRobber9000 avatar Dec 18 '22 00:12 MineRobber9000

@MineRobber9000 I'd be very curious to know how that is even possible - unless the entire TIC-80 platform is virtualized... this might be possible to do with the WASM build (typically running in the browser) since you'd have access to the full state (the full TIC-80 system state - not just the game) - but I can't think of a way outside of that to do this easily.

joshgoebel avatar Dec 18 '22 00:12 joshgoebel

They have something called waterbox which allows them to serialize and restore a program's entire state. It's obviously much more complicated than I can really understand, but it works, and that's the part that matters.

MineRobber9000 avatar Dec 19 '22 20:12 MineRobber9000