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
:loop
ping 127.0.0.1 -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 (
https://github.com/batteryshark/CHDSSF ) will have no problems using it.