Official release thread for WindowCast core

hey dude basically you just have to setup a txt file

you can name it any way you want inside it should look like this

#Sonic Mania (game name)

SonicMania (window/proces title)

#AM2R

AM2R

#GuiltyGearXrd

GuiltyGearXrd (32-bit, DX9)

thats basically the file your start with windowcast

if you use launchbox you can setup a .bat file for each game

like this to start retroarch and the game at once

@echo off

C:

cd “C:\Users\name\AppData\Roaming\RetroArch”

start retroarch.exe -L “.\cores\wgc_libretro.dll” “F:\Roms\name of the partial-examples .txt”

timeout 19

D: cd “D:\games\Sonic Mania”

start SonicMania.exe

exit

call it like the game and use this bat file as roms “rom”

4 Likes

Hey bro, thanks a lot for such a detailed response. You just saved me from getting a migraine :sweat_smile:. Seriously, I get migraines when I struggle and stress when learning something new that I can’t seem to grasp, so thank you very much! I will be testing this out very shortly.

I am still lost as to how I get the correct window/process title. Is it what would show up if I were running it in a bordered window or do I get it from task manager or using something like WindowSpy in AutoHotKey?

Lastly, is there a default location for storing the text file for WindowCast to know to look where I just need to use a relative path and game name instead of the entire path of the text file and name? So like if I drop the txt in “.\RetroArch\System”, it would look something like start retroarch.exe -L “.\cores\wgc_libretro.dll” -AM2R

If not, would it be possible to add that function into it where basically the game name we set can be used as a parameter?

Thanks again and I apologize for playing 20Q :grimacing:

3 Likes

first of all you have the option to get the name from the window title or from the taskmanager (details) :slight_smile:

second it shouldn´t matter where to place it there is no real default path as far as i know

1 Like

On a related note. I tried to name the text file something unique containing only one reference, so I could save a game shader preset based on the text file name. And it didn’t work.

yeah for any reason you have to make folders and use params

each folder containing a new/copy of the file

at least i had to do it to switch between wide screen and 4:3 presets/overlays

2 Likes

Hey all o/

I recently stumbled across this and fell in love. Most exciting thing in emulation (for my money) in ages. Thank you so much @IHQMD

I wrote a little wrapper utility to help leverage the most out of it and help integrate the Core into frontends. Supports a few nifty little things like automatically closing the emulator when RetroArch closes, and supports both standalone emulators and standalone windows games.

Can be downloaded here

I’m not a programmer by any means so expect bugs and weirdness, but has worked well in my testing so far \o/

Simple usage for Pegasus-frontend (should be easy to adapt to LaunchBox or anything else):

launch: …\Emulators\RetroArch\wincast.exe --emulator “…\Emulators\PCSX2\pcsx2-qtx64-avx2.exe” --retroarch “…\Emulators\RetroArch\retroarch.exe” --partialdir “E:\Temp\PartialTest” --rom “{file.path}”

9 Likes

Thank you for this! I was able to use super model 2 with my daytona usa overlay :slight_smile:

5 Likes

That looks really nice! :grin:

The same procedure should work in portrait mode. . . there is one additional parameter that tells the shader that your monitor orientation is portrait.

2 Likes

LOVING WINDOWCAST!!! I added a link to this thread in the description of my new Star Wars Battle Pod 4K Vertical Overlay :smiling_face_with_three_hearts:

WIP :grin:

Lots of fun ideas and things happening here! Come visit and sub!

7 Likes

I’m having some trouble installing this on Retroarch. When I click on the .txt file, it tries to get me to use a different core. Any ideas?

Trying to improve the look in Castlevania Rebirth, with Widow Cast Core. I think there is some shader that can make it more polished. Has anyone tried a combination, resolution, preset shader that was better?

2 Likes

I notice this core often makes the window become unresponsive when you use particular bezel shaders, such as “MBZ__0__SMOOTH-ADV” and various koko-aio ones

1 Like

I mentioned this the other day. MegaBezel’s advanced presets don’t seem to work with it.

strange for me it works fine if used with MBZ__0__SMOOTH-ADV__GDV

2 Likes

Hey. Anyone figure out how to get this working with LaunchBox? I couldn’t make heads or tails of the ‘wincast’ wrapper, unfortunately…

What everybody has to keep in mind with the core is that system power matters. It is the Core + Emulator/Game + Shader. I have trouble running the Core, PS2 Emulator and ADV presets together but fine with just PS2 and ADV preset.

1 Like

Check out @p3st’s earlier post

2 Likes

It’s not an ideal solution - but that’s for later, I can’t get it to work as it is. RA just freezes without ever showing its face. I have to kill the process. Nothing suspicious in the log either.

A ‘class name’ is an internal thing that every window on Windows has but it isn’t normally shown. You can find these with a tool like https://www.nirsoft.net/utils/winlister.htm.

That said, you don’t actually need to find ‘class names’ to make WindowCast work. WindowCast basically has logic that reads the .txt file you load as your “content” and it will try to find a window to most closely matches whatever was written on the line in that text file. That’s based on several metrics of that window, including it’s title, class name, program name of the owning application, etc.

It essentially uses a scoring system for every window you have open on how closely it matches what’s written on the lines in that file. So if you write “AM2R”, say, then a window with “AM2R” in it’s title, or it’s class name, or it’s ‘program name’ will get a high score and it’ll be more likely to pick that window over other windows that will score worse.

IDK if that makes things any clearer?

3 Likes

For those interested in the technical details of window selection, the main logic goes something like this:

  1. Each line in the .txt file, called a ‘partial’ is used to score every open window, and select one candidate window or ‘scored window’ with the best score for that ‘partial’.
  2. These are then weighted by the priorities you specify in the .txt file (see the README about how to set priorities in that file). Basically it’s just score * priority value. If you don’t set priorities then the priority values are all 1, and this does nothing.
  3. The list of ‘scored windows’ is sorted so the window with the best weighted score overall is what gets selected.

Each window is scored roughly like this:

  1. Get a few pieces of information about the window; it’s title, class name, and the ‘product name’ and ‘file description’ fields stored in the metadata for .exe for the program that owns it.
  2. Using partial_ratio() from the rapidfuzz library, it gets a fuzzy matching score between each of those pieces of information, basically a number between 0 and 100 on how well that piece of text matches the given ‘partial’.
  3. It first takes the largest score value from the following;
    • The score for the ‘product name’ + 30.
    • The score for the window title + 20.
    • The score for the ‘file description’ + 10.
    • The score for the ‘class name’ + 0.
  4. Finally a few other modifications are made to that score;
    • If the window is ‘visible’, i.e. not minimized, it’s score is multiplied by 2, so as to greatly prefer visible windows.
    • The length of the window’s title is added to the score so as to slightly prefer windows with longer titles.
    • If product name exactly matches “Microsoft Windows Operating System”, the score is multiplied by 0.5, so as to disprefer capturing windows from the OS itself.
    • If class name exactly matches “Chrome_Widget”, the score is multiplied by 0.5, so as to disprefer capturing windows from Chromium-based browsers and Electron apps like VS Code.

This logic was mostly developed by testing and tweaking to try and capture game or emulator windows most of the time.

7 Likes