Well it solved my issue so thanks on that.
I don't mean to argue by I still don't think you guys are getting my point.
Yeah these emulators were developed separately, of course. But the lua implementation, that was decided upon by the community and the syntax was purposefully made universal (stuff like fceux.function has been depreciated by emu.function, specifically so that code is universal).
So how the emulator handles savestates and what have you is irrelevant. Because when the lua was implemented and modeled specifically after another emulator's lua implementation (I believe in this case snes9xrr) it should have been hooked up in such a way that it worked identically.
I'm a programmer I assure you this is possible.
Just to use this specific issue as an example:
Ok so I need to call savestate.persist first. Why? Why wasn't lua hooked up to automatically do whatever savestate.persist is doing behind the scenes when savestate.load or save is called so that it operates exactly like snes9x or Gens?
The authors want to add non-persistant states? Well then make an option for that, don't make persistence the option as it breaks universal scripting support.
Remember, lua is "hooked up" to functions native to the emulator. So any differences in the functions, extra stuff that needs done ect, should be handled, internally, not at the scripting level.
I've got a gens menu finished, and it's working quite well:
http://youtu.be/Fi6g55hfpNw
For the most part scripting is fairly consistent between the two, except for the save/load state issues. Now I've got to try and figure out how to fake a pause in FCEUX, because the function available in Gens isn't available in this emulator.