Previous 15994 Revisions Next

r8325 Sunday 27th June, 2010 at 09:46:21 UTC by Miodrag Milanović
Moved some MESS related files to one file.
[src/emu]clifront.c info.c
[src/mess]climess.c climess.h infomess.c infomess.h mess.c mess.h messcore.mak messopts.c messopts.h
[src/mess/osd/winui]optionsms.c propertiesms.c
[src/mess/tools/messtest]testmess.c
[src/osd/winui]properties.c winui.c

src/osd/winui/winui.c
r8324r8325
8181
8282#ifdef MESS
8383#include "messui.h"
84#include "messopts.h"
8584#endif // MESS
8685
8786#ifdef _MSC_VER
src/osd/winui/properties.c
r8324r8325
150150
151151#ifdef MESS
152152// done like this until I figure out a better idea
153#include "messopts.h"
154153#include "resourcems.h"
155154#include "propertiesms.h"
156155#endif
src/emu/clifront.c
r8324r8325
2424#include <new>
2525#include <ctype.h>
2626
27#ifdef MESS
28#include "climess.h"
29#endif /* MESS */
3027
3128
3229
src/emu/info.c
r8324r8325
1818
1919#include <ctype.h>
2020
21#ifdef MESS
22#include "infomess.h"
23#endif /* MESS */
24
2521/* MESS/MAME configuration */
2622#ifdef MESS
2723#define XML_ROOT "mess"
src/mess/climess.c
r8324r8325
1/***************************************************************************
2
3    climess.c
4
5    Command-line interface frontend for MESS.
6
7***************************************************************************/
8
9#include "emu.h"
10#include "climess.h"
11#include "output.h"
12#include "hash.h"
13
14
15/*-------------------------------------------------
16    mess_display_help - display MESS help to
17    standard output
18-------------------------------------------------*/
19
20void mess_display_help(void)
21{
22   mame_printf_info(
23      "MESS v%s\n"
24      "Multi Emulator Super System - Copyright (C) 1997-2009 by the MESS Team\n"
25      "MESS is based on MAME Source code\n"
26      "Copyright (C) 1997-2009 by Nicola Salmoria and the MAME Team\n\n",
27      build_version);
28   mame_printf_info("%s\n", mess_disclaimer);
29   mame_printf_info(
30      "Usage:  MESS <system> <device> <software> <options>\n"
31      "\n"
32      "        MESS -showusage    for a brief list of options\n"
33      "        MESS -showconfig   for a list of configuration options\n"
34      "        MESS -listdevices  for a full list of supported devices\n"
35      "        MESS -createconfig to create a mess.ini\n"
36      "\n"
37      "See config.txt and windows.txt for usage instructions.\n");
38}
39
src/mess/climess.h
r8324r8325
1/***************************************************************************
2
3    climess.h
4
5    Command-line interface frontend for MESS.
6
7***************************************************************************/
8
9#pragma once
10
11#ifndef __CLIMESS_H__
12#define __CLIMESS_H__
13
14
15/***************************************************************************
16    FUNCTION PROTOTYPES
17***************************************************************************/
18
19void mess_display_help(void);
20
21#endif   /* __CLIMESS_H__ */
src/mess/infomess.c
r8324r8325
1/***************************************************************************
2
3    infomess.c
4
5    MESS-specific augmentation to info.c
6
7***************************************************************************/
8
9#include <ctype.h>
10
11#include "emu.h"
12#include "sound/samples.h"
13#include "info.h"
14#include "hash.h"
15#include "xmlfile.h"
16#include "infomess.h"
17#include "devices/messram.h"
18
19
20/*************************************
21 *
22 *  Code used by print_mame_xml()
23 *
24 *************************************/
25
26/* device iteration helpers */
27#define ram_first(config)            (config)->devicelist.first(MESSRAM)
28#define ram_next(previous)            ((previous)->typenext())
29
30/*-------------------------------------------------
31    print_game_ramoptions - prints out all RAM
32    options for this system
33-------------------------------------------------*/
34static void print_game_ramoptions(FILE *out, const game_driver *game, const machine_config *config)
35{
36   const device_config *device;
37
38   for (device = ram_first(config); device != NULL; device = ram_next(device))
39   {
40      ram_config *ram = (ram_config *)downcast<const legacy_device_config_base *>(device)->inline_config();
41      fprintf(out, "\t\t<ramoption default=\"1\">%u</ramoption>\n",  messram_parse_string(ram->default_size));
42      if (ram->extra_options != NULL)
43      {
44         int j;
45         int size = strlen(ram->extra_options);
46         char * const s = mame_strdup(ram->extra_options);
47         char * const e = s + size;
48         char *p = s;
49         for (j=0;j<size;j++) {
50            if (p[j]==',') p[j]=0;
51         }
52         /* try to parse each option */
53         while(p <= e)
54         {
55            fprintf(out, "\t\t<ramoption>%u</ramoption>\n",  messram_parse_string(p));
56            p += strlen(p);
57            if (p == e)
58               break;
59            p += 1;
60         }
61
62         osd_free(s);
63      }
64   }
65}
66
67
68/*-------------------------------------------------
69    print_mess_game_xml - print MESS specific game
70    information.
71-------------------------------------------------*/
72
73void print_mess_game_xml(FILE *out, const game_driver *game, const machine_config *config)
74{
75   print_game_ramoptions( out, game, config );   
76}
77
src/mess/infomess.h
r8324r8325
1/***************************************************************************
2
3    infomess.h
4
5    MESS-specific augmentation to info.c
6
7***************************************************************************/
8
9#ifndef INFOMESS_H
10#define INFOMESS_H
11
12/* code used by print_mame_xml() */
13void print_mess_game_xml(FILE *out, const game_driver *game, const machine_config *config);
14
15#endif /* INFOMESS_H */
src/mess/messopts.c
r8324r8325
1/***************************************************************************
2
3    messopts.c - MESS specific option handling
4
5****************************************************************************/
6
7#include "emu.h"
8#include "emuopts.h"
9#include "options.h"
10
11/***************************************************************************
12    LOCAL VARIABLES
13***************************************************************************/
14
15const options_entry mess_core_options[] =
16{
17   { NULL,                     NULL,   OPTION_HEADER,                  "MESS SPECIFIC OPTIONS" },
18   { "ramsize;ram",            NULL,   0,                           "size of RAM (if supported by driver)" },
19   { "newui;nu",                   "0",    OPTION_BOOLEAN,                  "use the new MESS UI" },
20   { NULL }
21};
22
23
24
25/***************************************************************************
26    IMPLEMENTATION
27***************************************************************************/
28/*-------------------------------------------------
29    mess_options_init - called from core to add
30    MESS specific options
31-------------------------------------------------*/
32
33void mess_options_init(core_options *opts)
34{
35   /* add MESS-specific options */
36   options_add_entries(opts, mess_core_options);
37}
38
src/mess/messopts.h
r8324r8325
1/***************************************************************************
2
3    messopts.h - MESS specific option handling
4
5****************************************************************************/
6
7#ifndef __MESSOPTS_H__
8#define __MESSOPTS_H__
9
10#include "image.h"
11#include "options.h"
12
13/***************************************************************************
14    CONSTANTS
15***************************************************************************/
16
17#define OPTION_RAMSIZE         "ramsize"
18#define OPTION_WRITECONFIG      "writeconfig"
19
20
21
22/***************************************************************************
23    GLOBALS
24***************************************************************************/
25
26extern const options_entry mess_core_options[];
27
28
29/***************************************************************************
30    FUNCTION PROTOTYPES
31***************************************************************************/
32
33/* initialize MESS specific options (called from MAME core) */
34void mess_options_init(core_options *opts);
35#endif /* __MESSOPTS_H__ */
src/mess/osd/winui/optionsms.c
r8324r8325
1313#include "mui_opts.h"
1414#include "optionsms.h"
1515#include "emuopts.h"
16#include "messopts.h"
1716#include "winmain.h"
1817
1918#define WINGUIOPTION_SOFTWARE_COLUMN_SHOWN      "mess_column_shown"
src/mess/osd/winui/propertiesms.c
r8324r8325
2929#include "propertiesms.h"
3030#include "optionsms.h"
3131#include "msuiutil.h"
32#include "messopts.h"
3332#include "strconv.h"
3433#include "winutf8.h"
3534#include "devices/messram.h"
src/mess/messcore.mak
r8324r8325
7575
7676EMUOBJS += \
7777   $(MESSOBJ)/mess.o      \
78   $(MESSOBJ)/messopts.o   \
7978   $(MESSOBJ)/uimess.o      \
8079   $(MESSOBJ)/tapectrl.o   \
8180   $(MESSOBJ)/utils.o      \
8281   $(MESSOBJ)/eventlst.o   \
8382   $(MESSOBJ)/cheatms.o   \
84   $(MESSOBJ)/infomess.o   \
85   $(MESSOBJ)/climess.o   \
8683
8784$(LIBEMU): $(EMUOBJS)
src/mess/mess.c
r8324r8325
77***************************************************************************/
88
99#include "emu.h"
10#include "emuopts.h"
1011
1112#include "lcd.lh"
1213#include "lcd_rot.lh"
1314
15#include "devices/messram.h"
16
1417/* Globals */
1518const char mess_disclaimer[] =
1619      "MESS is an emulator: it reproduces, more or less faithfully, the behaviour of\n"
r8324r8325
2225      "files are not distributed together with MESS. Distribution of MESS together\n"
2326      "with these files is a violation of copyright law and should be promptly\n"
2427      "reported to the authors so that appropriate legal action can be taken.\n\n";
28
29/*-------------------------------------------------
30    mess_display_help - display MESS help to
31    standard output
32-------------------------------------------------*/
33
34void mess_display_help(void)
35{
36   mame_printf_info(
37      "MESS v%s\n"
38      "Multi Emulator Super System - Copyright (C) 1997-2009 by the MESS Team\n"
39      "MESS is based on MAME Source code\n"
40      "Copyright (C) 1997-2009 by Nicola Salmoria and the MAME Team\n\n",
41      build_version);
42   mame_printf_info("%s\n", mess_disclaimer);
43   mame_printf_info(
44      "Usage:  MESS <system> <device> <software> <options>\n"
45      "\n"
46      "        MESS -showusage    for a brief list of options\n"
47      "        MESS -showconfig   for a list of configuration options\n"
48      "        MESS -listdevices  for a full list of supported devices\n"
49      "        MESS -createconfig to create a mess.ini\n"
50      "\n"
51      "See config.txt and windows.txt for usage instructions.\n");
52}
53
54/*************************************
55 *
56 *  Code used by print_mame_xml()
57 *
58 *************************************/
59
60/* device iteration helpers */
61#define ram_first(config)            (config)->devicelist.first(MESSRAM)
62#define ram_next(previous)            ((previous)->typenext())
63
64/*-------------------------------------------------
65    print_game_ramoptions - prints out all RAM
66    options for this system
67-------------------------------------------------*/
68static void print_game_ramoptions(FILE *out, const game_driver *game, const machine_config *config)
69{
70   const device_config *device;
71
72   for (device = ram_first(config); device != NULL; device = ram_next(device))
73   {
74      ram_config *ram = (ram_config *)downcast<const legacy_device_config_base *>(device)->inline_config();
75      fprintf(out, "\t\t<ramoption default=\"1\">%u</ramoption>\n",  messram_parse_string(ram->default_size));
76      if (ram->extra_options != NULL)
77      {
78         int j;
79         int size = strlen(ram->extra_options);
80         char * const s = mame_strdup(ram->extra_options);
81         char * const e = s + size;
82         char *p = s;
83         for (j=0;j<size;j++) {
84            if (p[j]==',') p[j]=0;
85         }
86         /* try to parse each option */
87         while(p <= e)
88         {
89            fprintf(out, "\t\t<ramoption>%u</ramoption>\n",  messram_parse_string(p));
90            p += strlen(p);
91            if (p == e)
92               break;
93            p += 1;
94         }
95
96         osd_free(s);
97      }
98   }
99}
100
101
102/*-------------------------------------------------
103    print_mess_game_xml - print MESS specific game
104    information.
105-------------------------------------------------*/
106
107void print_mess_game_xml(FILE *out, const game_driver *game, const machine_config *config)
108{
109   print_game_ramoptions( out, game, config );   
110}
111
112/***************************************************************************
113    LOCAL VARIABLES
114***************************************************************************/
115
116const options_entry mess_core_options[] =
117{
118   { NULL,                     NULL,   OPTION_HEADER,                  "MESS SPECIFIC OPTIONS" },
119   { "ramsize;ram",            NULL,   0,                           "size of RAM (if supported by driver)" },
120   { "newui;nu",                   "0",    OPTION_BOOLEAN,                  "use the new MESS UI" },
121   { NULL }
122};
123
124/***************************************************************************
125    IMPLEMENTATION
126***************************************************************************/
127/*-------------------------------------------------
128    mess_options_init - called from core to add
129    MESS specific options
130-------------------------------------------------*/
131
132void mess_options_init(core_options *opts)
133{
134   /* add MESS-specific options */
135   options_add_entries(opts, mess_core_options);
136}
src/mess/mess.h
r8324r8325
99#ifndef __MESS_H__
1010#define __MESS_H__
1111
12#include "messopts.h"
12#include "options.h"
1313
14
1514/***************************************************************************
15    CONSTANTS
16***************************************************************************/
1617
17    Constants
18#define OPTION_RAMSIZE         "ramsize"
19#define OPTION_WRITECONFIG      "writeconfig"
20#define LCD_FRAMES_PER_SECOND   30
1821
22
23/***************************************************************************
24    GLOBALS
1925***************************************************************************/
2026
21#define LCD_FRAMES_PER_SECOND   30
27extern const options_entry mess_core_options[];
2228
23/**************************************************************************/
24
25/* mess specific layout files */
2629extern const char layout_lcd[];   /* generic 1:1 lcd screen layout */
2730extern const char layout_lcd_rot[];   /* same, for use with ROT90 or ROT270 */
2831
32extern const char mess_disclaimer[];
2933
30/***************************************************************************/
34/***************************************************************************
35    FUNCTION PROTOTYPES
36***************************************************************************/
3137
32extern const char mess_disclaimer[];
38void mess_display_help(void);
3339
34/***************************************************************************/
40/* code used by print_mame_xml() */
41void print_mess_game_xml(FILE *out, const game_driver *game, const machine_config *config);
42
43/* initialize MESS specific options (called from MAME core) */
44void mess_options_init(core_options *opts);
45
3546#endif /* __MESS_H__ */
src/mess/tools/messtest/testmess.c
r8324r8325
1818#include "sound/wavwrite.h"
1919#include "video/generic.h"
2020#include "render.h"
21#include "messopts.h"
22#include "device.h"
2321#include "devices/messram.h"
2422#include "debug/debugcpu.h"
2523

Previous 15994 Revisions Next


© 1998-2018 The MESS Team