Attract-Mode Support Forum
Attract-Mode Support => General => Topic started by: ScherzKeks on March 15, 2021, 05:01:02 PM
-
Hello there!
My machine is set up to run with runcommand from the retropie setup although I'm running a regular debian pc in my Arcade. I want to pass the Game Name to the command line to use it for a Text to Speech programm.
The config for my Arcade games is like this:
# Generated by Attract-Mode v2.6.0
#
executable /opt/runcommand/runArcade.sh
args 0 _SYS_ arcade "[romfilename]" "[name]"
rompath /opt/roms/arcade
romext .7z;.cue;.fba;.iso;.zip;.7Z;.CUE;.FBA;.ISO;.ZIP
system Arcade
My romlist is generated with mame -listxml and looks like this:
#Name;Title;Emulator;CloneOf;Year;Manufacturer;Category;Players;Rotation;Control;Status;DisplayCount;DisplayType;AltRomname;AltTitle;Extra;Buttons;Series;Language;Region;Rating
1942;1942;Arcade;;;;Shooter / Flying Vertical;;;;;;;;;;;;;;
1942a;1942 (Revision A);Arcade;1942;1984;Capcom;Shooter / Flying Vertical;2;270;joystick (8-way),joystick (8-way);good;1;raster;1942;;;2;;;;
1942;1942 (Revision B);Arcade;;1984;Capcom;Shooter / Flying Vertical;2;270;joystick (8-way),joystick (8-way);good;1;raster;;;;2;;;;
1942a;1942a;Arcade;;;;Shooter / Flying Vertical;;;;;;;;;;;;;;
1943;1943;Arcade;;;;Shooter / Flying Vertical;;;;;;;;;;;;;;
airwolf;Airwolf;Arcade;;1987;Kyugo;Shooter / Flying Horizontal;2;0;joystick (8-way),joystick (8-way);good;1;raster;;;;2;;;;
astorm;Alien Storm (World, 2 Players) (FD1094 317-0154);Arcade;;1990;Sega;Platform / Shooter Scrolling;2;0;joystick (8-way),joystick (8-way);good;1;raster;;;;3;;;;
However each time I run a game it just gives me the name of the romfile instead of the title (e.g. "astorm" instead of "Aliens Storm (World, 2 PLayers....) and I just don't understand where I'm wrong.
-
With this arguments:
0 _SYS_ arcade "[romfilename]" "[name]"
AM starts this:
0 _SYS_ arcade "path_to_rom-folder\name_of_rom-file.rom-file_extension" "name_of_rom-file"
0 _SYS_ arcade "your_path\astorm.zip" "astorm"
I do not know, if that works. Please test:
0 _SYS_ arcade "[romfilename]" "[title]
or
0 _SYS_ arcade "[romfilename]" "[Title]"
-
With this arguments:
0 _SYS_ arcade "[romfilename]" "[name]"
AM starts this:
0 _SYS_ arcade "path_to_rom-folder\name_of_rom-file.rom-file_extension" "name_of_rom-file"
0 _SYS_ arcade "your_path\astorm.zip" "astorm"
I do not know, if that works. Please test:
0 _SYS_ arcade "[romfilename]" "[title]
or
0 _SYS_ arcade "[romfilename]" "[Title]"
hmm, i think i tried that. But probably only before I regenerated the romlist (to be sure it is correct).
Thanks I'll give it another try tonight.
is there by chance a list of valid arguments attract uses? In the docs I found the Magic Tokens, but [romfilename] is not on this list. So i guess these are not neccesarily the arguments which can be used for command line
-
Just tested a few moments ago. it works.
#Name;Title;Emulator;CloneOf;Year;Manufacturer;Category;Players;Rotation;Control;Status;DisplayCount;DisplayType;AltRomname;AltTitle;Extra;Buttons;Series;Language;Region;Rating
astorm;Alien Storm (World, 2 Players) (FD1094 317-0154);Arcade;;1990;Sega;Platform / Shooter Scrolling;2;0;joystick (8-way),joystick (8-way);good;1;raster;;;;3;;;;
[Title] works
I've heard before that these things are missing in the documentation. But if you see the templates (your_AM_folder\emulators\templates), [romfilename] is a standard argument or in different threads like here (http://forum.attractmode.org/index.php?topic=2143.0). or simple trial and error ^-^
-
[Title] works
Yes the capital T does the trick. i did only try all lowercase before.
Thanks for the help. Now my cab announces all games while starting :)
-
Hi.
I've tested this romlist with ZSNES (SNES Emulator) and tried all of them:#Name;Title;Emulator;CloneOf;Year;Manufacturer;Category;Players;Rotation;Control;Status;DisplayCount;DisplayType;AltRomname;AltTitle;Extra;Buttons;Series;Language;Region;Rating
a;b;ZSNES;d;e;f;g;h;i;j;k;l;m;n;o;p;q;r;s;t;u
executable C:\attract\EMU\ZSNES\zsnesw.exe
args -m [Name] [Title] [Emulator] [CloneOf] [Year] [Manufacturer] [Category] [Players] [Rotation] [Control] [Status] [DisplayCount] [DisplayType] [AltRomname] [AltTitle] [Extra] [Buttons] [Series] [Language] [Region] [Rating]
Output:Running: C:\attract\EMU\ZSNES\zsnesw.exe -m a b ZSNES d e f g h i j k l m o p q r s t u
So it's possible to take all these Infos from romlist and get it to argument-line as parameter.
Another question:
which "Text to Speech program" do you use?
-
currently I'm using gTTS https://pypi.org/project/gTTS/ (https://pypi.org/project/gTTS/)
However this is based on the google service and prone to be deprecated some time in the future or at least your machine needs to be online. So I plan to make the text to speach working being offline.
This is part of my strategy to safeguard my whole cab to be passed on my future generations :)