Main > Software Forum
Question on editing Mame.C....
(1/3) > >>
electricd:
Hello,

I usually edit my Mame.c file to remove the nags by changing the "if" statements to "if(1)".  What I really want to do is make it so I can have an option in mame.ini to turn each nag on and off.  I know there is an option for "skip_gameinfo" in version 103, but it looks like the "skip_disclaimer" has been removed?  Anyway, I would love to have 3 options in mame.ini, 1. skip_gameinfo, 2. skip_warnings, and 3. skip_disclaimer.  Is there an easy way to get Mame to like these settings?  The lines in question in Mame.c are:

   /* if we didn't find a settings file, show the disclaimer */
   if (settingsloaded || options.skip_disclaimer || ui_display_copyright(artwork_get_ui_bitmap()) == 0)
   {
      /* show info about incorrect behaviour (wrong colors etc.) */
      if (options.skip_warnings || ui_display_game_warnings(artwork_get_ui_bitmap()) == 0)
      {
         /* show info about the game */
         if (options.skip_gameinfo || ui_display_game_info(artwork_get_ui_bitmap()) == 0)

Thanks so much in advance!!
electricd:
Looks like Alank2 used to implement the skip_warnings, but i downloaded his latest .103 edits, and its not in there anymore.  From one of his old posts:

-[no]skip_warnings / -[no]sw (default disabled) will skip game warnings.
This is useful for skipping warnings like "The video emulation isn't 100%
accurate.", but keep in mind that it will also skip more serious warnings
such as "This game doesn't work properly.".  It might be best to enable this
option for specific games that you want to skip the warnings on instead of
enabling it globally.

Alank2, can you help a brotha out?
JoyMonkey:

--- Quote from: electricd on January 25, 2006, 09:46:24 am ---   /* if we didn't find a settings file, show the disclaimer */
   if (settingsloaded || options.skip_disclaimer || ui_display_copyright(artwork_get_ui_bitmap()) == 0)
   {
      /* show info about incorrect behaviour (wrong colors etc.) */
      if (options.skip_warnings || ui_display_game_warnings(artwork_get_ui_bitmap()) == 0)
      {
         /* show info about the game */
         if (options.skip_gameinfo || ui_display_game_info(artwork_get_ui_bitmap()) == 0)

--- End quote ---

Probably won't help, but did you try replacing 'settingsloaded' with 'options.skip_disclaimer' ?
electricd:
No i didn't try it...im not really a C guy...more of a VB guy.

 if (settingsloaded || options.skip_disclaimer || ui_display_copyright(artwork_get_ui_bitmap()) == 0)

I understand this to read if settingsloaded = FALSE AND option.skip_disclaimer = FALSE then ui_display_copyright.  Is this accurate?
Farmboy90:
Well from a very quick poke in the code I would think you need to add a couple of entries to the options array in config.c (under mame\src\windows).  Here is a snippet with the interesting line highlighted.

   /* misc */
   { "Mame CORE misc options", NULL, rc_seperator, NULL, NULL, 0, 0, NULL, NULL },
   { "artwork", "art", rc_bool, &use_artwork, "1", 0, 0, NULL, "use additional " GAMENOUN " artwork (sets default for specific options below)" },
   { "use_backdrops", "backdrop", rc_bool, &use_backdrops, "1", 0, 0, NULL, "use backdrop artwork" },
   { "use_overlays", "overlay", rc_bool, &use_overlays, "1", 0, 0, NULL, "use overlay artwork" },
   { "use_bezels", "bezel", rc_bool, &use_bezels, "1", 0, 0, NULL, "use bezel artwork" },
   { "artwork_crop", "artcrop", rc_bool, &options.artwork_crop, "0", 0, 0, NULL, "crop artwork to " GAMENOUN " screen only" },
   { "artwork_resolution", "artres", rc_int, &options.artwork_res, "0", 0, 0, NULL, "artwork resolution (0 for auto)" },
   { "cheat", "c", rc_bool, &options.cheat, "0", 0, 0, NULL, "enable/disable cheat subsystem" },
   { "debug", "d", rc_bool, &options.mame_debug, "0", 0, 0, NULL, "enable/disable debugger (only if available)" },
   { "debugscript", NULL, rc_string, &debugscript, NULL, 0, 0, NULL, "script for debugger (only if available)" },
   { "playback", "pb", rc_string, &playbackname, NULL, 0, 0, NULL, "playback an input file" },
   { "record", "rec", rc_string, &recordname, NULL, 0, 0, NULL, "record an input file" },
   { "log", NULL, rc_bool, &errorlog, "0", 0, 0, init_errorlog, "generate error.log" },
   { "oslog", NULL, rc_bool, &erroroslog, "0", 0, 0, NULL, "output error log to debugger" },
   { "skip_gameinfo", NULL, rc_bool, &options.skip_gameinfo, "0", 0, 0, NULL, "skip displaying the " GAMENOUN " info screen" },
   { "bios", NULL, rc_string, &options.bios, "default", 0, 14, NULL, "change system bios" },
   { "state", NULL, rc_string, &statename, NULL, 0, 0, NULL, "state to load" },
   { "autosave", NULL, rc_bool, &options.auto_save, "0", 0, 0, NULL, "enable automatic restore at startup and save at exit" },


In mame.c the variables are still declared and available:

struct _global_options
...
...
   int    skip_disclaimer;   /* 1 to skip the disclaimer screen at startup */
   int    skip_gameinfo;      /* 1 to skip the game info screen at startup */
   int    skip_warnings;      /* 1 to skip the warnings screen at startup */
...
...

So you don't need to add the variables.  You should just add new rows to the struct up above similar to the highlighted line.  Recompile and test.

Let me know if it works.  :)

Navigation
Message Index
Next page

Go to full version