| 1314 | } |
| 1315 | |
| 1316 | void 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 | |
| 1340 | bool HarddiskInterfaceCard::LoadSnapshotHDDUnit(YamlLoadHelper& yamlLoadHelper, const UINT unit, const UINT version) |
| 1341 | { |
nothing calls this directly
no test coverage detected