Apple II - Fix Memory and Input Callbacks interacting with savestates

This commit is contained in:
scrimpeh 2015-07-06 22:09:18 +02:00
parent 23d93cc1fe
commit bcbc588e05
4 changed files with 19 additions and 12 deletions

View File

@ -37,6 +37,9 @@ namespace BizHawk.Emulation.Cores.Computers.AppleII
{
_settings = o;
_machine.Video.IsMonochrome = _settings.Monochrome;
setCallbacks();
return false;
}

View File

@ -54,12 +54,7 @@ namespace BizHawk.Emulation.Cores.Computers.AppleII
ser.Register<ITraceable>(Tracer);
//Set up Memory Callbacks
_machine.Memory.ReadCallback = MemoryCallbacks.CallReads;
_machine.Memory.WriteCallback = MemoryCallbacks.CallWrites;
_machine.Memory.ExecuteCallback = MemoryCallbacks.CallExecutes;
_machine.Memory.InputCallback = InputCallbacks.Call;
setCallbacks();
InitSaveStates();
SetupMemoryDomains();
@ -180,5 +175,14 @@ namespace BizHawk.Emulation.Cores.Computers.AppleII
Frame++;
}
private void setCallbacks()
{
_machine.Memory.ReadCallback = MemoryCallbacks.CallReads;
_machine.Memory.WriteCallback = MemoryCallbacks.CallWrites;
_machine.Memory.ExecuteCallback = MemoryCallbacks.CallExecutes;
_machine.Memory.InputCallback = InputCallbacks.Call;
}
}
}

View File

@ -83,7 +83,6 @@ namespace Jellyfish.Virtu
}
}
public void BizInitialize()
{
Initialize();
@ -139,11 +138,12 @@ namespace Jellyfish.Virtu
};
ser.Converters.Add(new TypeTypeConverter(new[]
{
// all expected Types to convert are either in this assembly or mscorlib
typeof(Machine).Assembly,
typeof(object).Assembly
}));
{
// all expected Types to convert are either in this assembly or mscorlib
typeof(Machine).Assembly,
typeof(object).Assembly
}));
ser.Converters.Add(new DelegateConverter());
ser.Converters.Add(new ArrayConverter());

Binary file not shown.