mirror of
https://github.com/holub/mame
synced 2025-07-01 08:18:59 +03:00
Expose condition for DIP switches, configuration entries, and adjusters.
This eliminates ambiguities between settings with different conditions and allows a frontend/tool to generate a DIP switch preview. (nw) Reduce number of calls to fprintf - saves overhead of setting up the formatting engine. (nw) Add the previously commented osborne1 chargen ROM for v1.4 BIOS now that we've established that ROM BIOS applies to multiple regions and -listxml reports it correctly.
This commit is contained in:
parent
cbddd42e05
commit
87f7bbb114
@ -894,7 +894,10 @@ public:
|
|||||||
ioport_condition(condition_t condition, const char *tag, ioport_value mask, ioport_value value) { set(condition, tag, mask, value); }
|
ioport_condition(condition_t condition, const char *tag, ioport_value mask, ioport_value value) { set(condition, tag, mask, value); }
|
||||||
|
|
||||||
// getters
|
// getters
|
||||||
|
condition_t condition() const { return m_condition; }
|
||||||
const char *tag() const { return m_tag; }
|
const char *tag() const { return m_tag; }
|
||||||
|
ioport_value mask() const { return m_mask; }
|
||||||
|
ioport_value value() const { return m_value; }
|
||||||
|
|
||||||
// operators
|
// operators
|
||||||
bool operator==(const ioport_condition &rhs) const { return (m_mask == rhs.m_mask && m_value == rhs.m_value && m_condition == rhs.m_condition && strcmp(m_tag, rhs.m_tag) == 0); }
|
bool operator==(const ioport_condition &rhs) const { return (m_mask == rhs.m_mask && m_value == rhs.m_value && m_condition == rhs.m_condition && strcmp(m_tag, rhs.m_tag) == 0); }
|
||||||
@ -942,6 +945,7 @@ public:
|
|||||||
running_machine &machine() const;
|
running_machine &machine() const;
|
||||||
ioport_value value() const { return m_value; }
|
ioport_value value() const { return m_value; }
|
||||||
ioport_condition &condition() { return m_condition; }
|
ioport_condition &condition() { return m_condition; }
|
||||||
|
ioport_condition const &condition() const { return m_condition; }
|
||||||
const char *name() const { return m_name; }
|
const char *name() const { return m_name; }
|
||||||
|
|
||||||
// helpers
|
// helpers
|
||||||
@ -1021,6 +1025,7 @@ public:
|
|||||||
ioport_value mask() const { return m_mask; }
|
ioport_value mask() const { return m_mask; }
|
||||||
ioport_value defvalue() const { return m_defvalue; }
|
ioport_value defvalue() const { return m_defvalue; }
|
||||||
ioport_condition &condition() { return m_condition; }
|
ioport_condition &condition() { return m_condition; }
|
||||||
|
ioport_condition const &condition() const { return m_condition; }
|
||||||
ioport_type type() const { return m_type; }
|
ioport_type type() const { return m_type; }
|
||||||
u8 player() const { return m_player; }
|
u8 player() const { return m_player; }
|
||||||
bool digital_value() const { return m_digital_value; }
|
bool digital_value() const { return m_digital_value; }
|
||||||
|
@ -91,7 +91,7 @@ const char info_xml_creator::s_dtd_string[] =
|
|||||||
"\t\t\t<!ATTLIST chip clock CDATA #IMPLIED>\n"
|
"\t\t\t<!ATTLIST chip clock CDATA #IMPLIED>\n"
|
||||||
"\t\t<!ELEMENT display EMPTY>\n"
|
"\t\t<!ELEMENT display EMPTY>\n"
|
||||||
"\t\t\t<!ATTLIST display tag CDATA #IMPLIED>\n"
|
"\t\t\t<!ATTLIST display tag CDATA #IMPLIED>\n"
|
||||||
"\t\t\t<!ATTLIST display type (raster|vector|lcd|unknown) #REQUIRED>\n"
|
"\t\t\t<!ATTLIST display type (raster|vector|lcd|svg|unknown) #REQUIRED>\n"
|
||||||
"\t\t\t<!ATTLIST display rotate (0|90|180|270) #IMPLIED>\n"
|
"\t\t\t<!ATTLIST display rotate (0|90|180|270) #IMPLIED>\n"
|
||||||
"\t\t\t<!ATTLIST display flipx (yes|no) \"no\">\n"
|
"\t\t\t<!ATTLIST display flipx (yes|no) \"no\">\n"
|
||||||
"\t\t\t<!ATTLIST display width CDATA #IMPLIED>\n"
|
"\t\t\t<!ATTLIST display width CDATA #IMPLIED>\n"
|
||||||
@ -106,6 +106,11 @@ const char info_xml_creator::s_dtd_string[] =
|
|||||||
"\t\t\t<!ATTLIST display vbstart CDATA #IMPLIED>\n"
|
"\t\t\t<!ATTLIST display vbstart CDATA #IMPLIED>\n"
|
||||||
"\t\t<!ELEMENT sound EMPTY>\n"
|
"\t\t<!ELEMENT sound EMPTY>\n"
|
||||||
"\t\t\t<!ATTLIST sound channels CDATA #REQUIRED>\n"
|
"\t\t\t<!ATTLIST sound channels CDATA #REQUIRED>\n"
|
||||||
|
"\t\t\t<!ELEMENT condition EMPTY>\n"
|
||||||
|
"\t\t\t<!ATTLIST condition tag CDATA #REQUIRED>\n"
|
||||||
|
"\t\t\t<!ATTLIST condition mask CDATA #REQUIRED>\n"
|
||||||
|
"\t\t\t<!ATTLIST condition relation (eq|ne|gt|le|lt|ge) #REQUIRED>\n"
|
||||||
|
"\t\t\t<!ATTLIST condition value CDATA #REQUIRED>\n"
|
||||||
"\t\t<!ELEMENT input (control*)>\n"
|
"\t\t<!ELEMENT input (control*)>\n"
|
||||||
"\t\t\t<!ATTLIST input service (yes|no) \"no\">\n"
|
"\t\t\t<!ATTLIST input service (yes|no) \"no\">\n"
|
||||||
"\t\t\t<!ATTLIST input tilt (yes|no) \"no\">\n"
|
"\t\t\t<!ATTLIST input tilt (yes|no) \"no\">\n"
|
||||||
@ -124,7 +129,7 @@ const char info_xml_creator::s_dtd_string[] =
|
|||||||
"\t\t\t\t<!ATTLIST control ways CDATA #IMPLIED>\n"
|
"\t\t\t\t<!ATTLIST control ways CDATA #IMPLIED>\n"
|
||||||
"\t\t\t\t<!ATTLIST control ways2 CDATA #IMPLIED>\n"
|
"\t\t\t\t<!ATTLIST control ways2 CDATA #IMPLIED>\n"
|
||||||
"\t\t\t\t<!ATTLIST control ways3 CDATA #IMPLIED>\n"
|
"\t\t\t\t<!ATTLIST control ways3 CDATA #IMPLIED>\n"
|
||||||
"\t\t<!ELEMENT dipswitch (diplocation*, dipvalue*)>\n"
|
"\t\t<!ELEMENT dipswitch (condition?, diplocation*, dipvalue*)>\n"
|
||||||
"\t\t\t<!ATTLIST dipswitch name CDATA #REQUIRED>\n"
|
"\t\t\t<!ATTLIST dipswitch name CDATA #REQUIRED>\n"
|
||||||
"\t\t\t<!ATTLIST dipswitch tag CDATA #REQUIRED>\n"
|
"\t\t\t<!ATTLIST dipswitch tag CDATA #REQUIRED>\n"
|
||||||
"\t\t\t<!ATTLIST dipswitch mask CDATA #REQUIRED>\n"
|
"\t\t\t<!ATTLIST dipswitch mask CDATA #REQUIRED>\n"
|
||||||
@ -132,11 +137,11 @@ const char info_xml_creator::s_dtd_string[] =
|
|||||||
"\t\t\t\t<!ATTLIST diplocation name CDATA #REQUIRED>\n"
|
"\t\t\t\t<!ATTLIST diplocation name CDATA #REQUIRED>\n"
|
||||||
"\t\t\t\t<!ATTLIST diplocation number CDATA #REQUIRED>\n"
|
"\t\t\t\t<!ATTLIST diplocation number CDATA #REQUIRED>\n"
|
||||||
"\t\t\t\t<!ATTLIST diplocation inverted (yes|no) \"no\">\n"
|
"\t\t\t\t<!ATTLIST diplocation inverted (yes|no) \"no\">\n"
|
||||||
"\t\t\t<!ELEMENT dipvalue EMPTY>\n"
|
"\t\t\t<!ELEMENT dipvalue (condition?)>\n"
|
||||||
"\t\t\t\t<!ATTLIST dipvalue name CDATA #REQUIRED>\n"
|
"\t\t\t\t<!ATTLIST dipvalue name CDATA #REQUIRED>\n"
|
||||||
"\t\t\t\t<!ATTLIST dipvalue value CDATA #REQUIRED>\n"
|
"\t\t\t\t<!ATTLIST dipvalue value CDATA #REQUIRED>\n"
|
||||||
"\t\t\t\t<!ATTLIST dipvalue default (yes|no) \"no\">\n"
|
"\t\t\t\t<!ATTLIST dipvalue default (yes|no) \"no\">\n"
|
||||||
"\t\t<!ELEMENT configuration (conflocation*, confsetting*)>\n"
|
"\t\t<!ELEMENT configuration (condition?, conflocation*, confsetting*)>\n"
|
||||||
"\t\t\t<!ATTLIST configuration name CDATA #REQUIRED>\n"
|
"\t\t\t<!ATTLIST configuration name CDATA #REQUIRED>\n"
|
||||||
"\t\t\t<!ATTLIST configuration tag CDATA #REQUIRED>\n"
|
"\t\t\t<!ATTLIST configuration tag CDATA #REQUIRED>\n"
|
||||||
"\t\t\t<!ATTLIST configuration mask CDATA #REQUIRED>\n"
|
"\t\t\t<!ATTLIST configuration mask CDATA #REQUIRED>\n"
|
||||||
@ -144,7 +149,7 @@ const char info_xml_creator::s_dtd_string[] =
|
|||||||
"\t\t\t\t<!ATTLIST conflocation name CDATA #REQUIRED>\n"
|
"\t\t\t\t<!ATTLIST conflocation name CDATA #REQUIRED>\n"
|
||||||
"\t\t\t\t<!ATTLIST conflocation number CDATA #REQUIRED>\n"
|
"\t\t\t\t<!ATTLIST conflocation number CDATA #REQUIRED>\n"
|
||||||
"\t\t\t\t<!ATTLIST conflocation inverted (yes|no) \"no\">\n"
|
"\t\t\t\t<!ATTLIST conflocation inverted (yes|no) \"no\">\n"
|
||||||
"\t\t\t<!ELEMENT confsetting EMPTY>\n"
|
"\t\t\t<!ELEMENT confsetting (condition?)>\n"
|
||||||
"\t\t\t\t<!ATTLIST confsetting name CDATA #REQUIRED>\n"
|
"\t\t\t\t<!ATTLIST confsetting name CDATA #REQUIRED>\n"
|
||||||
"\t\t\t\t<!ATTLIST confsetting value CDATA #REQUIRED>\n"
|
"\t\t\t\t<!ATTLIST confsetting value CDATA #REQUIRED>\n"
|
||||||
"\t\t\t\t<!ATTLIST confsetting default (yes|no) \"no\">\n"
|
"\t\t\t\t<!ATTLIST confsetting default (yes|no) \"no\">\n"
|
||||||
@ -152,7 +157,7 @@ const char info_xml_creator::s_dtd_string[] =
|
|||||||
"\t\t\t<!ATTLIST port tag CDATA #REQUIRED>\n"
|
"\t\t\t<!ATTLIST port tag CDATA #REQUIRED>\n"
|
||||||
"\t\t\t<!ELEMENT analog EMPTY>\n"
|
"\t\t\t<!ELEMENT analog EMPTY>\n"
|
||||||
"\t\t\t\t<!ATTLIST analog mask CDATA #REQUIRED>\n"
|
"\t\t\t\t<!ATTLIST analog mask CDATA #REQUIRED>\n"
|
||||||
"\t\t<!ELEMENT adjuster EMPTY>\n"
|
"\t\t<!ELEMENT adjuster (condition?)>\n"
|
||||||
"\t\t\t<!ATTLIST adjuster name CDATA #REQUIRED>\n"
|
"\t\t\t<!ATTLIST adjuster name CDATA #REQUIRED>\n"
|
||||||
"\t\t\t<!ATTLIST adjuster default CDATA #REQUIRED>\n"
|
"\t\t\t<!ATTLIST adjuster default CDATA #REQUIRED>\n"
|
||||||
"\t\t<!ELEMENT driver EMPTY>\n"
|
"\t\t<!ELEMENT driver EMPTY>\n"
|
||||||
@ -164,7 +169,7 @@ const char info_xml_creator::s_dtd_string[] =
|
|||||||
"\t\t\t<!ATTLIST feature type (protection|palette|graphics|sound|controls|keyboard|mouse|microphone|camera|disk|printer|lan|wan|timing) #REQUIRED>\n"
|
"\t\t\t<!ATTLIST feature type (protection|palette|graphics|sound|controls|keyboard|mouse|microphone|camera|disk|printer|lan|wan|timing) #REQUIRED>\n"
|
||||||
"\t\t\t<!ATTLIST feature status (unemulated|imperfect) #IMPLIED>\n"
|
"\t\t\t<!ATTLIST feature status (unemulated|imperfect) #IMPLIED>\n"
|
||||||
"\t\t\t<!ATTLIST feature overall (unemulated|imperfect) #IMPLIED>\n"
|
"\t\t\t<!ATTLIST feature overall (unemulated|imperfect) #IMPLIED>\n"
|
||||||
"\t\t<!ELEMENT device (instance*, extension*)>\n"
|
"\t\t<!ELEMENT device (instance?, extension*)>\n"
|
||||||
"\t\t\t<!ATTLIST device type CDATA #REQUIRED>\n"
|
"\t\t\t<!ATTLIST device type CDATA #REQUIRED>\n"
|
||||||
"\t\t\t<!ATTLIST device tag CDATA #IMPLIED>\n"
|
"\t\t\t<!ATTLIST device tag CDATA #IMPLIED>\n"
|
||||||
"\t\t\t<!ATTLIST device fixed_image CDATA #IMPLIED>\n"
|
"\t\t\t<!ATTLIST device fixed_image CDATA #IMPLIED>\n"
|
||||||
@ -349,15 +354,14 @@ void info_xml_creator::output_header()
|
|||||||
// top-level tag
|
// top-level tag
|
||||||
fprintf(m_output, "<%s build=\"%s\" debug=\""
|
fprintf(m_output, "<%s build=\"%s\" debug=\""
|
||||||
#ifdef MAME_DEBUG
|
#ifdef MAME_DEBUG
|
||||||
"yes"
|
"yes"
|
||||||
#else
|
#else
|
||||||
"no"
|
"no"
|
||||||
#endif
|
#endif
|
||||||
"\" mameconfig=\"%d\">\n",
|
"\" mameconfig=\"%d\">\n",
|
||||||
XML_ROOT,
|
XML_ROOT,
|
||||||
util::xml::normalize_string(emulator_info::get_build_version()),
|
util::xml::normalize_string(emulator_info::get_build_version()),
|
||||||
CONFIG_VERSION
|
CONFIG_VERSION);
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -413,7 +417,8 @@ void info_xml_creator::output_one(driver_enumerator &drivlist, device_type_set *
|
|||||||
{
|
{
|
||||||
if (field.type() == IPT_KEYBOARD)
|
if (field.type() == IPT_KEYBOARD)
|
||||||
{
|
{
|
||||||
if (!new_kbd) new_kbd = true;
|
if (!new_kbd)
|
||||||
|
new_kbd = true;
|
||||||
field.set_player(field.player() + kbd_offset);
|
field.set_player(field.player() + kbd_offset);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -427,8 +432,7 @@ void info_xml_creator::output_one(driver_enumerator &drivlist, device_type_set *
|
|||||||
}
|
}
|
||||||
|
|
||||||
// print the header and the machine name
|
// print the header and the machine name
|
||||||
fprintf(m_output, "\t<%s",XML_TOP);
|
fprintf(m_output, "\t<%s name=\"%s\"", XML_TOP, util::xml::normalize_string(driver.name));
|
||||||
fprintf(m_output, " name=\"%s\"", util::xml::normalize_string(driver.name));
|
|
||||||
|
|
||||||
// strip away any path information from the source_file and output it
|
// strip away any path information from the source_file and output it
|
||||||
const char *start = strrchr(driver.type.source(), '/');
|
const char *start = strrchr(driver.type.source(), '/');
|
||||||
@ -487,7 +491,7 @@ void info_xml_creator::output_one(driver_enumerator &drivlist, device_type_set *
|
|||||||
output_ramoptions(config->root_device());
|
output_ramoptions(config->root_device());
|
||||||
|
|
||||||
// close the topmost tag
|
// close the topmost tag
|
||||||
fprintf(m_output, "\t</%s>\n",XML_TOP);
|
fprintf(m_output, "\t</%s>\n", XML_TOP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -518,7 +522,7 @@ void info_xml_creator::output_one_device(machine_config &config, device_t &devic
|
|||||||
|
|
||||||
// check if the device adds player inputs (other than dsw and configs) to the system
|
// check if the device adds player inputs (other than dsw and configs) to the system
|
||||||
for (auto &port : portlist)
|
for (auto &port : portlist)
|
||||||
for (ioport_field &field : port.second->fields())
|
for (ioport_field const &field : port.second->fields())
|
||||||
if (field.type() >= IPT_START1 && field.type() < IPT_UI_FIRST)
|
if (field.type() >= IPT_START1 && field.type() < IPT_UI_FIRST)
|
||||||
{
|
{
|
||||||
has_input = true;
|
has_input = true;
|
||||||
@ -526,16 +530,12 @@ void info_xml_creator::output_one_device(machine_config &config, device_t &devic
|
|||||||
}
|
}
|
||||||
|
|
||||||
// start to output info
|
// start to output info
|
||||||
fprintf(m_output, "\t<%s", XML_TOP);
|
fprintf(m_output, "\t<%s name=\"%s\"", XML_TOP, util::xml::normalize_string(device.shortname()));
|
||||||
fprintf(m_output, " name=\"%s\"", util::xml::normalize_string(device.shortname()));
|
|
||||||
std::string src(device.source());
|
std::string src(device.source());
|
||||||
strreplace(src,"../", "");
|
strreplace(src,"../", "");
|
||||||
fprintf(m_output, " sourcefile=\"%s\"", util::xml::normalize_string(src.c_str()));
|
fprintf(m_output, " sourcefile=\"%s\" isdevice=\"yes\" runnable=\"no\"", util::xml::normalize_string(src.c_str()));
|
||||||
fprintf(m_output, " isdevice=\"yes\"");
|
|
||||||
fprintf(m_output, " runnable=\"no\"");
|
|
||||||
output_sampleof(device);
|
output_sampleof(device);
|
||||||
fprintf(m_output, ">\n");
|
fprintf(m_output, ">\n\t\t<description>%s</description>\n", util::xml::normalize_string(device.name()));
|
||||||
fprintf(m_output, "\t\t<description>%s</description>\n", util::xml::normalize_string(device.name()));
|
|
||||||
|
|
||||||
output_bios(device);
|
output_bios(device);
|
||||||
output_rom(nullptr, device);
|
output_rom(nullptr, device);
|
||||||
@ -754,56 +754,45 @@ void info_xml_creator::output_rom(driver_enumerator *drivlist, device_t &device)
|
|||||||
util::hash_collection const hashes(rom->hashdata);
|
util::hash_collection const hashes(rom->hashdata);
|
||||||
char const *const merge_name((do_merge_name && !hashes.flag(util::hash_collection::FLAG_NO_DUMP)) ? get_merge_name(*drivlist, hashes) : nullptr);
|
char const *const merge_name((do_merge_name && !hashes.flag(util::hash_collection::FLAG_NO_DUMP)) ? get_merge_name(*drivlist, hashes) : nullptr);
|
||||||
|
|
||||||
std::ostringstream output;
|
|
||||||
|
|
||||||
// opening tag
|
// opening tag
|
||||||
if (is_disk)
|
fprintf(m_output, is_disk ? "\t\t<disk" : "\t\t<rom");
|
||||||
output << "\t\t<disk";
|
|
||||||
else
|
|
||||||
output << "\t\t<rom";
|
|
||||||
|
|
||||||
// add name, merge, bios, and size tags */
|
// add name, merge, bios, and size tags */
|
||||||
char const *const name(rom->name);
|
char const *const name(rom->name);
|
||||||
if (name && name[0])
|
if (name && name[0])
|
||||||
util::stream_format(output, " name=\"%s\"", util::xml::normalize_string(name));
|
fprintf(m_output, " name=\"%s\"", util::xml::normalize_string(name));
|
||||||
if (merge_name)
|
if (merge_name)
|
||||||
util::stream_format(output, " merge=\"%s\"", util::xml::normalize_string(merge_name));
|
fprintf(m_output, " merge=\"%s\"", util::xml::normalize_string(merge_name));
|
||||||
if (bios_name)
|
if (bios_name)
|
||||||
util::stream_format(output, " bios=\"%s\"", util::xml::normalize_string(bios_name));
|
fprintf(m_output, " bios=\"%s\"", util::xml::normalize_string(bios_name));
|
||||||
if (!is_disk)
|
if (!is_disk)
|
||||||
util::stream_format(output, " size=\"%u\"", rom_file_size(rom));
|
fprintf(m_output, " size=\"%u\"", rom_file_size(rom));
|
||||||
|
|
||||||
// dump checksum information only if there is a known dump
|
// dump checksum information only if there is a known dump
|
||||||
if (!hashes.flag(util::hash_collection::FLAG_NO_DUMP))
|
if (!hashes.flag(util::hash_collection::FLAG_NO_DUMP))
|
||||||
{
|
fprintf(m_output, " %s", hashes.attribute_string().c_str()); // iterate over hash function types and print m_output their values
|
||||||
// iterate over hash function types and print m_output their values
|
|
||||||
output << " " << hashes.attribute_string();
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
output << " status=\"nodump\"";
|
fprintf(m_output, " status=\"nodump\"");
|
||||||
|
|
||||||
// append a region name
|
// append a region name
|
||||||
util::stream_format(output, " region=\"%s\"", region->name);
|
fprintf(m_output, " region=\"%s\"", region->name);
|
||||||
|
|
||||||
if (!is_disk)
|
if (!is_disk)
|
||||||
{
|
{
|
||||||
// for non-disk entries, print offset
|
// for non-disk entries, print offset
|
||||||
util::stream_format(output, " offset=\"%x\"", ROM_GETOFFSET(rom));
|
fprintf(m_output, " offset=\"%x\"", ROM_GETOFFSET(rom));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// for disk entries, add the disk index
|
// for disk entries, add the disk index
|
||||||
util::stream_format(output, " index=\"%x\"", DISK_GETINDEX(rom));
|
fprintf(m_output, " index=\"%x\" writable=\"%s\"", DISK_GETINDEX(rom), DISK_ISREADONLY(rom) ? "no" : "yes");
|
||||||
util::stream_format(output, " writable=\"%s\"", DISK_ISREADONLY(rom) ? "no" : "yes");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// add optional flag
|
// add optional flag
|
||||||
if (ROM_ISOPTIONAL(rom))
|
if (ROM_ISOPTIONAL(rom))
|
||||||
output << " optional=\"yes\"";
|
fprintf(m_output, " optional=\"yes\"");
|
||||||
|
|
||||||
output << "/>\n";
|
fprintf(m_output, "/>\n");
|
||||||
|
|
||||||
fprintf(m_output, "%s", output.str().c_str());
|
|
||||||
}
|
}
|
||||||
bios_scanned = true;
|
bios_scanned = true;
|
||||||
}
|
}
|
||||||
@ -894,14 +883,14 @@ void info_xml_creator::output_display(device_t &device, machine_flags::type cons
|
|||||||
std::string newtag(screendev.tag()), oldtag(":");
|
std::string newtag(screendev.tag()), oldtag(":");
|
||||||
newtag = newtag.substr(newtag.find(oldtag.append(root_tag)) + oldtag.length());
|
newtag = newtag.substr(newtag.find(oldtag.append(root_tag)) + oldtag.length());
|
||||||
|
|
||||||
fprintf(m_output, "\t\t<display");
|
fprintf(m_output, "\t\t<display tag=\"%s\"", util::xml::normalize_string(newtag.c_str()));
|
||||||
fprintf(m_output, " tag=\"%s\"", util::xml::normalize_string(newtag.c_str()));
|
|
||||||
|
|
||||||
switch (screendev.screen_type())
|
switch (screendev.screen_type())
|
||||||
{
|
{
|
||||||
case SCREEN_TYPE_RASTER: fprintf(m_output, " type=\"raster\""); break;
|
case SCREEN_TYPE_RASTER: fprintf(m_output, " type=\"raster\""); break;
|
||||||
case SCREEN_TYPE_VECTOR: fprintf(m_output, " type=\"vector\""); break;
|
case SCREEN_TYPE_VECTOR: fprintf(m_output, " type=\"vector\""); break;
|
||||||
case SCREEN_TYPE_LCD: fprintf(m_output, " type=\"lcd\""); break;
|
case SCREEN_TYPE_LCD: fprintf(m_output, " type=\"lcd\""); break;
|
||||||
|
case SCREEN_TYPE_SVG: fprintf(m_output, " type=\"svg\""); break;
|
||||||
default: fprintf(m_output, " type=\"unknown\""); break;
|
default: fprintf(m_output, " type=\"unknown\""); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -987,6 +976,31 @@ void info_xml_creator::output_sound(device_t &device)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// output_ioport_condition - print condition
|
||||||
|
// required to use I/O port field/setting
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
void info_xml_creator::output_ioport_condition(const ioport_condition &condition, unsigned indent)
|
||||||
|
{
|
||||||
|
for (unsigned i = 0; indent > i; ++i)
|
||||||
|
fprintf(m_output, "\t");
|
||||||
|
|
||||||
|
char const *rel(nullptr);
|
||||||
|
switch (condition.condition())
|
||||||
|
{
|
||||||
|
case ioport_condition::ALWAYS: throw false;
|
||||||
|
case ioport_condition::EQUALS: rel = "eq"; break;
|
||||||
|
case ioport_condition::NOTEQUALS: rel = "ne"; break;
|
||||||
|
case ioport_condition::GREATERTHAN: rel = "gt"; break;
|
||||||
|
case ioport_condition::NOTGREATERTHAN: rel = "le"; break;
|
||||||
|
case ioport_condition::LESSTHAN: rel = "lt"; break;
|
||||||
|
case ioport_condition::NOTLESSTHAN: rel = "ge"; break;
|
||||||
|
}
|
||||||
|
|
||||||
|
fprintf(m_output,"<condition tag=\"%s\" mask=\"%u\" relation=\"%s\" value=\"%u\"/>\n", util::xml::normalize_string(condition.tag()), condition.mask(), rel, condition.value());
|
||||||
|
}
|
||||||
|
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
// output_input - print a summary of a game's
|
// output_input - print a summary of a game's
|
||||||
// input
|
// input
|
||||||
@ -1079,272 +1093,272 @@ void info_xml_creator::output_input(const ioport_list &portlist)
|
|||||||
// switch off of the type
|
// switch off of the type
|
||||||
switch (field.type())
|
switch (field.type())
|
||||||
{
|
{
|
||||||
// map joysticks
|
// map joysticks
|
||||||
case IPT_JOYSTICK_UP:
|
case IPT_JOYSTICK_UP:
|
||||||
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[0] |= DIR_UP;
|
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[0] |= DIR_UP;
|
||||||
break;
|
break;
|
||||||
case IPT_JOYSTICK_DOWN:
|
case IPT_JOYSTICK_DOWN:
|
||||||
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[0] |= DIR_DOWN;
|
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[0] |= DIR_DOWN;
|
||||||
break;
|
break;
|
||||||
case IPT_JOYSTICK_LEFT:
|
case IPT_JOYSTICK_LEFT:
|
||||||
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[0] |= DIR_LEFT;
|
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[0] |= DIR_LEFT;
|
||||||
break;
|
break;
|
||||||
case IPT_JOYSTICK_RIGHT:
|
case IPT_JOYSTICK_RIGHT:
|
||||||
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[0] |= DIR_RIGHT;
|
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[0] |= DIR_RIGHT;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IPT_JOYSTICKLEFT_UP:
|
case IPT_JOYSTICKLEFT_UP:
|
||||||
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[1] |= DIR_UP;
|
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[1] |= DIR_UP;
|
||||||
break;
|
break;
|
||||||
case IPT_JOYSTICKLEFT_DOWN:
|
case IPT_JOYSTICKLEFT_DOWN:
|
||||||
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[1] |= DIR_DOWN;
|
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[1] |= DIR_DOWN;
|
||||||
break;
|
break;
|
||||||
case IPT_JOYSTICKLEFT_LEFT:
|
case IPT_JOYSTICKLEFT_LEFT:
|
||||||
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[1] |= DIR_LEFT;
|
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[1] |= DIR_LEFT;
|
||||||
break;
|
break;
|
||||||
case IPT_JOYSTICKLEFT_RIGHT:
|
case IPT_JOYSTICKLEFT_RIGHT:
|
||||||
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[1] |= DIR_RIGHT;
|
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[1] |= DIR_RIGHT;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IPT_JOYSTICKRIGHT_UP:
|
case IPT_JOYSTICKRIGHT_UP:
|
||||||
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[2] |= DIR_UP;
|
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[2] |= DIR_UP;
|
||||||
break;
|
break;
|
||||||
case IPT_JOYSTICKRIGHT_DOWN:
|
case IPT_JOYSTICKRIGHT_DOWN:
|
||||||
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[2] |= DIR_DOWN;
|
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[2] |= DIR_DOWN;
|
||||||
break;
|
break;
|
||||||
case IPT_JOYSTICKRIGHT_LEFT:
|
case IPT_JOYSTICKRIGHT_LEFT:
|
||||||
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[2] |= DIR_LEFT;
|
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[2] |= DIR_LEFT;
|
||||||
break;
|
break;
|
||||||
case IPT_JOYSTICKRIGHT_RIGHT:
|
case IPT_JOYSTICKRIGHT_RIGHT:
|
||||||
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
ctrl_type = CTRL_DIGITAL_JOYSTICK;
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "joy";
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
control_info[field.player() * CTRL_COUNT + ctrl_type].ways = field.way();
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[2] |= DIR_RIGHT;
|
control_info[field.player() * CTRL_COUNT + ctrl_type].helper[2] |= DIR_RIGHT;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// map analog inputs
|
// map analog inputs
|
||||||
case IPT_AD_STICK_X:
|
case IPT_AD_STICK_X:
|
||||||
case IPT_AD_STICK_Y:
|
case IPT_AD_STICK_Y:
|
||||||
case IPT_AD_STICK_Z:
|
case IPT_AD_STICK_Z:
|
||||||
ctrl_analog = true;
|
ctrl_analog = true;
|
||||||
ctrl_type = CTRL_ANALOG_JOYSTICK;
|
ctrl_type = CTRL_ANALOG_JOYSTICK;
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "stick";
|
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "stick";
|
||||||
|
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||||
|
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = true;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case IPT_PADDLE:
|
||||||
|
case IPT_PADDLE_V:
|
||||||
|
ctrl_analog = true;
|
||||||
|
ctrl_type = CTRL_ANALOG_PADDLE;
|
||||||
|
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "paddle";
|
||||||
|
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||||
|
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = true;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case IPT_PEDAL:
|
||||||
|
case IPT_PEDAL2:
|
||||||
|
case IPT_PEDAL3:
|
||||||
|
ctrl_analog = true;
|
||||||
|
ctrl_type = CTRL_ANALOG_PEDAL;
|
||||||
|
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "pedal";
|
||||||
|
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||||
|
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = true;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case IPT_LIGHTGUN_X:
|
||||||
|
case IPT_LIGHTGUN_Y:
|
||||||
|
ctrl_analog = true;
|
||||||
|
ctrl_type = CTRL_ANALOG_LIGHTGUN;
|
||||||
|
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "lightgun";
|
||||||
|
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||||
|
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = true;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case IPT_POSITIONAL:
|
||||||
|
case IPT_POSITIONAL_V:
|
||||||
|
ctrl_analog = true;
|
||||||
|
ctrl_type = CTRL_ANALOG_POSITIONAL;
|
||||||
|
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "positional";
|
||||||
|
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||||
|
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = true;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case IPT_DIAL:
|
||||||
|
case IPT_DIAL_V:
|
||||||
|
ctrl_analog = true;
|
||||||
|
ctrl_type = CTRL_ANALOG_DIAL;
|
||||||
|
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "dial";
|
||||||
|
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||||
|
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = true;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case IPT_TRACKBALL_X:
|
||||||
|
case IPT_TRACKBALL_Y:
|
||||||
|
ctrl_analog = true;
|
||||||
|
ctrl_type = CTRL_ANALOG_TRACKBALL;
|
||||||
|
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "trackball";
|
||||||
|
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||||
|
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = true;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case IPT_MOUSE_X:
|
||||||
|
case IPT_MOUSE_Y:
|
||||||
|
ctrl_analog = true;
|
||||||
|
ctrl_type = CTRL_ANALOG_MOUSE;
|
||||||
|
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "mouse";
|
||||||
|
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||||
|
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = true;
|
||||||
|
break;
|
||||||
|
|
||||||
|
// map buttons
|
||||||
|
case IPT_BUTTON1:
|
||||||
|
case IPT_BUTTON2:
|
||||||
|
case IPT_BUTTON3:
|
||||||
|
case IPT_BUTTON4:
|
||||||
|
case IPT_BUTTON5:
|
||||||
|
case IPT_BUTTON6:
|
||||||
|
case IPT_BUTTON7:
|
||||||
|
case IPT_BUTTON8:
|
||||||
|
case IPT_BUTTON9:
|
||||||
|
case IPT_BUTTON10:
|
||||||
|
case IPT_BUTTON11:
|
||||||
|
case IPT_BUTTON12:
|
||||||
|
case IPT_BUTTON13:
|
||||||
|
case IPT_BUTTON14:
|
||||||
|
case IPT_BUTTON15:
|
||||||
|
case IPT_BUTTON16:
|
||||||
|
ctrl_analog = false;
|
||||||
|
if (control_info[field.player() * CTRL_COUNT + ctrl_type].type == nullptr)
|
||||||
|
{
|
||||||
|
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "only_buttons";
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = true;
|
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = false;
|
||||||
break;
|
}
|
||||||
|
control_info[field.player() * CTRL_COUNT + ctrl_type].maxbuttons = std::max(control_info[field.player() * CTRL_COUNT + ctrl_type].maxbuttons, field.type() - IPT_BUTTON1 + 1);
|
||||||
|
control_info[field.player() * CTRL_COUNT + ctrl_type].nbuttons++;
|
||||||
|
if (!field.optional())
|
||||||
|
control_info[field.player() * CTRL_COUNT + ctrl_type].reqbuttons++;
|
||||||
|
break;
|
||||||
|
|
||||||
case IPT_PADDLE:
|
// track maximum coin index
|
||||||
case IPT_PADDLE_V:
|
case IPT_COIN1:
|
||||||
ctrl_analog = true;
|
case IPT_COIN2:
|
||||||
ctrl_type = CTRL_ANALOG_PADDLE;
|
case IPT_COIN3:
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "paddle";
|
case IPT_COIN4:
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
case IPT_COIN5:
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = true;
|
case IPT_COIN6:
|
||||||
break;
|
case IPT_COIN7:
|
||||||
|
case IPT_COIN8:
|
||||||
|
case IPT_COIN9:
|
||||||
|
case IPT_COIN10:
|
||||||
|
case IPT_COIN11:
|
||||||
|
case IPT_COIN12:
|
||||||
|
ncoin = std::max(ncoin, field.type() - IPT_COIN1 + 1);
|
||||||
|
break;
|
||||||
|
|
||||||
case IPT_PEDAL:
|
// track presence of keypads and keyboards
|
||||||
case IPT_PEDAL2:
|
case IPT_KEYPAD:
|
||||||
case IPT_PEDAL3:
|
ctrl_type = CTRL_DIGITAL_KEYPAD;
|
||||||
ctrl_analog = true;
|
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "keypad";
|
||||||
ctrl_type = CTRL_ANALOG_PEDAL;
|
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "pedal";
|
control_info[field.player() * CTRL_COUNT + ctrl_type].nbuttons++;
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
if (!field.optional())
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = true;
|
control_info[field.player() * CTRL_COUNT + ctrl_type].reqbuttons++;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IPT_LIGHTGUN_X:
|
case IPT_KEYBOARD:
|
||||||
case IPT_LIGHTGUN_Y:
|
ctrl_type = CTRL_DIGITAL_KEYBOARD;
|
||||||
ctrl_analog = true;
|
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "keyboard";
|
||||||
ctrl_type = CTRL_ANALOG_LIGHTGUN;
|
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "lightgun";
|
control_info[field.player() * CTRL_COUNT + ctrl_type].nbuttons++;
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
if (!field.optional())
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = true;
|
control_info[field.player() * CTRL_COUNT + ctrl_type].reqbuttons++;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IPT_POSITIONAL:
|
// additional types
|
||||||
case IPT_POSITIONAL_V:
|
case IPT_SERVICE:
|
||||||
ctrl_analog = true;
|
service = true;
|
||||||
ctrl_type = CTRL_ANALOG_POSITIONAL;
|
break;
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "positional";
|
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = true;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case IPT_DIAL:
|
case IPT_TILT:
|
||||||
case IPT_DIAL_V:
|
tilt = true;
|
||||||
ctrl_analog = true;
|
break;
|
||||||
ctrl_type = CTRL_ANALOG_DIAL;
|
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "dial";
|
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = true;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case IPT_TRACKBALL_X:
|
default:
|
||||||
case IPT_TRACKBALL_Y:
|
if (field.type() > IPT_MAHJONG_FIRST && field.type() < IPT_MAHJONG_LAST)
|
||||||
ctrl_analog = true;
|
{
|
||||||
ctrl_type = CTRL_ANALOG_TRACKBALL;
|
ctrl_type = CTRL_DIGITAL_MAHJONG;
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "trackball";
|
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "mahjong";
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = true;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case IPT_MOUSE_X:
|
|
||||||
case IPT_MOUSE_Y:
|
|
||||||
ctrl_analog = true;
|
|
||||||
ctrl_type = CTRL_ANALOG_MOUSE;
|
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "mouse";
|
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = true;
|
|
||||||
break;
|
|
||||||
|
|
||||||
// map buttons
|
|
||||||
case IPT_BUTTON1:
|
|
||||||
case IPT_BUTTON2:
|
|
||||||
case IPT_BUTTON3:
|
|
||||||
case IPT_BUTTON4:
|
|
||||||
case IPT_BUTTON5:
|
|
||||||
case IPT_BUTTON6:
|
|
||||||
case IPT_BUTTON7:
|
|
||||||
case IPT_BUTTON8:
|
|
||||||
case IPT_BUTTON9:
|
|
||||||
case IPT_BUTTON10:
|
|
||||||
case IPT_BUTTON11:
|
|
||||||
case IPT_BUTTON12:
|
|
||||||
case IPT_BUTTON13:
|
|
||||||
case IPT_BUTTON14:
|
|
||||||
case IPT_BUTTON15:
|
|
||||||
case IPT_BUTTON16:
|
|
||||||
ctrl_analog = false;
|
|
||||||
if (control_info[field.player() * CTRL_COUNT + ctrl_type].type == nullptr)
|
|
||||||
{
|
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "only_buttons";
|
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].analog = false;
|
|
||||||
}
|
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].maxbuttons = std::max(control_info[field.player() * CTRL_COUNT + ctrl_type].maxbuttons, field.type() - IPT_BUTTON1 + 1);
|
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].nbuttons++;
|
|
||||||
if (!field.optional())
|
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].reqbuttons++;
|
|
||||||
break;
|
|
||||||
|
|
||||||
// track maximum coin index
|
|
||||||
case IPT_COIN1:
|
|
||||||
case IPT_COIN2:
|
|
||||||
case IPT_COIN3:
|
|
||||||
case IPT_COIN4:
|
|
||||||
case IPT_COIN5:
|
|
||||||
case IPT_COIN6:
|
|
||||||
case IPT_COIN7:
|
|
||||||
case IPT_COIN8:
|
|
||||||
case IPT_COIN9:
|
|
||||||
case IPT_COIN10:
|
|
||||||
case IPT_COIN11:
|
|
||||||
case IPT_COIN12:
|
|
||||||
ncoin = std::max(ncoin, field.type() - IPT_COIN1 + 1);
|
|
||||||
break;
|
|
||||||
|
|
||||||
// track presence of keypads and keyboards
|
|
||||||
case IPT_KEYPAD:
|
|
||||||
ctrl_type = CTRL_DIGITAL_KEYPAD;
|
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "keypad";
|
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].nbuttons++;
|
control_info[field.player() * CTRL_COUNT + ctrl_type].nbuttons++;
|
||||||
if (!field.optional())
|
if (!field.optional())
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].reqbuttons++;
|
control_info[field.player() * CTRL_COUNT + ctrl_type].reqbuttons++;
|
||||||
break;
|
}
|
||||||
|
else if (field.type() > IPT_HANAFUDA_FIRST && field.type() < IPT_HANAFUDA_LAST)
|
||||||
case IPT_KEYBOARD:
|
{
|
||||||
ctrl_type = CTRL_DIGITAL_KEYBOARD;
|
ctrl_type = CTRL_DIGITAL_HANAFUDA;
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "keyboard";
|
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "hanafuda";
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].nbuttons++;
|
control_info[field.player() * CTRL_COUNT + ctrl_type].nbuttons++;
|
||||||
if (!field.optional())
|
if (!field.optional())
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].reqbuttons++;
|
control_info[field.player() * CTRL_COUNT + ctrl_type].reqbuttons++;
|
||||||
break;
|
}
|
||||||
|
else if (field.type() > IPT_GAMBLING_FIRST && field.type() < IPT_GAMBLING_LAST)
|
||||||
// additional types
|
{
|
||||||
case IPT_SERVICE:
|
ctrl_type = CTRL_DIGITAL_GAMBLING;
|
||||||
service = true;
|
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "gambling";
|
||||||
break;
|
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
||||||
|
control_info[field.player() * CTRL_COUNT + ctrl_type].nbuttons++;
|
||||||
case IPT_TILT:
|
if (!field.optional())
|
||||||
tilt = true;
|
control_info[field.player() * CTRL_COUNT + ctrl_type].reqbuttons++;
|
||||||
break;
|
}
|
||||||
|
break;
|
||||||
default:
|
|
||||||
if (field.type() > IPT_MAHJONG_FIRST && field.type() < IPT_MAHJONG_LAST)
|
|
||||||
{
|
|
||||||
ctrl_type = CTRL_DIGITAL_MAHJONG;
|
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "mahjong";
|
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].nbuttons++;
|
|
||||||
if (!field.optional())
|
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].reqbuttons++;
|
|
||||||
}
|
|
||||||
else if (field.type() > IPT_HANAFUDA_FIRST && field.type() < IPT_HANAFUDA_LAST)
|
|
||||||
{
|
|
||||||
ctrl_type = CTRL_DIGITAL_HANAFUDA;
|
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "hanafuda";
|
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].nbuttons++;
|
|
||||||
if (!field.optional())
|
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].reqbuttons++;
|
|
||||||
}
|
|
||||||
else if (field.type() > IPT_GAMBLING_FIRST && field.type() < IPT_GAMBLING_LAST)
|
|
||||||
{
|
|
||||||
ctrl_type = CTRL_DIGITAL_GAMBLING;
|
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].type = "gambling";
|
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].player = field.player() + 1;
|
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].nbuttons++;
|
|
||||||
if (!field.optional())
|
|
||||||
control_info[field.player() * CTRL_COUNT + ctrl_type].reqbuttons++;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ctrl_analog)
|
if (ctrl_analog)
|
||||||
@ -1413,10 +1427,7 @@ void info_xml_creator::output_input(const ioport_list &portlist)
|
|||||||
fprintf(m_output, " reqbuttons=\"%d\"", elem.reqbuttons);
|
fprintf(m_output, " reqbuttons=\"%d\"", elem.reqbuttons);
|
||||||
}
|
}
|
||||||
if (elem.min != 0 || elem.max != 0)
|
if (elem.min != 0 || elem.max != 0)
|
||||||
{
|
fprintf(m_output, " minimum=\"%d\" maximum=\"%d\"", elem.min, elem.max);
|
||||||
fprintf(m_output, " minimum=\"%d\"", elem.min);
|
|
||||||
fprintf(m_output, " maximum=\"%d\"", elem.max);
|
|
||||||
}
|
|
||||||
if (elem.sensitivity != 0)
|
if (elem.sensitivity != 0)
|
||||||
fprintf(m_output, " sensitivity=\"%d\"", elem.sensitivity);
|
fprintf(m_output, " sensitivity=\"%d\"", elem.sensitivity);
|
||||||
if (elem.keydelta != 0)
|
if (elem.keydelta != 0)
|
||||||
@ -1496,33 +1507,45 @@ void info_xml_creator::output_switches(const ioport_list &portlist, const char *
|
|||||||
for (ioport_field const &field : port.second->fields())
|
for (ioport_field const &field : port.second->fields())
|
||||||
if (field.type() == type)
|
if (field.type() == type)
|
||||||
{
|
{
|
||||||
std::ostringstream output;
|
|
||||||
|
|
||||||
std::string newtag(port.second->tag()), oldtag(":");
|
std::string newtag(port.second->tag()), oldtag(":");
|
||||||
newtag = newtag.substr(newtag.find(oldtag.append(root_tag)) + oldtag.length());
|
newtag = newtag.substr(newtag.find(oldtag.append(root_tag)) + oldtag.length());
|
||||||
|
|
||||||
// output the switch name information
|
// output the switch name information
|
||||||
std::string const normalized_field_name(util::xml::normalize_string(field.name()));
|
std::string const normalized_field_name(util::xml::normalize_string(field.name()));
|
||||||
std::string const normalized_newtag(util::xml::normalize_string(newtag.c_str()));
|
std::string const normalized_newtag(util::xml::normalize_string(newtag.c_str()));
|
||||||
util::stream_format(output, "\t\t<%s name=\"%s\" tag=\"%s\" mask=\"%u\">\n", outertag, normalized_field_name.c_str(), normalized_newtag.c_str(), field.mask());
|
fprintf(m_output, "\t\t<%s name=\"%s\" tag=\"%s\" mask=\"%u\">\n", outertag, normalized_field_name.c_str(), normalized_newtag.c_str(), field.mask());
|
||||||
|
if (!field.condition().none())
|
||||||
|
output_ioport_condition(field.condition(), 3);
|
||||||
|
|
||||||
// loop over locations
|
// loop over locations
|
||||||
for (ioport_diplocation const &diploc : field.diplocations())
|
for (ioport_diplocation const &diploc : field.diplocations())
|
||||||
{
|
{
|
||||||
util::stream_format(output, "\t\t\t<%s name=\"%s\" number=\"%u\"", loctag, util::xml::normalize_string(diploc.name()), diploc.number());
|
fprintf(m_output, "\t\t\t<%s name=\"%s\" number=\"%u\"", loctag, util::xml::normalize_string(diploc.name()), diploc.number());
|
||||||
if (diploc.inverted())
|
if (diploc.inverted())
|
||||||
output << " inverted=\"yes\"";
|
fprintf(m_output, " inverted=\"yes\"");
|
||||||
output << "/>\n";
|
fprintf(m_output, "/>\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
// loop over settings
|
// loop over settings
|
||||||
for (ioport_setting const &setting : field.settings())
|
for (ioport_setting const &setting : field.settings())
|
||||||
util::stream_format(output,"\t\t\t<%s name=\"%s\" value=\"%u\"%s/>\n", innertag, util::xml::normalize_string(setting.name()), setting.value(), setting.value() == field.defvalue() ? " default=\"yes\"" : "");
|
{
|
||||||
|
fprintf(m_output, "\t\t\t<%s name=\"%s\" value=\"%u\"", innertag, util::xml::normalize_string(setting.name()), setting.value());
|
||||||
|
if (setting.value() == field.defvalue())
|
||||||
|
fprintf(m_output, " default=\"yes\"");
|
||||||
|
if (setting.condition().none())
|
||||||
|
{
|
||||||
|
fprintf(m_output, "/>\n");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fprintf(m_output, ">\n");
|
||||||
|
output_ioport_condition(setting.condition(), 4);
|
||||||
|
fprintf(m_output, "\t\t\t</%s>\n", innertag);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// terminate the switch entry
|
// terminate the switch entry
|
||||||
util::stream_format(output,"\t\t</%s>\n", outertag);
|
fprintf(m_output, "\t\t</%s>\n", outertag);
|
||||||
|
|
||||||
fprintf(m_output, "%s", output.str().c_str());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1536,12 +1559,11 @@ void info_xml_creator::output_ports(const ioport_list &portlist)
|
|||||||
for (auto &port : portlist)
|
for (auto &port : portlist)
|
||||||
{
|
{
|
||||||
fprintf(m_output,"\t\t<port tag=\"%s\">\n", util::xml::normalize_string(port.second->tag()));
|
fprintf(m_output,"\t\t<port tag=\"%s\">\n", util::xml::normalize_string(port.second->tag()));
|
||||||
for (ioport_field &field : port.second->fields())
|
for (ioport_field const &field : port.second->fields())
|
||||||
{
|
{
|
||||||
if(field.is_analog())
|
if (field.is_analog())
|
||||||
fprintf(m_output,"\t\t\t<analog mask=\"%u\"/>\n", field.mask());
|
fprintf(m_output,"\t\t\t<analog mask=\"%u\"/>\n", field.mask());
|
||||||
}
|
}
|
||||||
// close element
|
|
||||||
fprintf(m_output,"\t\t</port>\n");
|
fprintf(m_output,"\t\t</port>\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1556,9 +1578,11 @@ void info_xml_creator::output_adjusters(const ioport_list &portlist)
|
|||||||
{
|
{
|
||||||
// iterate looking for Adjusters
|
// iterate looking for Adjusters
|
||||||
for (auto &port : portlist)
|
for (auto &port : portlist)
|
||||||
for (ioport_field &field : port.second->fields())
|
for (ioport_field const &field : port.second->fields())
|
||||||
if (field.type() == IPT_ADJUSTER)
|
if (field.type() == IPT_ADJUSTER)
|
||||||
|
{
|
||||||
fprintf(m_output, "\t\t<adjuster name=\"%s\" default=\"%d\"/>\n", util::xml::normalize_string(field.name()), field.defvalue());
|
fprintf(m_output, "\t\t<adjuster name=\"%s\" default=\"%d\"/>\n", util::xml::normalize_string(field.name()), field.defvalue());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1707,9 +1731,7 @@ void info_xml_creator::output_images(device_t &device, const char *root_tag)
|
|||||||
char *ext = strtok((char *)extensions.c_str(), ",");
|
char *ext = strtok((char *)extensions.c_str(), ",");
|
||||||
while (ext != nullptr)
|
while (ext != nullptr)
|
||||||
{
|
{
|
||||||
fprintf(m_output, "\t\t\t<extension");
|
fprintf(m_output, "\t\t\t<extension name=\"%s\"/>\n", util::xml::normalize_string(ext));
|
||||||
fprintf(m_output, " name=\"%s\"", util::xml::normalize_string(ext));
|
|
||||||
fprintf(m_output, "/>\n");
|
|
||||||
ext = strtok(nullptr, ",");
|
ext = strtok(nullptr, ",");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1720,7 +1742,7 @@ void info_xml_creator::output_images(device_t &device, const char *root_tag)
|
|||||||
|
|
||||||
|
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
// output_images - prints all info about slots
|
// output_slots - prints all info about slots
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
|
||||||
void info_xml_creator::output_slots(machine_config &config, device_t &device, const char *root_tag, device_type_set *devtypes)
|
void info_xml_creator::output_slots(machine_config &config, device_t &device, const char *root_tag, device_type_set *devtypes)
|
||||||
@ -1739,11 +1761,6 @@ void info_xml_creator::output_slots(machine_config &config, device_t &device, co
|
|||||||
if (listed)
|
if (listed)
|
||||||
fprintf(m_output, "\t\t<slot name=\"%s\">\n", util::xml::normalize_string(newtag.c_str()));
|
fprintf(m_output, "\t\t<slot name=\"%s\">\n", util::xml::normalize_string(newtag.c_str()));
|
||||||
|
|
||||||
/*
|
|
||||||
if (listed && slot.slot_interface()[0])
|
|
||||||
fprintf(m_output, " interface=\"%s\"", util::xml::normalize_string(slot.slot_interface()));
|
|
||||||
*/
|
|
||||||
|
|
||||||
for (auto &option : slot.option_list())
|
for (auto &option : slot.option_list())
|
||||||
{
|
{
|
||||||
if (devtypes || (listed && option.second->selectable()))
|
if (devtypes || (listed && option.second->selectable()))
|
||||||
@ -1757,8 +1774,7 @@ void info_xml_creator::output_slots(machine_config &config, device_t &device, co
|
|||||||
|
|
||||||
if (listed && option.second->selectable())
|
if (listed && option.second->selectable())
|
||||||
{
|
{
|
||||||
fprintf(m_output, "\t\t\t<slotoption");
|
fprintf(m_output, "\t\t\t<slotoption name=\"%s\"", util::xml::normalize_string(option.second->name()));
|
||||||
fprintf(m_output, " name=\"%s\"", util::xml::normalize_string(option.second->name()));
|
|
||||||
fprintf(m_output, " devname=\"%s\"", util::xml::normalize_string(dev->shortname()));
|
fprintf(m_output, " devname=\"%s\"", util::xml::normalize_string(dev->shortname()));
|
||||||
if (slot.default_option() != nullptr && strcmp(slot.default_option(), option.second->name())==0)
|
if (slot.default_option() != nullptr && strcmp(slot.default_option(), option.second->name())==0)
|
||||||
fprintf(m_output, " default=\"yes\"");
|
fprintf(m_output, " default=\"yes\"");
|
||||||
@ -1785,10 +1801,9 @@ void info_xml_creator::output_software_list(device_t &root)
|
|||||||
{
|
{
|
||||||
for (const software_list_device &swlist : software_list_device_iterator(root))
|
for (const software_list_device &swlist : software_list_device_iterator(root))
|
||||||
{
|
{
|
||||||
fprintf(m_output, "\t\t<softwarelist name=\"%s\" ", swlist.list_name().c_str());
|
fprintf(m_output, "\t\t<softwarelist name=\"%s\" status=\"%s\"", util::xml::normalize_string(swlist.list_name().c_str()), (swlist.list_type() == SOFTWARE_LIST_ORIGINAL_SYSTEM) ? "original" : "compatible");
|
||||||
fprintf(m_output, "status=\"%s\" ", (swlist.list_type() == SOFTWARE_LIST_ORIGINAL_SYSTEM) ? "original" : "compatible");
|
|
||||||
if (swlist.filter())
|
if (swlist.filter())
|
||||||
fprintf(m_output, "filter=\"%s\" ", swlist.filter());
|
fprintf(m_output, " filter=\"%s\"", util::xml::normalize_string(swlist.filter()));
|
||||||
fprintf(m_output, "/>\n");
|
fprintf(m_output, "/>\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -54,6 +54,7 @@ private:
|
|||||||
void output_chips(device_t &device, const char *root_tag);
|
void output_chips(device_t &device, const char *root_tag);
|
||||||
void output_display(device_t &device, machine_flags::type const *flags, const char *root_tag);
|
void output_display(device_t &device, machine_flags::type const *flags, const char *root_tag);
|
||||||
void output_sound(device_t &device);
|
void output_sound(device_t &device);
|
||||||
|
void output_ioport_condition(const ioport_condition &condition, unsigned indent);
|
||||||
void output_input(const ioport_list &portlist);
|
void output_input(const ioport_list &portlist);
|
||||||
void output_switches(const ioport_list &portlist, const char *root_tag, int type, const char *outertag, const char *loctag, const char *innertag);
|
void output_switches(const ioport_list &portlist, const char *root_tag, int type, const char *outertag, const char *loctag, const char *innertag);
|
||||||
void output_ports(const ioport_list &portlist);
|
void output_ports(const ioport_list &portlist);
|
||||||
@ -78,5 +79,4 @@ private:
|
|||||||
bool m_dtd;
|
bool m_dtd;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif // MAME_FRONTEND_MAME_INFO_H
|
||||||
#endif // MAME_FRONTEND_MAME_INFO_H
|
|
||||||
|
@ -358,23 +358,28 @@ ROM_START( osborne1 )
|
|||||||
ROM_REGION( 0x1000, "maincpu", 0 )
|
ROM_REGION( 0x1000, "maincpu", 0 )
|
||||||
ROM_DEFAULT_BIOS("ver144")
|
ROM_DEFAULT_BIOS("ver144")
|
||||||
ROM_SYSTEM_BIOS( 0, "vera", "BIOS version A" )
|
ROM_SYSTEM_BIOS( 0, "vera", "BIOS version A" )
|
||||||
ROMX_LOAD( "osba.bin", 0x0000, 0x1000, NO_DUMP, ROM_BIOS(1) )
|
|
||||||
ROM_SYSTEM_BIOS( 1, "ver12", "BIOS version 1.2" )
|
ROM_SYSTEM_BIOS( 1, "ver12", "BIOS version 1.2" )
|
||||||
ROMX_LOAD( "osb12.bin", 0x0000, 0x1000, NO_DUMP, ROM_BIOS(2) )
|
|
||||||
ROM_SYSTEM_BIOS( 2, "ver121", "BIOS version 1.2.1" )
|
ROM_SYSTEM_BIOS( 2, "ver121", "BIOS version 1.2.1" )
|
||||||
ROMX_LOAD( "osb121.bin", 0x0000, 0x1000, NO_DUMP, ROM_BIOS(3) )
|
|
||||||
ROM_SYSTEM_BIOS( 3, "ver13", "BIOS version 1.3" )
|
ROM_SYSTEM_BIOS( 3, "ver13", "BIOS version 1.3" )
|
||||||
ROMX_LOAD( "osb13.bin", 0x0000, 0x1000, NO_DUMP, ROM_BIOS(4) )
|
|
||||||
ROM_SYSTEM_BIOS( 4, "ver14", "BIOS version 1.4" )
|
ROM_SYSTEM_BIOS( 4, "ver14", "BIOS version 1.4" )
|
||||||
ROMX_LOAD( "rev1.40.ud11", 0x0000, 0x1000, CRC(3d966335) SHA1(0c60b97a3154a75868efc6370d26995eadc7d927), ROM_BIOS(5) )
|
|
||||||
ROM_SYSTEM_BIOS( 5, "ver143", "BIOS version 1.43" )
|
ROM_SYSTEM_BIOS( 5, "ver143", "BIOS version 1.43" )
|
||||||
ROMX_LOAD( "rev1.43.ud11", 0x0000, 0x1000, CRC(91a48e3c) SHA1(c37b83f278d21e6e92d80f9c057b11f7f22d88d4), ROM_BIOS(6) )
|
|
||||||
ROM_SYSTEM_BIOS( 6, "ver144", "BIOS version 1.44" )
|
ROM_SYSTEM_BIOS( 6, "ver144", "BIOS version 1.44" )
|
||||||
|
ROMX_LOAD( "osba.bin", 0x0000, 0x1000, NO_DUMP, ROM_BIOS(1) )
|
||||||
|
ROMX_LOAD( "osb12.bin", 0x0000, 0x1000, NO_DUMP, ROM_BIOS(2) )
|
||||||
|
ROMX_LOAD( "osb121.bin", 0x0000, 0x1000, NO_DUMP, ROM_BIOS(3) )
|
||||||
|
ROMX_LOAD( "osb13.bin", 0x0000, 0x1000, NO_DUMP, ROM_BIOS(4) )
|
||||||
|
ROMX_LOAD( "rev1.40.ud11", 0x0000, 0x1000, CRC(3d966335) SHA1(0c60b97a3154a75868efc6370d26995eadc7d927), ROM_BIOS(5) )
|
||||||
|
ROMX_LOAD( "rev1.43.ud11", 0x0000, 0x1000, CRC(91a48e3c) SHA1(c37b83f278d21e6e92d80f9c057b11f7f22d88d4), ROM_BIOS(6) )
|
||||||
ROMX_LOAD( "3a10082-00rev-e.ud11", 0x0000, 0x1000, CRC(c0596b14) SHA1(ee6a9cc9be3ddc5949d3379351c1d58a175ce9ac), ROM_BIOS(7) )
|
ROMX_LOAD( "3a10082-00rev-e.ud11", 0x0000, 0x1000, CRC(c0596b14) SHA1(ee6a9cc9be3ddc5949d3379351c1d58a175ce9ac), ROM_BIOS(7) )
|
||||||
|
|
||||||
ROM_REGION( 0x800, "chargen", 0 )
|
ROM_REGION( 0x800, "chargen", 0 )
|
||||||
ROM_LOAD( "7a3007-00.ud15", 0x0000, 0x800, CRC(6c1eab0d) SHA1(b04459d377a70abc9155a5486003cb795342c801) )
|
ROMX_LOAD( "char.ua15", 0x0000, 0x800, CRC(5297C109) SHA1(e1a59d87edd66e6c226102cb0688e9cb74dbb594), ROM_BIOS(1) ) // this is CHRROM from v1.4 BIOS MB
|
||||||
//ROM_LOAD( "char.ua15", 0x0000, 0x800, CRC(5297C109) SHA1(e1a59d87edd66e6c226102cb0688e9cb74dbb594) ) // this is CHRROM from v1.4 BIOS MB. I don't know how to hook up diff CHR to ROM_BIOS(6)
|
ROMX_LOAD( "char.ua15", 0x0000, 0x800, CRC(5297C109) SHA1(e1a59d87edd66e6c226102cb0688e9cb74dbb594), ROM_BIOS(2) )
|
||||||
|
ROMX_LOAD( "char.ua15", 0x0000, 0x800, CRC(5297C109) SHA1(e1a59d87edd66e6c226102cb0688e9cb74dbb594), ROM_BIOS(3) )
|
||||||
|
ROMX_LOAD( "char.ua15", 0x0000, 0x800, CRC(5297C109) SHA1(e1a59d87edd66e6c226102cb0688e9cb74dbb594), ROM_BIOS(4) )
|
||||||
|
ROMX_LOAD( "char.ua15", 0x0000, 0x800, CRC(5297C109) SHA1(e1a59d87edd66e6c226102cb0688e9cb74dbb594), ROM_BIOS(5) )
|
||||||
|
ROMX_LOAD( "7a3007-00.ud15", 0x0000, 0x800, CRC(6c1eab0d) SHA1(b04459d377a70abc9155a5486003cb795342c801), ROM_BIOS(6) )
|
||||||
|
ROMX_LOAD( "7a3007-00.ud15", 0x0000, 0x800, CRC(6c1eab0d) SHA1(b04459d377a70abc9155a5486003cb795342c801), ROM_BIOS(7) )
|
||||||
ROM_END
|
ROM_END
|
||||||
|
|
||||||
ROM_START( osborne1nv )
|
ROM_START( osborne1nv )
|
||||||
|
Loading…
Reference in New Issue
Block a user