Main > Main Forum

Autohotkey + mame + win 7 x64 = SOLVED!

Pages: << < (2/2)

severdhed:

Ok, after a bunch  of messing around, i finally got this working!!!

i had to recompile mame, with a different tweak to the source code than i did for xp. 

the first time i did this years ago, it was with the help of nitz on the forums, i followed his instructions and they worked beautifully on xp..here is what i changed to the source code:

Navigate your way to C:\mamesrc\src\osd\windows\. Open the file input.c. If you double-click it, it should just open in notepad, if not, open it with notepad. Now, find the following text:

// initialize RawInput and DirectInput (RawInput first so we can fall back)
rawinput_init(machine);
dinput_init(machine);
win32_init(machine);

and change it to this:

// initialize RawInput and DirectInput (DirectInput first so we can fall back)
dinput_init(machine);
rawinput_init(machine);
win32_init(machine);

then compiled mame, with the hiscore nonag patch.

this DOES NOT WORK WITH WINDOWS 7 or 8 x64.

upon doing some searching, i stumbled across a thread on an xpadder forum, where they said to change a different value instead:

1) Edit \source\src\osd\windows\input.c (this is the first file named "input")
2) Replace the 0 in the following line with 1: #define FORCE_DIRECTINPUT   0

i then compiled it and it works!  i figured while i was at it, i figured out how to compile the 64bit version..so now i have a 64bit version of mame 124 with directinput support that works in 64bit versions of windows.

the only problem i ran into was i had to use a different key in my script..since mame was receiving the actual keypress, as well as the scripted keypress. i have to make it so that i am pressing a key that is not defined in mame, and then it sends one of two other keys, depending on how long it is pressed.

i am so happy about this, i can't wait to get home and try it out tonight.

SgtSlaughter:

Glad you got it working.  I haven't built my machine yet, but most definitely will look at using this script, so thanks for posting it!

Pages: << < (2/2)

Go to full version