Jump to content
LaunchBox Community Forums

Recommended Posts

Posted (edited)

Hi all,

Ymir is a young in development Sega Saturn emulator but already has some very appealing features. I have been using it often recently but have been unsatisfied with how Saturn graphics render at 1080p without some sort of scaling or filter. I read a post by the author in Github saying that internal resolution scaling and shaders features will be implemented soon but until then I think this will do the job 😃

This is a mini tutorial/instructions on how to use Ymir in conjunction with ShaderGlass in Launchbox, to have access to tons of shader effects for Sega Sautn games. I did not see any specific tutorial so I did a bit of research and trial and error and I am sharing here the results. With this method both applications will be started when launching a game and closed together at the end.

First of all of course have your Sega Saturn isos (chd, bin/cue, whatever), Ymir emulator and ShaderGlass setup wherever you want. I put ShaderGlass inside Launchbox/ThirdParty directory.

You don't want Ymir to go fullscreen because in my testing it wasn't working well with some shaders, in particular MegaBezel (my favorite). So remove any related command line in emulator settings in Launchbox (-f). Then setup the following options in Ymir video settings:

- Force integer scaling: enabled

- Force aspect ration: 4:3

- Full screen: disabled

- View, set video scale to: 3x - The window will be larger than the monitor at 1080p resolution but it will be scaled down trough ShaderGlass. I know it's not 3x internal scaling, just a view scale, but to me the final result is looking better than 2x at 1080p.

In Launchbox setup a running script. I used the script for the Xemu emulator from this post and modified it a bit:

This is what I am using:

Quote

Run, d:\emu\ymir\renamewintitle.exe
WinWait, ahk_exe ymir-sdl3.exe
WinWaitActive, ahk_exe ymir-sdl3.exe
Run, G:\LaunchBox\ThirdParty\ShaderGlass\ShaderGlass.exe -f G:\LaunchBox\ThirdParty\ShaderGlass\Profiles\ymir.sgp
WinActivate, ahk_exe ymir-sdl3.exe
WinWaitActive, ahk_exe ymir-sdl3.exe

$Esc::
{
  Process, Close, ymir-sdl3.exe
  Process, Close, ShaderGlass.exe
  Process, Close, renamewintitle.exe
  Return
}

WinWaitClose, ahk_exe ymir-sdl3.exe
WinClose, ahk_exe ShaderGlass.exe

I'm not explaining it in details since it is already done in that post, only the addition that I made to make it working with Ymir.

Create an sgp profile in ShaderGlass for Ymir choosing the shader of your choice. The problem that I found here is that choosing Ymir window as "Input, Window" in ShaderGlass couldn't be autmated in the script because Ymir is updating the its window title constantly. You can still setup the emulator in fullscreen and choose "Input, Desktop" in ShaderGlass but, as I said, I wasn't always satisfied with the results. The solution that I found was to create the following Auothotkey script "renamewintitle.exe" and run before everything else:

Quote

#NoEnv
#Persistent
SendMode Input
SetWorkingDir %A_ScriptDir%

targetProcess := "ymir-sdl3.exe"
newTitle := "ymir"

; Timer runs every 10 ms forever
SetTimer, ForceRename, 10
return

ForceRename:
    WinGet, hwnd, ID, ahk_exe %targetProcess%
    if (hwnd) {
        WinSetTitle, ahk_id %hwnd%, , %newTitle%
    }
return

It basically renames Ymir window to "ymir" every 10 ms.

Setup "Input, Window" to "ymir" in ShaderGlass and you're good. Also you can crop the window in ShaderGlass to cut the Ymir menu. I use 24 pixels from the top.

If anyone has a better or more elegant solution please share.

You can change the shader in ShaderGlass in real time with the hotkey (default keyboard "n"), experiment and find which one you like.

Enjoy! 😄😁✌️

Edited by GoukiKain
  • Like 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...