Jump to content
LaunchBox Community Forums

GameLaunchProxy Version 0.0.3.0 (Steam launch proxy, temporary font loading, and more)


Recommended Posts

@Nielk1 That is actually what I WAS using before when I couldn't get it to work at all a few days ago. I stopped using the launch options and instead, only use the target now and all is well. No idea if it would work from the launch options now, though. Either way, that is not the intended setup method and so should be considered improper. Also, whatever the steam launch options say, it seems to not change the ID# in a desktop shortcut.

Forgive a stupid question from a plebeian but is this table in a place where you can detect it or read it? Is this something you can change at runtime of Proxy? I ask because even if it only does this when the app is launched by hand and the interface is opened or even a specific button press, it may be a way to ensure at least a modicum of 'future proofing' as I know this is one of your chief concerns.

Link to comment
Share on other sites

Launch Options are technically the right way to add these flags but the proxy wouldn't be able to find them then.  Gotta love doing things wrong to make them work!

vtable can only be read with a dissembler and it looks... horrifying.  So long as someone updates open-steamworks I can update the rename system.  I'm considering also making the system look for existing shortcuts (even hidden ones).

Link to comment
Share on other sites

@Nielk1 As I am sure you are loving me finding stuff to report to you by now and speaking of renaming I have found a curiosity/bug. I launch a game in Dolphin, it renames the shortcut perfectly, I then close the emulator by hitting escape on my KB it renames it back to Dolphin. If I close Dolphin using the BPM 'close shortcut' option it does not rename the shortcut back to "Dolphin" and instead it leaves the shortcut with the games name and so it fails to launch a second game without manually renaming the shortcut back to "Dolphin". DeSmuME will not rename the shortcut back to DeSmuME at all even if I use the file/exit option. I assume something to do with a graceful or non-graceful shutdown of the emulator?

With me around, there isn't a single thing that's going to get past. :)

Link to comment
Share on other sites

@cammelspit I'm not sure on the DeSmuME issue, but I see that if you use the Big Picture command it kills the proxy before it can perform it's cleanup operation of restoring the name and, optionally, closing big picture.  For a C# program I am needing to import a lot of C functions...  It looks like the fix for this one is to hook into the console's close handler but it's a bit iffy for Windows 7+.  I'll dig into it.

Edit:
@cammelspit I'm thinking I might remove the -steamproxyhold switch and make it default behavior.  Then I can shift the rename and Big Picture close commands to occur in the outer proxy.

Edited by Nielk1
Link to comment
Share on other sites

@Nielk1 You know, i was actually just thinking this last night. I mean, I added the hold argument to an EMU that didn't need it and it still worked fine. I haven't done an insane amount of testing with 0.0.1.3 yet, so I am not sure if there are any major incompatibilities with using that function on a given emulator. Perhaps replacing it with "-steamproxyrelease" to return to the current behavior just in case of a compatibility issue, later on, would be prudent.

I have errands to run today so I can't really do much testing until this evening but I will try to find any major issues with the hold command in case you want to be sure there aren't any problems making this the default behavior. I also have a theory regarding RetroArch but I can't test now. I think it may have something to do with the fact that the default command line for loading cores is relative and is looking based on starting in my LB folder, where Proxy is installed and not from within the RetroArch folder. If it works when I do use an explicit path then fine, if not I will try making a second copy of Proxy in the RA folder itself so it starts in the same place and the relative path might work. This is all a stab in the dark from an uneducated emulation enthusiast here but it made sense to me while I was laying in bed thinking of possible reasons it might not work. I will look into it and report back what I find.

Edited by cammelspit
Link to comment
Share on other sites

@Nielk1 Ok, so I think I have found a way to get RetroArch to load up, only it is still not working but for a completely different reason. The command line -L "cores\whatever.dll" won't work at all when it is used in LB platforms command line area. What I did to fix this made another entry for Retroarch just for N64 and added that command line directly to the main command line instead of the platforms area and now Proxy is seeing it, with quotes and the log looks correct. I also needed to make a new copy of Proxy directly in the Retroarch folder since it seems that RA requires a relative path. When I did this,though, it threw and error and told me that steamproxy.data could not be found even though the log looked correct and the command line being passed through also looked correct. Any ideas?

Link to comment
Share on other sites

@cammelspit When you use the platform specific commands what does the proxy log as it's input?  The proxy does assume in a few places that the last argument in the list is the rom name.  I could implement something more aggressive if that's not the case.

I'm working on a massive refactor of the code at the moment.

Link to comment
Share on other sites




3b931387-da79-4a4c-8359-562b24c41e1f	Start



3b931387-da79-4a4c-8359-562b24c41e1f	Start GUI



3b931387-da79-4a4c-8359-562b24c41e1f	End GUI



3b931387-da79-4a4c-8359-562b24c41e1f	End



411daec1-9a49-4c5c-8e1b-ad4dfeda6fc7	Start



411daec1-9a49-4c5c-8e1b-ad4dfeda6fc7	Args[3]



411daec1-9a49-4c5c-8e1b-ad4dfeda6fc7	[0]	-L



411daec1-9a49-4c5c-8e1b-ad4dfeda6fc7	[1]	cores\mupen64plus_libretro.dll



411daec1-9a49-4c5c-8e1b-ad4dfeda6fc7	[2]	E:\Emulation\Roms\Nintendo -Nintendo 64 (N64)\Banjo-Kazooie (USA) (Rev A).zip



411daec1-9a49-4c5c-8e1b-ad4dfeda6fc7	End

This is what it looks like when I attempt a launch via the platform specific command line. Arg 1 does not have quotes as it should and it abruptly stops, I assume this is because Retroarch just closes itself the moment it sees that the command line it is receiving is improper.

Edited by cammelspit
Link to comment
Share on other sites

@Nielk1 Hey buddy, I did a little more poking about and I finally found a way to get Retroarch to launch properly. Doing the same thing as I did before that causes the steamproxy.data error only, this time, I tried copying my entire Retroarch install right into the launchbox folder and it does work. I still have to have the system command line -L "cores\whatever.dll" in the main command line and not the system specific command line but this is a good workaround to get it going in the mean time. Thought I would mention this in case it helps you track down whatever it is you need to.

Link to comment
Share on other sites

@cammelspit 0.0.2.0 offers a different method of logging the command line args that will help show exactly what the system is seeing.  That should help sort out why retroarch doesn't want to launch.

I'm thinking about making the program be able to ingest LaunchBox's library XML to build a name map for when it renames the shortcut rather than just relying on the rom's filename.

Link to comment
Share on other sites

@Nielk1 That would be of huge benefit for the Launchbox users. If I may be so bold as to make a suggestion, however. Since other users may not necessarily be using launchbox and might be using some other front end, you may still wish to have the roms filename still be usable if the user wishes it, maybe yet another command line switch, or have Proxy fallback on the roms filename if the launchbox XML is not found.

About the logging, I will find some time to puts about with the logging in 0.0.2.0 and make a few logs in a few different scenarios so you can have some more useful information. Since I have found some way to get RA to launch and work, I have been adding systems one by one and playing around with it and I must say, when this thing is more ready for prime time, I am gonna be having a blast! :D The ROM name function is SUPER cool, to say the least as it allows per emulated game configs that are persistent for the Steam controller. It is like, this Proxy app has opened up a whole new world of many novel and interesting things to do. I have already had a steam friend message me and ask about how I am able to have the game I am playing show up like that if not with ICE, which is terrible IMHO.

In the interests of ease of use, I would like to make another suggestion. This would obviously go FAR down the list of things to do but... Since we know now how ICE adds steam shortcuts and that it is possible to do programmatically, perhaps a feature for having Proxy add the steam shortcut itself instead of manually since that is quite a cumbersome process. Of course, this is early days when it comes to this app but I can absolutely see it becoming a must-have tool in the bullpen of an emulation enthusiast that also uses steam. Just something to chew on.

Link to comment
Share on other sites

@cammelspit For game names I'd have a database built into the program with the option to scrape the LaunchBox database to build it.

Here's what I know how to do for reference:

  • Rename a Steam shortcut (will break eventually and need to be fixed, the proxy does this now)
  • Add a Steam shortcut while Steam is open (will break eventually and need to be fixed, the proxy doesn't do this yet)
  • Add a Steam shortcut while Steam is closed (easy, I can do it how ICE does it and edit the config file Steam uses, the proxy doesn't do this yet)
  • Read existing Steam shortcuts (the config file is saved every time you edit one in Steam, so it's always up to date with what's in the client, the proxy doesn't do this yet)
  • Guess a valid Steam shortcut ID based on name and target of a shortcut (as seen in the proxy's UI)

I could set up the system so that it first tries to run a shortcut with the correct name already, before it tries to rename the main proxy's shortcut.  I can do this as I can guess the shortcut ID or read the shortcut config file from Steam.

If renaming was to ever catastrophically and irreparably break, I could do what ICE does and add a shortcut for every game via the proxy BUT make the shortcut hidden so it doesn't show in Steam's game list unless you explicitly turn on "hidden" from the selector in Steam.  Utilizing the note above I could easily find said shortcut.  As all the entries would be proxy entries they would be very easy to find and remove in mass as well, sort of like what ICE can do but less ugly.

I'm trying to make sure I future proof this.

Link to comment
Share on other sites

@Nielk1 Sorry, I haven't had a lot of time to do much of testing in the last day or so because I had a massive HDD crash. I had one of those 3TB Seagate Barracuda ST3000DM001 drives and I just started getting the dreaded click of death. My emulation drive is safe since it is an HGST 4TB NAS drive but my whole Steam library is completely gone, not to mention the stability problems a dying drive that can't access data makes when steam keeps trying to access it. I will try and find some time here today or tomorrow to get all the logs I promised you.

Link to comment
Share on other sites

1 hour ago, cammelspit said:

@Nielk1 Sorry, I haven't had a lot of time to do much of testing in the last day or so because I had a massive HDD crash. I had one of those 3TB Seagate Barracuda ST3000DM001 drives and I just started getting the dreaded click of death. My emulation drive is safe since it is an HGST 4TB NAS drive but my whole Steam library is completely gone, not to mention the stability problems a dying drive that can't access data makes when steam keeps trying to access it. I will try and find some time here today or tomorrow to get all the logs I promised you.

Take your time.  I've got my own fun time over here.  Something ate my LaunchBox license email.

My setup is a 6x6TB drive NAS and a 4x4TB computer so I know what losing a large drive is like.

Link to comment
Share on other sites

@Nielk1 Alright, I have done the testing I promised and here are the logs exactly as they appear. I will sort these by what the situation is so you can have an idea of what the heck I am doing. :D




c8347800-553d-4d2a-8ae5-bd82cf833e51	Start



c8347800-553d-4d2a-8ae5-bd82cf833e51	Raw Command Line	"E:\LaunchBox\GameLaunchProxy.exe" -L "cores\nestopia_libretro.dll" "E:\Emulation\Roms\Nintendo -Nintendo Entertainment System (NES)\1942 (Japan, USA).zip"



c8347800-553d-4d2a-8ae5-bd82cf833e51	Start Mode GenericProxy



c8347800-553d-4d2a-8ae5-bd82cf833e51	Program	-L



c8347800-553d-4d2a-8ae5-bd82cf833e51	Args	"cores\nestopia_libretro.dll" "E:\Emulation\Roms\Nintendo -Nintendo Entertainment System (NES)\1942 (Japan, USA).zip"



c8347800-553d-4d2a-8ae5-bd82cf833e51	End Mode GenericProxy



c8347800-553d-4d2a-8ae5-bd82cf833e51	End



8e11eb74-044a-4ce8-a024-14080baf505f	Start



8e11eb74-044a-4ce8-a024-14080baf505f	Raw Command Line	"E:\LaunchBox\GameLaunchProxy.exe" -L "cores\nestopia_libretro.dll" "E:\Emulation\Roms\Nintendo -Nintendo Entertainment System (NES)\Abadox - The Deadly Inner War (USA).zip"



8e11eb74-044a-4ce8-a024-14080baf505f	Start Mode GenericProxy



8e11eb74-044a-4ce8-a024-14080baf505f	Program	-L



8e11eb74-044a-4ce8-a024-14080baf505f	Args	"cores\nestopia_libretro.dll" "E:\Emulation\Roms\Nintendo -Nintendo Entertainment System (NES)\Abadox - The Deadly Inner War (USA).zip"



8e11eb74-044a-4ce8-a024-14080baf505f	End Mode GenericProxy



8e11eb74-044a-4ce8-a024-14080baf505f	End

Above is the log that happens when I load a game from Proxy while both proxy AND Retroarch are both in the same folder as Launchbox but I use the per system command lines for the -L "cores\whatever.dll" argument.




ddbe1426-3477-4501-be1e-d5156c97fcc0	Start



ddbe1426-3477-4501-be1e-d5156c97fcc0	Raw Command Line	"E:\LaunchBox\GameLaunchProxy.exe" 



ddbe1426-3477-4501-be1e-d5156c97fcc0	Start GUI



ddbe1426-3477-4501-be1e-d5156c97fcc0	End GUI



ddbe1426-3477-4501-be1e-d5156c97fcc0	End

Above is the log that happens when I load a game from Proxy while Retroarch is NOT in the same folder as Launchbox and I use the per system command lines for the -L "cores\whatever.dll" argument. I also tried loading two games and this is all that was written in the log.




5ff249a3-b531-4a3b-b1df-fdd85429ae1d	Start



5ff249a3-b531-4a3b-b1df-fdd85429ae1d	Args[3]



5ff249a3-b531-4a3b-b1df-fdd85429ae1d	[0]	-L



5ff249a3-b531-4a3b-b1df-fdd85429ae1d	[1]	cores\nestopia_libretro.dll



5ff249a3-b531-4a3b-b1df-fdd85429ae1d	[2]	E:\Emulation\Roms\Nintendo -Nintendo Entertainment System (NES)\Adventure Island 3 (USA).zip



5ff249a3-b531-4a3b-b1df-fdd85429ae1d	End



6ec00440-361c-42ba-b56b-081672fb722a	Start



6ec00440-361c-42ba-b56b-081672fb722a	Args[3]



6ec00440-361c-42ba-b56b-081672fb722a	[0]	-L



6ec00440-361c-42ba-b56b-081672fb722a	[1]	cores\nestopia_libretro.dll



6ec00440-361c-42ba-b56b-081672fb722a	[2]	E:\Emulation\Roms\Nintendo -Nintendo Entertainment System (NES)\Adventures of Lolo (Europe).zip



6ec00440-361c-42ba-b56b-081672fb722a	End



0067944f-6440-4e90-93a1-c15683e4fa0c	Start



0067944f-6440-4e90-93a1-c15683e4fa0c	Args[3]



0067944f-6440-4e90-93a1-c15683e4fa0c	[0]	-L



0067944f-6440-4e90-93a1-c15683e4fa0c	[1]	cores\nestopia_libretro.dll



0067944f-6440-4e90-93a1-c15683e4fa0c	[2]	E:\Emulation\Roms\Nintendo -Nintendo Entertainment System (NES)\Adventures of Lolo (Europe).zip



0067944f-6440-4e90-93a1-c15683e4fa0c	End

Above is the log that happens when I load a game from Proxy while Proxy AND Retroarch are NOT in the same folder as Launchbox and I do NOT per system command lines for the -L "cores\whatever.dll" argument.

When both RA and Proxy are both in the same folder as Launchbox and I do not use the per system command lines, as in putting the -L "cores\whatever.dll" in the main command line instead, it will work and it works quite well too. This has the side effect of me needing to make a new entry for RA through the proxy for each system and remove the per system command lines while adding it all to the main command line window.

I mean, for me as of right now it is at least doing what I want with RA. I also haven't found any other emulators, so far that is, that exhibit similar behavior. If I do, I will surely let you know. IF that does happen, I can see a point where having more than one emulator embedded into my Launchbox folder could cause some real havoc with conflicting file names or directory structures. Thankfully, RA can emulate a good variety of systems so I haven't run across this yet. This having been said, I also haven't done as much "testing :D" as I could or should have because of my HDD shenanigans but I hope this is enough for you to see what is happening. If you would like me to test a specific scenario, please, let me know. I will do anything I can.

Thanks again for this awesome little program, I am having a blast setting things up. I am one of the only people I have seen that actually considers setting up frontends and making steam controller configs therapeutic. *Double Thumbs Up*

Edited by cammelspit
Link to comment
Share on other sites

@cammelspit

How odd.  Your first log set is missing the -steamproxysetup switch.  Maybe LaunchBox doesn't add the switches for a specific platform but uses them instead?

If you look it thinks -L is the program to run since the program is missing and it thinks it's being used as a generic proxy (the original purpose of the program) rather than a Steam proxy because of the missing -steamproxysetup switch.

Once that's sorted take a try again with the path difference and see what happens.  Local paths shouldn't be an issue since the proxy sets the working directory of the program it proxies to said program's own folder.

Link to comment
Share on other sites

I had already tried this before but I did again to get a fresh log. This is what was returned.


c5f0ddbd-f451-468f-89b1-f9bc20dc8301	[0]	-steamproxysetup

c5f0ddbd-f451-468f-89b1-f9bc20dc8301	[1]	2b61fe2f

c5f0ddbd-f451-468f-89b1-f9bc20dc8301	[2]	-steamproxyname

c5f0ddbd-f451-468f-89b1-f9bc20dc8301	[3]	FDS [%cleanromname%]

c5f0ddbd-f451-468f-89b1-f9bc20dc8301	[4]	E:\Emulation\Emulators\MultiPlatform\RetroArch\retroarch.exe

c5f0ddbd-f451-468f-89b1-f9bc20dc8301	[5]	-L

c5f0ddbd-f451-468f-89b1-f9bc20dc8301	[6]	cores\nestopia_libretro.dll

c5f0ddbd-f451-468f-89b1-f9bc20dc8301	[7]	E:\Emulation\Roms\Nintendo - FamicomDiskSysytem (FDS)\Yume Koujou Doki Doki Panic (Japan) [b].zip

c5f0ddbd-f451-468f-89b1-f9bc20dc8301	End

It drops the quotes around the cores/whatever.dll and the paths. I am beginning to think that this is Launchbox itself stripping these but if it does, then why would it work at all even without the proxy?

For completeness sake, I just tried using the proxy inside the launchbox folder and it DID work! Holy hell, I swear this was not working before. It was throwing an error telling me that proxy was already in start mode or something like that. I know I posted about it earlier in this thread.

Frankly, I am stumped. No idea why it would be working all of a sudden unless your code refactoring fixed a bug somewhere and I hadn't tested in this very specific scenario in a while.

Again, just for completeness sake here is the successful log for Proxy being in the LB folder using RA in another folder and ALL command line switches being added right to the system specific command line and literally nothing in the main command line.


1c31a908-2beb-457d-b18d-6a0a186ca783	Start

1c31a908-2beb-457d-b18d-6a0a186ca783	Raw Command Line	"E:\LaunchBox\GameLaunchProxy.exe" -steamproxysetup 2b61fe2f -steamproxyname "FDS [%cleanromname%]" "E:\Emulation\Emulators\MultiPlatform\RetroArch\retroarch.exe" -L "cores\nestopia_libretro.dll" "E:\Emulation\Roms\Nintendo - FamicomDiskSysytem (FDS)\Yume Koujou Doki Doki Panic (Japan) [b].zip"

1c31a908-2beb-457d-b18d-6a0a186ca783	Mode SteamProxySetup

1c31a908-2beb-457d-b18d-6a0a186ca783	-steamproxyname Contains %cleanromname%

1c31a908-2beb-457d-b18d-6a0a186ca783	New -steamproxyname	FDS [Yume Koujou Doki Doki Panic (Japan) [b]]

1c31a908-2beb-457d-b18d-6a0a186ca783	Looking for shortcut in database that ends with -steamproxyactivate 2b61fe2f

1c31a908-2beb-457d-b18d-6a0a186ca783	Found Shortcut

1c31a908-2beb-457d-b18d-6a0a186ca783	set shortcut name	FDS [Yume Koujou Doki Doki Panic (Japan) [b]]

1c31a908-2beb-457d-b18d-6a0a186ca783	steamproxy.json contents

1c31a908-2beb-457d-b18d-6a0a186ca783	{"Program":"E:\\Emulation\\Emulators\\MultiPlatform\\RetroArch\\retroarch.exe","Args":"-L \"cores\\nestopia_libretro.dll\" \"E:\\Emulation\\Roms\\Nintendo - FamicomDiskSysytem (FDS)\\Yume Koujou Doki Doki Panic (Japan) [b].zip\"","ShortcutID":10470880777326297088}

1c31a908-2beb-457d-b18d-6a0a186ca783	start	steam://rungameid/10470880777326297088

5b82d00e-f2e9-4b7b-9de4-8bd60a9c9c96	Start

5b82d00e-f2e9-4b7b-9de4-8bd60a9c9c96	Raw Command Line	"E:\LaunchBox\GameLaunchProxy.exe" -steamproxyactivate 2b61fe2f

5b82d00e-f2e9-4b7b-9de4-8bd60a9c9c96	Start Mode SteamProxyActivate

5b82d00e-f2e9-4b7b-9de4-8bd60a9c9c96	steamproxy.json

5b82d00e-f2e9-4b7b-9de4-8bd60a9c9c96	{"Program":"E:\\Emulation\\Emulators\\MultiPlatform\\RetroArch\\retroarch.exe","Args":"-L \"cores\\nestopia_libretro.dll\" \"E:\\Emulation\\Roms\\Nintendo - FamicomDiskSysytem (FDS)\\Yume Koujou Doki Doki Panic (Japan) [b].zip\"","ShortcutID":10470880777326297088}

5b82d00e-f2e9-4b7b-9de4-8bd60a9c9c96	Starting Program

5b82d00e-f2e9-4b7b-9de4-8bd60a9c9c96	FileName:	E:\Emulation\Emulators\MultiPlatform\RetroArch\retroarch.exe

5b82d00e-f2e9-4b7b-9de4-8bd60a9c9c96	Arguments:	-L "cores\nestopia_libretro.dll" "E:\Emulation\Roms\Nintendo - FamicomDiskSysytem (FDS)\Yume Koujou Doki Doki Panic (Japan) [b].zip"

5b82d00e-f2e9-4b7b-9de4-8bd60a9c9c96	WorkingDirectory:	E:\Emulation\Emulators\MultiPlatform\RetroArch

1c31a908-2beb-457d-b18d-6a0a186ca783	found process to wait on	retroarch

5b82d00e-f2e9-4b7b-9de4-8bd60a9c9c96	Ended Program Normally

5b82d00e-f2e9-4b7b-9de4-8bd60a9c9c96	End Mode SteamProxyActivate

5b82d00e-f2e9-4b7b-9de4-8bd60a9c9c96	End

1c31a908-2beb-457d-b18d-6a0a186ca783	ended	steam://rungameid/10470880777326297088

1c31a908-2beb-457d-b18d-6a0a186ca783	set shortcut name	RetroArch

1c31a908-2beb-457d-b18d-6a0a186ca783	End

Then again, LB just had an update so maybe there has been some changes to the way it is handling the command lines in some way that is passing it through properly now when it wasn't before. I have no idea but now it will be easier to make only ONE Retroarch emulator entry and use the per system command line to do all the special stuff. Of course, now that I have already made a separate entry for every system I have roms added to LB with so far AND have migrated my whole RA install into my LB folder. Gonna need to do some major directory cleanup now. :P

Link to comment
Share on other sites

@cammelspit

It doesn't drop the quotes, it uses the CLI exactly as it's listed in the Raw Command Line field.  I thought I removed all those argument array prints because they are inaccurate when it comes to quotes.

If you look here you see it's not dropping the quotes:


{

  "Program": "E:\\Emulation\\Emulators\\MultiPlatform\\RetroArch\\retroarch.exe",

  "Args": "-L \"cores\\nestopia_libretro.dll\" \"E:\\Emulation\\Roms\\Nintendo - FamicomDiskSysytem (FDS)\\Yume Koujou Doki Doki Panic (Japan) [b].zip\"",

  "ShortcutID": 10470880777326297088

}

 

Edit: Are you sure you're on 0.0.2.0?

Edited by Nielk1
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...