Jump to content

Compiling MAME's Source


Recommended Posts

Okay. Please bear with me, becuase I probobly am screwing up a whole lot, sicne I don't know what to do.

 

I want to learn how to compile my own build of MAME. So I went here and tried to follow the directions: http://www.mame.net/compilewin.html. But I have a problem; The tutorial is made for Windows 98 users and not Windows XP users. Because of that, my windows does not have a c:\windows\command folder, and even when I create one it does nothing. And so I cannot use the unzip command in the command prompt.

 

Since I couldn't do that, I just unzipped everything with WinRAR, and hoped that everything would work fine by unzipping that way. Well, I can't tell if it works fine, because I can't set up my MingW correctly because my autoexec.bat file is completely empty. I can't put the line of text where they tell me to, becuase there is nothing in there.

 

"Okay," I thought. "This is really flocking annoying." But I still continued my misguided adventure. My last idea was to open the make.exe file in the command prompt and try to see if maybe any command extentions would work. Whenever I do "make.exe -C C:\MINGW\MAME\" it tells me that there isn't a makefile in that folder, despite the fact that I am looking at it, and "make.exe -f C:\MINGW\MAME\makefile" just lists files that I can also see and tell me that those don't exist.

 

My questions are: What the hell am I missing? What am I doing wrong? Can I fix anything to make it work right? Should my autoexec.bat file be completely empty? Why is the sky blue?

 

Thanks for reading my lenghty story of hardship and incompetence, and thanks for trying to help me out. I can't tell you how annoyed and spent I am from trying to figure out what's wrong.

Link to comment
Share on other sites

  • Replies 26
  • Created
  • Last Reply

Top Posters In This Topic

Yes, that worked, thank you very much. But now, I still have the problem with my autoexec.bat. Should I just add the line "PATH C:\WINDOWS;C:\WIN98\system32;C:\MINGW\BIN" then reboot and see if that would make my MingW work? Or should I do something else?

Link to comment
Share on other sites

The PATH command gives you access to commands straight from the root, without haing to open a specific location just to use a specific command.

 

Windows XP actually have Autoexec.bat per se, so you have to set the PATH by changing the environment variables which can be accessed by going into Control Panel --> System --> Advanced settings tab(I hope that's what it's called), and click on the Environment variables button. Do not create an extra Autoexec.bat in Windows XP.

 

There should already be some paths set, so add your MinGW path there.

Link to comment
Share on other sites

Okay, I can't read, it seems. I skipped this part, I guess, when screwing up the first time:

With systems that don't use startup files (such as Windows NT, 2000 or XP), you can instead type edit c:\mingw\mingw.bat and write SET PATH=%PATH%;c:\mingw\bin into it. You'll have to run this file (simply type c:\mingw\mingw to run it) before being able to use MinGW.

So I did that. I went into the command prompt, went to the mame folder, I typed "c:\mingw\mingw" and hit enter, like it said to. This popped up:

C:\MINGW\MAME>SET PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Common Files\Autodesk Shared\;C:\PROGRA~1\BACKBU~1\;c:\mingw\bin

I then typed make, and same thing happens: Nothing. It still doesn't recognise the command "make". I don't know what to do.

 

And when I went into Environment variables, I tried making make a command by just putting C:\MINGW\BIN as the value, but that also did nothing.

 

EDIT: I went to Mr. Do's compiling page, and he said to add "mingw32-make" two lines under "SET PATH=%PATH%;c:\mingw\bin" in the mingw.bat file. Running this file make it say

C:\MINGW\MAME>SET PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Common Files\Autodesk Shared\;C:\PROGRA~1\BACKBU~1\;c:\mingw\bin


C:\MINGW\MAME>mingw32-make
Compiling src/machine/segacrpt.c...
cc1.exe: Invalid option '-Wno-unused-funtions'
cc1.exe: Invalid option '-Wdisabled-functions'
cc1.exe: unknown C standard 'gnu99'
mingw32-make: *** [obj/mame/machine/segacrpt.o] Error1

And then it stops. Another error to get confused by.

Edited by Dooz
Link to comment
Share on other sites

when you edit bat files, you have to make it do something, like you did when you added 'mingw32 -make'. It echoes the lines in the batch file to the command prompt when run the batch, because you hadn't specified @ECHO OFF at the begginnig on line 1.

 

The error you are having suggests you're using options that aren't supported or you are missing a component.

Link to comment
Share on other sites

Alright, well I installed the version of MinGW that Mr. Do tells me to, and it starts compiling just fine. And then after like 7 minutes, it just errors with every file it trys to read.

 

Here's a screenshot of some of the compile error, most of it had to be cut off because it was racing so fast through the errors and then immediately shuts down (My computer automatically shuts down command prompts after they've expired, and unlike a lot of computers, I don't have the option to turn that off): http://dooz.thebmp.org/images/compileerror.jpg

 

Ugh, it's just one problem after another. Really sucks when you're flying through this blindly.

 

Edit: Apperantly, it just gets stuck on wind3d.c. Would there be any way to fix that?

Edited by Dooz
Link to comment
Share on other sites

This is what I use in my batch file

 

@echo off
set PATH=C:\MinGW\bin;%PATH%
echo Compile in progress Please wait !
make WINUI=1 I686=1 SUFFIX=32
echo Compile is complete.
pause
echo Enjoy :)
pause

 

 

I have the mingw folder in C:\Mingw then the mame source goes in that folder The batch file goes in the Mame source.

 

You do not direct anything to the system32 folder at all

Just make sure you have the latest version of mingw and tools.

Link to comment
Share on other sites

That didn't actually do anything. All it does is make it say that it compiled something, when in reality nothing compiled at all.

 

 

Well you are doing somthing wrong.

It would of shown an error So ignore the part that says it has compiled.

Please check to see if there were errors

What you posted above is all wrong

Maybe you are missing things that are needed for it to compile.

 

C:\MinGW\mame098u2

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...