Author Topic: Confusion over Command Arguments  (Read 11161 times)

Asterra

  • Full Member
  • ***
  • Posts: 44
    • View Profile
Confusion over Command Arguments
« on: June 26, 2017, 05:11:15 AM »
Trying to set up Amiga emulation via FS-UAE.  Turns out the process everyone seems to have decided works best is to point FS-UAE at "UUIDs" which correspond to the games in one's library.

To that end, I used an app which generated a bunch of directories named after my games, inside each of which is an empty file whose filename is the exact text which comprises the game's UUID.  The idea is that I take advantage of AttractMode's ability to use directory names for the names of "roms", and simply point the emulator at whatever's inside said directory.  So, for example, the rom directory structure looks like this:

/roms/some_driving_game/asdf1234qwerzxcv

and what AttractMode should be doing is this:

Code: [Select]
Launcher.exe asdf1234qwerzxcv

But of course what AttractMode is actually doing is this:

Code: [Select]
Launcher.exe "roms/some_driving_game/asdf1234qwerzxcv"

This does me no good because FS-UAE is not looking for a file; it's looking for that mess of text that is the filename, by itself.  When it gets anything it can't process, it just opens the GUI.  No dice.

Solutions?  Some magic I can finagle via Command Arguments?

hermine.potter

  • Hero Member
  • *****
  • Posts: 767
    • View Profile
Re: Confusion over Command Arguments
« Reply #1 on: June 26, 2017, 05:32:08 AM »
@Asterra
Probably you do not use the [name] parameter; instead the [romfilename] parameter.

e.g ZSNES to see the difference:
>to start .smc files in zsnes:
Code: [Select]
executable           C:\attract\EMU\zsnes\zsnesw.exe
args                 -m "[romfilename]"
rompath              C:\attract\EMU\zsnes\roms
romext               .smc

>to start .smc files in folder (structure like : game 123\game 123.smc ):
Code: [Select]
executable           C:\attract\EMU\zsnes2\zsnesw.exe
args                 -m "[rompath][name]\[name].smc"
rompath              C:\attract\EMU\zsnes2\roms
romext               <DIR>

please post your AM settings of your amiga emulator system.

---------------------

with fs-uae, i'm using directly .adf-files instead UUID.
>AMIGA ( WinUAE & fs-uae )

executable           C:\attract\EMU\WinUAE\fs-uae\Windows\fs-uae\fs-uae.exe
args                 C:\attract\EMU\WinUAE\fs-uae\Configurations\default.uae --floppy-drive-0="[romfilename]" --fullscreen
rompath              C:\attract\EMU\WinUAE\ROMS
romext               .adf

-install winuae
-install fs-uae
-start and configure fs-uae.exe (path to kick.rom and so on; create one global default.uae or .uae-file each game)
« Last Edit: June 26, 2017, 06:08:11 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

Asterra

  • Full Member
  • ***
  • Posts: 44
    • View Profile
Re: Confusion over Command Arguments
« Reply #2 on: June 26, 2017, 07:01:58 AM »
Code: [Select]
args                 -m "[rompath][name]\[name].smc"
I gave this a try, including many permutations of said.  Does AttractMode generate a log at all?  I'd be interested in seeing just exactly what command line these args result in.  In this case, for example, if I have a path like: "some_driving_game/qwer1234asdfzvxc", then wouldn't the above arg give me "some_driving_gameSome Driving Game\Some Driving Game" ?  It hurts that I don't know what args are available or what they correspond to.

please post your AM settings of your amiga emulator system.
I would, but I don't know where AttractMode hides that data.

with fs-uae, i'm using directly .adf-files instead UUID.
That was my original plan.  But I went with WHDLoad packages because 1) there didn't seem to be a good package out there that was regular ADFs, 2) all of the wheel/etc. assets are already named specifically after the WHDLoad package, and renaming all of that would be a day-long process even with matchmaking software, 3) many games come as multiple discs, and apparently the WHDLoad system eliminates the need to fiddle with that issue, and 4) games definitely load faster as WHDLoad, even if you include the 5-second-long opening GUI.

-start and configure fs-uae.exe (path to kick.rom and so on; create one global default.uae or .uae-file each game)
That last suggestion is an interesting one.  If I knew how to generate a .fs-uae config for every single game, I would definitely do that, because I already know Launcher.exe can use those to launch games without any rompath issues.  And better still, anything specified in the config file actually takes effect.

hermine.potter

  • Hero Member
  • *****
  • Posts: 767
    • View Profile
Re: Confusion over Command Arguments
« Reply #3 on: June 26, 2017, 07:43:28 AM »
zsnes was only an example.
so you have to adjust to your settings, of course ^-^

there are two ways to check your config:
start AM > press TAB key > Emulators > choose your system > there is the configuration

or

goto folder where attract.exe is found. there is a folder called 'emulators'.
e.g. C:\attract\emulators\zsnes.cfg

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

Asterra

  • Full Member
  • ***
  • Posts: 44
    • View Profile
Re: Confusion over Command Arguments
« Reply #4 on: June 26, 2017, 08:06:50 AM »
Okay, here is that cfg.  Keep in mind it is in a state of flux, since I had been trying everything I could to force things to function.

Code: [Select]
# Generated by Attract-Mode v2.2.1
#
executable           /HyperSpin/Emulators/Commodore Amiga/FS-UAE/Launcher.exe
args                 "[romfilename]"
workdir              /HyperSpin/Emulators/Commodore Amiga/FS-UAE/FS-UAE_UUIDs
rompath              /HyperSpin/Emulators/Commodore Amiga/FS-UAE/FS-UAE_UUIDs
romext               <DIR>
system               Amiga
artwork    flyer           /attractmode/emulators/amiga/boxart
artwork    marquee         
artwork    snap            /attractmode/emulators/Amiga/videos;/attractmode/emulators/Amiga/snap
artwork    wheel           /attractmode/emulators/amiga/wheel

It is worth repeating that if there is some method to generate individual .fs-uae config files for every game in my library, that would just about solve this whole thing.  (I would have to rename all the video/snap/etc. assets, but that is at least doable in theory.)  Even if there turns out to be a way to correctly launch FS-UAE with a UUID, I still have the problem that doing so does not cause it to use my custom config files when one exists.  Everything I've read says this is supposed to work, but for me it doesn't.

hermine.potter

  • Hero Member
  • *****
  • Posts: 767
    • View Profile
Re: Confusion over Command Arguments
« Reply #5 on: June 27, 2017, 02:59:11 AM »
@Asterra
creating a .fs-uae each game should do it.

then config AM to this (depending to your folder structure):
Code: [Select]
executable           C:\attract\EMU\amiga\Programs\Windows\x86\fs-uae.exe
args                 "[romfilename]" --fullscreen
rompath              C:\attract\EMU\amiga\Configurations
romext               .fs-uae
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

Asterra

  • Full Member
  • ***
  • Posts: 44
    • View Profile
Re: Confusion over Command Arguments
« Reply #6 on: June 27, 2017, 06:05:33 AM »
@Asterra
creating a .fs-uae each game should do it.
Precisely.  But how?

The process for creating a .fs-uae for an individual game is not as simple as mass duplicating a text file.  In addition to the filename of the game's archive (let's call it: A_Racing_Game_2000.zip), I also need to know one or two other things:
  • The Amiga model the game should run on, as specified by info downloaded from the online database.  (Could possibly get away with using 100% A1200.)
  • Extra arguments.  This always means "PRECACHE" but many games include other things on top of that.  This is also dictated by downloaded info.
  • The specific name of the slave file associated with the game, also specified by downloaded info.  Let's call it: ARacingGame2000.slave

These three items are ascertained from within FS-UAE's GUI; when you create a custom config with the GUI, these important pieces of info carry over.  This data is not available externally, as it is secreted away in a .sqlite file, rather than a potentially more convenient text file.  The main barrier here is that the name of the slave file is pretty much never identical to the name of the game or of its archive.  It truly must be gleaned from somewhere else.  Guess wrong and it just won't work.
« Last Edit: June 27, 2017, 06:07:43 AM by Asterra »

hermine.potter

  • Hero Member
  • *****
  • Posts: 767
    • View Profile
Re: Confusion over Command Arguments
« Reply #7 on: June 29, 2017, 02:16:41 AM »
@Asterra
i'm not using whdload, so i can't help you.

you can try this :
-unzip your games (so you get a folder A_Racing_Game_2000 )
-create a batch-file with this code (e.g. make_configfile.bat) :
Code: [Select]
@echo off

SET path_to_configs=C:\attract\EMU\amiga\Configurations
SET path_to_roms=C:\attract\EMU\amiga\roms

for /f "delims=" %%i in ('dir /B /AD %path_to_roms%') do (
for /f "delims=" %%j in ('dir /B %path_to_roms%\%%i\*.Slave') do (

echo [fs-uae] > %path_to_configs%\%%i.fs-uae
echo hard_drive_0 = %path_to_roms%\%%i >> %path_to_configs%\%%i.fs-uae
echo x_whdload_args = %%j >> %path_to_configs%\%%i.fs-uae

)
)

-set there your path to fs-uae-folder 'Configurations'
-set there your path to rom folder (where A_Racing_Game_2000 is found)
-start the script

the scripts scans all folders in your rom-directory for .slave
wrote this information to 'Configuration'-folder of fs-uae.
so you get a configuration-file each game



>Maybe is this helpful:
to start an .adf-file by configuration file, the configuration file contains:
floppy_drive_0 = C:\attract\EMU\amiga\roms\game123.adf

to start an .adf-file by commandline:
C:\attract\EMU\WinUAE\fs-uae\Windows\fs-uae\fs-uae.exe --floppy-drive-0="C:\attract\EMU\amiga\roms\game123.adf"

If you config a whdload-game, there is in the configuration file:
hard_drive_0 = C:\attract\EMU\amiga\roms\game123.zip
x_whdload_args = game123.Slave

maybe this are working commandline parameters (i don't know because I'm not using whdload):
C:\attract\EMU\WinUAE\fs-uae\Windows\fs-uae\fs-uae.exe --hard_drive_0="C:\attract\EMU\amiga\roms\game123.zip" --x_whdload_args="game123.Slave"
« Last Edit: June 29, 2017, 03:56:29 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