I remember FCEU does not have savestate.persist(). Is this function really necessary?
I read the svn log (r870) of FCEUX, and I understood this function was introduced to optimize the performance, processing savestates on-memory. But, I think this function and its documentation spoil the compatibility with FCEU and they are confusing.
I understood the sentence above like below:
* By default, anonymous savestates will be deleted when they are loaded. But if you call persist() against them, they will be remain until the exit of the script.
* By default, predefined savestates will not be deleted when they are loaded. But if you want to write them out to disk, you must call persist() against them.
For predefined savestates, it is true on FCEUX 2.1.2. But for anonymous savestates, it is not true (they will not be deleted when they are loaded, in any case).
First, is the feature which deletes anonymous savestates when they are loaded really needed? If not, persist() against anonymous savestates is meaningless, isn't it?
And, I think the feature which does not write predefined savestates out to disk by default is not compatible with FCEU, and confusing. If a person uses a predefined savestate, his purpose will be reusing the savestate after the exit of the script, in most cases. Indeed, writing savestates out to disk whenever they are saved may be slow, but saving is not so frequent operation as loading, isn't it?
How about removing this function and reverting the feature to that of FCEU?