Jump to content
LaunchBox Community Forums

[MAME] Romname as variable on command line


Daliant

Recommended Posts

QUESTION: Is there anyway to add the VARIABLE of the romname to the end of the command line for Mame emulator?

I want to record my games with -record command, but need to add the name of the rom after command to have my games individualy recorded.

Any suggestions?

 

Thanks in advance.

Link to comment
Share on other sites

the filename is automatically appended to the end command line when you start a game. If that is not sufficient you'd probably be looking at using a script as an in-between.

 

Maybe you could post an example command. Would probably help us figure out exactly what you're trying to do and what your options are.

Link to comment
Share on other sites

Hi @Pr0FiT!!!

This is my actual command line for launching Mame on Launchbox: mameuifx64.exe -nowindow -joy -skip_gameinfo -record ROMNAME.inp Archivo

As you see I want to record my plays in a .inp file, but need to replace ROMNAME with the name of the rom launched. I've tryied [romname] "[romname]" and some other variants, but nothing seems work to replace this variable with the rom name of the game launched.

 

Note: my Launchbox installation is in Spanish, this is why you see the word Archivo at the end of the line instead of File.

 

Link to comment
Share on other sites

I think you're going to need a go between to launch your game then. As far as i know LB does not populate any variable you can use to customize the command line like you need, it just slaps the filename on the end. Should be pretty simple though

```

@echco off

cd /d <path to mame dir>

mameuifx64.exe -nowindow -joy -skip_gameinfo -record %1.inp %1

```

save this as `<whatever.cmd>` and this would be the new emulator path you use in LB. Another option might be to use rocket launcher....i've never actually used it myself so not sure if that is accurate but it seems like it might be up to the task.

Link to comment
Share on other sites

12 minutes ago, Pr0FiT said:

I think you're going to need a go between to launch your game then. As far as i know LB does not populate any variable you can use to customize the command line like you need, it just slaps the filename on the end. Should be pretty simple though

```

@echco off

cd /d <path to mame dir>

mameuifx64.exe -nowindow -joy -skip_gameinfo -record %1.inp %1

```

save this as `<whatever.cmd>` and this would be the new emulator path you use in LB. Another option might be to use rocket launcher....i've never actually used it myself so not sure if that is accurate but it seems like it might be up to the task.

Works Perfect!!!!

Thank you so much for your kindly help friend.

Link to comment
Share on other sites

Just now, Daliant said:

Works Perfect!!!!

Thank you so much for your kindly help friend.

Just thought of something else too. if the "ROMNAME.inp" is just an output name (I have no idea, never done what you're doing) you could use the random variable like so

`-record %random%.inp`

Then it would have a random file name, avoids the script...if that matters to you.

Link to comment
Share on other sites

7 minutes ago, Pr0FiT said:

Just thought of something else too. if the "ROMNAME.inp" is just an output name (I have no idea, never done what you're doing) you could use the random variable like so

`-record %random%.inp`

Then it would have a random file name, avoids the script...if that matters to you.

Ok, thanks for the suggestion, but I prefer naming the output files same as the original rom in order to find it easy.

The first solution is PERFECT for me now, but thanks a lot for the second suggestion.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...