Beispiel #1
0
int MDFNSS_StateAction(StateMem *st, int load, int data_only, SFORMAT *sf, const char *name, bool optional)
{
	std::vector <SSDescriptor> love;

	love.push_back(SSDescriptor(sf, name, optional));
	return(MDFNSS_StateAction(st, load, data_only, love));
}
Beispiel #2
0
int CMemMap::StateAction(StateMem *sm, int load, int data_only)
{
 SFORMAT MemMapRegs[] =
 {
        SFVAR(mMikieEnabled),
        SFVAR(mSusieEnabled),
        SFVAR(mRomEnabled),
        SFVAR(mVectorsEnabled),
	SFEND
 };
 std::vector <SSDescriptor> love;
 love.push_back(SSDescriptor(MemMapRegs, "MMAP"));
 int ret = MDFNSS_StateAction(sm, load, data_only, love);

 if(load)
 {
        // The peek will give us the correct value to put back
        uint8 mystate=Peek(0);

        // Now set to un-initialised so the poke will set correctly
        mSusieEnabled=-1;
        mMikieEnabled=-1;
        mRomEnabled=-1;
        mVectorsEnabled=-1;

        // Set banks correctly
        Poke(0,mystate);
 }

 return ret;
}