Jump to content

All my products and services are free. All my costs are met by donations I receive from my users. If you enjoy using any of my products, please donate to support me. My bare hosting costs are currently not met so please consider donating by either clicking this text or the Patreon link on the right.

Patreon

Recommended Posts

Posted

This topic is a little dated so I was wondering if it is still true that MAME does not accept DirectInput by default and that a re-compile is required to make that change?

I just purchased Xpadder with the hope of using Xbox 360 gamepads as my 3rd and 4th player controls in MAME. Unfortunately I can't seem to get it to work with MAME. Finally I came across this thread. I am using the GameEx Xpadder plugin and I was able to successfully test that the plugin works with the GameEx interface (I configured a controller button to skip to the next song) so I'm pretty sure MAME is the problem I'm having. Off the top of my head I don't know what version of MAME I'm running, but I downloaded it around August 2012 timeframe.

Posted

Nope you're right. MAME uses RAW input. I compile my own version for Xpadder support.

I think Ben added a switch for this to his MAME compiler though.

Posted

Nope you're right. MAME uses RAW input. I compile my own version for Xpadder support. I think Ben added a switch for this to his MAME compiler though.

Thanks! Who is Ben and where can I get his MAME compiler? :)

Posted

Ben is the secret identity of our very own local superhero headkaze! You can find his excellent MAME compiler (along with usage instructions) right here. Good luck man!

Ok thanks. After reading the instructions I think I am going to make some modification to get what I want. First off, I want to compile version 144 of MAME (I think I need to do this because the versions of ROMs I have are for that version). Of the 11 steps listed here is what I think I need to do:

  1. yes
  2. download Mame Compiler v1.17 instead for older versions of MAME
  3. yes (folder name C:\MinGW\source\Mame0144)
  4. skip (I don't want these patches, although could someone explain what the Hi Score patch is?)
  5. download 144 instead
  6. skip (updates don't apply to version 144)
  7. skip
  8. skip
  9. skip
  10. I assume I set my "Mame Source Folder" from the MAME Compiler program.
  11. yes

Does it make sense to skip all those steps given what I am trying to do? Also, I'm assuming that within the MAME Compiler program there is a switch (as you described) to enable DirectInput. I would just make that switch before pressing "Go".

As a side note, I found this guide on the Xpadder forums that describes how to compile MAME for Xpadder support.

http://xpadder.com/forum4/viewtopic.php?f=177&t=2576

Unfortunately I haven't gotten it to work so I'm going to try this method.

Posted

Ben is the secret identity of our very own local superhero headkaze! You can find his excellent MAME compiler (along with usage instructions) right here. Good luck man!

I finally just finished downloading the MinGW file from step 1 and Chrome said it appears malicious! However Microsoft Security Essentials (my anti-virus) didn't find anything. Any advice?

Posted

Hi Koop! Your steps all look good. The one amendments or adjustments I would make include the following:

Install Mame Compiler*

* For Mame versions earlier than 0143u1 you cannot use Mame Compiler v1.24 to compile MAME you must use v1.17.

  • download Mame Compiler v1.17 instead for older versions of MAME

Since your MAME version is more recent than 0143u1, you should be fine to use the most recent version of MAME Compiler.

Download the hiscore hi_147u3.txt from here and copy it into the C:\MinGW\patches (you can rename it to hi_147.diff if you like but it doesn't matter)

  • skip (I don't want these patches, although could someone explain what the Hi Score patch is?

The Hi Score patch adds support for saving High Scores to MAME. This High Score support is transparent to the end user as it doesn’t rely on save states or anything weird like that. More details can be found here. If you’re not using any patches skipping this step should be fine. Note that in most cases you compile MAME for the specific purpose of adding patches to MAME, but in this case you’re making a minor adjustment directly to the source code.

Does it make sense to skip all those steps given what I am trying to do? Also, I'm assuming that within the MAME Compiler program there is a switch (as you described) to enable DirectInput. I would just make that switch before pressing "Go".

Yep it should be as easy as that. Good luck Koop!

Edit: Koop I hope you don't mind I split your line of questions into a separate thread. It was really starting to mess with my mind that we were posting in a topic having been marked as [RESOLVED]! ;)

Posted

I finally just finished downloading the MinGW file from step 1 and Chrome said it appears malicious! However Microsoft Security Essentials (my anti-virus) didn't find anything. Any advice?

Sorry, I missed this one. So long as you pull it from the posted link you should be fine. MinGW is just a set of compiling tools, which may have set off a red flag in Chrome.

Posted

Yes, thanks for moving the thread. I was thinking of doing that myself.

Thanks for the tip about using the most recent version of the compiler. I was wondering why there didn't seem to be an option to "Force Direct Input", but I see it now with the latest version.

I tried to run it but I actually got the exact same error that I got when I tried to use the method from the Xpadder forum. Here is the last little bit of output from the compile window:

Compiling src/emu/cpu/superfx/sfx_dasm.c...Compiling src/emu/cpu/pps4/pps4dasm.c...Compiling src/emu/cpu/hd61700/hd61700d.c...Linking obj/windows/mame/build/vconv.exe...c:/mingw/mingw64-w32/bin/../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lunicowscollect2: ld returned 1 exit statusmake: *** [obj/windows/mame/build/vconv.exe] Error 1make: *** Waiting for unfinished jobs....Finished!0 Hours 12 Minutes and 13 Seconds Elapsed.

Any idea what this problem is? What is "-lunicows"?

Posted

Hmm.

Try and re-download your MAME source code and compile it again. I've never seen this error personally.

Posted

It might also be worth while trying a previous version of the MinGW toolset (It's at the top of the page). I'm a bit remiss to suggest just how far back to go, but if I'd try to find the first release of the toolset occurring either before or after the release of MAME 0144 (which looks like it occurred on 13 Nov 2011).

MAME Compiler 64 used to include MinGW but nowadays you need to install it separately. Occasionally this means that the two components can be out of synch.

Posted

Hmm, same result. Tell me if I'm putting the source code into the right folder:

C:\MinGW\source\Mame0144\makefile

The "makefile" is just an example of what is in that level of folder. I ask because the file I download "mame0144s.zip" has another zip file inside it called "mame.zip". What I have been doing is only taking the contents of the "mame.zip" and putting that into the "C:\MinGW\source\Mame0144" folder. Or am I supposed to make it so it looks like this: C:\MinGW\source\Mame0144\mame.zip?

The other possibility is that I'm doing something wrong in the option MAME Compiler that is causing the error, but I kind of doubt that because, like I said, I got the same error using a different process from the Xpadder forum. One difference between my results from this method and that at the Xpadder forum is that this compile took over 12 minutes to complete while the Xpadder method took about 2 seconds before arriving at the same error.

Posted

It might also be worth while trying a previous version of the MinGW toolset (It's at the top of the page). I'm a bit remiss to suggest just how far back to go, but if I'd try to find the first release of the toolset occurring either before or after the release of MAME 0144 (which looks like it occurred on 13 Nov 2011).

MAME Compiler 64 used to include MinGW but nowadays you need to install it separately. Occasionally this means that the two components can be out of synch.

Good suggestion, I'll try the versions of MinGW from May 2011 and then from Aug 2012.

Posted

Hmm, same result. Tell me if I'm putting the source code into the right folder:

C:\MinGW\source\Mame0144\makefile

The "makefile" is just an example of what is in that level of folder. I ask because the file I download "mame0144s.zip" has another zip file inside it called "mame.zip". What I have been doing is only taking the contents of the "mame.zip" and putting that into the "C:\MinGW\source\Mame0144" folder. Or am I supposed to make it so it looks like this: C:\MinGW\source\Mame0144\mame.zip?

I just looked at my own MinGW\source\ folder and here's what mine looks like:

MinGW\source\

  • mame.zip
  • mame0143s.zip

I'm pretty sure I haven't changed anything from when I last compiled successfully, so you might try adjusting your source directory accordingly?

Posted

@nullPointer

I don't think that's right, I can't get the compiler to do anything when I put my files like that. Besides, the instructions say to "Download the mame0147s.zip from here and extract to C:\MinGW\source\Mame0147u3". But if I just put the mame.zip into that folder then nothing happens. Well, I get this as my output:

Compiling Mame...Using Parameters  -j3 TARGETOS=win32 TARGET=mame OSD=windows NOWERROR=1make: *** No targets specified and no makefile found.  Stop.Finished!0 Hours 0 Minutes and 0 Seconds Elapsed.

Only if I unzip the mame.zip do I get any more results. One thing I've noticed is that I don't make much progress unless I have the 64-bit version of the MAME tools as well as the 32-bit version. I'm gonna try a few more combinations and I'll post again soon. Right now I'm compiling...

Posted

Oops sorry Koop. You're absolutely right. I should of kept my mouth shut on that one. Ultimately you want to point your source directory at whatever directory has the makefile in it, which I believe is the top directory of mame.zip after extracting.

Posted

Still not working. Here are some results.

  • Using MAME tools from May 2011 these are the results I get if I ONLY have the 32-bit version of the tools extracted (note, I am NOT compiling for 64-bit and I have the box unchecked in the Mame Compiler 64 program).
Compiling Mame...Using Parameters  -j3 TARGETOS=win32 TARGET=mame OSD=windows NOWERROR=1mkdir.exe -p obj/windows/mameprocess_easy: DuplicateHandle(In) failed (e=6)process_easy() failed to launch process (e=6)Finished!0 Hours 0 Minutes and 0 Seconds Elapsed.mkdir.exe -p obj/windows/mame Counted 3 args in failed launch
  • However, if I extract both the 32-bit and the 64-bit tools and run the Mame Compiler (still with 64-bit unchecked) it will run for a long time, but I get the error that I referenced before.
  • Using the Aug 2012 version of the tools, it will run for a while if I have both the 32-bit and the 64-bit tools extracted AND it will run if I have ONLY the the 32-bit tools. However, I still get the same error I referenced before.
  • Using the current version of the MAME tools, I get the same results as the Aug 2012 version.

Currently the options I have checked in Mame Compiler 64 are "dual core", "no warnings as errors", and "force direct input". I'm not sure what the "no warnings as errors" means, but it was checked by default when I first installed the program. Should I try unchecking it? Is it possible that skipping one of the patches steps is causing this error?

Now, I just want to make sure I understand how to know when it does work. If a compile works, I should see a mame.exe in the "source" folder, correct?

Posted

Wait, it worked! I'm not sure what I did differently this time, but I am using the May 2011 version of the MAME tools, and I both the 32-bit and 64-bit versions of the tools extracted. I could have sworn that I tried this before and it didn't work, but maybe I got mixed up.

So now my question is, in order to test this new mame.exe do I just need to transfer the mame.exe file over to my arcade computer (I'm using a different computer right now to compile) or do I need to move all of the contents of that folder (makefile, and also the various folders such as /obj and /src)? I don't want to overwrite any save states that I have on my arcade computer (not sure where those are stored) because I use them to save high scores. Also, a few games I have setup custom controls (anyone know where those files are stored?).

Thanks a lot for the help so far, almost there! Of course, the real test will be to see if Xpadder now works with MAME since that was the original intention of all of this. :)

Posted

That's great news Koop! Glad it worked out for you.

Ideally it's good to compile on the same machine that will be running MAME, but it should be fine to transfer the executable over to your other machine. As far as save states working flawlessly, it's a bit hard to say since you presumably saved using the default build of MAME but will now be using a custom build. I'd venture a guess that it will work fine, but naturally you'll want to back those files up before attempting to load them.

IIRC custom game control settings are stored in the cfg file corresponding to the configured ROM under \mame\cfg\

Save states are saved to the sta directory under \mame\sta\

(where mame is your mame directory)

Posted

It works on the arcade machine! I just replaced the mame.exe and that's it. Then, using the Xpadder plugin (great plugin by the way) I got my 3rd and 4th player controls working. I'm also excited to see that the Xpadder plugin has options for exceptions. So for certain MAME games I will be able to use the gamepads as the first player controls when an analog joystick is required. But there aren't too many games where I think I will want to do that. For the most part, I'm trying to keep my setup as simple and clean as possible so I will only plug in the gamepads in 3 situations:

  1. The need for a 3rd or 4th player
  2. N64 games (most just don't play that well with my digital joysticks)
  3. The rare necessity to have an analog joystick for MAME games (as long as the game is playable with digital joysticks then I'm not going to worry about this, unless I really get into a particular game and want the best controls)

Thanks for the help. I'm not sure this thread will be that useful for anyone else having the same problem as me. The instructions given on the website should work. I don't know why it didn't work for me at first but then did work later (unless I was messing something up before).

Posted

I just wanna jump in and say thanks for the props on the plugin. Users like you are the reason I enjoy making plugins in the first place. I'm flattered and honored that you find it useful.

Glad you got it working koop! Have fun playing! :)

  • Like 2
Posted

I just wanna jump in and say thanks for the props on the plugin. Users like you are the reason I enjoy making plugins in the first place. I'm flattered and honored that you find it useful. Glad you got it working koop! Have fun playing! :)

Yeah, you really nailed it with this plugin. I haven't used it much but so far it's been really easy to use and seems very powerful and flexible.

  • Like 1
Guest
This topic is now closed to further replies.
×
×
  • Create New...