Jump to content
LaunchBox Community Forums

Delay launch of apps


LuismaSP89

Recommended Posts

Ok I think @LuismaSP89 was on the right track. It seems that the very close timing of the regedit and the start of the emulator is the only issue. I've not toyed with additional apps much but I believe that if you just tweak your batch a bit and tick the "wait for exit" box in the additional apps screen, your problem will be solved. So what I've done is that I've created a batch that simply reads "hello world" to the screen and has a pause line that requires you to hit a button to exit. In Launchbox, that batch file is set to run before the Main Application (ePSXe) and is also set to "Wait for exit". 

In testing, this works fine. So if I were to replace my hello world batch with yours, theoretically the registry could be updated, you could tap a controller key to close the window, or you could simply add a timeout command "timeout /t 10" and that would give the registry enough time to accept the edit before the batch closes and ePSXe opens up. I'll make a quick vid of this later and you should be good to go. On the plus side, I've learned about the additional app feature which I've never really bothered with before.

Edited by Zeromod
Link to comment
Share on other sites

1 hour ago, Zeromod said:

I believe that if Luis here just points to the batch file as the actual emulator under manage emulators and then creates an additional app line and adds the ePSXe details in, it would solve his issue. It seems very similar to the Daemon tools issue and SSF that the other gentleman was working with you on. Thoughts?

I'm not entirely sure if that would work simply because if the batch is set as the emulator it's going to try to direct the rom file to that in attempt to use it as the emulator. You could, however, uncheck "use an emulator", direct the rom path field to the batch, and then add an additional app directed to the emulator with the rom path added in the custom command line parameters field (along with any other needed command line parameters) and tell it to "automatically run after main application".

Alternately, and frankly a much less hacky option, would be to simply use Retroarch which has the capability of per-game control remapping. Load a game -> change the controls -> save game remap. Now it'll load automatically whenever you start that game.

Link to comment
Share on other sites

Just now, Zombeaver said:

I'm not entirely sure if that would work simply because if the batch is set as the emulator it's going to try to direct the rom file to that in attempt to use it as the emulator. You could, however, uncheck "use an emulator", direct the rom path field to the batch, and then add an additional app directed to the emulator with the rom path added in the custom command line parameters path (along with any other needed command line parameters) and tell it to "automatically run after main application".

Alternately, and frankly a much less hacky option would be to simply use Retroarch which has the capability of per-game control remapping. Load a game -> change the controls -> save game remap. Now it'll load automatically whenever you start that game.

Yep, I figured it out I believe. I'm upping a video for him now. I think just using wait for exit and adding a timeout /t command to his batch will sort his issues. I've tested it with my hello world locally in LB and BB and it's working without issue and calling my game properly etc. I use Retroarch myself, but I don't like to offer a new emulator etc as a solution to people as I always found it a bit frustrating when I myself was looking for a solution and the answer provided was to get a new emulator etc. I agree, that this is far from an ideal setup but if I can fix it with a quick batch edit, and he's happy with the solution I'm good. 

I think he was on the right path all along, but there is likely a very small timing issue in where the emulator would launch just before the registry would accept the read from the batch. So if the timeout command and wait for exit sorts that out sorts that out, he should be good. I'll wait for his reply and we shall see. Thanks for jumping in, I hate pinging mods but it seemed somewhat related to that bitbucket request. 

Link to comment
Share on other sites

@LuismaSP89 Whew so this has been a fun exercise for me haha. I've posted a video below that details what I've figured out. I believe that just a minor tweak to your batch file (replacing the deprecated sleep command with a timeout command) and tweaking the additional application dialogue will get you on track. On my setup, this worked in LB and BB and calls my game without issue. I'll note however, that you may very well have to edit each game individually to get that batch working. So while I'm committed to trying to solve your issue, I'm can nearly guarantee you that if you had used Retroarch and a good core, you would be happier with the end result overall. 

 

Also, obligatory warning. You are writing to your registry. Make restore points and be safe here. It's the last thing you want to have issues with trust me on that one. I'm excited to see if this works for you, so please let me know once you've tested.

 

 

Link to comment
Share on other sites

11 minutes ago, Zeromod said:

I use Retroarch myself, but I don't like to offer a new emulator etc as a solution to people as I always found it a bit frustrating when I myself was looking for a solution and the answer provided was to get a new emulator etc. I agree, that this is far from an ideal setup but if I can fix it with a quick batch edit, and he's happy with the solution I'm good. 

I mean I understand that point of view, and don't get me wrong, I appreciate that you're helping another user no matter what form that takes - a solution is a solution, even if it's not ideal. Sometimes you just have to work with what you've got. And when it comes to emulation there's almost always multiple solutions to the same problem.

My point is that this is a situation that Retroarch has features that are specifically designed to address. This is a single one-off situation, sure, but what happens when another one arises unforeseen later on down the road? Another hacky solution could be used for that one-off situation, and the next... or you could use something that has the necessary infrastructure in the first place to deal with those situations. Switching emulators is more time consuming, no argument there, but RA provides a great foundation to do a lot of things that aren't quite so easy to accomplish elsewhere. There's also no shortage of RA tech support around these parts since tons of us use it haha. Brad also has about a bajillion video tutorials that use it :P

Link to comment
Share on other sites

It's really the end users call I guess. If I used Launchbox for example and someone said to use Hyperspin because it does X out of the box and is specifically good at that thing, I would be frustrated because it assumes that it also does all of the other things that Launchbox does well on top of that one thing. Emulators are no different. Personally, I'm not a huge fan of his emulator but the solution is less "hacky" in my opinion since we are using Launchbox features to automate them and keep them nice and organized.

I did recommend RA as something that he look into for future usage though as I imagine he would in this case be happier in the long run. At the very least, it's unlikely that he would have any controller issues that require editing his registry lol. I think the biggest reason that people stick to some of these older emulator solutions is that they view Retroarch as this beast that is too complicated to approach. And if I'm being honest, it was not the easiest thing to get sorted but I'm talking more "Advanced" things like custom overlays, shaders, per core configurations etc. Just getting a PSX game running with great controller support is fairly easy out of the box. At either rate, I'm interested to see if this works for him and it's another thread someone might find useful for a similar issue down the road. Thanks for jumping in. I'm going to get back to my real work now :D 

Link to comment
Share on other sites

18 minutes ago, Zeromod said:

the solution is less "hacky" in my opinion since we are using Launchbox features to automate them and keep them nice and organized

Well by "hacky" I mean using a script to edit the registry to change controls for a PSX game haha; not the implementation of said script within Launchbox.

"Alright now the first thing ya gotta do is disable UAC, then disable yer firewall, install TeamViewer, double click on this handy script, just ignore the command prompt it'll go away in a second, and then you too can watch Netflix!"

Flexibility and fostering the "to each their own" approach is one of Launchbox's greatest strengths, so I'd never tell someone "You need to use X" since chances are they can do whatever they want to do with whatever they want to use via LB (with more or less complication depending on what you're dealing with); but if someone (on these very forums) hadn't told me at one point "Hey, you can do that and a lot of other neat things with Retroarch! Here are some useful things you can do..." then I would still be using ePSXe too - and I'm saying this as someone who did use ePSXe for many years in the past. I'm just throwin' it out there as a convert with no regrets haha.

  • Like 1
Link to comment
Share on other sites

3 hours ago, Zeromod said:

Sooo I'm an idiot. I just sat here and did exactly what you don't need, I delayed the batch lol. I was thinking about it while showering and had a duh moment. Give me a sec and I'll see if the AHK functionality in LB lets me just reverse the order here and delay the start of the emulator. Sorry for the run around Luis I'm running on little sleep today. Worst case scenario and we can literally just set AHK as the emulator and let the script handle importing the reg file and launching EPSXE for you. YAY CAFFEINE! 

xD don´t worry. Yes, it delays the batch, and i need to delay the emulator launch. By the way thank you for your interest : )  and i hope you sleep well.

Link to comment
Share on other sites

26 minutes ago, LuismaSP89 said:

xD don´t worry. Yes, it delays the batch, and i need to delay the emulator launch. By the way thank you for your interest : )  and i hope you sleep well.

@LuismaSP89 see my later replies. I posted a second vid and some details in the second part of this thread. I'm pretty sure I've found the solution. 

Link to comment
Share on other sites

2 hours ago, Zeromod said:

@LuismaSP89 Whew so this has been a fun exercise for me haha. I've posted a video below that details what I've figured out. I believe that just a minor tweak to your batch file (replacing the deprecated sleep command with a timeout command) and tweaking the additional application dialogue will get you on track. On my setup, this worked in LB and BB and calls my game without issue. I'll note however, that you may very well have to edit each game individually to get that batch working. So while I'm committed to trying to solve your issue, I'm can nearly guarantee you that if you had used Retroarch and a good core, you would be happier with the end result overall. 

 

Also, obligatory warning. You are writing to your registry. Make restore points and be safe here. It's the last thing you want to have issues with trust me on that one. I'm excited to see if this works for you, so please let me know once you've tested.

 

 

Don´t worry, it´s only a line in the registry, only to modify if the controller that uses the Epsxe is the digital controller of the PSX or the Dualshock, because certain games doesn´t work with this last one.

I use two .batch, the first enables the digital controller, and the second the Dualshock, it´s very useful "At least for me xD" because i use the "digital batch" before runing the two or three games i got that uses digital controller, and the "Dualshock batch" to restore it when i close the game, using the "after" option in launchbox. So, i don´t need to edit all games, only these two or three games to use the digital pad with him.

I tested many emulators and many plugin pads, the pokopom, the lilypad, etc. And this is the only option i found. And i want to use the epsxe, retroarch doesn´t like me.

By the way, i must tell you that your solution of "timeout t /10" works like a charm :D seriously THANK YOU.

I´m an idiot, because, i put the timeout option many times ago, but i laked the "Wait for exit" option.

I don´t know if editing the registry is the best way for solve my problem, but is the solution i found, and i promise that i don´t broke my OS, i´m network admin and i know more or less what i´ve done xD.

A thousand of thanks again Zeromod, i hope this can solves the problem for more people looking for delay the launch of an emulator : )

  • Like 1
Link to comment
Share on other sites

Glad to hear it. I'm the idiot that woke up and asked you if you wanted to delay the batch and then turned around and did that anyway :P happy gaming. If you determine how to bulk change I would share that here as well. I didn't see any obvious solution at a glance and I'd hate to have to do that to every game in a large library. My PS1 library is pretty small so it wouldn't be that big of a deal.

Link to comment
Share on other sites

  • faeran locked this topic
Guest
This topic is now closed to further replies.
×
×
  • Create New...