Jump to content
LaunchBox Community Forums

Anyone know a ahk script for launching a game in retroarch ?


jimbone007

Recommended Posts

Hey I’m trying to create a ahk script to launch single games in retroarch and mame. Or a ahk script to launch games through lb/bb. I am just looking for a example that works that I can change and use.
example:

run, retroarch.exe  core-… rom- super Mario world. 
run, mame Rom- time crisis

run, launchbox.exe platform- snes rom- super Mario world  

im trying to set up a stream deck to launch games with the touch of a button and it works with some games but I don’t know what a ahk would look like for mame or retroarch. 

Edited by jimbone007
Link to comment
Share on other sites

 

Put your "full/paths/to/whatever/folder/and/file/your/pointing/to" in quotes. You don't always need them, but it WILL save a lot of potential headaches.

 

11 hours ago, jimbone007 said:

looking for a example that works

 

Run, "D:\Emulators\Retroarch\retroarch.exe" -f -L "D:\Emulators\Retroarch\cores\stella_libretro.dll" "D:\ROMs\Atari 2600\Adventure (1978) (Atari) [!].7z"

"-f" is to open it full screen. If you don't need it, you can remove it.  "-L" is to Load the core.  You need it. Don't remove it. ;) 

 

Run, mame.exe "D:\ROMs\Arcade\centiped.zip", "D:\Emulators\MAME"

Here, after the last , (comma), we're putting in the working directory for MAME.  This way we don't have to add another line for "SetWorkingDir" that will affect the entire script.

 

LaunchBox doesn't accept command line parameters. 

Link to comment
Share on other sites

I got the Retroarch ahk working but the mame ahk isn't. I checked my file paths and they are good. I'm pointing it right to the .zip but the error I'm getting is that It can't find any of the files that are in the zip file. I tried 2 different roms that I know work. example " c71.bin not found ( tried in timecris) ". Its not a ahk error its a mame error. any idea what I'm doing wrong?

Link to comment
Share on other sites

Run, mame.exe "F:\Video Games\MAME 0.242 ROMs (non-merged)\timecris.zip", "F:\LaunchBox\Emulators\MAME 0.242"

 

This is what mine looks like. File paths are spelled and typed correctly. the ahk was placed in my mame root folder. path to rom is correct and after the last comma is my mame root folder.

Link to comment
Share on other sites

  • Start mame.exe
  • go to General Settings
  • go to Configure Folders
  • go to ROMs
  • go to Add Folder
  • navigate to your "F:\Video Games\MAME 0.242 ROMs (non-merged)" folder
  • press Tab
  • press Escape twice
  • double click on Save Settings
  • press Esc, then press Esc again to exit MAME

Try the Time Crisis script again.

 

I'm not at my main PC now, but I believe with the rompath now set, your script can be shortened to

;if the script is in the same folder as mame.exe
Run, mame.exe timecris

;if the script is NOT in the same folder as mame.exe
Run, mame.exe timecris, "F:\LaunchBox\Emulators\MAME 0.242"

 

Link to comment
Share on other sites

That was the problem. Its works now. Thanks. Also wondering if you'd share a ahk script to launch sm2 games this way? I have :

Run, F:\DemulShoote_v10.5.0\DemulShooter.exe -target=model2 -rom=hotd
Run, emulator_multicpu.exe -f -L "F:\LaunchBox\Emulators\Sega Model 2 Emu 1.1a\Model 2 Emulator 1.1a\m2emulator\roms\hotd.zip"

It  only launches the emulator though not the game.

Edited by jimbone007
Link to comment
Share on other sites

2 hours ago, jimbone007 said:

Run, emulator_multicpu.exe -f -L "F:\LaunchBox\Emulators\Sega Model 2 Emu 1.1a\Model 2 Emulator 1.1a\m2emulator\roms\hotd.zip"

It  only launches the emulator though not the game.

Make sure that in emulator.ini you have specified the path to your model 2 rom folder.

174691322_Schermopname(1).thumb.jpg.731d06979239f9da02a53a9076fb84e9.jpg

Then:

Run, emulator_multicpu.exe hotd

 

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...