src/emu/info.c
| r7696 | r7697 | |
| 927 | 927 | print_game_adjusters(out, game, portlist); |
| 928 | 928 | print_game_driver(out, game, config); |
| 929 | 929 | #ifdef MESS |
| 930 | | print_game_device(out, game, config); |
| 931 | | print_game_ramoptions(out, game, config); |
| 930 | print_mess_game_xml(out, game, config); |
| 932 | 931 | #endif /* MESS */ |
| 933 | 932 | |
| 934 | 933 | /* close the topmost tag */ |
| r7696 | r7697 | |
| 955 | 954 | "\t<!ATTLIST " XML_ROOT " debug (yes|no) \"no\">\n" |
| 956 | 955 | "\t<!ATTLIST " XML_ROOT " mameconfig CDATA #REQUIRED>\n" |
| 957 | 956 | #ifdef MESS |
| 958 | | "\t<!ELEMENT " XML_TOP " (description, year?, manufacturer, biosset*, rom*, disk*, sample*, chip*, display*, sound?, input?, dipswitch*, configuration*, category*, adjuster*, driver?, device*, ramoption*)>\n" |
| 957 | "\t<!ELEMENT " XML_TOP " (description, year?, manufacturer, biosset*, rom*, disk*, sample*, chip*, display*, sound?, input?, dipswitch*, configuration*, category*, adjuster*, driver?, device*, ramoption*, softwarelist*)>\n" |
| 959 | 958 | #else |
| 960 | 959 | "\t<!ELEMENT " XML_TOP " (description, year?, manufacturer, biosset*, rom*, disk*, sample*, chip*, display*, sound?, input?, dipswitch*, configuration*, category*, adjuster*, driver?)>\n" |
| 961 | 960 | #endif |
| r7696 | r7697 | |
| 1076 | 1075 | "\t\t\t\t<!ATTLIST extension name CDATA #REQUIRED>\n" |
| 1077 | 1076 | "\t\t<!ELEMENT ramoption (#PCDATA)>\n" |
| 1078 | 1077 | "\t\t\t<!ATTLIST ramoption default CDATA #IMPLIED>\n" |
| 1078 | "\t\t<!ELEMENT softwarelist EMPTY>\n" |
| 1079 | "\t\t\t<!ATTLIST softwarelist name CDATA #REQUIRED>\n" |
| 1079 | 1080 | #endif |
| 1080 | 1081 | "]>\n\n" |
| 1081 | 1082 | "<" XML_ROOT " build=\"%s\" debug=\"" |
src/mess/infomess.c
| r7696 | r7697 | |
| 16 | 16 | #include "infomess.h" |
| 17 | 17 | #include "device.h" |
| 18 | 18 | #include "devices/messram.h" |
| 19 | #include "softlist.h" |
| 19 | 20 | |
| 21 | |
| 20 | 22 | /************************************* |
| 21 | 23 | * |
| 22 | 24 | * Code used by print_mame_xml() |
| r7696 | r7697 | |
| 28 | 30 | MESS-specific devices |
| 29 | 31 | -------------------------------------------------*/ |
| 30 | 32 | |
| 31 | | void print_game_device(FILE *out, const game_driver *game, const machine_config *config) |
| 33 | static void print_game_device(FILE *out, const game_driver *game, const machine_config *config) |
| 32 | 34 | { |
| 33 | 35 | const device_config *dev; |
| 34 | 36 | image_device_info info; |
| r7696 | r7697 | |
| 53 | 55 | if (info.must_be_loaded) |
| 54 | 56 | fprintf(out, " mandatory=\"1\""); |
| 55 | 57 | |
| 58 | if (info.interface_name[0] ) |
| 59 | fprintf(out, " interface=\"%s\"", xml_normalize_string(info.interface_name)); |
| 60 | |
| 56 | 61 | /* close the XML tag */ |
| 57 | 62 | fprintf(out, ">\n"); |
| 58 | 63 | |
| r7696 | r7697 | |
| 86 | 91 | print_game_ramoptions - prints out all RAM |
| 87 | 92 | options for this system |
| 88 | 93 | -------------------------------------------------*/ |
| 89 | | void print_game_ramoptions(FILE *out, const game_driver *game, const machine_config *config) |
| 94 | static void print_game_ramoptions(FILE *out, const game_driver *game, const machine_config *config) |
| 90 | 95 | { |
| 91 | 96 | const device_config *device; |
| 92 | 97 | |
| r7696 | r7697 | |
| 113 | 118 | } |
| 114 | 119 | } |
| 115 | 120 | } |
| 121 | |
| 122 | |
| 123 | /*------------------------------------------------- |
| 124 | print_game_software_list - print the information |
| 125 | for all known software lists for this system |
| 126 | -------------------------------------------------*/ |
| 127 | |
| 128 | static void print_game_software_list(FILE *out, const game_driver *game, const machine_config *config) |
| 129 | { |
| 130 | for (const device_config *dev = config->devicelist.first(); dev != NULL; dev = dev->next) |
| 131 | { |
| 132 | if ( ! strcmp( dev->tag(), __SOFTWARE_LIST_TAG ) ) |
| 133 | { |
| 134 | software_list_config *swlist = (software_list_config *)dev->inline_config; |
| 135 | |
| 136 | for ( int i = 0; i < DEVINFO_STR_SWLIST_MAX - DEVINFO_STR_SWLIST_0; i++ ) |
| 137 | { |
| 138 | if ( swlist->list_name[i] ) |
| 139 | { |
| 140 | fprintf(out, "\t\t<softwarelist name=\"%s\" />\n", swlist->list_name[i] ); |
| 141 | } |
| 142 | } |
| 143 | } |
| 144 | } |
| 145 | } |
| 146 | |
| 147 | |
| 148 | /*------------------------------------------------- |
| 149 | print_mess_game_xml - print MESS specific game |
| 150 | information. |
| 151 | -------------------------------------------------*/ |
| 152 | |
| 153 | void print_mess_game_xml(FILE *out, const game_driver *game, const machine_config *config) |
| 154 | { |
| 155 | print_game_device( out, game, config ); |
| 156 | print_game_ramoptions( out, game, config ); |
| 157 | print_game_software_list( out, game, config ); |
| 158 | } |
| 159 | |