MB: Support old save-states where 6522 T1 latch is 0x0000

This commit is contained in:
tomcw 2021-04-18 18:33:16 +01:00
parent 26414b74df
commit 6fefce553a
2 changed files with 8 additions and 1 deletions

View File

@ -9,7 +9,7 @@ https://github.com/AppleWin/AppleWin/issues/new
Tom Charlesworth Tom Charlesworth
1.30.0.0 - 17 Apr 2021 1.30.0.0 - 18 Apr 2021
---------------------- ----------------------
Note: This version only works under Windows XP and later. Note: This version only works under Windows XP and later.

View File

@ -1929,6 +1929,13 @@ static void LoadSnapshotSY6522(YamlLoadHelper& yamlLoadHelper, SY6522& sy6522, U
sy6522.timer2IrqDelay = yamlLoadHelper.LoadUint(SS_YAML_KEY_SY6522_TIMER2_IRQ_DELAY); sy6522.timer2IrqDelay = yamlLoadHelper.LoadUint(SS_YAML_KEY_SY6522_TIMER2_IRQ_DELAY);
} }
if (version < 7)
{
// Assume t1_latch was never written to (so had the old default of 0x0000) - this now results in failure of Mockingboard detection!
if (sy6522.TIMER1_LATCH.w == 0x0000)
sy6522.TIMER1_LATCH.w = 0xFFFF; // Allow Mockingboard detection to succeed
}
yamlLoadHelper.PopMap(); yamlLoadHelper.PopMap();
} }