--- nono/lib/config.cpp 2026/04/29 17:04:37 1.1.1.3 +++ nono/lib/config.cpp 2026/04/29 17:04:51 1.1.1.6 @@ -26,7 +26,8 @@ Config::Config() // 以下概ねアルファベット順に並べる // デバッガの TCP 待ち受けポート - Add("debugger-port", 9999); + Add("debugger-port", 0); + Add("ethernet-hostdevice", "auto"); Add("ethernet-hostdriver", "none"); Add("ethernet-macaddr", "auto"); // LUNA の DIPSW (1 が UP、0 が DOWN) @@ -46,9 +47,12 @@ Config::Config() // 各 VM クラスで初期値を設定している。 Add("ram-size", 0); Add(".rtc-force-fixed", 0); + Add("show-statuspanel", 1); for (int id = 0; id < 8; id++) { Add(string_format("spc0-id%d-image", id)); Add(string_format("spc0-id%d-writeprotect", id), 0); + // シークタイム [msec] + Add(string_format("spc0-id%d-seektime", id), 0); } } @@ -82,6 +86,21 @@ Config::Add(const std::string& key, cons return true; } +// 項目を削除 +// key が見付からなくても何もしない。key は複数登録されていることはないはず。 +void +Config::Delete(const std::string& key) +{ + for (auto it = list.begin(); it != list.end(); ++it) { + auto item = *it; + if (key == item.key) { + list.erase(it); + return; + } + } + assert(FindItem(key) == NULL); +} + // 設定ファイルの内容で上書きする bool Config::Update(const ConfigFile& file)