Author Topic: Launch "pre-commands" on windows  (Read 9761 times)

qqplayer

  • Sr. Member
  • ****
  • Posts: 301
    • View Profile
Launch "pre-commands" on windows
« on: February 06, 2017, 01:45:47 AM »
I want to test ssf emulator but it needs to mount .cue files before lauch a game.
Is there any option to set this on a windows system?
Thanks.

qqplayer

  • Sr. Member
  • ****
  • Posts: 301
    • View Profile
Re: Launch "pre-commands" on windows
« Reply #1 on: February 06, 2017, 10:13:23 AM »
Just reading daemon tools faqs found the command line to mount a .cue:

Code: [Select]
DTAgent.exe -mount dt, 0, "[romfilename]"

So , I just need a little help to make this work.
How can I launch this command first and then launch ssf?
When ssf launches it will look for the daemon tools drive and start emulation automatically.

« Last Edit: February 06, 2017, 10:17:17 AM by qqplayer »

hermine.potter

  • Hero Member
  • *****
  • Posts: 767
    • View Profile
Re: Launch "pre-commands" on windows
« Reply #2 on: February 06, 2017, 09:47:52 PM »
@qqplayer
set & in argument-line

I'm using WinCDEmu for mounting images. It supports ISO, CUE, NRG, MDS/MDF, CCD, IMG.
Daemon Tools got always this nag license check.

This is a working config:
executable           cmd
args                 /c C:\Progs\WinCDEmu\batchmnt.exe /unmountall & C:\Progs\WinCDEmu\batchmnt.exe [romfilename] & start C:\path_to_emulator\exe_of_emulator.exe -Parameter_of_emulator drive_letter_of_mounted_image
rompath              C:\attract\EMU\System1\ROMs
romext               .iso;.cue;.nrg;.mdf;.ccd;.img
« Last Edit: February 07, 2017, 12:04:07 AM by hermine.potter »
AM Version : 2.6.1
Input : Mad Catz Brawlstick; Mouse; Keyboard; Xbox360 Wireless
Cabinet : Yes
OS : Windows10 Pro
System : Dell Precision T3500 ; Intel X5650 ; 12GB RAM

qqplayer

  • Sr. Member
  • ****
  • Posts: 301
    • View Profile
Re: Launch "pre-commands" on windows
« Reply #3 on: February 07, 2017, 04:35:25 AM »
Thanks for your help.
Is working but not perfectly.
I have a new problem , only works with AM and ssf on windowed mode.

If I launch ssf at fullscreen crashes , only works correctly on first run.
And sometimes keeps behind AM.

Any ideas?

hermine.potter

  • Hero Member
  • *****
  • Posts: 767
    • View Profile
Re: Launch "pre-commands" on windows
« Reply #4 on: February 07, 2017, 05:43:30 AM »
Do not know.

maybe ssf (is this ssf?!) don't get mounted image fast enough?!
So enter
& ping 127.0.0.1 &
too

or

leave the 'start' argument and test it

or

put all your parameters in a single batch-file and test it:

@echo off
application_and_parameter_to_mount_your_cue_file
parameter_to_start_ssf_in_fullscreen_with_mounted_cue_file

What happens?
AM Version : 2.6.1
Input : Mad Catz Brawlstick; Mouse; Keyboard; Xbox360 Wireless
Cabinet : Yes
OS : Windows10 Pro
System : Dell Precision T3500 ; Intel X5650 ; 12GB RAM

qqplayer

  • Sr. Member
  • ****
  • Posts: 301
    • View Profile
Re: Launch "pre-commands" on windows
« Reply #5 on: February 08, 2017, 01:45:17 PM »
Almost done , only adding
Quote
/wait ""
to your code

Code: [Select]
start /wait "" C:\path_to_emulator\exe_of_emulator.exe
So , last thing I need , I´m using <DIR> as "romext" and -mount "[romfilename]\[name].cue" , is there any option-code to set -mount "[romfilename]\[name].ccd" when .cue is not found?
This is because some of my roms are clone cd sets.

Thanks for all your help.

hermine.potter

  • Hero Member
  • *****
  • Posts: 767
    • View Profile
Re: Launch "pre-commands" on windows
« Reply #6 on: February 09, 2017, 02:19:40 AM »
don't know... to complicated

copy all your image files (bin, img) to a root-folder (and life without game music; cue and ccd manages the cd tracks)
or
rename and edit image-names (bin, img) and meta-files (cue, ccd) to correct game names. copy them to a root-folder
or
create batch files each game (with correct parameters to starting game) > configure AM with .bat-files
or
convert your images to .iso (eg. with ultraiso)
« Last Edit: February 09, 2017, 02:21:17 AM by hermine.potter »
AM Version : 2.6.1
Input : Mad Catz Brawlstick; Mouse; Keyboard; Xbox360 Wireless
Cabinet : Yes
OS : Windows10 Pro
System : Dell Precision T3500 ; Intel X5650 ; 12GB RAM

akafox

  • Moderator
  • Hero Member
  • *****
  • Posts: 985
    • View Profile
Re: Launch "pre-commands" on windows
« Reply #7 on: February 09, 2017, 03:21:19 PM »
To quote the site below:

Quote
It is designed to run game CDs directly, so images must be mounted with a virtual drive program (e.g. Daemon Tools) in order to be played.

So try to use Daemon Tools to mount the image. I think Closemul http://lustark.com/closemul helps with loading images that way. ex. load it into deamon tools automatically when you start the game. But I have never tried it for that.

http://www.segaretro.org/SSF
People want life easy..then complain about it

qqplayer

  • Sr. Member
  • ****
  • Posts: 301
    • View Profile
Re: Launch "pre-commands" on windows
« Reply #8 on: February 10, 2017, 10:08:53 AM »
@hermine.potter thanks , can you help me with this "new" problem , all was working perfectly on C: but the thing is I have my AM on "Y:\Attrack Mode"
I`ve created a symlink to the Daemon tools instalation, so my code look like this:

Code: [Select]
args                 /c "Y:\Attrack Mode\utilities\DAEMONToolsUltra\DTAgent.exe" -unmount_all & "Y:\Attrack Mode\utilities\DAEMONToolsUltra\DTAgent.exe" -mount "[romfilename]\[name].cue" & start /wait "" "Y:\Attrack Mode\systems\SSF\SSF_TestVer 29-12-2016\SSF_TestVer\SSF.exe"
I think the problem is dtools command , because when I set back to c: works perfectly even with ssf on y:


@akafox thanks too , yes , I´m using dtools , but the problem is that like I set my romext as <DIR> I have to "tell" daemon tools the rom extension manually with:

Code: [Select]
"[romfilename]\[name].cue"
So , some dumps are on .ccd and with this dtools is not working.
I want to now if is posible set and "condicional" setting for this.

akafox

  • Moderator
  • Hero Member
  • *****
  • Posts: 985
    • View Profile
Re: Launch "pre-commands" on windows
« Reply #9 on: February 11, 2017, 08:43:53 AM »
Ah I see. Well all I can suggest to you is to convert everything to cue / bin maybe?

https://www.ultraiso.com/ ..it may not work..I think the cap is set at 800 GB..but ss games are cd based so you should be ok.

Sorry I don't have much experience with ssf (lucky windows users *sigh*) does it work ok..(I am really curious..I know sega sat has been a pain to emulate)
People want life easy..then complain about it

hermine.potter

  • Hero Member
  • *****
  • Posts: 767
    • View Profile
Re: Launch "pre-commands" on windows
« Reply #10 on: February 13, 2017, 05:16:39 AM »
i think : it's a dos thing.
if you start a command window, you're already on c:\
so dos found correct path on C:\.
i think you need to extend your parameter with cd (cd = change directory).

please test this:
args                 /c cd "Y:\Attrack Mode\utilities\DAEMONToolsUltra\" & start DTAgent.exe [...] and so on

please mount an image, start AM & test this command line first and expand your arguments step by step (to see at which point it doesn't work):
Code: [Select]
args                 /c cd "Y:\Attrack Mode\utilities\DAEMONToolsUltra\" & start DTAgent.exe -unmount_all
« Last Edit: February 13, 2017, 05:25:40 AM by hermine.potter »
AM Version : 2.6.1
Input : Mad Catz Brawlstick; Mouse; Keyboard; Xbox360 Wireless
Cabinet : Yes
OS : Windows10 Pro
System : Dell Precision T3500 ; Intel X5650 ; 12GB RAM

qqplayer

  • Sr. Member
  • ****
  • Posts: 301
    • View Profile
Re: Launch "pre-commands" on windows
« Reply #11 on: February 14, 2017, 08:15:14 AM »
Sorry I don't have much experience with ssf (lucky windows users *sigh*) does it work ok..(I am really curious..I know sega sat has been a pain to emulate)

As far as I know is the best sega saturn emulator ever made.
Only thing I hate is that hasn´t a virtual drive plugin like epsxe , retroarch ... and you have to mount images with a third party program before launch the emulator.

qqplayer

  • Sr. Member
  • ****
  • Posts: 301
    • View Profile
Re: Launch "pre-commands" on windows
« Reply #12 on: February 15, 2017, 10:24:05 AM »
i think : it's a dos thing.
if you start a command window, you're already on c:\
so dos found correct path on C:\.
i think you need to extend your parameter with cd (cd = change directory).

please test this:
args                 /c cd "Y:\Attrack Mode\utilities\DAEMONToolsUltra\" & start DTAgent.exe [...] and so on

please mount an image, start AM & test this command line first and expand your arguments step by step (to see at which point it doesn't work):
Code: [Select]
args                 /c cd "Y:\Attrack Mode\utilities\DAEMONToolsUltra\" & start DTAgent.exe -unmount_all

Thank you so much hermine.potter , that solved all my problems:

Code: [Select]
args                 /c cd "Y:\Attrack Mode\utilities\DAEMONToolsUltra\" & start DTAgent.exe [...] and so on
Now works perfect on drive Y:


Marba

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Launch "pre-commands" on windows
« Reply #13 on: August 23, 2022, 04:09:48 AM »
Hi, hermine.potter, I´m trying to set up this emulator reading this post...but I´m lost at the end of your command, I tried this:
Ejecutable cmd
Args /c C:\Program Files (x86)\WinCDEmu\batchmnt.exe [romfilename] & start "F:\MultiMega\(1993) FM Towns Marty\Emus\Unz 0.5 30\Unz.exe batchmnt <image file> [<G:>] [/wait]
Roms path F:\MultiMega\(1993) FM Towns Marty\Roms
Rom ext .bin

Probably Args final part is wrong but I don´t know how is this final part...help please!! Thanks!  :'( :P