Attract-Mode Support Forum

Attract-Mode Support => General => Topic started by: qqplayer on January 19, 2017, 05:56:42 AM

Title: Roms into subfolders
Post by: qqplayer on January 19, 2017, 05:56:42 AM
I know that I can set diferent rompath , but is AM able to scan roms into subfolders?
I mean , I have 259 dreamcast .zip roms and I want to decompress them.
But the only way is to leave them into subfolders , for exapmle:

Sega Dreamcast > Sonic Adventure > Sonic Adventure.gdi
Title: Re: Roms into subfolders
Post by: hermine.potter on January 20, 2017, 05:36:37 AM
e.g. zsnes:
if folder-name and romfilename are identical (C:\attract\EMU\zsnes\roms\mygame1234\mygame1234.smc)
Code: [Select]
executable           C:\attract\EMU\zsnes\zsnesw.exe
args                 -m "[romfilename]\[name].smc"
rompath              C:\attract\EMU\zsnes\roms\
romext               <DIR>

set as rom-extension <DIR>
and set as argument for zsnes -m "[romfilename]\[name].smc"

just adjust config to dreamcast arguments.
Title: Re: Roms into subfolders
Post by: qqplayer on January 21, 2017, 12:58:27 PM
Wow!!! Thank you so much , working like a charm.

This is my future pinball config.If anyone wants to try with roms into subfolders.

Code: [Select]
args                 /open "[romfilename]\[name].fpt" /play /exit
Title: Re: Roms into subfolders
Post by: hermine.potter on January 22, 2017, 10:40:26 PM
there are already various emulator settings posted (http://forum.attractmode.org/index.php?topic=503.0).
the config of future pinball doesn't works?!
Title: Re: Roms into subfolders
Post by: qqplayer on January 23, 2017, 09:39:39 AM
Sure, just a little update using DIR as rom extension like you show me
Title: Re: Roms into subfolders
Post by: firewater on October 26, 2018, 05:59:56 PM
e.g. zsnes:
if folder-name and romfilename are identical (C:\attract\EMU\zsnes\roms\mygame1234\mygame1234.smc)
Code: [Select]
executable           C:\attract\EMU\zsnes\zsnesw.exe
args                 -m "[romfilename]\[name].smc"
rompath              C:\attract\EMU\zsnes\roms\
romext               <DIR>

set as rom-extension <DIR>
and set as argument for zsnes -m "[romfilename]\[name].smc"

just adjust config to dreamcast arguments.

How does this work if I have multiple extensions on the folder?
Title: Re: Roms into subfolders
Post by: progets on October 27, 2018, 02:19:37 AM
e.g. zsnes:
if folder-name and romfilename are identical (C:\attract\EMU\zsnes\roms\mygame1234\mygame1234.smc)
Code: [Select]
executable           C:\attract\EMU\zsnes\zsnesw.exe
args                 -m "[romfilename]\[name].smc"
rompath              C:\attract\EMU\zsnes\roms\
romext               <DIR>

set as rom-extension <DIR>
and set as argument for zsnes -m "[romfilename]\[name].smc"

just adjust config to dreamcast arguments.

How does this work if I have multiple extensions on the folder?

I don't understand this. What does "multiple extensions on the folder" mean? Do you mean "multiple extensions in the folder"?

This is an old thread. What OS? What emulator? What folder structure?
Title: Re: Roms into subfolders
Post by: firewater on October 27, 2018, 09:56:54 AM
e.g. zsnes:
if folder-name and romfilename are identical (C:\attract\EMU\zsnes\roms\mygame1234\mygame1234.smc)
Code: [Select]
executable           C:\attract\EMU\zsnes\zsnesw.exe
args                 -m "[romfilename]\[name].smc"
rompath              C:\attract\EMU\zsnes\roms\
romext               <DIR>

set as rom-extension <DIR>
and set as argument for zsnes -m "[romfilename]\[name].smc"

just adjust config to dreamcast arguments.

How does this work if I have multiple extensions on the folder?

I don't understand this. What does "multiple extensions on the folder" mean? Do you mean "multiple extensions in the folder"?

This is an old thread. What OS? What emulator? What folder structure?

Yes, multiple extensions in the directory. So for Dreamcast I've got games in .cdi and gdi

Sorry it's an old thread, but it has good info on the issue so I thought it'd be be better to revive it. It's Windows, any emulator since I'm more concerned about the folder structure working than the particular command (for the sake of an example, say it's nullDC), and I have all my games in their own subfolders. So Dreamcast > Crazy Taxy > Crazy Taxi.cdi
Title: Re: Roms into subfolders
Post by: rand0m on October 27, 2018, 11:46:56 PM
I think "[name]\[romfilename]" in arguments will take care of directories so <dir>may not be needed in romext. Please try:

executable           C:\attract\EMU\zsnes\zsnesw.exe
args                 -m "[name]\[romfilename]"
rompath              C:\attract\EMU\zsnes\roms\
romext               cdi;gdi
Title: Re: Roms into subfolders
Post by: progets on October 28, 2018, 12:50:25 AM
I think "[name]\[romfilename]" in arguments will take care of directories so <dir>may not be needed in romext. Please try:

executable           C:\attract\EMU\zsnes\zsnesw.exe
args                 -m "[name]\[romfilename]"
rompath              C:\attract\EMU\zsnes\roms\
romext               cdi;gdi

No offence but this won't work for several reasons. First, "[name]\[romfilename]" = "gamename_without_extension\full_path_to_and_including rom" which isn't correct. Second, by not having "<DIR>" as a romext he won't be able to build romlists. Third, I don't think you can use "[romfilename]" with multiple romext.
Title: Re: Roms into subfolders
Post by: progets on October 28, 2018, 01:26:56 AM
@firewater - Because you want to use subfolders and multiple file extension you have a complex issue with multiple solutions.

IMO, your best solution is to
1. determine whether you have more .cdi or more .gdi games
2. create your emulator file to cater to the larger selection of games
Code: [Select]
# Generated by Attract-Mode v2.4.1
#
executable           \Emulators\nullDC\nullDC_Win32_Release.exe
args                 -config ImageReader:defaultImage="[rompath]\[name]\[name].gdi"
rompath              \Roms\Sega Dreamcast
romext               <DIR>;.cgi;.gdi
system               Sega Dreamcast
info_source          thegamesdb.net
3. create exceptions for the games that don't use the file extension mentioned in your emulator file. This can be done within AttractMode by selecting the game in the FE and then pressing the button configured for edit game (Configure-->Controls-->Edit Game=?) and setting this
Code: [Select]
Custom Arguments -config ImageReader:defaultImage="[rompath]\[name]\[name].cdi"

Exceptions can also be manually created with simple text files too. Here's an example.
\AttractMode\romlists\Sega Dreamcast\Crazy Taxi.cfg
Code: [Select]
args -config ImageReader:defaultImage="[rompath]\[name]\[name].cdi"
Title: Re: Roms into subfolders
Post by: firewater on October 29, 2018, 11:17:01 AM
Thank you so much for the throughout explanation! I'd never been able to figure this one on my own. I do wonder though how most people do it if they don't use subfolders, specially for systems were the games are generally in multi-part formats. For example, in Saturn, one game is at least 2 files, and up to 30+
Title: Re: Roms into subfolders
Post by: progets on October 29, 2018, 03:49:41 PM
I personally don't use subfolders or multi-part games, I think it's a thing of the past since there are better ways to do this today and people just haven't caught up with it yet. http://forum.attractmode.org/index.php?topic=2290.msg15484#msg15484 (http://forum.attractmode.org/index.php?topic=2290.msg15484#msg15484)

Some might create two emulators and then use the AttractMode's builtin function to combine two emulators into one romlist.

Some might use RocketLauncher with AttractMode to handle these type of things.

Some might create .cue files that point to the .cdi and gdi files. You could also create .bat files for these roms too.

I'm sure there are other options too. Let's see what others have to say.
Title: Re: Roms into subfolders
Post by: firewater on December 07, 2018, 02:06:49 PM
I've run into another issue. Whats being read when one uses "romext               <DIR>" is literally the directory, which means multi-part games don't get read properly. For example, Gran Turismo 2 on PlayStation contains two discs, for two independently playable modes. When I use "<DIR>", the game is listed as "Gran Turismo 2", and crashes upon loading, because its trying to load the folder "Gran Turismo 2". Expected behavior should be to read the files and expand it into "Gran Turismo 2 (Disc 1)" and "Gran Turismo 2 (Disc 2)". Is there a workaround for this?
Title: Re: Roms into subfolders
Post by: progets on December 07, 2018, 05:20:35 PM
You could use a playlist for multi-disc games if the emulator supports it. Read the "Multiple-disc games" section here https://docs.libretro.com/library/beetle_psx/ as an example if you don't know what I mean.

You could create folders for each disc (i.e. folder for "Gran Turismo 2 (Disc 1)" and folder for "Gran Turismo 2 (Disc 2)"). I think this might get messy.

You could combine/convert your files into a PBP or CHD format so there is only one file that contains all the discs.

You could only show and launch Disc 1 of any given game and then use the emulator to "swap discs".

There are bunch of solutions and you just need to figure out what will work best for your setup.
Title: Re: Roms into subfolders
Post by: firewater on December 08, 2018, 09:20:21 PM
I do have them all in CHD + m3u (not the case of this game though, as it doesn't support disc-swapping), but that doesn't help because they're still inside the "Gran Turismo 2" folder, which is what it's trying to load (so for example, if I rename the folder to "Gran Turismo 2 TEST FOLDER WHATEVER" and rebuild the romlist, that's what the game selection amounts to). What I was hoping is that it would read, for example, "Final Fantasy VII (Disc 1).chd", "Final Fantasy VII (Disc 2).chd", "Final Fantasy VII (Disc 3).chd", "Final Fantasy VII (Disc 4).chd", and "Final Fantasy VII.m3u" from a "Final Fantasy VII" folder, and I'd use the filter to filter out games with "(Disc", so that I'd only have the .m3u on the romlist. But instead it adds, and tries to load, the directory itself.

To be clear - the reason I have them in folders is not because they're multi-part games, it's because it's just the way I organize files. I understand a majority don't use folders, but from my point of view (and to make a comparison) it'd be really odd to have a "Michael Jackson" folder, with 100 loose mp3 files inside. They would display just fine, as the "Album" aspect goes on the metadata of each mp3, but the literal file structure would be all over the place for my taste. So I "can" take them out and put them all under "PlayStation", but man do I not want to do that...

So where does that leave me? I feel like there's a workaround lying somewhere in splitting, or rather, merging my PlayStation display from two displays, one with disc games, one without... I'll look into it when I have time. But regardless I pray to the dev gods that recursive search is added... someday
Title: Re: Roms into subfolders
Post by: progets on December 08, 2018, 10:07:28 PM
I do have them all in CHD + m3u (not the case of this game though, as it doesn't support disc-swapping), but that doesn't help because they're still inside the "Gran Turismo 2" folder, which is what it's trying to load (so for example, if I rename the folder to "Gran Turismo 2 TEST FOLDER WHATEVER" and rebuild the romlist, that's what the game selection amounts to). What I was hoping is that it would read, for example, "Final Fantasy VII (Disc 1).chd", "Final Fantasy VII (Disc 2).chd", "Final Fantasy VII (Disc 3).chd", "Final Fantasy VII (Disc 4).chd", and "Final Fantasy VII.m3u" from a "Final Fantasy VII" folder, and I'd use the filter to filter out games with "(Disc", so that I'd only have the .m3u on the romlist. But instead it adds, and tries to load, the directory itself.

To be clear - the reason I have them in folders is not because they're multi-part games, it's because it's just the way I organize files. I understand a majority don't use folders, but from my point of view (and to make a comparison) it'd be really odd to have a "Michael Jackson" folder, with 100 loose mp3 files inside. They would display just fine, as the "Album" aspect goes on the metadata of each mp3, but the literal file structure would be all over the place for my taste. So I "can" take them out and put them all under "PlayStation", but man do I not want to do that...

So where does that leave me? I feel like there's a workaround lying somewhere in splitting, or rather, merging my PlayStation display from two displays, one with disc games, one without... I'll look into it when I have time. But regardless I pray to the dev gods that recursive search is added... someday

I'm not sure I understand your problem. If you're using .chd files why do you have loose mp3 files? Those mp3 files should be inside your .chd files. If you placed all the files under "PlayStation" as you suggest, you should just have .chd files and some .m3u files for your multi-disc games.

Regardless of how you store your files I think that "Gran Turismo 2" is a unique setup since it needs to load disc 2 independent of disc 1. This can be done with a simple game exception and/or an manual modification to your romlist.

Post your emulator.cfg for PlayStation. If AM is trying to load a directory instead of the file it's because of your argument in this file.


Update - I just remembered that a .chd conversion can't use compressed audio files (like mp3), you need to have the audio files in an uncompressed format (like .wav). I even point this out in my other post (http://forum.attractmode.org/index.php?topic=2290.msg15513#msg15513 (http://forum.attractmode.org/index.php?topic=2290.msg15513#msg15513)) that you've seen. Maybe, because of this, you still need the .mp3 files?
Title: Re: Roms into subfolders
Post by: firewater on December 09, 2018, 11:47:43 AM
Sorry maybe I didn't explain it clearly. What I mean is that my file structure is a standard that I use for everything - music, books, etc, which is that every title goes under a folder. Even if it's a NES game - I have "Nintendo Entertainment System (folder) > Super Mario Bros. (folder) > Super Mario Bros.zip". Basically under no circumstance I'd want to have "NES > Super Mario Bros.zip" as a loose file. So I was making a comparison with music, were you normally wouldn't have the songs of an artist loosely dumped into the artist's folder, but instead would put them into their corresponding albums. It would work regardless, since the information that music players read comes not from the file structure, but from the metadata on the mp3 themselves, wherever they're placed - yet most would find it preferable to have the songs under a corresponding album folder still.

Another reason I have all systems in folders is because some platforms have games stored in folders no matter what (Windows, PlayStation 3, Wii U), and it makes sense to me that if some are, all should be (so, a standard). The sole system I have with non-foldered, loose files, is arcade, because of how MAME is distributed and updated, there's no way around it - they have their own standard and I have to use it if I want to play arcade games.

So as you say, if I placed everything under "PlayStation" without folders it would read the .chd and .m3u files properly, and it would work. But I really don't want to do it like that. It's obviously a bit on an OCD thing, but I feel like I should have my file structure, and work the programs from there, rather than the other way around (after all, I went ahead with this structure also because it had been supported so far by other programs I used)

Here's my .cfg for PlayStation:

Code: [Select]
# Generated by Attract-Mode v2.4.1
#
executable           C:\Program Files\RetroArch\retroarch.exe
args                 "[romfilename]\[name].chd" -L "cores\mednafen_psx_libretro.dll"
rompath              M:\Media\Games\Platform\PlayStation
romext               <DIR>
system               Sony PlayStation
info_source          thegamesdb.net
artwork    flyer           M:\Media\Games\Metadata\PlayStation\cover
artwork    snap            M:\Media\Games\Metadata\PlayStation\video;M:\Media\Games\Metadata\PlayStation\screenshot
Title: Re: Roms into subfolders
Post by: rand0m on December 09, 2018, 12:48:23 PM
You can make links of files in a single folder and use that in rompath.
Title: Re: Roms into subfolders
Post by: progets on December 09, 2018, 10:53:43 PM
@firewater - I understand your desire to use sub folders. Do you still need help launching "Gran Turismo 2 Disc 2" or are we talking about what might work best for your setup having everything in folders?

To fix your "Gran Turismo 2 Disc 2" issue you could try this (assuming your AM emulator is called "PlayStation"):
1. Create a folder called M:\Media\Games\Platform\PlayStation\Gran Turismo 2 Disc 2
2. Create an text file in the new directory called M:\Media\Games\Platform\PlayStation\Gran Turismo 2 Disc 2\Gran Turismo 2 Disc 2.m3u and add entry like this
Code: [Select]
"M:\Media\Games\Platform\PlayStation\Gran Turismo 2\Gran Turismo 2 (Disc 2).chd"
3. rebuild your romlist
4. creating a folder called \AttractMode\romlists\PlayStation
5. create a text file called \AttractMode\romlists\PlayStation\Gran Turismo 2 Disc 2.cfg and add an entry like this
Code: [Select]
Custom Arguments "[romfilename]\[name].m3u" -L "cores\mednafen_psx_libretro.dll"
Title: Re: Roms into subfolders
Post by: firewater on December 10, 2018, 12:27:49 PM
Alright so I'm just gonna have to bite the bullet and make some exceptions to my file structure. I'll make a folder with .lnk files and problem solved. It's not ideal but I don't have enough patience to go with more intricate methods that support my usual file structure. If any dev is reading this, please do support romlist search inside directories. I'm aware that EmulationStation and RetroFE both handle game-adding like this, with a setting were you choose to enable it or not for the given folder. If you think it like that, it's worth considering it on the basis that it seems to be commonplace and not just some fringe petition from an OCD guy.

Once again thanks a lot to both of you for helping me and everyone constantly, that's very kind of you and builds up an excellent archive for future google searches of other clueless folks.
Title: Re: Roms into subfolders
Post by: progets on December 10, 2018, 04:30:12 PM
If you want to try to get a feature added to AM you should create a ticket here https://github.com/mickelson/attract/issues (https://github.com/mickelson/attract/issues).

You could write a script that recursively looks into folders and creates all your .lnk file or even creates your AM romlist directly.

You could use middleware like RocketLauncher http://forum.attractmode.org/index.php?topic=2401.msg16418#msg16418 (http://forum.attractmode.org/index.php?topic=2401.msg16418#msg16418) with AM to add all sorts of additional features (like sub directory support).
Title: Re: Roms into subfolders
Post by: grayfish on July 31, 2019, 07:13:24 PM
Just wanted to share what was working for me.
OS is Windows 10, i'm using Retroarch for emulation and attract-v2.5.1-win64 as frontend.

Code: [Select]
executable           D:\Emulators\RetroArch_1.7.7\retroarch.exe -L D:\Emulators\RetroArch_1.7.7\cores\mednafen_psx_hw_libretro.dll
args                 "[romfilename]\[name].cue"
rompath              D:\roms\ps1
romext               <DIR>
artwork    flyer           $HOME/Playstation 1/boxart
artwork    marquee         
artwork    snap            $HOME/Playstation 1/videos;$HOME/Playstation 1/snap
artwork    wheel     

The first 4 rows are the important ones.  (the rest is not yet configured, just got ps1 games to boot from AtractMode through RetroArch)

Note:
-I'm using the full path to the emulator, and since retroarch uses Cores I also describes the path to the core folder as an absolute path ("Full path").
-I'm not using the "-m" in front of my argument (row 2, "args").
-As "romext" i'm setting the value "<DIR>".

This works for me, hopefully it helps somone else.
(Not sure if using this thread was a good Idea, but since i found it when i searched for a solution I figured somone else will probably find it if they have the same problem...)
Title: Re: Roms into subfolders
Post by: snupello on October 25, 2019, 06:16:01 AM
hello !! i have problem with dreamcast emulator configurations. (DEMUL)
I have Roms into subfolders, rom are .gdi

where am I wrong ??


# Generated by Attract-Mode v2.5.1
#
executable           Z:\Dreamcast\demul07_111117\demul.exe
args                 -run=dc -image="[rompath]\[name]\[name].gdi"
workdir              Z:\Dreamcast\demul07_111117\
rompath              Z:\Dreamcast\demul07_111117\roms
romext               <DIR>;gdi
exit_hotkey          Escape
artwork    flyer           $HOME/Dreamcast/boxart
artwork    marquee         
artwork    snap            $HOME/Dreamcast/videos;$HOME/Dreamcast/snap
artwork    wheel           
Title: Re: Roms into subfolders
Post by: rand0m on October 25, 2019, 02:24:46 PM
remove <Dir> in romext and check, also I think workdir line is not needed.
Title: Re: Roms into subfolders
Post by: Firefoxian on November 22, 2020, 08:13:11 PM
e.g. zsnes:
if folder-name and romfilename are identical (C:\attract\EMU\zsnes\roms\mygame1234\mygame1234.smc)
Code: [Select]
executable           C:\attract\EMU\zsnes\zsnesw.exe
args                 -m "[romfilename]\[name].smc"
rompath              C:\attract\EMU\zsnes\roms\
romext               <DIR>

set as rom-extension <DIR>
and set as argument for zsnes -m "[romfilename]\[name].smc"

just adjust config to dreamcast arguments.

this was a good start for me, but does not factor in different rom types (for those that may have multiple). consider emulating with retroarch and using m3u files
args                 -m "[romfilename]\[name].m3u"
In this system, you can use many types of files like zip, iso, smc all under the same wheel/emulator. Look up https://forums.libretro.com/t/multi-disc-for-sony-playstation-and-sega-saturn-using-m3u-files/14161
One other thing that works for multiple rom types (in folders) under one wheel is to set up multiple emulators and then use "generate rom list" to combine them into one for a display. Both ways take some setting up.

also, a tip i'll note here is that [romfilename] and [rompath] add an extra / to the end which can mess up any  build. most of the time the /\ effective command line cancels itself out, but some emu's apparently don't like that. I I used a relative path like: args                 -m "..\roms\snes\[name]\[name].m3u"