--- nono/lib/mainapp.cpp 2026/04/29 17:05:08 1.1.1.12 +++ nono/lib/mainapp.cpp 2026/04/29 17:05:12 1.1.1.13 @@ -168,11 +168,11 @@ MainApp::Init1(bool is_cli_, int ac, cha const ConfigItem& item = gConfig->Find("vmtype"); std::string vmstr = string_tolower(item.AsString()); if (vmstr == "x68030") { - vmtype = VMTYPE_X68030; + vmtype = VMType::X68030; } else if (vmstr == "luna") { - vmtype = VMTYPE_LUNA1; + vmtype = VMType::LUNA1; } else if (vmstr == "luna88k") { - vmtype = VMTYPE_LUNA88K; + vmtype = VMType::LUNA88K; } else { if (item.GetFrom() == ConfigItem::FromInitial) { // 未指定の時 @@ -186,15 +186,15 @@ MainApp::Init1(bool is_cli_, int ac, cha // 1. VM 作成 switch (vmtype) { - case VMTYPE_X68030: + case VMType::X68030: pVM.reset(new VM_X68030()); break; - case VMTYPE_LUNA1: + case VMType::LUNA1: pVM.reset(new VM_LUNA1()); break; - case VMTYPE_LUNA88K: + case VMType::LUNA88K: pVM.reset(new VM_LUNA88K()); break; @@ -596,6 +596,15 @@ MainApp::SetLogopt1(const std::string& i } return true; } + // "fdd" なら "fdd*" 全部にする + if (name == "fdd") { + for (auto obj : gMainApp.GetObjects()) { + if (strncasecmp(obj->GetName().c_str(), "fdd", 3) == 0) { + obj->SetLogLevel(level); + } + } + return true; + } // エイリアスリストを作る using aliaslist_t = std::vector>; @@ -760,12 +769,12 @@ MainApp::SearchFile(const std::string& n return path; } -// 現在の VM が指定の feature を持っているか? +// 現在の VM が指定のケーパビリティを持っているか? bool -MainApp::HasVMFeature(vmf_t feature) const +MainApp::Has(VMCap cap) const { - uint32 vmf = 1 << GetVMType(); - return (vmf & feature) != 0; + uint32 vmcap = 1U << (int)GetVMType(); + return (vmcap & (uint32)cap) != 0; } // コンパイルされている host netdriver の一覧を表示。