src/emu/info.c
| r4898 | r4899 | |
| 65 | 65 | } |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | /*------------------------------------------------- |
| 69 | print_game_configs - print the Configuration |
| 70 | settings for a game |
| 71 | -------------------------------------------------*/ |
| 68 | 72 | |
| 73 | static void print_game_configs(FILE *out, const game_driver *game, const input_port_config *portlist) |
| 74 | { |
| 75 | const input_port_config *port; |
| 76 | const input_field_config *field; |
| 77 | |
| 78 | /* iterate looking for configurations */ |
| 79 | for (port = portlist; port != NULL; port = port->next) |
| 80 | for (field = port->fieldlist; field != NULL; field = field->next) |
| 81 | if (field->type == IPT_CONFIG) |
| 82 | { |
| 83 | const input_setting_config *setting; |
| 84 | |
| 85 | /* output the configuration name information */ |
| 86 | fprintf(out, "\t\t<configuration name=\"%s\">\n", xml_normalize_string(input_field_name(field))); |
| 87 | |
| 88 | /* loop over settings */ |
| 89 | for (setting = field->settinglist; setting != NULL; setting = setting->next) |
| 90 | { |
| 91 | fprintf(out, "\t\t\t<confsetting name=\"%s\"", xml_normalize_string(setting->name)); |
| 92 | if (setting->value == field->defvalue) |
| 93 | fprintf(out, " default=\"yes\""); |
| 94 | fprintf(out, "/>\n"); |
| 95 | } |
| 96 | |
| 97 | /* terminate the configuration entry */ |
| 98 | fprintf(out, "\t\t</configuration>\n"); |
| 99 | } |
| 100 | } |
| 101 | |
| 69 | 102 | /*------------------------------------------------- |
| 103 | print_game_adjusters - print the Analog |
| 104 | Adjusters for a game |
| 105 | -------------------------------------------------*/ |
| 106 | |
| 107 | static void print_game_adjusters(FILE *out, const game_driver *game, const input_port_config *portlist) |
| 108 | { |
| 109 | const input_port_config *port; |
| 110 | const input_field_config *field; |
| 111 | |
| 112 | /* iterate looking for Adjusters */ |
| 113 | for (port = portlist; port != NULL; port = port->next) |
| 114 | for (field = port->fieldlist; field != NULL; field = field->next) |
| 115 | if (field->type == IPT_ADJUSTER) |
| 116 | { |
| 117 | /* output the adjuster information */ |
| 118 | fprintf(out, "\t\t<adjuster name=\"%s\" default=\"%d\"/>\n", xml_normalize_string(input_field_name(field)), field->defvalue); |
| 119 | } |
| 120 | } |
| 121 | |
| 122 | /*------------------------------------------------- |
| 70 | 123 | print_game_input - print a summary of a game's |
| 71 | 124 | input |
| 72 | 125 | -------------------------------------------------*/ |
| r4898 | r4899 | |
| 835 | 888 | print_game_sound(out, game, config); |
| 836 | 889 | print_game_input(out, game, portconfig); |
| 837 | 890 | print_game_switches(out, game, portconfig); |
| 891 | print_game_configs(out, game, portconfig); |
| 892 | #ifdef MESS |
| 893 | print_game_categories(out, game, portconfig); |
| 894 | #endif /* MESS */ |
| 895 | print_game_adjusters(out, game, portconfig); |
| 838 | 896 | print_game_driver(out, game, config); |
| 839 | 897 | #ifdef MESS |
| 840 | 898 | print_game_device(out, game, config); |
| r4898 | r4899 | |
| 865 | 923 | "\t<!ATTLIST " XML_ROOT " build CDATA #IMPLIED>\n" |
| 866 | 924 | "\t<!ATTLIST " XML_ROOT " debug (yes|no) \"no\">\n" |
| 867 | 925 | #ifdef MESS |
| 868 | | "\t<!ELEMENT " XML_TOP " (description, year?, manufacturer, biosset*, rom*, disk*, sample*, chip*, display*, sound?, input?, dipswitch*, driver?, device*, ramoption*)>\n" |
| 926 | "\t<!ELEMENT " XML_TOP " (description, year?, manufacturer, biosset*, rom*, disk*, sample*, chip*, display*, sound?, input?, dipswitch*, configuration*, category*, adjuster*, driver?, device*, ramoption*)>\n" |
| 869 | 927 | #else |
| 870 | | "\t<!ELEMENT " XML_TOP " (description, year?, manufacturer, biosset*, rom*, disk*, sample*, chip*, display*, sound?, input?, dipswitch*, driver?)>\n" |
| 928 | "\t<!ELEMENT " XML_TOP " (description, year?, manufacturer, biosset*, rom*, disk*, sample*, chip*, display*, sound?, input?, dipswitch*, configuration*, adjuster*, driver?)>\n" |
| 871 | 929 | #endif |
| 872 | 930 | "\t\t<!ATTLIST " XML_TOP " name CDATA #REQUIRED>\n" |
| 873 | 931 | "\t\t<!ATTLIST " XML_TOP " sourcefile CDATA #IMPLIED>\n" |
| r4898 | r4899 | |
| 944 | 1002 | "\t\t\t<!ELEMENT dipvalue EMPTY>\n" |
| 945 | 1003 | "\t\t\t\t<!ATTLIST dipvalue name CDATA #REQUIRED>\n" |
| 946 | 1004 | "\t\t\t\t<!ATTLIST dipvalue default (yes|no) \"no\">\n" |
| 1005 | "\t\t<!ELEMENT configuration (confsetting*)>\n" |
| 1006 | "\t\t\t<!ATTLIST configuration name CDATA #REQUIRED>\n" |
| 1007 | "\t\t\t<!ELEMENT confsetting EMPTY>\n" |
| 1008 | "\t\t\t\t<!ATTLIST confsetting name CDATA #REQUIRED>\n" |
| 1009 | "\t\t\t\t<!ATTLIST confsetting default (yes|no) \"no\">\n" |
| 1010 | #ifdef MESS |
| 1011 | "\t\t<!ELEMENT category (item*)>\n" |
| 1012 | "\t\t\t<!ATTLIST category name CDATA #REQUIRED>\n" |
| 1013 | "\t\t\t<!ELEMENT item EMPTY>\n" |
| 1014 | "\t\t\t\t<!ATTLIST item name CDATA #REQUIRED>\n" |
| 1015 | "\t\t\t\t<!ATTLIST item default (yes|no) \"no\">\n" |
| 1016 | #endif |
| 1017 | "\t\t<!ELEMENT adjuster EMPTY>\n" |
| 1018 | "\t\t\t<!ATTLIST adjuster name CDATA #REQUIRED>\n" |
| 1019 | "\t\t\t<!ATTLIST adjuster default CDATA #REQUIRED>\n" |
| 947 | 1020 | "\t\t<!ELEMENT driver EMPTY>\n" |
| 948 | 1021 | "\t\t\t<!ATTLIST driver status (good|imperfect|preliminary) #REQUIRED>\n" |
| 949 | 1022 | "\t\t\t<!ATTLIST driver emulation (good|imperfect|preliminary) #REQUIRED>\n" |
src/mess/infomess.c
| r4898 | r4899 | |
| 21 | 21 | * |
| 22 | 22 | *************************************/ |
| 23 | 23 | |
| 24 | /*------------------------------------------------- |
| 25 | print_game_categories - print the Categories |
| 26 | settings for a system |
| 27 | -------------------------------------------------*/ |
| 24 | 28 | |
| 29 | void print_game_categories(FILE *out, const game_driver *game, const input_port_config *portlist) |
| 30 | { |
| 31 | const input_port_config *port; |
| 32 | const input_field_config *field; |
| 33 | |
| 34 | /* iterate looking for Categories */ |
| 35 | for (port = portlist; port != NULL; port = port->next) |
| 36 | for (field = port->fieldlist; field != NULL; field = field->next) |
| 37 | if (field->type == IPT_CATEGORY) |
| 38 | { |
| 39 | const input_setting_config *setting; |
| 40 | |
| 41 | /* output the category name information */ |
| 42 | fprintf(out, "\t\t<category name=\"%s\">\n", xml_normalize_string(input_field_name(field))); |
| 43 | |
| 44 | /* loop over item settings */ |
| 45 | for (setting = field->settinglist; setting != NULL; setting = setting->next) |
| 46 | { |
| 47 | fprintf(out, "\t\t\t<item name=\"%s\"", xml_normalize_string(setting->name)); |
| 48 | if (setting->value == field->defvalue) |
| 49 | fprintf(out, " default=\"yes\""); |
| 50 | fprintf(out, "/>\n"); |
| 51 | } |
| 52 | |
| 53 | /* terminate the category entry */ |
| 54 | fprintf(out, "\t\t</category>\n"); |
| 55 | } |
| 56 | } |
| 57 | |
| 25 | 58 | /*------------------------------------------------- |
| 26 | 59 | print_game_device - prints out all info on |
| 27 | 60 | MESS-specific devices |