Beispiel #1
0
astring *image_info_astring(running_machine *machine, astring *string)
{
	device_image_interface *image = NULL;

	astring_printf(string, "%s\n\n", machine->gamedrv->description);

#if 0
	if (mess_ram_size > 0)
	{
		char buf2[RAM_STRING_BUFLEN];
		astring_catprintf(string, "RAM: %s\n\n", ram_string(buf2, mess_ram_size));
	}
#endif

	for (bool gotone = machine->m_devicelist.first(image); gotone; gotone = image->next(image))
	{
		const char *name = image->filename();
		if (name != NULL)
		{
			const char *base_filename;
			const char *info;
			char *base_filename_noextension;

			base_filename = image->basename();
			base_filename_noextension = strip_extension(base_filename);

			/* display device type and filename */
			astring_catprintf(string, "%s: %s\n", image->image_config().devconfig().name(), base_filename);

			/* display long filename, if present and doesn't correspond to name */
			info = image->longname();
			if (info && (!base_filename_noextension || mame_stricmp(info, base_filename_noextension)))
				astring_catprintf(string, "%s\n", info);

			/* display manufacturer, if available */
			info = image->manufacturer();
			if (info != NULL)
			{
				astring_catprintf(string, "%s", info);
				info = stripspace(image->year());
				if (info && *info)
					astring_catprintf(string, ", %s", info);
				astring_catprintf(string,"\n");
			}

			/* display playable information, if available */
			info = image->playable();
			if (info != NULL)
				astring_catprintf(string, "%s\n", info);

			if (base_filename_noextension != NULL)
				free(base_filename_noextension);
		}
		else
		{
			astring_catprintf(string, "%s: ---\n", image->image_config().devconfig().name());
		}
	}
	return string;
}
Beispiel #2
0
void ui_menu_image_info::image_info_astring(running_machine &machine, astring &string)
{
	string.printf("%s\n\n", machine.system().description);

#if 0
	if (mess_ram_size > 0)
	{
		char buf2[RAM_STRING_BUFLEN];
		string.catprintf("RAM: %s\n\n", ram_string(buf2, mess_ram_size));
	}
#endif

	image_interface_iterator iter(machine.root_device());
	for (device_image_interface *image = iter.first(); image != NULL; image = iter.next())
	{
		const char *name = image->filename();
		if (name != NULL)
		{
			const char *base_filename;
			const char *info;
			char *base_filename_noextension;

			base_filename = image->basename();
			base_filename_noextension = strip_extension(base_filename);

			// display device type and filename
			string.catprintf("%s: %s\n", image->device().name(), base_filename);

			// display long filename, if present and doesn't correspond to name
			info = image->longname();
			if (info && (!base_filename_noextension || core_stricmp(info, base_filename_noextension)))
				string.catprintf("%s\n", info);

			// display manufacturer, if available
			info = image->manufacturer();
			if (info != NULL)
			{
				string.catprintf("%s", info);
				info = stripspace(image->year());
				if (info && *info)
					string.catprintf(", %s", info);
				string.catprintf("\n");
			}

			// display supported information, if available
			switch(image->supported()) {
				case SOFTWARE_SUPPORTED_NO : string.catprintf("Not supported\n"); break;
				case SOFTWARE_SUPPORTED_PARTIAL : string.catprintf("Partially supported\n"); break;
				default : break;
			}

			if (base_filename_noextension != NULL)
				free(base_filename_noextension);
		}
		else
		{
			string.catprintf("%s: ---\n", image->device().name());
		}
	}
}
Beispiel #3
0
int ui_sprintf_image_info(char *buf)
{
    char *dst = buf;
    const struct IODevice *dev;
    int id;

    dst += sprintf(dst, "%s\n\n", Machine->gamedrv->description);

    if (options.ram)
    {
        char buf2[RAM_STRING_BUFLEN];
        dst += sprintf(dst, "RAM: %s\n\n", ram_string(buf2, options.ram));
    }

    for (dev = Machine->devices; dev->type < IO_COUNT; dev++)
    {
        for (id = 0; id < dev->count; id++)
        {
            mess_image *img = image_from_device_and_index(dev, id);
            const char *name = image_filename(img);
            if( name )
            {
                const char *base_filename;
                const char *info;
                char *base_filename_noextension;

                base_filename = image_basename(img);
                base_filename_noextension = strip_extension((char *) base_filename);

                /* display device type and filename */
                dst += sprintf(dst,"%s: %s\n", image_typename_id(img), base_filename);

                /* display long filename, if present and doesn't correspond to name */
                info = image_longname(img);
                if (info && (!base_filename_noextension || mame_stricmp(info, base_filename_noextension)))
                    dst += sprintf(dst,"%s\n", info);

                /* display manufacturer, if available */
                info = image_manufacturer(img);
                if (info)
                {
                    dst += sprintf(dst,"%s", info);
                    info = stripspace(image_year(img));
                    if (info && *info)
                        dst += sprintf(dst,", %s", info);
                    dst += sprintf(dst,"\n");
                }

                /* display playable information, if available */
                info = image_playable(img);
                if (info)
                    dst += sprintf(dst,"%s\n", info);

                if (base_filename_noextension)
                    free(base_filename_noextension);
            }
            else
            {
                dst += sprintf(dst,"%s: ---\n", image_typename_id(img));
            }
        }
    }
    return dst - buf;
}
Beispiel #4
0
astring *image_info_astring(running_machine &machine, astring *string)
{
	device_image_interface *image = NULL;

	astring_printf(string, "%s\n\n", machine.system().description);

#if 0
	if (mess_ram_size > 0)
	{
		char buf2[RAM_STRING_BUFLEN];
		astring_catprintf(string, "RAM: %s\n\n", ram_string(buf2, mess_ram_size));
	}
#endif

	for (bool gotone = machine.devicelist().first(image); gotone; gotone = image->next(image))
	{
		const char *name = image->filename();
		if (name != NULL)
		{
			const char *base_filename;
			const char *info;
			char *base_filename_noextension;

			base_filename = image->basename();
			base_filename_noextension = strip_extension(base_filename);

			/* display device type and filename */
			astring_catprintf(string, "%s: %s\n", image->device().name(), base_filename);

			/* display long filename, if present and doesn't correspond to name */
			info = image->longname();
			if (info && (!base_filename_noextension || mame_stricmp(info, base_filename_noextension)))
				astring_catprintf(string, "%s\n", info);

			/* display manufacturer, if available */
			info = image->manufacturer();
			if (info != NULL)
			{
				astring_catprintf(string, "%s", info);
				info = stripspace(image->year());
				if (info && *info)
					astring_catprintf(string, ", %s", info);
				astring_catprintf(string,"\n");
			}

			/* display supported information, if available */
			switch(image->supported()) {
				case SOFTWARE_SUPPORTED_NO : astring_catprintf(string, "Not supported\n"); break;
				case SOFTWARE_SUPPORTED_PARTIAL : astring_catprintf(string, "Partialy supported\n"); break;
				default : break;
			}

			if (base_filename_noextension != NULL)
				free(base_filename_noextension);
		}
		else
		{
			astring_catprintf(string, "%s: ---\n", image->device().name());
		}
	}
	return string;
}