Attract-Mode Support Forum

Attract-Mode Support => General => Topic started by: krizali1 on June 24, 2019, 12:31:46 AM

Title: SSF emulator with SSFLoader plugin
Post by: krizali1 on June 24, 2019, 12:31:46 AM
Hello there,

First of all, thank you everybody involved with AM and it's themes, amazing frontend.
What i'm trying to accomplish is this:

I've got SSF emulator for Saturn which runs great for low end devices. Since i have some troubles with virtual devices, i'm using SSFLoader plugin to use CHD Saturn game format instead of a CD drive.
The SSFLoader plugin goes to the same folder as SSF, it's just an executable that launches SSF and then closes, leaving SSF open and running the game, and here's the problem. AM returns to the main "Saturn screen" when SSFLoader terminates.

It's not an AM problem since it's configured to load SSFLoader, but when SSFLoader does his job of opening SSF with the game, it closes, and AM sees the execution is over and returns to the game selection screen.

There is any way to accomplish this? Make AM to open an executable that opens another executable and instead of waiting the first one to close (SSFLoader), wait for the "child process" (SSF)?

The saturn.cfg containts this:
executable           cmd
args                 /c SSFLoader.exe C:\roms\saturn\[name].chd
workdir              C:\ssf
rompath              C:\roms\saturn
romext               .chd

Thank you.
Title: Re: SSF emulator with SSFLoader plugin
Post by: krizali1 on June 26, 2019, 11:23:34 AM
OK, i've found a workaround.

Since i cannot make SSFLoader running all the time, i can create a batch file that opens SSFLoader and loops itself while SSF.exe is running, so the behavior is what i expect.

ssf.bat inside the ssf folder:

cd C:\ssf\
SSFLoader.exe C:\roms\saturn\%1
ping -n 2 > nul
tasklist /fi "imagename eq ssf.exe" |find ":" > nul
if errorlevel 1 goto loop

What it does is just running SSFLoader and pass the game in CHD format, and then every 1 second it checks if the process ssf.exe (the emulator) is running. The batch ends when i alt+f4'd ssf.exe and returns to the AM Saturn menu. So the cfg file stays like that:

executable           cmd
args                 /c C:\ssf\ssf.bat [name].chd
workdir              C:\ssf
rompath              C:\roms\saturn
romext               .chd

I have xpadder with a key binded to alt+f4 when ssf.exe is running.
I hope that anybody who wants to use this plugin ( ) will have no problems using it.
Title: Re: SSF emulator with SSFLoader plugin
Post by: bundangdon on June 29, 2019, 09:03:37 PM
This is really helpful! Thank you very much for sharing, as I never knew such a plugin existed. But I'm wondering, besides being more suitable for older systems, slower processors, etc. are there any benefits of using SSF over the Saturn core within Mednafen/Retroarch?
Title: Re: SSF emulator with SSFLoader plugin
Post by: krizali1 on June 30, 2019, 03:29:36 AM
Not really, it's just for performance issues. I've heard that mednafen has equal or better compatibility than SSF, but at the expenses of higher CPU requirements. I've got an i3 4030U, so i cannot deal with "medna".

Retroarch has some Saturn cores that accept ISO, BIN/CUE or ZIP format (Yaba Sanshiro / Kronos), but i'm unable to use redump images for launching games, most probably because they are multitrack bin/cue (i've also tried to convert those CD images but without success).
Title: Re: SSF emulator with SSFLoader plugin
Post by: rand0m on July 02, 2019, 08:24:13 AM
I also worked a bit on SSF before I moved to Retroacrh core. For mounting CDs I used Alcohol soft with following code:

Code: [Select]
@echo off
"C:\Path to Alcohol 120\AxCmd.exe" V: /U
"C:\Path to Alcohol 120\AxCmd.exe" V: /M:"D:\Path to Saturn Roms\Rom.cue"
start /wait "" cd "D:\Path to SSF Test Ver (01-03-18)\SSF.exe"

"C:\Path to Alcohol 120\AxCmd.exe" V: /U

This worked as intended and mounted/ unmounted the CDs. As I recall .chd loader was working OK with focus returning to AM, perhaps because I have "ResFix" turned on.