Author Topic: how to patch mame with .diff and compile mame source code on windows x86 and x64  (Read 20185 times)

hermine.potter

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
I think, that source will be the same. Edit the file ui.c or patch it with .diff-file. Give it a try.
Quote
8 )
Open the following file with editor, notepad++, or another editor of your choice:
C:\buildtools\src\src\emu\ui\ui.c

9)
Add in line #316 (it's a empty line)

from:
Code: [Select]
int state;

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

to:
Code: [Select]
int state;
show_gameinfo = show_warnings = show_disclaimer = show_mandatory_fileman = FALSE;
// disable everything if we are using -str for 300 or fewer seconds, or if we're the empty driver,

10)
Edit line #444, #445, #446 and #447 as a comment:

from:
Code: [Select]
if (osd_ticks() < m_popup_text_end)
draw_text_box(container, messagebox_poptext.c_str(), JUSTIFY_CENTER, 0.5f, 0.9f, messagebox_backcolor);
else
m_popup_text_end = 0;

to:
Code: [Select]
// if (osd_ticks() < m_popup_text_end)
// draw_text_box(container, messagebox_poptext.c_str(), JUSTIFY_CENTER, 0.5f, 0.9f, messagebox_backcolor);
// else
// m_popup_text_end = 0;

11)
Edit line #1275 as a comment:

from:
Code: [Select]
machine.ui().draw_text_box(container, messagebox_text.c_str(), JUSTIFY_LEFT, 0.5f, 0.5f, messagebox_backcolor);
to:
Code: [Select]
//machine.ui().draw_text_box(container, messagebox_text.c_str(), JUSTIFY_LEFT, 0.5f, 0.5f, messagebox_backcolor);
13)
Save and overwrite the file:
C:\buildtools\src\src\emu\ui\ui.c
AM Version : 2.3.0
Input : Mad Catz Brawlstick; Mouse; Keyboard; Xbox360 Wireless
Cabinet : Yes
OS : WindowsXP x86 SP3
System : Dell Precision T3500 ; Intel X5650 ; 4GB RAM
Emulators : zsnes; mame; dosbox; scummvm; bsnes; fusion; openbor; windows_games; winuae; video; flashgames; vice; visualboy

akafox

  • Moderator
  • Hero Member
  • *****
  • Posts: 757
    • View Profile
I think this web site has pre compiled binaries for mac http://sdlmame.lngn.net/

I think they are stock mame..not a "no nag high score" patched version
People want life easy..then complain about it

verion

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 737
    • View Profile
    • new projects
Yes, It's vanilla mame for OS X (with nag screens) - currently I'm using x64 SDLmame .164 (from this site) with SDL 2.0.
Working perfectly ok. The only reason for compiling is to get rid of the nag screens.

beto20a

  • Newbie
  • *
  • Posts: 3
    • View Profile
I have a problem compiling the 167 version with this step-by-step. I start with the second option(using .diff patch)
Error :

Compiling 3rdparty/bgfx/src/renderer_d3d12.cpp....

Someone can help me?

akafox

  • Moderator
  • Hero Member
  • *****
  • Posts: 757
    • View Profile
Note: In my opinion it's not a good idea to upload a finished / compiled mame.exe, because of the security risks (e.g. distribute virus, trojan, etc. etc.).
So I've wrote this guide to compile your own mame.exe step by step and in the current version and so it's not necessary downloading from any dubious hoster.

And you are very right to have that opinion. However that is why I want to host it here..from someone here that we know here and can trust. Compiling is NOT for everyone..anything can happen. I have tried and tried to compile the new AM and can not..for whatever reason..however I have done it before with the older versions many times no problem.
« Last Edit: November 10, 2015, 03:12:12 PM by akafox »
People want life easy..then complain about it

hermine.potter

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
@beto20a
You're right. It seems that the current mame-buildtools v1.2 contains bugs. I've uninstalled & installed the buildtools (v1.2) and getting now same errors too.

Here is my workaround (right now succesfully tested):

1) install the buildtools as told as by install.exe (you'll get the bug-version 1.2 installed, BUT you'll get the correct environment and registry entries and so on)
2) delete the folder C:\buildtools
3) download the previous release v1.1
4) unzip it (so you can found the correct folder structure : C:\buildtools\buildtools.bat)
5) start buildtools.bat or Cmder.exe as told as (IMPORTANT : ignore step4 in tutorial and DO NOT UPDATE the mame tools or you'll get the bug version v1.2 again).

This is how it works at the moment.
« Last Edit: November 11, 2015, 02:12:22 AM by hermine.potter »
AM Version : 2.3.0
Input : Mad Catz Brawlstick; Mouse; Keyboard; Xbox360 Wireless
Cabinet : Yes
OS : WindowsXP x86 SP3
System : Dell Precision T3500 ; Intel X5650 ; 4GB RAM
Emulators : zsnes; mame; dosbox; scummvm; bsnes; fusion; openbor; windows_games; winuae; video; flashgames; vice; visualboy

hermine.potter

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
@akafox
Providing a compiled version of mame that's not showing warnings, disclaimer and so on, is not allowed by mamedev-team and violates their specifications:

Quote
Do not remove the startup screen that contains information about why certain non-working games don't work. This only serves to generate a bunch of useless email traffic to the developers asking why the games don't work.
AM Version : 2.3.0
Input : Mad Catz Brawlstick; Mouse; Keyboard; Xbox360 Wireless
Cabinet : Yes
OS : WindowsXP x86 SP3
System : Dell Precision T3500 ; Intel X5650 ; 4GB RAM
Emulators : zsnes; mame; dosbox; scummvm; bsnes; fusion; openbor; windows_games; winuae; video; flashgames; vice; visualboy

beto20a

  • Newbie
  • *
  • Posts: 3
    • View Profile
@beto20a
You're right. It seems that the current mame-buildtools v1.2 contains bugs. I've uninstalled & installed the buildtools (v1.2) and getting now same errors too.

Here is my workaround (right now succesfully tested):

1) install the buildtools as told as by install.exe (you'll get the bug-version 1.2 installed, BUT you'll get the correct environment and registry entries and so on)
2) delete the folder C:\buildtools
3) download the previous release v1.1
4) unzip it (so you can found the correct folder structure : C:\buildtools\buildtools.bat)
5) start buildtools.bat or Cmder.exe as told as (IMPORTANT : ignore step4 in tutorial and DO NOT UPDATE the mame tools or you'll get the bug version v1.2 again).

This is how it works at the moment.

Thanks dude! I'll try your workaround

akafox

  • Moderator
  • Hero Member
  • *****
  • Posts: 757
    • View Profile
@akafox
Providing a compiled version of mame that's not showing warnings, disclaimer and so on, is not allowed by mamedev-team and violates their specifications:

Quote
Do not remove the startup screen that contains information about why certain non-working games don't work. This only serves to generate a bunch of useless email traffic to the developers asking why the games don't work.
It gets annoying to see that screen every time..yes I already not it's not 100%!  However I understand your point..maybe I can put a disclaimer there or something..or just pull it.
People want life easy..then complain about it

beto20a

  • Newbie
  • *
  • Posts: 3
    • View Profile
Hello guys!
I had success with mame compiling workaround, but not with mameui.
Somebody could help me with step-by-step for mameui 0.167 compiling?
Thanks

hermine.potter

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
@beto20a
I'm not sure, because I don't know mameui. It's a mame frontend too, right?!
Tried this, but not sure about it (that the same steps are the correct way):

01 ) open folder C:\buildtools\src
02 ) you see different folders (3rdparty, artwork and so on)
03 ) delete or move complete folder content
04 ) download zip-file
05 ) open the mameui-master.zip
06 ) extract the content to src folder, so you get the same content and structure like in step 02 (3rdparty, artwork and so on)
07 ) open buildtools.bat or Cmder.exe
08 ) As told as here :  make subtarget=arcade osd=winui
09 ) wait for finish compiling

For further & detailed information, you should contact the experts of mameui forum
AM Version : 2.3.0
Input : Mad Catz Brawlstick; Mouse; Keyboard; Xbox360 Wireless
Cabinet : Yes
OS : WindowsXP x86 SP3
System : Dell Precision T3500 ; Intel X5650 ; 4GB RAM
Emulators : zsnes; mame; dosbox; scummvm; bsnes; fusion; openbor; windows_games; winuae; video; flashgames; vice; visualboy

hermine.potter

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
Mame 0.168 is out. It seems that they have changed programming language to c++/cpp
Everything works correct again.
AM Version : 2.3.0
Input : Mad Catz Brawlstick; Mouse; Keyboard; Xbox360 Wireless
Cabinet : Yes
OS : WindowsXP x86 SP3
System : Dell Precision T3500 ; Intel X5650 ; 4GB RAM
Emulators : zsnes; mame; dosbox; scummvm; bsnes; fusion; openbor; windows_games; winuae; video; flashgames; vice; visualboy

xev1n

  • Full Member
  • ***
  • Posts: 74
    • View Profile
OMG I have spent hours trying to do this. I am using Windows 10 x64. I am using mame 64 .151. I am just trying to remove the "left/right type OK" screen. I have downloaded everything and keep getting errors. Does this not work with .151? I have the hi_151.diff file and the mame 64bit .151 source.

hermine.potter

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
Mame 0.169 is out.
With new buildtools msys2, I wasn't able to compile a working build of mame with diff-file (patch command doesn't longer exists; install.exe isn't longer available on github, msys2 is awful ...)

My workaround:
-Download old buildtools.7z from archive.org
-download source and diff-file in prefered version
-compile it with buildtools.bat
« Last Edit: February 08, 2016, 07:24:11 AM by hermine.potter »
AM Version : 2.3.0
Input : Mad Catz Brawlstick; Mouse; Keyboard; Xbox360 Wireless
Cabinet : Yes
OS : WindowsXP x86 SP3
System : Dell Precision T3500 ; Intel X5650 ; 4GB RAM
Emulators : zsnes; mame; dosbox; scummvm; bsnes; fusion; openbor; windows_games; winuae; video; flashgames; vice; visualboy

hermine.potter

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
@xev1in
getting an error too. Try another version of mame (current : 0.169)
AM Version : 2.3.0
Input : Mad Catz Brawlstick; Mouse; Keyboard; Xbox360 Wireless
Cabinet : Yes
OS : WindowsXP x86 SP3
System : Dell Precision T3500 ; Intel X5650 ; 4GB RAM
Emulators : zsnes; mame; dosbox; scummvm; bsnes; fusion; openbor; windows_games; winuae; video; flashgames; vice; visualboy