Jump to content
LaunchBox Community Forums

Recommended Posts

Posted

DemulShooter Auto-Launcher

View File

Automatically start DemulShooter when launching a game.

When launching a game, this plugin will check for a valid DemulShooter emulator or exe and associated game.  If found, DemulShooter will be started with the appropriate command line parameters for that game.

 This reduces the need for customized Additional Apps, batch files or AutoHotkey scripts to run DemulShooter. (See Notes)

 

NEW: v1.1.0  Self launching exe's (e.g. 'Windows' games) are now supported.

 

If you don't have a lightgun or have never setup DemulShooter, there's really nothing more to see here.

 


Requirements:

  • LaunchBox v13.19 or newer
  • DemulShooter installed and setup**
  • The plugin file (RunDemulShooter.dll)
  • "settings.txt" in the plugin's folder and edited/saved (see below)

**See DemulShooter documentation for setting it up and its supported emulators & ROMs.
    https://github.com/argonlefou/DemulShooter/wiki



Installing and Using:

  • Extract the contents of the zip file to the /Plugins/ folder
    • e.g.  D:\LaunchBox\Plugins\RunDemulShooter\RunDemulShooter.dll
  • In that plugins folder, create a new "settings.txt" file.
    • In the file, add "demulshooter = full/path/to/DemulShooterFolder" (without quotes)
      • e.g.  demulshooter = E:\My LightGun Files\DemulShooter
    • The path can be a relative path to LaunchBox.
  • Start LaunchBox
  • (optional: Start QMamehook or MAME Hooker or your alternative Hook flavor of choice)
  • Launch a valid DemulShooter emulator/game.

 

Adding Custom Command-line Parameters per-game: (new v1.1.0)

 To add custom parameters per-game, go to the Tools Menu and select "DemulShooter Auto-Launcher Settings"

This will load all supported games found in your collection.

Here you can set the folder for your DemulShooter.
   The folder value will be saved to an xml file [RDSsettings.xml] (along with any game-specific custom command-line parameters).
   The folder path will be saved as a relative path (to LaunchBox) to keep things portable.

Double-click on a game to view and modify the command-line parameters passed to DemulShooter for that game.

Make your changes and click Save to save them.

 

Default Parameters:

  • If the game's emulator is TeknoParrotUI, -noinput will be added to the parameters
  • System 357 games will also have -pname=rpcs3.exe added to the parameters



How it works - What it does
When a game is launched, the plugin will...

  • (A) Check if the game is an exe (no emulator)
    • The games Title will be checked against "the list"
  • (B) Check the game's emulator against a list of supported emulators
    • Check the game's ROM file against a list of supported games for that emulator
  • Check if DemulShooter.exe (or DemulShooterX64.exe) is inadvertently already running and then kill the process
  • Check for custom command-line parameters
  • Start DemulShooter.exe (or DemulShooterX64.exe) with the corresponding parameters

Examples:
Game:       Silent Hill: The Arcade
ROM file:  SilentHill.xml
Emulator: TeknoParrot
Launches: DemulShooter.exe -target=ttx -rom=sha -noinput

Game:      Ninja Assault (US)
ROM file:  ninjasltu.zip
Emulator: Flycast
Launches: DemulShooterX64.exe -target=flycast -rom=ninjasltu

Game:     Manic Panic Ghosts
ROM file: manicpnc.zip
Emulator: Demul
Launches: DemulShooter.exe -target=demul07a -rom=manicpnc

Game:      Razing Storm
ROM file:  RazingStorm.xml
Emulator: TeknoParrot
Launches: DemulShooterX64.exe -target=rpcs3 -rom=razstorm -pname=rpcs3.exe -noinput



Support emulators:

  • Demul   (Demul 07a or newer)
  • Model2 Emulator
    • emulator.exe
    • emulator_multicpu.exe
  • Flycast
  • TeknoParrot
  • Linux Loader (new v1.2.0)



Notes:

  • TeknoParrot games must use TP as the emulator (TeknoParrotUI.exe) and the ROM must point to the game's xml file. 
    • The xml file must be named for the games ROM (as TP names them).
    • e.g. for Luigi's Mansion Arcade, "LuigisMansion.xml"
  • Games that are standalone executables are not recognized by this plugin. 
  • (v1.1.0) Checks for all games DemulShooter supports.
  • When launching a game, a check is done to see if DemulShooter is already running (e.g. if it didn't shut itself down from a previous launch). If it is, it will kill the existing process. This avoids the "Dude! You can't start DemulShoorter because it's already running".

 

Big special thanks to @magicray1028!!  Without Ray's support, guidance and testing, I most likely would have never created this.

 

As always, all thoughts, views, suggestions, comments are welcome.


 

  • 1 month later...
Posted

First off, thank you for this plugin. It saves SO much time with configuring DemulShooter in LB.

 

I received the attached error when I tried to launch the plugin's settings via LaunchBox.

 

Also, games launched via TeknoParrot don't seem to hook properly with DemulShooter unless DemulShooter is launhed after TP has launched the game EXE. Is there any way to automate this via the plugin?

 

Thanks!

Screenshot 2026-05-23 230809.png

  • Like 1
Posted
12 hours ago, prophecy0 said:

First off, thank you for this plugin. It saves SO much time with configuring DemulShooter in LB.

You're welcome. :) 

 

12 hours ago, prophecy0 said:

I received the attached error when I tried to launch the plugin's settings via LaunchBox.

Edit:  You didn't follow the Installing and Using instructions; The 2nd bullet (right after extracting the files).

(I should probably fix this. But this also shows me who can follow instructions. ;))

 

12 hours ago, prophecy0 said:

games launched via TeknoParrot don't seem to hook properly with DemulShooter unless DemulShooter is launhed after TP has launched the game EXE

Can't say I've ever heard of that before.  'Need to launch DemulShooter after the TP game is running.'

Unless you're saying that's the case ONLY via the plugin. If this is the case, may need to set the -pname= option for those games (?) via the settings menu.  Edit Which according to the above error, you can't even do that.

Posted (edited)

I created the settings.txt file after extracting and pointed it to DemulShooter. The plugin is working according to the log files. I simply can't access the plugin menu in Launchbox. I just tried closing and re-opening LB and got the same error that I pasted above. I was trying to access the plugin menu in LB so I could pass the argument to turn off crosshairs. 

 

The need to launch DemulShooter after the TP game is running IS weird, I know. It works that way on my machine whether or not I am using your plugin. I know it seems backwards, but if DemulShooter is running first it never hooks into the game properly. I'm not sure why. 

edit: I've posted in the BYOC DemulShooter thread about the TP hooking issue. I'm sure there is something simple I am overlooking on that front. I tried using the -pname argument to pass the Teknoparrot loader as the process name, but that didn't work for me either. 

Edited by prophecy0
Posted
11 hours ago, prophecy0 said:

I was trying to access the plugin menu in LB so I could pass the argument to turn off crosshairs. 

Made some changes.  Can you give this a try and let know how it goes?
RunDemulShooter (v1.3.0-beta-1).7z

 

11 hours ago, prophecy0 said:

if DemulShooter is running first it never hooks into the game properly. I'm not sure why.

Yeah, that is weird.

It sounds like when you start DemulShooter, it can't find the corresponding game to hook, so instead of waiting around, it exits itself.  Which if that's the case, the HookTimeout got set to something other than 0 (zero).  ("If the value is 0, it will wait forever.")

This setting can only be changed by manually editing DemulShooter's config.ini (should be the last line in the file).  Check if you have a value other than 0 set there.

 

Which games are you seeing this on?  (Don't say all of them! Name a few. ;))  I know with their most recent release (v17.5), Lindbergh games now require the parameter -pname=BudgieLoader.exe.  There was also a resolved issue with TP games when ran fullscreen.

However, neither of these explain why they'd work if starting DS after the game is running.  (dang it!)

 

So back to the original question: "Is there any way to automate this [starting DemulShooter after the game is running] via the plugin?"

No.  Because of how TP is a launcher, it's difficult to determine when the actual game is up-and-running to then start DS.  Well, there could be. But it'd be a guessing game and would have to customize it on a per game basis. It's not something that should need to be done and is more than I want to do.  If this becomes an epidemic, I may then rethink my position.

A fix:  Go old school and create an AutoHotkey script set to run Before the main application that will 'Sleep' a certain amount of time then start DS with the appropriate parameters.  The Sleep may, and the parameters will vary from game to game. So you can't just add something to the emulator's Running Script.

 

Hopefully your post on the DemulShooter thread will get a response that has a simple resolve.

  • Thanks 1
Posted

Thanks for the detailed response. The beta plugin worked - I was able to access the menu within LB without any issues. 

 

The game I was noticing the weird sequencing issue on (Launch game via TP, then launch DemulShooter) was Aliens: Extermination. That process was working consistently the other night, but now I can't get that method to work either. I also tried Aliens: Armageddon without success. Like I posted in the edit above, I've tried using the -pname argument to pass the process name of the corresponding TeknoParrot loader for each game, but that hasn't seemed to work. 

I am also hopeful that my post in the DemulShooter thread will get some replies. 

 

Thanks again!

  • Like 1
Posted

I got a reply from the DemulShooter dev. It turns out I was not running DemulShooter as admin. As soon as I set it to run as Admin it started hooking correctly. However, that led to your plugin no longer working. The following error was in the log file:

"An error occurred trying to start process '"C:\LaunchBox\ThirdParty\DemulShooter_v17.5\DemulShooter.exe"' with working directory 'C:\LaunchBox\ThirdParty\DemulShooter_v17.5'. The requested operation requires elevation."

I thought maybe if I made LaunchBox + BigBox run as admin as well that I could get past this error, but that didn't work. I have UAC completely disabled in Windows. 

Posted
4 hours ago, prophecy0 said:

I made LaunchBox + BigBox run as admin

You don't want to do that.  That will create other issues down the line.  Link making LB/BB throw [other] errors.

 

4 hours ago, prophecy0 said:

I have UAC completely disabled in Windows. 

That's usually the 1st thing I do on a PC. But in this case never had the issue [not hooking] you're seeing.  Another thing I'll do is add an exception in Defender for the entire LB folder structure.  Most likely not related but doesn't hurt if your diligent with your build.

I say I "never had the issue", but I also don't run TP at all.  I 'threw it out the door' several years ago. To many idiosyncrasies, more than I felt I should have to deal with.  Switched to JConfig, and more recently Linux Loader.  Unfortunately, the 2 example games you mentioned aren't in my arsenal.

You don't have TP running as Admin. Do you?  (That may have been part of the reason I 'threw it out'. For me, if a gaming app requires elevation to run on my machine, it doesn't get used on my machine.)

 

Do you have issues with DemulShooter and other emulators?  Flycast, Model2 (emulator_multicpu.exe), Demul, Linux Loader, MAME w/lua scripts, CXBX Reloaded...?

 

What hooking app are you using?  No idea if that'd be related at all. But if I'm thinking correctly, the hooker app is about the only way you can tell if DemulShooter is relaying the outputs. I used MAMEHooker for about a half day until I told to use QMameHook.  Not that there was something wrong with MH. It's just that I was told QH works better. (Note, I've only been in the lightgun scene for 3 months. So still learning as I go. :D)  I've recently switched to the up-and-coming OutputHooker, which has been working great.

Wait... is you hooker app running as Admin?

Posted (edited)

I'm using Hook of the Reaper. It is not running as admin. It looks like TeknoParrot DOES install itself with admin rights. I'm going to disable that and see if I run into any issues. 

This is all on a dedicated PC I've built for an arcade cabinet, so I'm not as worried about security on it. That said, I'd rather TP not be running as admin.

edit: I disabled admin on TeknoParrot. It still seems to be working fine. This also allowed me to disable admin on DemulShooter. Your plugin works as expected now. Thanks again for the plugin + help. 
 

Edited by prophecy0
  • Game On 1

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