Author Topic: Exporting Game Name/Title instead of rom file name to emulator  (Read 3279 times)

ScherzKeks

  • Jr. Member
  • **
  • Posts: 11
    • View Profile
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:

Code: [Select]
# 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:
Code: [Select]
#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.

hermine.potter

  • Hero Member
  • *****
  • Posts: 767
    • View Profile
Re: Exporting Game Name/Title instead of rom file name to emulator
« Reply #1 on: March 15, 2021, 10:36:08 PM »
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]"
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

ScherzKeks

  • Jr. Member
  • **
  • Posts: 11
    • View Profile
Re: Exporting Game Name/Title instead of rom file name to emulator
« Reply #2 on: March 16, 2021, 03:33:01 AM »
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

hermine.potter

  • Hero Member
  • *****
  • Posts: 767
    • View Profile
Re: Exporting Game Name/Title instead of rom file name to emulator
« Reply #3 on: March 16, 2021, 10:15:01 AM »
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. or simple trial and error ^-^
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

ScherzKeks

  • Jr. Member
  • **
  • Posts: 11
    • View Profile
Re: Exporting Game Name/Title instead of rom file name to emulator
« Reply #4 on: March 16, 2021, 12:26:14 PM »

[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 :)

hermine.potter

  • Hero Member
  • *****
  • Posts: 767
    • View Profile
Re: Exporting Game Name/Title instead of rom file name to emulator
« Reply #5 on: March 16, 2021, 12:40:47 PM »
Hi.
I've tested this romlist with ZSNES (SNES Emulator) and tried all of them:
Code: [Select]
#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

Code: [Select]
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:
Code: [Select]
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?
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

ScherzKeks

  • Jr. Member
  • **
  • Posts: 11
    • View Profile
Re: Exporting Game Name/Title instead of rom file name to emulator
« Reply #6 on: March 16, 2021, 01:23:08 PM »
currently I'm using 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 :)