EMULAB Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

The new forum is online, hope you enjoy it!

Pages: [1]   Go Down

Author Topic: Automatic ROMPath creation, TOSEC dats and my carpal tunnel syndrome :)  (Read 1409 times)

ArconEmu

  • Member
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 31
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Chrome 57.0.2987.133 Chrome 57.0.2987.133
    • View Profile

First of all I have been using CMP for some 15+ years now, since somewhere around the 2.xx version. Unfortunately not so much in the latter half of the time, so I missed out on actually exploring some of the current features. I practically only used it for MAME, which works perfectly.Since I only was doing that like every half a year, I also missed out on some bugs that happened. So the perfect user experience :)

So, when I had some time on my hands I also tried to try and update my TOSEC collection, which is where the problem starts. I picked up the latest TOSEC dats from Nov 2016 and was overwhelmed by the 2300+ dats they have nowadays (I remember something like 300 or so ... but I gave up sometime shortly after they introduced ISOs). Luckily they also give you the option to create the directories, which I used to create the tree for my ROMs. And also a script to move the datafiles appropriately, which for TOSEC seems to be one DAT for each format directory.

Example:
Datfile: Commodore C64 - Compilations - Games - [D64] (TOSEC-v2016-09-24)
ROMPath: <romroot>TOSEC\Commodore\C64\Compilations\Games\[D64]
DatPath: would be <cmproot>\TOSEC\Commodore\C64\Compilations\Games\[D64] containing Commodore C64 - Compilations - Games - [D64] (TOSEC-v2016-09-24_CM).dat

I guess if I just use the scripts provided and just move the directories into the CMP datfile folder, it will all work perfectly well using the automatic rompath creation for new dats in directory mode.

Unfortunately, my personal prefecence is to group the datfiles together and I started working without actually looking at all the options I have. Meaning, I didn't even register there was an option to automatically create the first ROMpath in batch mode. So I started manually setting all the rompaths and grouping the datfiles into folders without the actual format tags in it. So all "Commodore C64 - Compilations - Games - *.dat" went into "<cmppath>\datfiles\TOSEC\Commodore\C64\Compilations\Games".

So my question is: Can you update the function to create the rompath from the datfile name tag to recognize " - " as a path separator? Not sure if there is an easy solution for the "<manufaturer> <system>" information since it's just a space and there are quite some manufacturers that have names including spaces. Or maybe check the existing filesystem structure for existing path components.

Luckily, you only have to set the rompath once. When you update later, CMP recognizes which file to update pretty good. But that leads me to my second question.

Is there an easy (read "not annoying") way to move whole sections of my tree to another drive? Doing bulk changes to the rompaths over a bunch of datfiles?
As a possible solution having a flag to overwrite the first rompath in batch mode for existing datfiles using the same rules as for new dats comes to mind.

Thanks for listening.


Logged


The social dynamics of the net are a direct consequence of the fact that nobody has yet developed a Remote Strangulation Protocol. (Larry Wall, creator of Perl)

ArconEmu

  • Member
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 31
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Chrome 57.0.2987.133 Chrome 57.0.2987.133
    • View Profile

Blimey!
 ... I did some more testing. Using the TOSEC supplied script to create the directory structure, move the files into the appropriate directories and copy to the CMP datfile folder of a fresh CMP v4.031c installation produced the following results:

a) Datfile: 3DO 3DO Interactive Multiplayer - Applications (TOSEC-v2012-07-05)
Datfile name tag: <name>3DO 3DO Interactive Multiplayer - Applications</name>
Datfile path: <cmproot>\datfiles\TOSEC-ISO\3DO\3DO Interactive Multiplayer\Applications

Using rompath naming "DatFile Name Tag" the rompath became:
<rompath root>\TOSEC-ISO\3DO\3DO Interactive Multiplayer\Applications\3DO 3DO Interactive Multiplayer - Applications

Er... what? Oh yeah, user error, I didn't want to use the 'datfile name tag' option, let's try again with the next file  ???

b) Datfile: 3DO 3DO Interactive Multiplayer - Bonus Discs (TOSEC-v2012-07-05)
Datfile name tag: <name>3DO 3DO Interactive Multiplayer - Bonus Discs</name>
Datfile path: <cmproot>\datfiles\TOSEC-ISO\3DO\3DO Interactive Multiplayer\Bonus Discs

Using "DatFile Folder" option, the rompath became:
<rompath root>\TOSEC-ISO\3DO\3DO Interactive Multiplayer\Bonus Discs\Bonus Discs

Looks goo... WAIT!?! What? Why did the end element of the path double?  :o
*sigh* Does that mean I actually may be able to move the actual datfiles up one level in the datfiles folder?
Try again moving the rest of the datfiles in the datfiles directory up one level ..

c) Datfile: 3DO 3DO Interactive Multiplayer - Educational (TOSEC-v2012-07-05_CM).dat
Datfile name tag: <name>3DO 3DO Interactive Multiplayer - Educational</name>
Datfile path: <cmproot>\datfiles\TOSEC-ISO\3DO\3DO Interactive Multiplayer\

Using "DatFile Folder" option, the rompath became:
<rompath root>\TOSEC-ISO\3DO\3DO Interactive Multiplayer\3DO Interactive Multiplayer

Ooookay ... from the previous try I kinda expected that. Use the datfile path and double the last element  :P

d) Datfile: 3DO 3DO Interactive Multiplayer - Firmware (TOSEC-v2012-07-05_CM).dat
Datfile name tag: <name>3DO 3DO Interactive Multiplayer - Firmware</name>
Datfile path: <cmproot>\datfiles\TOSEC-ISO\3DO\3DO Interactive Multiplayer\

Using "DatFile Name Tag" option, the rompath became:
<rompath root>\TOSEC-ISO\3DO\3DO Interactive Multiplayer\3DO 3DO Interactive Multiplayer - Firmware

Kinda what I expected from a) but still not what I was looking for  :-\

So... am I doing something wrong, or is it the naming function? I was expecting was to get somehow to:
<rompath root>\TOSEC-ISO\3DO\3DO Interactive Multiplayer\Applications
<rompath root>\TOSEC-ISO\3DO\3DO Interactive Multiplayer\Bonus Discs
<rompath root>\TOSEC-ISO\3DO\3DO Interactive Multiplayer\Educational
<rompath root>\TOSEC-ISO\3DO\3DO Interactive Multiplayer\Firmware

And the associated DatFiles located at:
<cmproot>\datfiles\TOSEC-ISO\3DO\3DO Interactive Multiplayer

Note: The directories where the roms should go were also already in place before I loaded the dat files.
Any idea?
« Last Edit: 06 April 2017, 18:11 by ArconEmu »
Logged
The social dynamics of the net are a direct consequence of the fact that nobody has yet developed a Remote Strangulation Protocol. (Larry Wall, creator of Perl)

Roman

  • Global Moderator
  • Member
  • ***
  • Karma: 102
  • Offline Offline
  • Posts: 3064
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Chrome 57.0.2987.133 Chrome 57.0.2987.133
    • View Profile

There is a known bug causing the double folders...read this for a workaround...

https://www.emulab.it/forum/index.php?topic=4135.0

it's on my todo list


Regarding your other requests....Well, sure I can think about one separated which will be translated into a folder slash but as you've mentioned, it should be a valid one (not space if spaces are commonly used as non-path separators.....even '-' might be used in names...but could be a good start).

Regarding moving to a different drive...hmm....not so easy...maybe a "replace in files" job for a good texteditor which runs over the profile *.cmp files.
Logged

ArconEmu

  • Member
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 31
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Chrome 57.0.2987.133 Chrome 57.0.2987.133
    • View Profile

Oh great. I have missed that when searching the forum before I started ranting. I guess I should put on my glasses first. Sorry for that :)

As for the path separator, yes, just using the '-' is tricky .. it is also used in manufacturer names like "Hewlett-Packard" and in system names like "PC-Engine". But that's why I suggested ' - ' (<blank><dash><blank>) that seems to be the unique at least in the TOSEC name tags to separate sections.

For the renaming, that was another issue of me being blind. I was looking at the .cmp files and wondered where the path info was stored, because (me using vim on Windows...) the last stats line is so long without linebrakes, that vi doesn't show it until you scrolled far enough for the linefeed to be recognized... so I somehow assumed, it stopped after "Dir_ScannerSaveHaveFolder =". Again, sorry. I think I can whip up a perl script that can do that for me :)

But I think, using an option to reset the first rompath in the batch options, that would remove the entry before processing the datfile and then refill it from the settings for rompath creation might be the simpler way. Just my .02€ ;)

EDIT: Ah, I see. That part really seems to only be called, when it is really a new datfile. I just tried to remove the rompath and run the file through the batch processor again. No new rompath was set. So it really might be tricky.

Thanks very much for the help.
« Last Edit: 06 April 2017, 19:57 by ArconEmu »
Logged
The social dynamics of the net are a direct consequence of the fact that nobody has yet developed a Remote Strangulation Protocol. (Larry Wall, creator of Perl)
Pages: [1]   Go Up
 

Page created in 0.104 seconds with 21 queries.