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

Method SaveSnapshot

source/SSI263.cpp:1021–1046  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1019#define TYPE_SSI263_AP "SSI263AP"
1020
1021void SSI263::SaveSnapshot(YamlSaveHelper& yamlSaveHelper, UINT subunit)
1022{
1023 // Scope for SSI263 subunit (so that SC01 has same indentation)
1024 {
1025 YamlSaveHelper::Label label(yamlSaveHelper, "%s:\n", SS_YAML_KEY_SSI263);
1026
1027 std::string type = m_type == SSI263Empty ? TYPE_SSI263_EMPTY
1028 : m_type == SSI263P ? TYPE_SSI263_P
1029 : TYPE_SSI263_AP;
1030
1031 yamlSaveHelper.SaveString(SS_YAML_KEY_SSI263_TYPE, type);
1032
1033 if (m_type != SSI263Empty)
1034 {
1035 yamlSaveHelper.SaveHexUint8(SS_YAML_KEY_SSI263_REG_DUR_PHON, m_durationPhoneme);
1036 yamlSaveHelper.SaveHexUint8(SS_YAML_KEY_SSI263_REG_INF, m_inflection);
1037 yamlSaveHelper.SaveHexUint8(SS_YAML_KEY_SSI263_REG_RATE_INF, m_rateInflection);
1038 yamlSaveHelper.SaveHexUint8(SS_YAML_KEY_SSI263_REG_CTRL_ART_AMP, m_ctrlArtAmp);
1039 yamlSaveHelper.SaveHexUint8(SS_YAML_KEY_SSI263_REG_FILTER_FREQ, m_filterFreq);
1040 yamlSaveHelper.SaveHexUint8(SS_YAML_KEY_SSI263_CURRENT_MODE, m_currentMode.mode);
1041 }
1042 }
1043
1044 if (subunit == 0) // has SC01
1045 SC01_SaveSnapshot(yamlSaveHelper);
1046}
1047
1048void SSI263::LoadSnapshot(YamlLoadHelper& yamlLoadHelper, PHASOR_MODE mode, UINT version, UINT subunit)
1049{

Callers

nothing calls this directly

Calls 2

SaveStringMethod · 0.80
SaveHexUint8Method · 0.80

Tested by

no test coverage detected