The save state support in lsnes for Lua is a strange beast. The movie.* section has
Language: lua
movie.unsafe_rewind( movie.to_rewind(filename) )
to be able to load a save state, but nothing to save a save state. It has INPUTMOVIE to read/write/edit input movies, but you can't actually load them into the active state, as they are
just input files. The UNSAFEREWIND class's only function appears to be sending it to unsafe_rewind. Funny, there's actually a ZIPWRITER class, but I don't think Lua has enough access to all of the save state files to roll your own state writer.
Yes, I know about the
Language: lua
exec("save-state " .. filename)
command, which is what I'm using now, but that seems like an API of last resort. Are there plans to fill in these gaps? Am I missing some new functions or something obvious?