1
0
Fork 0
mirror of https://github.com/DarkMatterCore/nxdumptool.git synced 2024-11-26 12:12:02 +00:00

GameCardTab: show HOS version equivalent next to the required LAFW version.

This commit is contained in:
Pablo Curiel 2021-06-13 21:34:40 -04:00
parent 1e6b316cdc
commit df673f758d
2 changed files with 19 additions and 6 deletions

View file

@ -14,10 +14,11 @@
"total_size": "Total size", "total_size": "Total size",
"trimmed_size": "Trimmed size", "trimmed_size": "Trimmed size",
"update_version": "Bundled update version", "update_version": "Bundled update version",
"lafw_version": "Required Lotus ASIC firmware version", "lafw_version": "Required LAFW version",
"lafw_version_value": "%lu or greater", "lafw_version_value": "%lu or greater (%s)",
"sdk_version": "SDK version", "sdk_version": "SDK version",
"compatibility_type": "Compatibility type" "compatibility_type": "Compatibility type",
"unknown": "Unknown"
}, },
"dump_options": "Dump options", "dump_options": "Dump options",

View file

@ -32,6 +32,15 @@ namespace nxdt::views
[GameCardCompatibilityType_Terra] = "Terra" [GameCardCompatibilityType_Terra] = "Terra"
}; };
static const char *GameCardFwVersionStrings[GameCardFwVersion_Count] = {
[GameCardFwVersion_ForDev] = "1.0.0+",
[GameCardFwVersion_Since100NUP] = "1.0.0+",
[GameCardFwVersion_Since400NUP] = "4.0.0+",
[GameCardFwVersion_Since900NUP] = "9.0.0+",
[GameCardFwVersion_Since1100NUP] = "11.0.0+",
[GameCardFwVersion_Since1200NUP] = "12.0.0+"
};
GameCardTab::GameCardTab(nxdt::tasks::GameCardTask *gc_status_task) : brls::LayerView(), gc_status_task(gc_status_task) GameCardTab::GameCardTab(nxdt::tasks::GameCardTask *gc_status_task) : brls::LayerView(), gc_status_task(gc_status_task)
{ {
/* Error frame. */ /* Error frame. */
@ -122,14 +131,17 @@ namespace nxdt::views
card_info.upp_version.major_relstep, card_info.upp_version.minor_relstep, card_info.upp_version.value); card_info.upp_version.major_relstep, card_info.upp_version.minor_relstep, card_info.upp_version.value);
this->update_version->setValue(std::string(strbuf)); this->update_version->setValue(std::string(strbuf));
snprintf(strbuf, sizeof(strbuf), "gamecard_tab/list/properties_table/lafw_version_value"_i18n.c_str(), card_info.fw_version + 1); card_info.fw_version++;
snprintf(strbuf, sizeof(strbuf), "gamecard_tab/list/properties_table/lafw_version_value"_i18n.c_str(), card_info.fw_version, \
card_info.fw_version >= GameCardFwVersion_Count ? "gamecard_tab/list/properties_table/unknown"_i18n.c_str() : GameCardFwVersionStrings[card_info.fw_version]);
this->lafw_version->setValue(std::string(strbuf)); this->lafw_version->setValue(std::string(strbuf));
snprintf(strbuf, sizeof(strbuf), "%u.%u.%u-%u (v%u)", card_info.fw_mode.major, card_info.fw_mode.minor, card_info.fw_mode.micro, card_info.fw_mode.relstep, card_info.fw_mode.value); snprintf(strbuf, sizeof(strbuf), "%u.%u.%u-%u (v%u)", card_info.fw_mode.major, card_info.fw_mode.minor, card_info.fw_mode.micro, card_info.fw_mode.relstep, card_info.fw_mode.value);
this->sdk_version->setValue(std::string(strbuf)); this->sdk_version->setValue(std::string(strbuf));
snprintf(strbuf, sizeof(strbuf), "%s (%u)", \ snprintf(strbuf, sizeof(strbuf), "%s (%u)", card_info.compatibility_type >= GameCardCompatibilityType_Count ? \
card_info.compatibility_type >= GameCardCompatibilityType_Count ? "Unknown" : GameCardCompatibilityTypeStrings[card_info.compatibility_type], card_info.compatibility_type); "gamecard_tab/list/properties_table/unknown"_i18n.c_str() : GameCardCompatibilityTypeStrings[card_info.compatibility_type], \
card_info.compatibility_type);
this->compatibility_type->setValue(std::string(strbuf)); this->compatibility_type->setValue(std::string(strbuf));
this->changeLayerWrapper(this->list); this->changeLayerWrapper(this->list);