Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - PinealServo

Pages: [1] 2
1
OK, well, I think I've found out how to add this "wait for a different exe than the one we launched to close" functionality to RetroFE itself.  I'll see if I can get a test program working in Windows and if it's successful, I'll try adding it to RetroFE itself.  Might take a little while, though.

2
I did a bit of searching; I've seen other reports that implicate DS4Windows in unusual game crashes. Can you use it without DS4Windows?  There are apparently two ways to install DS4Windows, and switching to the non-%appdata% way apparently solved problems for some people.  Might be worth a try investigating this angle, but I don't really know for sure.

3
PowerShell 1.0 might not support the -executionpolicy flag.  You can change the default execution policy by doing the following:

Start powershell from the Start menu or command prompt; you should get a powershell prompt.

At the prompt, type the following command:
Code: [Select]
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
Then exit powershell and try launching the script again.

This execution policy change will allow you to run local scripts, but will not run dynamically-downloaded scripts unless they're signed by a trusted certificate.

You also most likely have PowerShell v2 installed; it's the newest version installed by default on Windows 7, and if you have a newer version of Windows, you may have even newer versions of PowerShell.  If you find the location of a newer version, try running it with the -executionpolicy flag before you change the default policy setting and see if that works.

The /K flag to cmd.exe tells the shell to stay open after the script finishes. Since the shell is what RetroFE launched, it'll stay paused until you explicitly close the shell.  Instead of using the task manager, you could probably alt-tab to it and just exit normally.

4
You should be able to take from the RetroFE log exactly what command it executes and what directory it does it in.  Can you tell me what happens if you open a CMD prompt, cd to that directory, and execute the same command that RetroFE does?

5
Feature Requests / Suggestions / Re: Multiple Inputs - Keyboard & Gamepad
« on: February 05, 2017, 04:31:35 PM »
My patch for this borrowed a function from the config reader that would strip beginning and ending spaces from each element in the string without removing middle ones.  I'll try that out again later today.

6
That seems incorrect?
From what I can see, maybe it should be:

Code: [Select]
executable = C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
arguments = -executionpolicy bypass -file F:\Jeux\TTX Games\pslauncher.ps1 "%ITEM_FILEPATH%"

You may need to use %ITEM_FILENAME% or %ITEM_NAME% rather than %ITEM_FILEPATH%

That's probably closer to what it needs to be; you'll have to verify the pathname of powershell on your machine and also, the powershell script takes two arguments, which (assuming the game itself is named so that it matches what's in RetroFE) will be %ITEM_FILEPATH% followed by %ITEM_NAME%.  The second one is supposed to be the name that shows up in the process list if you open up the task manager tool while the game is running, so it can wait for the real game exe to exit.

7
Announcements / Re: RetroFE 0.7.20
« on: February 05, 2017, 05:07:20 AM »
I came up with an alternate fix and opened a pull request.

8
When you launch an item in your collection, the launcher will execute the .bat pointing to your link. The .bat launches the application, and retroFE waits until its finished. Tell me if you still have trouble, as there are plenty .bat code variations in case you still have the problem.

The problem is that these exe files require a specific launcher to do some sort of fixup on them before they'll run, but the launcher itself doesn't keep running once the game starts. RetroFE (or whatever batch file you launch with RetroFE) detects that the launcher has died, but does not realize that there is a new process to wait for.

We need a way to tell the program RetroFE launches directly to keep running until a process other than the one that it starts itself stops running. My PowerShell script shows a way to do this by knowing both the exe/bat/lnk file that launches the game and the process name that represents the game process itself, which will be different from the launcher.  The trick is to devise a PowerShell script and a means of launching it from RetroFE with both the pathname of the item that launches the game and the string that will show up in the process list as the name of the game process itself.  I don't run RetroFE in Windows myself typically, aside from testing builds, so I'm hoping someone who does can experiment with this technique a bit to get it working right.

I have modified the PowerShell script to take parameters:
Code: [Select]
param (
  [string]$exename,
  [string]$procname
)
Write-Host Launching $exename
Invoke-Item $exename
Write-Host It was launched
$proc_id = (Get-Process $procname).id
Wait-Process -id $proc_id
Write-Host It was closed

If you name that
Code: [Select]
pslauncher.ps1 you should be able to call it with parameters like this:
Code: [Select]
powershell -executionpolicy bypass -file C:\RetroFE\pslauncher.ps1 C:\Games\GameDir\FunGameLauncher.lnk FunGame assuming you replace the pathnames with real ones and use the right name for the game's process name. If the process name of the final game exe ends up being related to the game item name from RetroFE, it should be pretty straightforward to get a launcher configuration set up to use this technique.

The script you pass in the $exename parameter doesn't have to be an exe; it can be anything that will launch a program when you double-click on it, but it has to have the full path.  It will probably help if both the $exename and $procname can be derived from something from RetroFE like %ITEM_NAME%, but I have no idea how the Windows process names are actually determined.

9
Announcements / Re: RetroFE 0.7.20
« on: February 05, 2017, 12:07:32 AM »
That one was actually an access-after-free error; the collection does get freed, but it would afterward get accessed somehow through the activeMenu_ items member. If I remember correctly, it happens when the menu itself gets deleted, which happens when the page gets deleted.

I'm not sure why the change caused issues, but I'll see if I can track down a better way to avoid the access-after-free problem.


10
I've got another idea for you to try:

Instead of launching with a batch script, try a PowerShell script.  You should be able to run whatever command necessary to launch the game, then use cmdlets to find the process id of the actual game process and wait for it.  Here's documentation on the relevant cmdlets, with some examples: https://msdn.microsoft.com/en-us/powershell/reference/4.0/microsoft.powershell.management/wait-process

I put the following in a file called calc.ps1:
Code: [Select]
Write-Host Launching calc.exe
Invoke-Item C:\Windows\System32\calc.exe
Write-Host It was launched
$proc_id = (Get-Process calc).id
Wait-Process -id $proc_id
Write-Host It was closed

I then ran it with powershell -file calc.ps1; it printed "It was launched" immediately but then paused until I closed the calculator app, after which it printed "It was closed" and exited back to the prompt.

11
Feature Requests / Suggestions / Re: Audio normalization
« on: February 04, 2017, 05:41:46 AM »
It looks like gstreamer has an audio level monitoring plugin that could be used to gather the information needed to do normalization.  We could store the information gathered about each video in the metadata database as it's played, and apply a volume adjustment to those that we have metadata for.  It might not be a perfect solution, but it ought to resolve large differences in volume between videos and other audio we might play in the future.

The level plugin: https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good-plugins/html/gst-plugins-good-plugins-level.html

12
When RetroFE launches another program, it gets a "handle" from the OS that it can use to wait for that program to exit. While it's waiting for the program to exit, it doesn't do much, but when it detects the exit it logs that it's "Finished" and goes on doing its front-end stuff. From your log.txt, it's apparent that it detects an immediate exit of the program that it launched; the "Finished" log timestamp is the same as the one where it launched the program. As far as it knows, your game is over and it is doing what it's supposed to do. The crash is definitely not what it's supposed to do, but we'll have to figure out how to reproduce that in order to fix it.

Meanwhile, it may be possible to bypass the batch files and links altogether and just have RetroFE run the "typex_loader game.exe" line by itself. In your launcher config, try using typex_loader as the executable and the game.exe as the argument. You may need to experiment a bit with the command line and directory settings to make the loader happy, but I think there's likely to be a combination of settings that will work.

13
Announcements / Re: RetroFE development
« on: January 29, 2017, 05:24:58 AM »
I've been playing around with a very cool feature of gcc, which is the set of "sanitizer" tools it has built-in now. If you're familiar with valgrind, it can catch many of the same kinds of errors but the program runs a *lot* faster than it does under valgrind and seems to do a better job of pinpointing where the relevant objects are referenced in the source.

Anyway, with -fsanitize=address and valgrind, I found a few little things that could potentially cause problems. These include some uninitialized variables being accessed, some memory being accessed after it was freed, and a *lot* of little memory leaks.

A bunch of the memory leaks are in the animation system and I haven't figured out where to free things yet, but I've fixed a bunch of the other problems.  I'll have a pull request coming for those misc clean-ups soon.

14
General Discussion & Help / Re: Help to go back to RetroFE
« on: January 28, 2017, 11:07:43 PM »
There are a few ways you might set this up; I can't guarantee any or all of them will work for you though:

1. Assuming all your emulators can be configured to read from the gamepad and assign an "exit program" command to a gamepad event, configure them all to do so.

2. Use an emulator framework like RetroArch; this unifies the input/output so you only have to set up the gamepad configuration once.

3. Use a program for your OS like JoyToKey, which can generate keyboard/mouse events from configurable gamepad events. You'll still have to do some extra config in your emulators, but you'll have keyboard events to work with instead of just gamepad events.

15
Announcements / Re: RetroFE development
« on: January 28, 2017, 10:56:14 PM »
Cool; the brightness change was probably an artifact of the conversion from a planar YUV 4:2:0 to a packed YUV 4:2:2 pixel format that was previously going on, or maybe an artifact of how SDL sets up the pixel shaders that convert the resulting textures of the two formats into RGB video frames. I wasn't sure it would fix that issue, but I'm glad it did!

Pages: [1] 2