Jump to content
LaunchBox Community Forums

Nielk1

Members
  • Posts

    178
  • Joined

  • Last visited

Posts posted by Nielk1

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

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

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

  4. @cammelspit It's basically that the function table can change.  All the interfaces Steam *wants* you to use are numbered so that if they change they up the number.  These are the interfaces games use to do stuff like give you achievements.  The interfaces the steam client itself use aren't numbered because both the client and it's steamworks libraries would update at the same time and always be in sync.  The renames would stop working if they add a new function to the shortcut API and cause the vtable binding to fail, etc.  We'll cross that bridge when we come to it.  If it ever breaks horrifically and somehow stops the proxy from working deleting the Steam4NET dll will get it going again.

    As for shortcut IDs: are you using Set Launch Options in Steam on the shortcut?  I am considering that value as just blank.  If you are using that it might be why the generated ID isn't matching Steam.  I think the names and targets might also be case sensitive in this case.

  5. @cammelspit The only rough spot that's inevitable is that the rename function *will* break at some point in the future and need to be fixed.  I know a way around it if Steam is closed and needs to open by editing the shortcuts.vdf file (the way ICE does it), but editing it live while Steam is running will require some code upkeep unless another way is found.  Luckily I made sure the program keeps working if the rename fails, but then your controller profiles would be a little harder to grab.

  6. @cammelspit

    Hmm, the automatic ID should work.  It's a CRC hash applied to the target and shortcut name.  If there's any difference between Steam's shortcut and the Proxy's Target and Name it will not match though.

    So, I screwed up the rename code and caused an infinite loop...  Sorry about that, fixing that now.  It was replacing the marker in the name but not saving it into the string, and then it was detecting it was still there and trying again.

    I added a new big picture switch.

  7. @cammelspit

    I've uploaded a new binary to github as release 0.0.1.2 that has changed the commands slightly.  You will have to fix your Steam shortcut and LaunchBox command.  It has a few new features you can see listed in the repository's readme.md file.  It should resolve MOST of your issues.  I was also able to grab a small piece of steampy's code to automatically generate the shortcut IDs so you don't need to create a desktop shortcut.

     

    Edit: Oh, and a logging toggle in it's UI.

  8. @cammelspit

    I'd never heard of ICE.  I am looking at it's source code now.

    Edit:

    @cammelspit

    Does ICE have the ability to add shortcuts to Steam while it is running or does it need to have Steam restarted?  If it can add them while Steam is running this can change a lot.  I see that it is using pySteam, which itself is parsing he user's shortcut.vdf file (a file I didn't even know existed).

  9. @cammelspit Excellent.  You've found a good number of design flaws for me to correct.  I'll wait on that readme till things stop changing so much.

    Things to fix:

    • Make it clearer what command is for Steam and what is not, renaming steamproxybegin to steamproxysetup and steamproxy to steamproxyactivate might help a bit
    • Instead of closing the initial proxy, let it wait a few seconds to try to find the window of the program it launched by name like how rocket launcher works.  Then it can hold onto that program and close when it does.  This will help LaunchBox see the emulator is still running even if it's actually just holding onto the proxy.
    • Find a way to prevent improper configurations from starting an infinite loop.  I never even realized this could happen.  The system semaphore method that applications use to run only once should work here if applied to the 3 main modes of the proxy separately
    • Adjust the rename command so programs like LaunchBox can use it.  Perhaps simply auto replace the text "%cleanromname%" with the filename of the rom.  Thus using [-steamproxyname "%cleanromname% (%platform%)"] in LaunchBox would have the desired effect.  I do need to again make note that the rename function will stop working at some point when Steam itself updates.  It will be a bit of an arms race so be prepared to, in the future, need to copy your controller configurations.  I do suggest using a separate proxy entry in Steam per system for when the rename functionality fails,
  10. @cammelspit OK, time for some good ol' brute force debugging.

    Use this alternate EXE that generates a log.
    0.0.1.1_logging.zip

    Use the "-steamproxystart" based command line and launch a game from LaunchBox.
    This is the command that stores the data temporarily and tells steam to run with "-steamproxy" to pick the data back up.

    Attach the resulting "GameLaunchProxy.log" to your reply.

    This log will contain some rough info on what the proxy is doing.

  11. @cammelspit

    I ran the following through the proxy in the debugger:

    
    -steamproxystart 1b86a02f "E:\Dolphin\Dolphin.exe" -b -e "E:\Dolphin\CSO\F-Zero GX NTSC-U.gcz"

     

    After cleaning the arguments and chewing them up it tries the following:

     

    Process Filename

    
    E:\Dolphin\Dolphin.exe

    Process Working Directory

    
    E:\Dolphin

    Process Arguments

    
    -b -e "E:\Dolphin\CSO\F-Zero GX NTSC-U.gcz"

     

    That all looks correct to me, so I'm pretty perplexed.

     

     

    Have you ever used "Process Explorer"?  It lets you see the exact command line that was used to start a program.

  12. @cammelspit

    My understanding of these things is a little limited, so please bear with me.  I know we can get it working but it might take a few tries.  I am going to describe how the proxy works and then I am going to ask specifics about your attempt to use it.

     

    Normally an emulator command line looks like this, note that the way LaunchBox is right now it forces the rom file-path to be the last item:

    
    "X:\path\to\emulator.exe" -a -b -c "test" -d "X:\path\to\rom.file"


    A command to launch that with the proxy would be:

    
    "X:\path\to\proxy\GameLaunchProxy.exe" -steamproxystart 61436684 -steamproxyname "optional name" "X:\path\to\emulator.exe" -a -b -c "test" -d "X:\path\to\rom.file"

    The proxy program will internally remove the <-steamproxystart 61436684> and if present <-steamproxyname "optional name"> attributes from the argument list and then take the first remaining argument <"X:\path\to\emulator.exe"> and call it as if it was the executable, passing it the arguments after it <-a -b -c "test" -d "X:\path\to\rom.file">.

    This should work universally.  In my initial testing I was using the following in LaunchBox to cause Steam to launch RocketLauncher:

    Emulator Application Path:

    
    "X:\path\to\proxy\GameLaunchProxy.exe"

    Default Command-Line Parameters:

    
    -gameproxystart 16477675849710043136 "X:\path\to\RocketLauncher.exe" -f "%launchboxorbigboxexepath%" -p "LaunchBox" -s "%platform%" -r

    I copied the attributes from RocketLauncher from the default configuration of RocketLauncher in LaunchBox.

     

    I believe the above is what you want, supplementing your emulator of choice for where I have RocketLauncher.  That said, when I tried to use this with RetroArch directly from LaunchBox I couldn't get it to load the rom file for unknown reasons that might be the same as your issue.  Additionally, there's no convenient way to utilize the steamproxyname parameter from LaunchBox's emulator list.

    If you don't mind my asking, what is your current 'Default Command-Line Parameters' being sent to the proxy from LaunchBox?  I think it should be something like this:

    
    -gameproxystart 16477675849710043136 "X:\path\to\Dolphin.exe" -b -e

    Which would in turn become:

    
    GameLaunchProxy.exe "X:\path\to\Dolphin.exe" -b -e "FULL\PATH\TO\ROM\FILE"

     

  13. @cammelspit Pulling you over here now that we're dealing with this tool directly.

    I ended up getting it to work with quite well for me with the 0.0.1.1 code and created a video showing what steps I used.
    I'll use your feedback based on the video to determine what changes are needed for a proper 0.0.2.0.
    I'm thinking maybe a switch to grab the game name based on the rom's filename in the last argument but I'd like to know what other considerations I should have based on your experience.

    While I didn't create a version 0.0.2.0 yet, I did upload a new 0.0.1.1 binary zip that includes the Steam4NET DLL.  If you are uncomfortable not having the source code for that DLL I also noted what repo the version I am using came from.  The Steam4NET DLL is used for both renaming the shortcut in Steam and aggressively searching for the shortcut in Steam based on it's target.  If you don't have the Steam4NET DLL the program will run (as you've seen) but won't be able to rename the shortcut or aggressively search for the shortcut in Steam, instead falling back to the original shortcut id number.

  14. @cammelspit

    Yes, I got it working perfectly.

    I'll update my GameLaunchProxy to version 0.0.2.0 and update my topic for the 3rd party tool with information.  It will take me some time to write that up.  It's a little fiddly but it works.  (The fiddly part is that you need to sort out Steam's ID for the 3rd party shortcut.)

    I use RocketLauncher to launch my actual emulators, so I hacked up RetroArch's script for RocketLauncher to pass through my proxy which in turn caused it to start with Steam.  Because of the way RocketLauncher watches for windows it seemed to work properly, though more testing for issues would be needed.  I don't know how well it will work with just LaunchBox in the picture.

  15. I'm using the undocumented functions of the Steam Client API.  I am being careful using them since they can stop working when steam makes a big update so I want to be sure this works even when renaming is disabled.

    EDIT:

    OK, so everything "works".  Of course I have no way to actually pass it the name even though I went through the trouble of implementing a rename function, so that's a bit funny.  When I use it with RetroArch via RocketLauncher it works but without the steam overlay (which looks like it might be an RL issue).  When I use RetroArch with it directly it just self closes right away.  It's technically working, but it's probably a bit over-engineered.  I'll keep tinkering and if my resulting thing is too big I'll strip it down.

    EDIT2:

    I pushed my source any my binary up.  I omitted the Steam4NET DLL so it should hopefully skip the rename function.  The lacking Steam4NET DLL also disables some logic that makes it more aggressively try to find the 3rd Party Game link in Steam if the name changes.  I'm quite late for bed here so I'll just give you the link to the 'so alpha it's omega' build and source: https://github.com/Nielk1/GameLaunchProxy/releases  The game name parameter is optional and won't do anything without the Steam4NET DLL anyway.

  16. Welp, I just rigged LaunchBox to start my proxy program which stores a record and tries to rename it's own shortcut in steam, and then launches itself via steam, which then in turn launches whatever program LaunchBox passed as an argument, in this case RocketLauncher which then ran RetroArch...

    What have I done...

    Side point, the shortcut renaming thing will only work until steam majorly updates their client in which case the DLL interface I am using will change and my renames should fail.  That said, I also discovered that the game's shortcut ID changes based on it's name.  So yea, I'm still puttering around with this.  Steam overlay didn't want to work but I don't know if that was the fault of my proxy not forking properly, RocketLauncher not forking in a way Steam likes, or RetroArch not liking the steam overlay.

    It's really buggy right now so I need to tinker with it.

  17. Are steam controller profiles stored per shortcut ID in Steam for 3rd party games?  If I remove a game and add it again will all the controller profiles I might have made be gone?  If I was to rename a shortcut would the controller profiles still be there?  I'm asking these questions because I don't have a Steam Controller but would like to take a spin at a solution to this.

  18. You'd need to add the emulator to Steam as a 3rd party shortcut and then trigger that shortcut via LaunchBox.  It would be nice if there was a way to add a 3rd party shortcut to steam and then launch it all in one automated motion.  I can think of several ways to do this in code but they all have issues and I can't test the finer points without such a Steam Controller.

    If you're using the same configuration emulator wide try adding the emulator to Steam, create a desktop shortcut to get the URL/Shortcut, and see if you can find a way to add that as the emulator in LaunchBox.

    I can suggest this starting point though I can't dig in now myself:

    
    steam://rungameid/<AppIDOfEmulator>//-<LaunchSettings>

     

  19. I created this program to resolve an issue I was running into with some RPG Maker based games that utilized custom fonts.
    I further improved this tool to add support for proxying games through Steam to utilize the Steam Overlay.
    I hope to grow it's utility based on user feedback.

    I've not uploaded this program here yet as it is only version 0.0.3.0 however it may be downloaded here (including the source code):
    DOWNLOAD BINARY AND/OR SOURCE >>GitHub<<

     

    GameLaunchProxy

    This application may be used as an in-between for other applications. This tool was created to resolve issues with RPG Maker games and older games where in the needed fonts would not be installed in the system and thus not not be available. The user may not wish to pollute their system fonts with additional fonts specifically for the purpose of one game. With this tool, fonts may be loaded at startup and removed at shutdown of the proxied application. Additional features will be noted as they are implemented.

    This tool can also be utilized for a 2 step proxied Steam launch of a chosen application/emulator/game.

    Features:

    • Load fonts into Windows temporarily and unload them after execution. Fonts will also be removed on reboot. Some games may not detect the fonts are installed but will properly utilize them anyway.
    • Aggressive Focus will attempt to pull the launched program into the foreground once per second for the number of configured seconds.
    • Launching emulators and games through Steam via proxy.

    Core Tab

    The core configuration of the Proxy application is on this tab. For the Steam functions to work, the Steam userdata shortcut.vdf path must be set. To scrape the LaunchBox library the LaunchBox Library LaunchBox.xml path must be set. The Front End Shortcut section allows for the creation of shortcut paths for use in LaunchBox or another front end.

    Steam Shortcut Names

    To utilize the Steam Proxy feature a proxy shortcut must exist in Steam. This can be done with 1 click to the "Add Default" button. The LaunchBox library must be scraped to generate a platform and gamename list for the proper function of the advanced Steam Proxy functions, such as shortcut renaming. Platform names may be adjusted in the platform list. Game names are matched from the LaunchBox Library scrape to the stored name and platform information via the rom filename. If the library item is an archive, the contained file will also be checked for the case where the front end extracted the rom file.

    Launch Options

    These are the original functions of the GameLaunchProxy. Currently available are temporary font loading and forced game focus.

    
    "X:\path\to\proxy\GameLaunchProxy.exe" [-steam] [-steambigpicture] [-name <string>] [-fallbackname <string>] -proxy "X:\path\to\emulator\emulator.exe" "FULL\PATH\TO\ROM\FILE"
    
    
    
    -steam : optional, triggers the steam proxy logic
    
    -steambigpicture : optional, triggers steam big picture via steam proxy logic
    
    -name : Name for Steam shortcut.  The system will try to find a SteamProxy.exe shortcut with this name and, failing that, rename the default shortcut.
    
    -fallbackname : Fallback name for the Steam shortcut.  The system will try this name if all attempts at using -name fail.
    
    -proxy : REQUIRED, any instructions after this command will be run through the proxy
    
    
    
    %platformname% and %gamename% may be used in -name and -fallbackname, they will be filled from the Launchbox Library Scrape data based on rom filename

     

    Use Cases:

    Temporary Font Loading

    Spoiler

     

    1. I extracted Pokémon Uranium from it's MSI package via msiexec (I didn't want to install it, it's hard to trust installers on free games like that)
    2. When I ran the game I encountered the following notice because I had not installed the fonts.  This is not uncommon in RPG Maker games though those that use installers try to get around it by installing their fonts into Windows:
      NoFont.pngI did not wish to install the fonts and pollute the system's font set (once you have to wait 2 hours for your fonts to load you'll never let it happen again) so I created this proxy.
    3. Add the proxy to LaunchBox as an emulator.LaunchBox.png
    4. Set the application to use the "emulator" so the application is passed as if it was a ROM file.EmulatorSettings.png
    5. Run the GameLaunchProxy application and add the game via the File > Add New menu.  Add the game's fonts to the font list.Screenshot.png
    6. Launch the game using the new "emulator" and ignore the font warning.  Temporary fonts are not always properly detected by RGP Maker but they are utilized.YesFont.png

     

     

     

     

     

     

  20. I have a lot of items in my library right now (27907 though I am cleaning it out a bit) and I have some major slowdown as expected.  I'm not sure where the slowdown is though so I can't make a specific suggestion.

    If the problem is in parsing the library data, I'd suggest placing that operation in a thread so the UI does not freeze while it is working.  This would also allow for canceling of the thread if the user changes their selection while it's busy.  You would need to get a nice mutex lock on the library data though which could get messy if you haven't already threaded that.

    If the issue is the customized ListView my only guess would be you're not using virtual mode.  Given the speed of the program overall I presume you are using virtual mode though, so that's likely not the issue.

  21. Theoretically this is ghost borders caused by anti-aliasing when scaling.

    This page describes a solution that involves tricking the scaler's anti-aliaser using flipped tiling and drawing the image scaled into a waiting canvas: https://blog.mariusschulz.com/2014/05/28/preventing-ghost-borders-when-resizing-images-with-system-drawing

    The important code fragment if the site goes down:

    
    using (var graphics = Graphics.FromImage(resizedImage))
    
    {
    
        graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
    
    
    
        var attributes = new ImageAttributes();
    
        attributes.SetWrapMode(WrapMode.TileFlipXY);
    
    
    
        var destination = new Rectangle(0, 0, targetWidth, targetHeight);
    
        graphics.DrawImage(image, destination, 0, 0, image.Width, image.Height, 
    
            GraphicsUnit.Pixel, attributes);
    
    }

     

    • Like 1
×
×
  • Create New...