Exemple #1
0
        static void get_device_warnings(ref string buf, device_t_feature_type unemulated, device_t_feature_type imperfect)
        {
            // add line for unemulated features
            if (unemulated != 0)
            {
                buf += __("Completely unemulated features: ");
                bool first = true;
                foreach (var feature in FEATURE_NAMES)
                {
                    if (unemulated != 0 & feature.first != 0)
                    {
                        util.stream_format(ref buf, first ? __("{0}") : __(", {0}"), __("emulation-feature", feature.second));
                        first = false;
                    }
                }

                buf += '\n';
            }

            // add line for imperfect features
            if (imperfect != 0)
            {
                buf += __("Imperfectly emulated features: ");
                bool first = true;
                foreach (var feature in FEATURE_NAMES)
                {
                    if (imperfect != 0 & feature.first != 0)
                    {
                        util.stream_format(ref buf, first ? __("{0}") : __(", {0}"), __("emulation-feature", feature.second));
                        first = false;
                    }
                }

                buf += '\n';
            }
        }
Exemple #2
0
        public static void get_system_warnings(ref string buf, running_machine machine, machine_flags.type flags, device_t_feature_type unemulated, device_t_feature_type imperfect)
        {
            // start with the unemulated/imperfect features
            get_device_warnings(ref buf, unemulated, imperfect);

            // add one line per machine warning flag
            if ((flags & machine_flags.type.NO_COCKTAIL) != 0)
            {
                buf += __("Screen flipping in cocktail mode is not supported.\n");
            }
            if ((flags & machine_flags.type.REQUIRES_ARTWORK) != 0)
            {
                buf += __("This machine requires external artwork files.\n");
            }
            if ((flags & machine_flags.type.IS_INCOMPLETE) != 0)
            {
                buf += __("This machine was never completed. It may exhibit strange behavior or missing elements that are not bugs in the emulation.\n");
            }
            if ((flags & machine_flags.type.NO_SOUND_HW) != 0)
            {
                buf += __("This machine has no sound hardware, MAME will produce no sounds, this is expected behaviour.\n");
            }

            // these are more severe warnings
            if ((flags & machine_flags.type.NOT_WORKING) != 0)
            {
                buf += __("\nTHIS MACHINE DOESN'T WORK. The emulation for this machine is not yet complete. There is nothing you can do to fix this problem except wait for the developers to improve the emulation.\n");
            }
            if ((flags & machine_flags.type.MECHANICAL) != 0)
            {
                buf += __("\nElements of this machine cannot be emulated as they require physical interaction or consist of mechanical devices. It is not possible to fully experience this machine.\n");
            }

            if ((flags & MACHINE_ERRORS) != 0 || ((machine.system().type.unemulated_features() | machine.system().type.imperfect_features()) & device_t_feature.type.PROTECTION) != 0)
            {
                // find the parent of this driver
                driver_enumerator drivlist = new driver_enumerator(machine.options());
                int maindrv  = driver_list.find(machine.system());
                int clone_of = driver_list.non_bios_clone((size_t)maindrv);
                if (clone_of != -1)
                {
                    maindrv = clone_of;
                }

                // scan the driver list for any working clones and add them
                bool foundworking = false;
                while (drivlist.next())
                {
                    if (drivlist.current() == maindrv || drivlist.clone() == maindrv)
                    {
                        game_driver driver = drivlist.driver();
                        if ((driver.flags & MACHINE_ERRORS) == 0 && ((driver.type.unemulated_features() | driver.type.imperfect_features()) & device_t_feature.type.PROTECTION) == 0)
                        {
                            // this one works, add a header and display the name of the clone
                            if (!foundworking)
                            {
                                util.stream_format(ref buf, __("\n\nThere are working clones of this machine: {0}"), driver.name);
                            }
                            else
                            {
                                util.stream_format(ref buf, __(", {0}"), driver.name);
                            }

                            foundworking = true;
                        }
                    }
                }

                if (foundworking)
                {
                    buf += '\n';
                }
            }
        }
Exemple #3
0
        protected machine_static_info(ui_options options, machine_config config, ioport_list ports)
        {
            m_options             = options;
            m_flags               = config.gamedrv().flags;
            m_unemulated_features = config.gamedrv().type.unemulated_features();
            m_imperfect_features  = config.gamedrv().type.imperfect_features();
            m_has_bioses          = false;
            m_has_dips            = false;
            m_has_configs         = false;
            m_has_keyboard        = false;
            m_has_test_switch     = false;
            m_has_analog          = false;


            ioport_list local_ports = new ioport_list();
            string      sink;

            foreach (device_t device in new device_enumerator(config.root_device()))
            {
                // the "no sound hardware" warning doesn't make sense when you plug in a sound card
                if (device.GetClassInterface <device_sound_interface>() != null)  // dynamic_cast<device_sound_interface *>(&device))
                {
                    m_flags &= ~machine_flags.type.NO_SOUND_HW;
                }

                // build overall emulation status
                m_unemulated_features |= device.type().unemulated_features();
                m_imperfect_features  |= device.type().imperfect_features();

                // look for BIOS options
                device_t parent            = device.owner();
                device_slot_interface slot = device.GetClassInterface <device_slot_interface>();  //device_slot_interface const *const slot(dynamic_cast<device_slot_interface const *>(parent));
                if (parent == null || (slot != null && (slot.get_card_device() == device)))
                {
                    for (Pointer <tiny_rom_entry> rom = device.rom_region(); !m_has_bioses && rom != null && !ROMENTRY_ISEND(rom.op); ++rom)  //for (tiny_rom_entry const *rom = device.rom_region(); !m_has_bioses && rom && !ROMENTRY_ISEND(rom); ++rom)
                    {
                        if (ROMENTRY_ISSYSTEM_BIOS(rom.op))
                        {
                            m_has_bioses = true;
                        }
                    }
                }
            }

            // suppress "requires external artwork" warning when external artwork was loaded
            if (config.root_device().has_running_machine())
            {
                for (render_target target = config.root_device().machine().render().first_target(); target != null; target = target.next())
                {
                    if (!target.hidden() && target.external_artwork())
                    {
                        m_flags &= ~machine_flags.type.REQUIRES_ARTWORK;
                        break;
                    }
                }
            }

            // unemulated trumps imperfect when aggregating (always be pessimistic)
            m_imperfect_features &= ~m_unemulated_features;

            // scan the input port array to see what options we need to enable
            foreach (var port in (ports != null ? ports : local_ports))
            {
                foreach (ioport_field field in port.Value.fields())
                {
                    switch (field.type())
                    {
                    case ioport_type.IPT_DIPSWITCH: m_has_dips = true;          break;

                    case ioport_type.IPT_CONFIG:    m_has_configs = true;       break;

                    case ioport_type.IPT_KEYBOARD:  m_has_keyboard = true;      break;

                    case ioport_type.IPT_SERVICE:   m_has_test_switch = true;   break;

                    default: break;
                    }

                    if (field.is_analog())
                    {
                        m_has_analog = true;
                    }
                }
            }
        }
Exemple #4
0
        public static void get_general_warnings(ref string buf, running_machine machine, machine_flags.type flags, device_t_feature_type unemulated, device_t_feature_type imperfect)  //void get_general_warnings(std::ostream &buf, running_machine &machine, machine_flags::type flags, device_t::feature_type unemulated, device_t::feature_type imperfect)
        {
            // add a warning if any ROMs were loaded with warnings
            bool bad_roms = false;

            if (machine.rom_load().warnings() > 0)
            {
                bad_roms = true;
                buf     += __("One or more ROMs/CHDs for this machine are incorrect. The machine may not run correctly.\n");
            }
            if (!machine.rom_load().software_load_warnings_message().empty())
            {
                bad_roms = true;
                buf     += machine.rom_load().software_load_warnings_message();
            }

            // if we have at least one warning flag, print the general header
            if ((machine.rom_load().knownbad() > 0) || (flags & (MACHINE_ERRORS | MACHINE_WARNINGS | MACHINE_BTANB)) != 0 || unemulated != 0 || imperfect != 0)
            {
                if (bad_roms)
                {
                    buf += '\n';
                }
                buf += __("There are known problems with this machine\n\n");
            }

            // add a warning if any ROMs are flagged BAD_DUMP/NO_DUMP
            if (machine.rom_load().knownbad() > 0)
            {
                buf += __("One or more ROMs/CHDs for this machine have not been correctly dumped.\n");
            }
        }