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

Method SaveSnapshot

source/Harddisk.cpp:1316–1338  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1314}
1315
1316void HarddiskInterfaceCard::SaveSnapshot(YamlSaveHelper& yamlSaveHelper)
1317{
1318 YamlSaveHelper::Slot slot(yamlSaveHelper, GetSnapshotCardName(), m_slot, kUNIT_VERSION);
1319
1320 YamlSaveHelper::Label state(yamlSaveHelper, "%s:\n", SS_YAML_KEY_STATE);
1321 yamlSaveHelper.Save("%s: %d # b7=unit for ProDOS BLK device\n", SS_YAML_KEY_CURRENT_UNIT, m_unitNum);
1322 yamlSaveHelper.SaveHexUint8(SS_YAML_KEY_COMMAND, m_command);
1323 yamlSaveHelper.SaveHexUint64(SS_YAML_KEY_NOT_BUSY_CYCLE, m_notBusyCycle);
1324 yamlSaveHelper.SaveHexUint8(SS_YAML_KEY_SP_STATUS_CODE, m_statusCode);
1325 yamlSaveHelper.SaveHexUint8(SS_YAML_KEY_FIFO_INDEX, m_fifoIdx);
1326
1327 // New label
1328 {
1329 YamlSaveHelper::Label buffer(yamlSaveHelper, "%s:\n", SS_YAML_KEY_FIRMWARE);
1330 yamlSaveHelper.SaveMemory(MemGetCxRomPeripheral() + m_slot * APPLE_SLOT_SIZE, APPLE_SLOT_SIZE);
1331 }
1332
1333 for (UINT i = HARDDISK_1; i < NUM_HARDDISKS; i++)
1334 {
1335 if (m_hardDiskDrive[i].m_imageloaded)
1336 SaveSnapshotHDDUnit(yamlSaveHelper, i);
1337 }
1338}
1339
1340bool HarddiskInterfaceCard::LoadSnapshotHDDUnit(YamlLoadHelper& yamlLoadHelper, const UINT unit, const UINT version)
1341{

Callers

nothing calls this directly

Calls 5

MemGetCxRomPeripheralFunction · 0.85
SaveMethod · 0.80
SaveHexUint8Method · 0.80
SaveHexUint64Method · 0.80
SaveMemoryMethod · 0.80

Tested by

no test coverage detected