Previous 15994 Revisions Next

r7697 Sunday 4th April, 2010 at 14:38:02 UTC by Wilbert Pol
Software list -listxml changes.
[src/emu]info.c
[src/mess]infomess.c infomess.h

src/emu/info.c
r7696r7697
927927   print_game_adjusters(out, game, portlist);
928928   print_game_driver(out, game, config);
929929#ifdef MESS
930   print_game_device(out, game, config);
931   print_game_ramoptions(out, game, config);
930   print_mess_game_xml(out, game, config);
932931#endif /* MESS */
933932
934933   /* close the topmost tag */
r7696r7697
955954      "\t<!ATTLIST " XML_ROOT " debug (yes|no) \"no\">\n"
956955      "\t<!ATTLIST " XML_ROOT " mameconfig CDATA #REQUIRED>\n"
957956#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"
959958#else
960959      "\t<!ELEMENT " XML_TOP " (description, year?, manufacturer, biosset*, rom*, disk*, sample*, chip*, display*, sound?, input?, dipswitch*, configuration*, category*, adjuster*, driver?)>\n"
961960#endif
r7696r7697
10761075      "\t\t\t\t<!ATTLIST extension name CDATA #REQUIRED>\n"
10771076      "\t\t<!ELEMENT ramoption (#PCDATA)>\n"
10781077      "\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"
10791080#endif
10801081      "]>\n\n"
10811082      "<" XML_ROOT " build=\"%s\" debug=\""
src/mess/infomess.c
r7696r7697
1616#include "infomess.h"
1717#include "device.h"
1818#include "devices/messram.h"
19#include "softlist.h"
1920
21
2022/*************************************
2123 *
2224 *  Code used by print_mame_xml()
r7696r7697
2830    MESS-specific devices
2931-------------------------------------------------*/
3032
31void print_game_device(FILE *out, const game_driver *game, const machine_config *config)
33static void print_game_device(FILE *out, const game_driver *game, const machine_config *config)
3234{
3335   const device_config *dev;
3436   image_device_info info;
r7696r7697
5355         if (info.must_be_loaded)
5456            fprintf(out, " mandatory=\"1\"");
5557
58         if (info.interface_name[0] )
59            fprintf(out, " interface=\"%s\"", xml_normalize_string(info.interface_name));
60
5661         /* close the XML tag */
5762         fprintf(out, ">\n");
5863
r7696r7697
8691    print_game_ramoptions - prints out all RAM
8792    options for this system
8893-------------------------------------------------*/
89void print_game_ramoptions(FILE *out, const game_driver *game, const machine_config *config)
94static void print_game_ramoptions(FILE *out, const game_driver *game, const machine_config *config)
9095{
9196   const device_config *device;
9297
r7696r7697
113118      }
114119   }
115120}
121
122
123/*-------------------------------------------------
124    print_game_software_list - print the information
125    for all known software lists for this system
126-------------------------------------------------*/
127
128static 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
153void 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
src/mess/infomess.h
r7696r7697
1010#define INFOMESS_H
1111
1212/* code used by print_mame_xml() */
13void print_game_device(FILE *out, const game_driver *game, const machine_config *config);
14void print_game_ramoptions(FILE *out, const game_driver *game, const machine_config *config);
13void print_mess_game_xml(FILE *out, const game_driver *game, const machine_config *config);
1514
1615#endif /* INFOMESS_H */

Previous 15994 Revisions Next


© 1998-2018 The MESS Team