Author Topic: Change emulator command based on rom extension?  (Read 6574 times)

rsn8887

  • Full Member
  • ***
  • Posts: 48
    • View Profile
Change emulator command based on rom extension?
« on: November 30, 2015, 01:45:49 PM »
Is there a simple way to modify the emulator command based on the rom extension?
Explanation:
For my Amiga display, I would like to run a certain emulator command for all ".hdf" files, and a different one for all ".whd" files.

My current solution is to have separate emulators, e.g. "FS-UAE-HDF" for my hdf files and "FS-UAE-WHD" for my whd files. But this creates two auto-generated romlists and correspondingly two displays. It also causes a bunch of other config file duplication. None of it is buggy, I think it is all as intended. But I would like to have all my amiga games in a single display, preferably auto-generated.

I found that I can manually merge the romlist files to get around the issue of having two Amiga related displays, but I have to do it again everytime I re-generate my romlists. When all I really want is to use one emulator command for .whd and a different one for .hdf.

I guess I could make my own launcher batch files or something, but that would complicate things a bit...

hermine.potter

  • Hero Member
  • *****
  • Posts: 767
    • View Profile
Re: Change emulator command based on rom extension?
« Reply #1 on: December 01, 2015, 12:00:43 AM »
Different methods to solve problem:

1)
If you want a single display, you'll get the same problem with 'config file duplication'. So you have to seperate them to different emulator systems / display.
-create a copy of your amiga-folder (e.g. amiga2) and rename your first amiga-folder to amiga1
-create a emulator FS-UAE-HDF and set amiga1 as rom-folder
-create a emulator FS-UAE-WHD and set amiga2 as rom-folder

2)
Set in Controls a button for 'Next Filter' and 'Add/Remove Favorite'
Set a Filter for hdf and whd files
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

rsn8887

  • Full Member
  • ***
  • Posts: 48
    • View Profile
Re: Change emulator command based on rom extension?
« Reply #2 on: December 04, 2015, 03:00:19 PM »
I think I found a similar solution in the manual. It should be a simple enough command to run on the commandline:
attract --build-romlist fs-uae-whd fs-uae-hdf

this should build a combined romlist. This would be a cool feature to make accessible from the frontend. I will still have two emulators, but using above I can auto-generate the romlists very easily.

The original readme says:
ROMLISTS: Romlists are saved in the "romlist" subdirectory of your Attract-Mode config directory. Each list is a semi-colon delimited text file that can be edited by most common spreadsheet programs (be sure to load it as "Text CSV"). The file has one game entry per line, with the very first line of the file specifying what each column represents.

In addition to the romlist generation function available in config mode, Attract-Mode can generate a romlist for multiple emulators from the command line using the following command:

    attract --build-romlist <emulator names...>
You can also import romlists from MameWah/Wahcade! (.lst), Attract-Mode (.txt) and HyperSpin (.xml) using the following command:

    attract --import-romlist <file> [emulator name]
The --build-romlist and --import-romlist options can be chained together in all sorts of strange and wonderful ways to generate combined Attract-Mode romlists. So:

attract --import-romlist mame.lst --import-romlist nintendo.lst nestopia

will combine the entries from the mame.lst and nintendo.lst files (located in the current directory) into a single Attract-Mode romlist. The "mame" emulator will be used for the mame.lst games, while the "nestopia" emulator will be used for the nintendo.lst games.

If you wish to specify the name of the created romlist at the command line, you can do so with the --output <name> option. Beware that this will overwrite any existing Attract-Mode romlist with the specified name.