From 82ac7de9b73af0083a002a9cf20693c4f81d7de7 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Sun, 17 Mar 2019 13:33:49 +1100 Subject: update UI and XML output for additional emulation status flags --- src/frontend/mame/info.cpp | 19 +++++++++----- src/frontend/mame/ui/info.cpp | 35 +++++++++++++++----------- src/frontend/mame/ui/selgame.cpp | 53 +++++++++++++++++++++++++++++++++------- 3 files changed, 78 insertions(+), 29 deletions(-) diff --git a/src/frontend/mame/info.cpp b/src/frontend/mame/info.cpp index 6110c5c5fa9..1fe65d7ea3c 100644 --- a/src/frontend/mame/info.cpp +++ b/src/frontend/mame/info.cpp @@ -168,7 +168,7 @@ const char info_xml_creator::s_dtd_string[] = "\t\t\t\n" "\t\t\t\n" "\t\t\n" -"\t\t\t\n" +"\t\t\t\n" "\t\t\t\n" "\t\t\t\n" "\t\t\n" @@ -1639,19 +1639,26 @@ void info_xml_creator::output_features(device_type type, device_t::feature_type { static constexpr std::pair features[] = { { device_t::feature::PROTECTION, "protection" }, - { device_t::feature::PALETTE, "palette" }, + { device_t::feature::TIMING, "timing" }, { device_t::feature::GRAPHICS, "graphics" }, + { device_t::feature::PALETTE, "palette" }, { device_t::feature::SOUND, "sound" }, + { device_t::feature::CAPTURE, "capture" }, + { device_t::feature::CAMERA, "camera" }, + { device_t::feature::MICROPHONE, "microphone" }, { device_t::feature::CONTROLS, "controls" }, { device_t::feature::KEYBOARD, "keyboard" }, { device_t::feature::MOUSE, "mouse" }, - { device_t::feature::MICROPHONE, "microphone" }, - { device_t::feature::CAMERA, "camera" }, + { device_t::feature::MEDIA, "media" }, { device_t::feature::DISK, "disk" }, { device_t::feature::PRINTER, "printer" }, + { device_t::feature::TAPE, "tape" }, + { device_t::feature::PUNCH, "punch" }, + { device_t::feature::DRUM, "drum" }, + { device_t::feature::ROM, "rom" }, + { device_t::feature::COMMS, "comms" }, { device_t::feature::LAN, "lan" }, - { device_t::feature::WAN, "wan" }, - { device_t::feature::TIMING, "timing" } }; + { device_t::feature::WAN, "wan" } }; device_t::feature_type const flags(type.unemulated_features() | type.imperfect_features() | unemulated | imperfect); for (auto const &feature : features) diff --git a/src/frontend/mame/ui/info.cpp b/src/frontend/mame/ui/info.cpp index 963dfb5597c..e7235b89111 100644 --- a/src/frontend/mame/ui/info.cpp +++ b/src/frontend/mame/ui/info.cpp @@ -28,20 +28,27 @@ constexpr machine_flags::type MACHINE_WARNINGS = machine_flags::NO_COCKTAIL | m constexpr machine_flags::type MACHINE_BTANB = machine_flags::NO_SOUND_HW | machine_flags::IS_INCOMPLETE; constexpr std::pair FEATURE_NAMES[] = { - { device_t::feature::PROTECTION, __("protection") }, - { device_t::feature::PALETTE, __("color palette") }, - { device_t::feature::GRAPHICS, __("graphics") }, - { device_t::feature::SOUND, __("sound") }, - { device_t::feature::CONTROLS, __("controls") }, - { device_t::feature::KEYBOARD, __("keyboard") }, - { device_t::feature::MOUSE, __("mouse") }, - { device_t::feature::MICROPHONE, __("microphone") }, - { device_t::feature::CAMERA, __("camera") }, - { device_t::feature::DISK, __("disk") }, - { device_t::feature::PRINTER, __("printer") }, - { device_t::feature::LAN, __("LAN") }, - { device_t::feature::WAN, __("WAN") }, - { device_t::feature::TIMING, __("timing") } }; + { device_t::feature::PROTECTION, __("protection") }, + { device_t::feature::TIMING, __("timing") }, + { device_t::feature::GRAPHICS, __("graphics") }, + { device_t::feature::PALETTE, __("color palette") }, + { device_t::feature::SOUND, __("sound") }, + { device_t::feature::CAPTURE, __("capture hardware") }, + { device_t::feature::CAMERA, __("camera") }, + { device_t::feature::MICROPHONE, __("microphone") }, + { device_t::feature::CONTROLS, __("controls") }, + { device_t::feature::KEYBOARD, __("keyboard") }, + { device_t::feature::MOUSE, __("mouse") }, + { device_t::feature::MEDIA, __("media") }, + { device_t::feature::DISK, __("disk") }, + { device_t::feature::PRINTER, __("printer") }, + { device_t::feature::TAPE, __("magnetic tape") }, + { device_t::feature::PUNCH, __("punch tape") }, + { device_t::feature::DRUM, __("magnetic drum") }, + { device_t::feature::ROM, __("solid state storage") }, + { device_t::feature::COMMS, __("communications") }, + { device_t::feature::LAN, __("LAN") }, + { device_t::feature::WAN, __("WAN") } }; } // anonymous namespace diff --git a/src/frontend/mame/ui/selgame.cpp b/src/frontend/mame/ui/selgame.cpp index bbdb1f55d50..def4ceaa5f9 100644 --- a/src/frontend/mame/ui/selgame.cpp +++ b/src/frontend/mame/ui/selgame.cpp @@ -1075,6 +1075,21 @@ void menu_select_game::general_info(const game_driver *driver, std::string &buff else str << _("Sound\tOK\n"); + if (flags.unemulated_features() & device_t::feature::CAPTURE) + str << _("Capture\tUnimplemented\n"); + else if (flags.imperfect_features() & device_t::feature::CAPTURE) + str << _("Capture\tImperfect\n"); + + if (flags.unemulated_features() & device_t::feature::CAMERA) + str << _("Camera\tUnimplemented\n"); + else if (flags.imperfect_features() & device_t::feature::CAMERA) + str << _("Camera\tImperfect\n"); + + if (flags.unemulated_features() & device_t::feature::MICROPHONE) + str << _("Microphone\tUnimplemented\n"); + else if (flags.imperfect_features() & device_t::feature::MICROPHONE) + str << _("Microphone\tImperfect\n"); + if (flags.unemulated_features() & device_t::feature::CONTROLS) str << _("Controls\tUnimplemented\n"); else if (flags.imperfect_features() & device_t::feature::CONTROLS) @@ -1090,15 +1105,10 @@ void menu_select_game::general_info(const game_driver *driver, std::string &buff else if (flags.imperfect_features() & device_t::feature::MOUSE) str << _("Mouse\tImperfect\n"); - if (flags.unemulated_features() & device_t::feature::MICROPHONE) - str << _("Microphone\tUnimplemented\n"); - else if (flags.imperfect_features() & device_t::feature::MICROPHONE) - str << _("Microphone\tImperfect\n"); - - if (flags.unemulated_features() & device_t::feature::CAMERA) - str << _("Camera\tUnimplemented\n"); - else if (flags.imperfect_features() & device_t::feature::CAMERA) - str << _("Camera\tImperfect\n"); + if (flags.unemulated_features() & device_t::feature::MEDIA) + str << _("Media\tUnimplemented\n"); + else if (flags.imperfect_features() & device_t::feature::MEDIA) + str << _("Media\tImperfect\n"); if (flags.unemulated_features() & device_t::feature::DISK) str << _("Disk\tUnimplemented\n"); @@ -1110,6 +1120,31 @@ void menu_select_game::general_info(const game_driver *driver, std::string &buff else if (flags.imperfect_features() & device_t::feature::PRINTER) str << _("Printer\tImperfect\n"); + if (flags.unemulated_features() & device_t::feature::TAPE) + str << _("Mag. Tape\tUnimplemented\n"); + else if (flags.imperfect_features() & device_t::feature::TAPE) + str << _("Mag. Tape\tImperfect\n"); + + if (flags.unemulated_features() & device_t::feature::PUNCH) + str << _("Punch Tape\tUnimplemented\n"); + else if (flags.imperfect_features() & device_t::feature::PUNCH) + str << _("Punch Tape\tImperfect\n"); + + if (flags.unemulated_features() & device_t::feature::DRUM) + str << _("Mag. Drum\tUnimplemented\n"); + else if (flags.imperfect_features() & device_t::feature::DRUM) + str << _("Mag. Drum\tImperfect\n"); + + if (flags.unemulated_features() & device_t::feature::ROM) + str << _("(EP)ROM\tUnimplemented\n"); + else if (flags.imperfect_features() & device_t::feature::ROM) + str << _("(EP)ROM\tImperfect\n"); + + if (flags.unemulated_features() & device_t::feature::COMMS) + str << _("Communications\tUnimplemented\n"); + else if (flags.imperfect_features() & device_t::feature::COMMS) + str << _("Communications\tImperfect\n"); + if (flags.unemulated_features() & device_t::feature::LAN) str << _("LAN\tUnimplemented\n"); else if (flags.imperfect_features() & device_t::feature::LAN) -- cgit v1.2.3