MCPcopy Create free account
hub / github.com/AppleWin/AppleWin / CopyProtectionDongleSaveSnapshot

Function CopyProtectionDongleSaveSnapshot

source/CopyProtectionDongles.cpp:216–252  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

214}
215
216void CopyProtectionDongleSaveSnapshot(YamlSaveHelper& yamlSaveHelper)
217{
218 if (copyProtectionDongleType == DT_SDSSPEEDSTAR)
219 {
220 yamlSaveHelper.SaveString(SS_YAML_KEY_DEVICE, GetSnapshotStructName_SDSSpeedStar());
221 // NB. No state for this dongle
222 }
223 else if (copyProtectionDongleType == DT_CODEWRITER)
224 {
225 yamlSaveHelper.SaveString(SS_YAML_KEY_DEVICE, GetSnapshotStructName_CodeWriter());
226 yamlSaveHelper.SaveHexUint8(SS_YAML_KEY_CODEWRITER_INDEX, codewriterLFSR);
227 }
228 else if (copyProtectionDongleType == DT_ROBOCOM500)
229 {
230 yamlSaveHelper.SaveString(SS_YAML_KEY_DEVICE, GetSnapshotStructName_Robocom500());
231 // NB. No state for this dongle
232 }
233 else if (copyProtectionDongleType == DT_ROBOCOM1000)
234 {
235 yamlSaveHelper.SaveString(SS_YAML_KEY_DEVICE, GetSnapshotStructName_Robocom1000());
236 // NB. No state for this dongle
237 }
238 else if (copyProtectionDongleType == DT_ROBOCOM1500)
239 {
240 yamlSaveHelper.SaveString(SS_YAML_KEY_DEVICE, GetSnapshotStructName_Robocom1500());
241 // NB. No state for this dongle
242 }
243 else if (copyProtectionDongleType == DT_HAYDENCOMPILER)
244 {
245 yamlSaveHelper.SaveString(SS_YAML_KEY_DEVICE, GetSnapshotStructName_HaydenCompiler());
246 // NB. No state for this dongle
247 }
248 else
249 {
250 _ASSERT(0);
251 }
252}
253
254void CopyProtectionDongleLoadSnapshot(YamlLoadHelper& yamlLoadHelper, UINT version, UINT kUNIT_VERSION)
255{

Callers 1

Snapshot_SaveStateFunction · 0.85

Calls 2

SaveStringMethod · 0.80
SaveHexUint8Method · 0.80

Tested by

no test coverage detected