How to removing the loading screen on compiled Mame?[SOLVED]

A nice (keyboard based) front end for Arcade / Console game emulators.

Moderator: battlecat

How to removing the loading screen on compiled Mame?[SOLVED]

Postby platao » Wed Jan 18, 2012 1:44 pm

Hello guys, I managed to compile mame successfully in ubuntu 10.04 and remove all the screens of "warnings" (check screens and that we type "ok" to start the game) .. I made up a mini tutorial on how to remove here ;

http://translate.google.com.br/translat ... 3msg499639

So far so good:) was great, the only screen that appears now is the screen "loading" and would like to remove ... anyone have a step by step or link to pass me? How do I remove the loading screen?

Use the Ubuntu and Whacade 1.0pre1 Lanchpad


Thank you.


Plato
Last edited by platao on Sat Feb 04, 2012 12:23 pm, edited 1 time in total.
platao
 
Posts: 10
Joined: Sun Aug 21, 2011 7:53 pm

Re: How to removing the loading screen on compiled Mame?

Postby laxdragon » Mon Jan 30, 2012 5:40 pm

Two options. First you can do a Google search for the fantastic MKChamp HiScore patch. Not only does it add back in hiscore saving support, but it can disable the warning and loading screens.

The other option, is to simply edit src/emu/ui.c and add a "break;" in case 1 of the switch block that displays the warning nag.
In the current tip at the time of this posting, it is at line 306. Note, this also works in MESS. As they use the same UI code.

Code: Select all
      /* pick the next state */
      switch (state)
      {
         case 0:
            if (show_disclaimer && disclaimer_string(machine, messagebox_text).len() > 0)
               ui_set_handler(handler_messagebox_ok, 0);
            break;

         case 1:
            break;
            if (show_warnings && warnings_string(machine, messagebox_text).len() > 0)
User avatar
laxdragon
 
Posts: 24
Joined: Tue Feb 13, 2007 5:24 pm
Location: Minneapolis, MN

Re: How to removing the loading screen on compiled Mame?

Postby platao » Thu Feb 02, 2012 9:07 pm

Wonder!
:) Thank you for reporting Lax, I took your tip and applied to what I already
had done and worked very well.

Initially I did as a reporter in the modification, (see mini tutorial on
link)

STATERR_NONE case:
break;

In this case it shows the screen "warning" and "OK" only the first
boot ROM, then is no longer displayed but warnings
"loading", "errors" and the "edges" of the white window to load the rom
still active.

In the second part of the link ui.c looking for
"ui_display_startup_screens" see immediately below the "case" and rename
for;

case 0:
...
case 1:
...
case 2:
...
and only change to the number;

case 4:
...
case 5:
...
case 6:
...

Works well, only displays the loading screen and the edges of the
white in the window. the rest has been disabled.

Tbm I found this link very interesting and it worked very well;

http://www.gameex.info/forums/topic/6114-tutorial-compi ...

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Tutorial: How to compile Mame Plus

UPDATE: Works with 0.137

NOTE: Don't fear how long the post is! Instructions are very detailed thats why it looks like so much to do. In fact you only edit 3 files and only very little code. The whole thing usually takes 10 minutes to do and 20-30 minutes to compile!

I just compiled Mame Plus 0.128 and I thought I would share the procedure with everyone. Now I know there are a lot of tutorials out there but it still took me some time to figure out what goes in the mingw directory, where to put everything ...
So over here I will post a link to a ready to use made mingw directory to speed things up. I tried to keep everything as simple as possible!

Now what is the advantage of compiling your own mame build:
For me it was to remove the nag screens in mame. When gameex is displaying mame games in attract mode some games don't start because of an error message of incomplete emulation. I will show you how you can get rid of this!
Many other people use it also to get hiscore support back into mame (e.g. save your donkey kong high score even if you exit a game). Since Mame Plus already has this feature enabled we don't need to enable hi score support.
Mame Plus further offers to use graphical filters to remove the "blockyness" of some games (eg hq3x or 2x super sai)
For me this is the main reason of using Mame Plus

What you need to do:
1. Download mingw here and put it into c:\mingw. if link sould be dead you can find instructions for what you need over here: http://mameicons.free.fr/mame32p/
THESE ARE OLD INSTRUCTIONS THOUGH: You don't have to rename g++-slij to g++ anymore and you now find the extra utils on the download section at the bottom of the page
2. Download Mame Source Code here. The file name is something like this : mame0128s.zip
3. Download Mame Plus Source Code here. Look for Source code which matches the mame build you just downloaded. In this case "Source code 0.128"
4. Download the Mame Plus fonts from over here
5. Unpack Mame Source code to a directory eg "c:\mamecompile". Unpack Mame Plus Source to the same directory. If you did this right it will ask you to replace a file. Confirm this!
6. A mistake I made more then once: Unpack the just downloaded font pack to the same directory.
7. In c:\mamecompile there is a file called env.bat. Right click on it and go to edit (or right click=> open with notepad)
The file will look like this:

@echo off
set MINGW_ROOT=D:\wgcc421
set PATH=%MINGW_ROOT%\bin;extra\bin;%PATH%

set C_INCLUDE_PATH=extra\include
set LIBRARY_PATH=extra\lib

gcc -v


Replace the path with our mingw directory so it looks like this:

@echo off
set MINGW_ROOT=c:\mingw
set PATH=%MINGW_ROOT%\bin;extra\bin;%PATH%

set C_INCLUDE_PATH=extra\include
set LIBRARY_PATH=extra\lib

gcc -v

8. Now we have set up everything to start compiling! But before we do this we will still need to edit 2 files to remove the nag screens. This is the most tricky part :

Removing disclaimer

Go to
c:\mamecompile\src\emu\ui.c

Open with Notepad.

Search for:

int show_gameinfo = !options_get_bool(mame_options(), OPTION_SKIP_GAMEINFO);
int show_warnings = TRUE;
int state;

/* disable everything if we are using -str for 300 or fewer seconds, or if we're the empty driver,
or if we are debugging */


Add this line:

int show_gameinfo = !options_get_bool(mame_options(), OPTION_SKIP_GAMEINFO);
int show_warnings = TRUE;
int state;
show_gameinfo = show_warnings = show_disclaimer = FALSE;

/* disable everything if we are using -str for 300 or fewer seconds, or if we're the empty driver,
or if we are debugging */


Notice the 'show_gameinfo = show_warnings = show_disclaimer = FALSE;" line was added
Search further for


/* display any popup messages */
if (osd_ticks() < popup_text_end)
ui_draw_text_box(astring_c(messagebox_text), JUSTIFY_CENTER, 0.5f, 0.9f, messagebox_backcolor);
else
popup_text_end = 0;

/* cancel takes us back to the ingame handler */
if (ui_handler_param == UI_HANDLER_CANCEL)
ui_set_handler(handler_ingame, 0);
}


and replace with:

/* display any popup messages */
/* if (osd_ticks() < popup_text_end)
ui_draw_text_box(astring_c(messagebox_text), JUSTIFY_CENTER, 0.5f, 0.9f, messagebox_backcolor);
else
popup_text_end = 0; */

/* cancel takes us back to the ingame handler */
if (ui_handler_param == UI_HANDLER_CANCEL)
ui_set_handler(handler_ingame, 0);
}


notice /* and */ disable this part of the code

Search further for:

static UINT32 handler_messagebox(running_machine *machine, UINT32 state)
{
ui_draw_text_box(astring_c(messagebox_text), JUSTIFY_LEFT, 0.5f, 0.5f, messagebox_backcolor);
return 0;
}


and replace with:

static UINT32 handler_messagebox(running_machine *machine, UINT32 state)
{
//ui_draw_text_box(astring_c(messagebox_text), JUSTIFY_LEFT, 0.5f, 0.5f, messagebox_backcolor);
return 0;
}


Notice "//ui_draw.." disables this line

Removing border

Go to c:\mamecompile\src\emu\render.c

Look for:

else
{
render_primitive *prim;

prim = alloc_render_primitive(RENDER_PRIMITIVE_QUAD);
set_render_bounds_xy(&prim->bounds, 0.0f, 0.0f, (float)target->width, (float)target->height);
set_render_color(&prim->color, 1.0f, 1.0f, 1.0f, 1.0f);
prim->texture.base = NULL;
prim->flags = PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA);
append_render_primitive(&target->primlist[listnum], prim);

if ((target->width > 1) && (target->height > 1))
{
prim = alloc_render_primitive(RENDER_PRIMITIVE_QUAD);
set_render_bounds_xy(&prim->bounds, 1.0f, 1.0f, (float)(target->width - 1), (float)(target->height - 1));
set_render_color(&prim->color, 1.0f, 0.0f, 0.0f, 0.0f);
prim->texture.base = NULL;
prim->flags = PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA);
append_render_primitive(&target->primlist[listnum], prim);
}
}



and replace with:

else
{
/* render_primitive *prim;

prim = alloc_render_primitive(RENDER_PRIMITIVE_QUAD);
set_render_bounds_xy(&prim->bounds, 0.0f, 0.0f, (float)target->width, (float)target->height);
set_render_color(&prim->color, 1.0f, 1.0f, 1.0f, 1.0f);
prim->texture.base = NULL;
prim->flags = PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA);
append_render_primitive(&target->primlist[listnum], prim);

if ((target->width > 1) && (target->height > 1))
{
prim = alloc_render_primitive(RENDER_PRIMITIVE_QUAD);
set_render_bounds_xy(&prim->bounds, 1.0f, 1.0f, (float)(target->width - 1), (float)(target>height - 1));
set_render_color(&prim->color, 1.0f, 0.0f, 0.0f, 0.0f);
prim->texture.base = NULL;
prim->flags = PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA);
append_render_primitive(&target->primlist[listnum], prim);
} */
}


/* and */ was added

OPTIONAL:

Got to \src\osd\windows\input.c


// For testing purposes: force DirectInput
#define FORCE_DIRECTINPUT 0


with


// For testing purposes: force DirectInput
#define FORCE_DIRECTINPUT 1


This is useful if you want a delay for an exit combo (eg hold 1P+2P for 2 secs to exit). you can simply create a ahk script to do this. normally the RAW input system of Mame prevents this!



If you made it until here, the rest is simple:
9. Go to start=> run and type in cmd
10. type in
c: <enter>
cd\ <enter>
cd mamecompile<enter>
env<enter>
make<enter>
11. now the computer should start compiling the files. It takes around 20 minutes. If you have any questions, please go ahead and ask me!
I first used this guide with mame plus 0.124 and it worked for every version until now with 0.133 so I expect it to work with upcoming versions as well.
12. One tip: to disable the confirmation screen when exiting a game, open mamepgui.exe. then go to options=> default game options=>miscellaneous. uncheck quit game with confirmation


Happy gaming,
chriss
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Following that link was great, not only displays the screen any more
black, no white edges and no warning, nothing. it was perfect!!

And I've already got a new build of the Marne + Whacade if desired
test and only download here!

http://minus.com/m2DFDtKp9 - > wahcade 1.0pre1 launchpad +mame 0.143 compiled

http://minus.com/mGVHvQbVi - > (My favorite) whacade(mahcade) sairuk's fork + mame 0.144 compiled

I am already compiling a new version with its hint of the patch and the change in ui.c Lax!! :)

The hiscore is for storing the scores of the games? How to works?

thanks

Plato
platao
 
Posts: 10
Joined: Sun Aug 21, 2011 7:53 pm


Return to Wah!Cade

Who is online

Users browsing this forum: Google [Bot] and 2 guests

cron