Jump to content

All my products and services are free. All my costs are met by donations I receive from my users. If you enjoy using any of my products, please donate to support me. My bare hosting costs are currently not met so please consider donating by either clicking this text or the Patreon link on the right.

Patreon

Recommended Posts

Posted

Okay I'm having issues trying to make use of Map files...generally I'm a whiz with these...but hey everyone has a dark hour or two. ;)

+\Roms Folder\
|+\Container Folder 1\
||+\Game Folder 1\Foo.cue
||+\Game Folder 2\bar.ccd
||+\Game Folder 3\me.mds
|+\Container Folder 2\
||+\...\

As you can tell I'm using nested folders beneath the Rom Folder assigned in GX.

Now typically if you're only one nesting below the Rom Folder & the folder name matches the image's name...and all images use the same extension you can typically get away with this in the command line:

"[RomPath]\[Rom]\[Rom].cdi"

So the map file is a simple:

foo|foo
bar|bar

Tho if they are not the same file extension you can typically get away with:

"[RomPath]\[Rom]\[RomFile]"

With a Map like so:

foo.cue|foo
bar.ccd|bar

Anyways thats not my luck currently...so I wrote a script that will drill one deep currently and find the first catalog file it comes across...if none are present then it will report back with a container file.

#include <File.au3>
#include <Array.au3>

; File Extensions to Find
$Find = StringSplit ( 'cue|ccd|mds|bwt|b5t|gdi|cdi|nrg|bin|img|mdf|iso|pdi' , '|' )

; Create Map File
$file = FileOpen( 'CD Directory.map' , 2 )

; Create Directory Array
$DirList = _FileListToArray ( @ScriptDir & '\' , '*' , 2 )

For $h = 1 to $DirList[0]
; Create File List Array
$FileList = _FileListToArray ( @ScriptDir & '\' & $DirList[$h] & '\' , '*' , 1 )
; Test File Extensions in Array Order Against Files
For $i = 1 to $Find[0]
; Test Current Extension Agaist All Files
For $j = 1 to $FileList[0]
$ext = StringTrimLeft ( $FileList[$j] , StringInStr ( $FileList[$j] , '.' , 0 , -1))
; If Extension Matched Then Write to Map Then Test Next Directory
If $ext = $Find[$i] Then
FileWriteLine( $file , $FileList[$j] & '|' & $DirList[$h] )
ExitLoop 2
EndIf
Next
Next
Next

FileClose($file)

; End Of File

Which for my test run generated the following data for the map file:

X\X-Bladez Inline Skater [SLUS_014.44]\X-Bladez Inline Skater.cue|X-Bladez Inline Skater [SLUS_014.44]
X\X-Com - UFO Defense [SLUS_001.41]\X-Com - UFO Defense [SLUS_001.41].mds|X-Com - UFO Defense [SLUS_001.41]
X\X-Files (1of4) [SLUS_009.15]\X-Files (1of4) [SLUS_009.15].mds|X-Files (1of4) [SLUS_009.15]
X\X-Files (2of4) [SLUS_009.49]\X-Files (2of4) [SLUS_009.49].mds|X-Files (2of4) [SLUS_009.49]
X\X-Files (3of4) [SLUS_009.50]\X-files (3of4) [SLUS_009.50].mds|X-Files (3of4) [SLUS_009.50]
X\X-Files (4of4) [SLUS_009.51]\X-Files (4of4) [SLUS_009.51].mds|X-Files (4of4) [SLUS_009.51]
X\X-men Academy [SLUS_007.74]\X-men Academy [SLUS_007.74].mds|X-men Academy [SLUS_007.74]
X\X-Men Children of the Atom [SLUS_000.44]\X-Men Children of the Atom [SLUS_000.44].mds|X-Men Children of the Atom [SLUS_000.44]
X\X-Men Mutant Academy 2 [SLUS_013.82]\X-Men Mutant Academy 2 [SLUS_013.82].mds|X-Men Mutant Academy 2 [SLUS_013.82]
X\X-Men vs. Street Fighter [SLUS_006.27]\X-Men vs. Street Fighter [SLUS-00627].cue|X-Men vs. Street Fighter [SLUS_006.27]
X\Xena - Warrior Princess [SLUS_009.77]\Xena - Warrior Princess [SLUS_009.77].ccd|Xena - Warrior Princess [SLUS_009.77]
X\XenoGears (1of2) [SLUS_006.64]\XenoGears (1of2) [SLUS_006.64].mds|XenoGears (1of2) [SLUS_006.64]
X\XenoGears (2of2) [SLUS_006.69]\XenoGears (2of2) [SLUS_006.69].mds|XenoGears (2of2) [SLUS_006.69]
X\Xevious 3D-G+ [SLUS-00461]\Xevious 3D-G+ [SLUS-00461].ccd|Xevious 3D-G+ [SLUS-00461]
X\Xploder [No_SLUS]\Xploder.iso|Xploder [No_SLUS]
X\XS Airboat Racing [SLUS_015.66]\mm-airace.cue|XS Airboat Racing [SLUS_015.66]
X\XS Jr. League Dodgeball [SLUS_015.60]\mm-dball.cue|XS Jr. League Dodgeball [SLUS_015.60]
X\XS Jr. League Football [SLUS-01554]\XSJRLEAGUEFOOTBALL.ccd|XS Jr. League Football [SLUS-01554]
X\XS Jr. League Soccer [SLUS_015.20]\XSJRLEAGUESOCCER.cue|XS Jr. League Soccer [SLUS_015.20]
X\XS Moto [SLUS_015.06]\XS Moto [SLUS-01506].cue|XS Moto [SLUS_015.06]

Now the script didn't add the first directory...I prefixed it post generation. So we are 3 items deep in this map. Containing folder, sub folder, file

X\XS Moto [sLUS_015.06]\XS Moto [sLUS-01506].cue|XS Moto [sLUS_015.06]

3\2\1|title

The problem is...is that GX strips everything but the first item.

1|title

So anyone with some idea's of how to prevent the stripping of prefixed data?

It just would be nice to skip out of all the file and folder renaming....correcting of catalog file info...and one folder containing a huge amount of sub folders...one deep. :(

Posted

Okay I give up...I surrender...hehe for now. ;)

So for now I've got every game stuffed in one directory...for PSX...thats a lot of games. :(

Anyways this is what I've done thus far.

1. Corrected the Naming of Containing Directories with "Directory Rename" script thats attached. Simply copy the names of all Directory's into both text files....use something like Ninotech Path Copy 4.0 to grab names in bulk. Then Manually or with Regex rename Directory's to how you want them...make sure to keep lines from one file to the other matching...other wise your going to have a bad day. :( Run the script with the two text files in the primary folder containing all the sub folders you are looking to rename...should just take a second to finish.

WARNING THIS SHOULD NOT BE USED ON CUE+ISO+MP3\WAV DIRECTORIES

2. Renamed all CD files contained in the sub folders to match that of the sub folder containing them...used "Rename File To Directory" Script thats attached. Again this is ran from the primary folder for speed and convenience...should only take a few seconds to finish.

3. Fixed all CUE files to use the new names, using "Fix CUE Files" which is attached here. As best as I can tell ccd\mds\bwt\b5t catalog files default to linking to files of the same name as them...so no fixes appear to be required...only CUE.

4. Put all Sub Folder into one major Primary Folder then run "CD Dir to Map" Script which is attached above to create the required Map file.

5. Edit Emu to use the Map File that was created and alter command line to do the right thing:

eme.exe "[RomPath]\[Rom]\[RomFile]"

Posted

Heh sure it does...it just requires a little bit of effort as shown above. :)

Tho it would be nice if the whole left side of the pipe symbol would stay intact.

Heh then it wouldn't require nearly as much effort. :)

Posted

It shouldn't be too hard to add recursive file listings. But then again simple things like this can require hours of re-writing code. I guess Tom could weigh up the amount of work involved and see if it's worth supporting. I wouldn't mind seeing zipped ROMs support added too, and that would just mean adding *.zip filter to the existing GoodMerge code.

http://www.java2s.com/Code/VB/File-Directo...rectoryInfo.htm

Posted

HK -

Yeah that would be a nice addition.

Everyone -

Well since I haven't seen anyone download the required files to create that PS1 map...I'm guessing people just wanted to see what it looked like...cause its not really going to be of any use to anyone...unless they just happen by some odd chance to want to write their own automation scripts to adjust files so that they can be used by that map file....as there is no release from any group that matches up with that file. :)

Tho I guess I could possibly post a dat file & catalog files so that others can try to rebuild to that...without going through all the white knuckled bs I did.

Posted
Then again when I started this project, I only ever wanted it to support MAME ;).

Hehe well Mame may have been your end game...hehe but its not mine...I'm going to get as many Emu's plugged into this thing as possible. :)

By doing so it'll likely become the defacto frontend. Course once I get every thing done...other FE's will likely work off my source...which is fine if they ever get around to it. :)

Guest
This topic is now closed to further replies.
×
×
  • Create New...