Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - makaveeti

Pages: 1 [2] 3
16
General Discussion & Help / Re: Mame Roms not launching via .Bat file
« on: June 21, 2017, 05:43:21 PM »
Glad to see you got your .bat file working. Here is ahk code in case you are curious.

Code: [Select]
#Persistent

mameEXE := A_ScriptDir "\mame64.exe"    ;path to mame64.exe

RunWait, %mameEXE%,,, MAME_PID    ;RunWait will wait until the program finishes before continuing
Exitapp

Joy9::
KeyWait, Joy9, T2    ;wait 2 seconds for release key
if (ErrorLevel)    ;more than 2 sec have passed
Process, Close, %MAME_PID%    ;close MAME using the Process ID we got from the RunWait command
return

I've tried this in a standalone ahk exe so far and it executes mame just fine. Can you incorporate the passing of the rom file into the code too please? I think you mentioned earlier that its %1 or %1%.

Thanks.

17
General Discussion & Help / Re: Mame Roms not launching via .Bat file
« on: June 21, 2017, 03:18:11 PM »
Yes sir

Sent from my LG-H950 using Tapatalk

In that case the above is certainly a sexy piece of code especially for an amateur coder like me :D I'll test tonight and feedback results.

18
General Discussion & Help / Re: Mame Roms not launching via .Bat file
« on: June 21, 2017, 10:21:54 AM »
Glad to see you got your .bat file working. Here is ahk code in case you are curious.

Code: [Select]
#Persistent

mameEXE := A_ScriptDir "\mame64.exe"    ;path to mame64.exe

RunWait, %mameEXE%,,, MAME_PID    ;RunWait will wait until the program finishes before continuing
Exitapp

Joy9::
KeyWait, Joy9, T2    ;wait 2 seconds for release key
if (ErrorLevel)    ;more than 2 sec have passed
Process, Close, %MAME_PID%    ;close MAME using the Process ID we got from the RunWait command
return

Thanks dustind900. This will be very useful to me at some point. I'll test the code tonight. Just to clarify I'm assuming the script launches MAME auotmatically and continues running in the background waiting for me to hold joy9 for 2 seconds?

19
General Discussion & Help / Re: Mame Roms not launching via .Bat file
« on: June 21, 2017, 12:36:19 AM »
All,

I have managed to resolve the issue.

I tweaked the code slightly and copied cmd.exe to the mame emulator folder. Here is what my code looks like now. Hosting the cmd.exe file outside of the mame folder causes it to fail therefore the cmd.exe file must reside in the mame emulator folder.

I'm now able to run an AHK script with MAME :) Thanks to everyone who helped.

Launcher Code
executable = emulators\mame\cmd.exe
arguments = /C mame64.bat "%ITEM_NAME%"


Bat file Code
@echo off
pushd "D:\emulators\retrofe080\emulators\autohotkey"
start ahk.exe mame.ahk
pushd "D:\emulators\retrofe080\emulators\mame\"
mame64.exe %1

20
General Discussion & Help / Re: Mame Roms not launching via .Bat file
« on: June 20, 2017, 09:56:32 PM »
I have used the following for bat files in the past: arguments = /C "%ITEM_FILEPATH%"

That launched my bat files fine, however, I have never tried launching multiple items though (ie, an ahk then mame + rom etc)

Jonah,

Are you using a batch file for Mame? Can you tell me the code from your Mame launcher?

21
General Discussion & Help / Re: Mame Roms not launching via .Bat file
« on: June 20, 2017, 05:47:16 PM »
An alternative piece of code for doing the same thing is enclosed below however I get the same result (works from command line but not from retrofe)

D:

CD\emulators\retrofe080\emulators\mame

mame64.exe %1

22
General Discussion & Help / Re: Mame Roms not launching via .Bat file
« on: June 20, 2017, 05:29:01 PM »
Correct and that works.

Trying with the command below results in an error stating the directory name is invalid. I believe this is because the pushd command only applies to directories and not files.

pushd "D:\Emulators\RetroFE080\emulators\Mame\mame64.exe" %1


23
General Discussion & Help / Re: Mame Roms not launching via .Bat file
« on: June 20, 2017, 05:17:43 PM »
the bat file resides in "emulators\Mame"

when I use the command line manually, i launch from the same directory above.

24
General Discussion & Help / Re: Mame Roms not launching via .Bat file
« on: June 20, 2017, 03:33:59 PM »
Thanks Pieter.


25
General Discussion & Help / Re: Mame Roms not launching via .Bat file
« on: June 20, 2017, 02:59:33 PM »
Yes it works manually directly from the command line. It launches both the AHK script and the game as per the code in the bat file.

26
General Discussion & Help / Re: Mame Roms not launching via .Bat file
« on: June 20, 2017, 02:52:47 PM »
Sure. I launched RetroFE, Tried the game Crude Buster (cbuster) and then manually exited from RetroFE.

27
General Discussion & Help / Re: Mame Roms not launching via .Bat file
« on: June 20, 2017, 02:18:23 PM »
@pieter - I tried both %ITEM_NAME% and %ITEM_FILEPATH% with and without quotes however this doesn't work.

@dustind900 - I'm not sure how I would go about adding the code to my AHK script. The script it designed to exit mame when I hold button9 on my gamepad for 2 seconds. I've pasted the code for the script below:

Joy9::
 KeyWait,Joy9,T2 ;wait 2 seconds for release key
 If (ErrorLevel) ;more than 2 sec have passed
 {
  Process, Close,  mame64.exe
  Exitapp
 }

Return


I'd like to add that running the .bat file manually from the command prompt (i.e. start command prompt, mame64.bat gamename) works ok but it doesn't when enacted from RetroFE.

28
General Discussion & Help / Mame Roms not launching via .Bat file
« on: June 20, 2017, 12:59:18 AM »
Hi guys,

I'm using RetroFE for windows. I've configured mame and my mame roms in RetroFE. With default launcher settings all works fine.

I made a .bat file to try launch 2 applications 1. ahk (autohotkey) and 2. mame + rom however the roms will not launch from RetroFE. The log file doesn't show any errors.

contents of launcher file -
executable = emulators\MAME\mame64.bat
arguments = %ITEM_FILEPATH%

contents of batch file -
@echo off

pushd "D:\Emulators\RetroFE080\emulators\autohotkey"
start ahk.exe mame.ahk

pushd "D:\Emulators\RetroFE080\emulators\Mame"
mame64.exe %1

I've made .bat files (coded to run several programs) for my windows games in RetroFE and they all work fine.

I tested the above code with Emulation Station for windows and it works fine. Feels like the item_filepath is not being passed through in RetroFE.

What am I doing wrong?


29
Share your theme / Re: Aura
« on: May 30, 2017, 09:08:37 PM »
Hey igarikoitz,

I absolutely love the theme you created. It is what I am trying to achieve in terms of a layout. i.e. All the games on the home screen and then a preview window of the game details upon selection. Unfortunately my XML skills are very poor as I've attempted to build my own with very little success. If possible can you share your theme with me in it's current state for me to use? Feel free to PM me.

30
I'm using the Ergo Proxy theme. I attempted to fiddle with the layout.xml file however I'm not achieving the results I want. Can you offer me an edited layout.xml file please?

Pages: 1 [2] 3