diff --git a/SabreTools.Library/Help/Feature.cs b/SabreTools.Library/Help/Feature.cs index 6ae64353..886c8560 100644 --- a/SabreTools.Library/Help/Feature.cs +++ b/SabreTools.Library/Help/Feature.cs @@ -272,23 +272,26 @@ namespace SabreTools.Library.Help if (split[i].Contains("\n")) { string[] subsplit = split[i].Replace("\r", "").Split('\n'); + for (int j = 0; j < subsplit.Length - 1; j++) + { + // Add the next word only if the total length doesn't go above the width of the screen + if (output.Length + subsplit[j].Length < width) + { + output += (output.Length == pre + 4 ? "" : " ") + subsplit[j]; + } + // Otherwise, we want to cache the line to output and create a new blank string + else + { + outputList.Add(output); + output = CreatePadding(pre + 4); + output += (output.Length == pre + 4 ? "" : " ") + subsplit[j]; + } - // Add the next word only if the total length doesn't go above the width of the screen - if (output.Length + subsplit[0].Length < width) - { - output += (output.Length == pre + 4 ? "" : " ") + subsplit[0]; - } - // Otherwise, we want to cache the line to output and create a new blank string - else - { outputList.Add(output); output = CreatePadding(pre + 4); - output += (output.Length == pre + 4 ? "" : " ") + subsplit[0]; } - outputList.Add(output); - output = CreatePadding(pre + 4); - output += subsplit[1]; + output += subsplit[subsplit.Length - 1]; continue; } @@ -392,23 +395,26 @@ namespace SabreTools.Library.Help if (split[i].Contains("\n")) { string[] subsplit = split[i].Replace("\r", "").Split('\n'); + for (int j = 0; j < subsplit.Length - 1; j++) + { + // Add the next word only if the total length doesn't go above the width of the screen + if (output.Length + subsplit[j].Length < width) + { + output += (output.Length == preAdjusted + 4 ? "" : " ") + subsplit[j]; + } + // Otherwise, we want to cache the line to output and create a new blank string + else + { + outputList.Add(output); + output = CreatePadding(preAdjusted + 4); + output += (output.Length == preAdjusted + 4 ? "" : " ") + subsplit[j]; + } - // Add the next word only if the total length doesn't go above the width of the screen - if (output.Length + subsplit[0].Length < width) - { - output += (output.Length == preAdjusted + 4 ? "" : " ") + subsplit[0]; - } - // Otherwise, we want to cache the line to output and create a new blank string - else - { outputList.Add(output); output = CreatePadding(preAdjusted + 4); - output += (output.Length == preAdjusted + 4 ? "" : " ") + subsplit[0]; } - outputList.Add(output); - output = CreatePadding(preAdjusted + 4); - output += subsplit[1]; + output += subsplit[subsplit.Length - 1]; continue; } diff --git a/SabreTools.Library/README.1ST b/SabreTools.Library/README.1ST index 131526ad..f174af1c 100644 --- a/SabreTools.Library/README.1ST +++ b/SabreTools.Library/README.1ST @@ -154,1060 +154,1114 @@ Usage: SabreTools.exe [options] [filename|dirname] ... Options: - -?, -h, --help Show the built-in help text - Built-in to most of the programs is a basic help text - - --script Enable script mode (no clear screen) - For times when SabreTools is being used in a scripted environment, the - user may not want the screen to be cleared every time that it is called. - This flag allows the user to skip clearing the screen on run just like - if the console was being redirected. - - -d, --dfd, --d2d Create a DAT from each input directory - Create a DAT file from an input directory or set of files. By default, - this will output a DAT named based on the input directory and the - current date. It will also treat all archives as possible games and add - all three hashes for each file. - - -nm, --skip-md5 Don't include MD5 in output - This allows the user to skip calculating the MD5 for each of the - files which will speed up the creation of the DAT. - - -ns, --skip-sha1 Don't include SHA1 in output - This allows the user to skip calculating the SHA-1 for each of the - files which will speed up the creation of the DAT. + -?, -h, --help Show this help + Built-in to most of the programs is a basic help text. - -ns256, --skip-sha256 Include SHA-256 in output - This allows the user to include calculating the SHA-256 for each of - the files which will speed up the creation of the DAT. - (Will be inverted later) - - -ns384, --skip-sha384 Include SHA-384 in output - This allows the user to include calculating the SHA-384 for each of - the files which will speed up the creation of the DAT. - (Will be inverted later) - - -ns512, --skip-sha512 Include SHA-512 in output - This allows the user to include calculating the SHA-512 for each of - the files which will speed up the creation of the DAT. - (Will be inverted later) - - -b, --no-automatic-date Don't include date in file name - Normally, the DAT will be created with the date in the file name. - This flag removes that but keeps the date tag intact. - - -fp=, --forcepacking= Set force packing - Set the forcepacking flag to one of the supported values: - None, Zip, Unzip - - -f, --archives-as-files Treat archives as files - Instead of trying to enumerate the files within archives, treat the - archives as files themselves. This is good for uncompressed sets - that include archives that should be read as-is. - - -ot=, --output-type= Output DATs to a given format - Add outputting the created DAT to one of the following formats: - all - All available DAT types - am, attractmode - AttractMode XML - cmp, clrmamepro - ClrMamePro - csv - Standardized Comma-Separated Value - dc, doscenter - DOSCenter - lr, listrom - MAME Listrom - lx, listxml - MAME Listxml - miss, missfile - GoodTools Missfile - md5 - MD5 - ol, offlinelist - OfflineList XML - rc, romcenter - RomCenter - sd, sabredat - SabreDat XML - sfv - SFV - sha1 - SHA1 - sha256 - SHA256 - sha384 - SHA384 - sha512 - SHA512 - sl, softwarelist - MAME Software List XML - ssv - Standardized Semicolon-Separated Value - tsv - Standardized Tab-Separated Value - xml, logiqx - Logiqx XML - - -dpc, --depreciated Output 'game' instead of 'machine' - By default, XML DATs output with the more modern "machine" tag - for each set. This flag allows users to output the older "game" - tag instead, for compatibility reasons. [Logiqx only] - - -ro, --romba Treat like a Romba depot (requires SHA-1) - Allow for reading of GZipped files as if they were from a Romba - depot. This implies that the files will be in the TorrentGZ format - as well, including naming convention. - - -ska, --skip-archives Skip all archives - Skip any files that are treated like archives - - -skf, --skip-files Skip all non-archives - Skip any files that are not treated like archives - - -f=, --filename= Set the external name of the DAT - Set the base filename for the output DAT(s) [default is folder name - plus date] - - -n=, --name= Set the internal name of the DAT - Set the internal name for the output DAT(s) [default is folder name - plus date] - - -de=, --description= Set the description of the DAT - Set the description for the output DAT(s) [default is the folder - name] - - -c=, --category= Set the category of the DAT - Set the category for the output DAT(s) [default is blank] - - -v=, --version= Set the version of the DAT - Set the version for the output DAT(s) [default is blank] - - -au=, --author= Set the author of the DAT - Set the author for the output DAT(s) [default is blank] - - -em=, --email= Set a new email - Set the email for the output DAT(s) [default is blank] - - -hp=, --homepage= Set a new homepage - Set the homepage for the output DAT(s) [default is blank] - - -u=, --url= Set a new URL - Set the URL for the output DAT(s) [default is blank] - - -co=, --comment= Set a new comment - Set the comment for the output DAT(s) [default is blank] - - -sd, --superdat Enable SuperDAT creation - Set the type flag to "SuperDAT" for the output DAT as well as - preserving the directory structure of the inputted folder, if - applicable - - -xof, --exclude-of Exclude romof, cloneof, sampleof tags - If this flag is enabled, then the romof, cloneof, and sampleof tags - will be omitted from the outputted DAT. - - -sds, --scene-date-strip Remove date from scene-named sets - If this flag is enabled, sets with "scene" names will have the date - removed from the beginning. For example "01.01.01-Game_Name-GROUP" - would become "Game_Name-Group". - - -ab, --add-blank-files Output blank files for folders - If this flag is set, then blank entries will be created for each of - the empty directories in the source. This is useful for tools that - require all folders be accounted for in the output DAT. - - -ad, --add-date Output dates for each file parsed - If this flag is set, then the Date will be appended to each file - information in the output DAT. The output format is standardized as - "yyyy/MM/dd HH:mm:ss". - - -cf, --copy-files Copy files to the temp directory before parsing - If this flag is set, then all files that are going to be parsed are - moved to the temporary directory before being hashed. This can be - helpful in cases where the temp folder is located on an SSD and the - user wants to take advantage of this. - - -h=, --header= Remove headers from hash calculations - If this is set, then all files that have copier headers that are - detected will have them removed from the hash calculation. This will - allow for a headered collection to be hashed without possibly - variant information. If a particular header skipper is defined, and - that skipper exists, then it will be used instead of trying to find - one that matches. - - -ic, --chds-as-files Treat CHDs as regular files - Normally, CHDs would be processed using their internal hash to - compare against the input DATs. This flag forces all CHDs to - be treated like regular files. - - -t=, --temp= Set the name of the temporary directory - Optionally, a temp folder can be supplied in the case the default - temp directory (inside the running folder) is not preferred. - - -out=, --output-dir= Set the name of the output directory - This sets an output folder to be used when the files are created. If - a path is not defined, the application directory is used instead. - - -mt=, --threads= Amount of threads to use - Optionally, set the number of threads to use for the multithreaded - operations. The default is the number of available machine threads; - -1 means unlimited threads created. - - -ex, --extract Backup and remove copier headers - This will detect, store, and remove copier headers from a file or folder - of files. The headers are backed up and collated by the hash of the - unheadered file. Files are then output without the detected copier - header alongside the originals with the suffix .new. No input files are - altered in the process. - - The following systems have headers that this program can work with: - - Atari 7800 - - Atari Lynx - - Commodore PSID Music - - NEC PC-Engine / TurboGrafx 16 - - Nintendo Famicom / Nintendo Entertainment System - - Nintendo Famicom Disk System - - Nintendo Super Famicom / Super Nintendo Entertainment System - - Nintendo Super Famicom / Super Nintendo Entertainment System SPC - - -out=, --output-dir= Set the name of the output directory - This sets an output folder to be used when the files are created. If - a path is not defined, the application directory is used instead. - - -nsh, --no-store-header Don't store the extracted header - By default, all headers that are removed from files are backed up in - the database. This flag allows users to skip that step entirely, - avoiding caching the headers at all. - - -re, --restore Restore copier headers from a variety of file types - This will make use of stored copier headers and reapply them to files if - they match the included hash. More than one header can be applied to a - file, so they will be output to new files, suffixed with .newX, where X - is a number. No input files are altered in the process. - - The following systems have headers that this program can work with: - - Atari 7800 - - Atari Lynx - - Commodore PSID Music - - NEC PC-Engine / TurboGrafx 16 - - Nintendo Famicom / Nintendo Entertainment System - - Nintendo Famicom Disk System - - Nintendo Super Famicom / Super Nintendo Entertainment System - - Nintendo Super Famicom / Super Nintendo Entertainment System SPC - - -out=, --output-dir= Set the name of the output directory - This sets an output folder to be used when the files are created. If - a path is not defined, the application directory is used instead. - - -sp, --split Split input DATs by a given criteria - This feature allows the user to split input DATs by a number of different - possible criteria. See the individual input information for details. More - than one split type is allowed at a time. - - -ot=, --output-type= Output DATs to a given format - Add outputting the created DAT to one of the following formats: - all - All available DAT types - am, attractmode - AttractMode XML - cmp, clrmamepro - ClrMamePro - csv - Standardized Comma-Separated Value - dc, doscenter - DOSCenter - lr, listrom - MAME Listrom - lx, listxml - MAME Listxml - miss, missfile - GoodTools Missfile - md5 - MD5 - ol, offlinelist - OfflineList XML - rc, romcenter - RomCenter - sd, sabredat - SabreDat XML - sfv - SFV - sha1 - SHA1 - sha256 - SHA256 - sha384 - SHA384 - sha512 - SHA512 - sl, softwarelist - MAME Software List XML - ssv - Standardized Semicolon-Separated Value - tsv - Standardized Tab-Separated Value - xml, logiqx - Logiqx XML - - -dpc, --depreciated Output 'game' instead of 'machine' - By default, XML DATs output with the more modern "machine" tag - for each set. This flag allows users to output the older "game" - tag instead, for compatibility reasons. [Logiqx only] - - -out=, --output-dir= Set the name of the output directory - This sets an output folder to be used when the files are created. If - a path is not defined, the application directory is used instead. - - -ip, --inplace Write to the input directories, where possible - By default, files are written to the runtime directory (or the output - directory, if set). This flag enables users to write out to the - directory that the DATs originated from. - - -es, --extension Split DAT(s) by two file extensions - For a DAT, or set of DATs, allow for splitting based on a list of - input extensions. This can allow for combined DAT files, such as - those combining two separate systems, to be split. Files with any - extensions not listed in the input lists will be included in both - outputted DAT files. - - -exta= Set extension to be included in first DAT - Set the extensions to be used to populate the first DAT. - Multiple instances of this flag are allowed. - - -extb= Set extension to be included in second DAT - Set the extensions to be used to populate the second DAT. - Multiple instances of this flag are allowed. - - -hs, --hash Split DAT(s) or folder by best-available hashes - For a DAT, or set of DATs, allow for splitting based on the best - available hash for each file within. The order of preference for the - outputted DATs is as follows: Nodump, SHA512, SHA384, SHA256, SHA1, - MD5, CRC (or worse). - - -ls, --level Split a SuperDAT or folder by lowest available level - For a DAT, or set of DATs, allow for splitting based on the lowest - available level of game name. That is, if a game name is top/mid/ - last, then it will create an output DAT for the parent directory - "mid" in a folder called "top" with a game called "last". - - -s, --short Use short output names - Instead of using ClrMamePro-style long names for DATs, use just - the name of the folder as the name of the DAT. This can be used - in conjunction with --base to output in the format of "Original - Name (Name)" instead. - - -ba, --base Use source DAT as base name for outputs - If splitting an entire folder of DATs, some output files may be - normally overwritten since the names would be the same. With - this flag, the original DAT name is used in the output name, in - the format of "Original Name (Dir - Name)". This can be used in - conjunction with --short to output in the format of "Original - Name (Name)" instead. - - -szs, --size Split DAT(s) or folder by file sizes - For a DAT, or set of DATs, allow for splitting based on the sizes - of the files, specifically if the type is a Rom (most item types don't - have sizes). - - -rad, --radix Set the midpoint to split at - Set the size at which all roms less than the size are put in the - first DAT, and everything greater than or equal goes in the second - - -ts, --type Split DAT(s) or folder by file types (rom/disk) - For a DAT, or set of DATs, allow for splitting based on the types of - the files, specifically if the type is a rom or a disk. - - -ss, --sort Sort input files by a set of DATs - This feature allows the user to quickly rebuild based on a supplied DAT - file(s). By default all files will be rebuilt to uncompressed folders in - the output directory. - - -dat= Input DAT to be used - User-supplied DAT for use in all operations. Multiple instances of - this flag are allowed. - - -out=, --output-dir= Set the name of the output directory - This sets an output folder to be used when the files are created. If - a path is not defined, the application directory is used instead. - - -dep, --depot Assume directories are romba depots - Normally, input directories will be treated with no special format. - If this flag is used, all input directories will be assumed to be - romba-style depots. - - -d, --delete Delete fully rebuilt input files - Optionally, the input files, once processed and fully matched, can - be deleted. This can be useful when the original file structure is - no longer needed or if there is limited space on the source drive. - - -in, --inverse Rebuild only files not in DAT - Instead of the normal behavior of rebuilding using a DAT, this flag - allows the user to use the DAT as a filter instead. All files that - are found in the DAT will be skipped and everything else will be - output in the selected format. - - -qs, --quick Enable quick scanning of archives - For all archives, if this flag is enabled, it will only use the - header information to get the archive entries' file information. The - upside to this is that it is much quicker than extracting all files - to the temp folder. On the downside, it can only get the CRC and - size from most archive formats, leading to possible issues. - - -ic, --chds-as-files Treat CHDs as regular files - Normally, CHDs would be processed using their internal hash to - compare against the input DATs. This flag forces all CHDs to - be treated like regular files. - - -ad, --add-date Write dates for each file parsed, if available - If this flag is set, the the date in the DAT will be used for the - output file instead of the standard date and time for TorrentZip. - This will technically invalidate the output files as proper - TorrentZip files because the date will not match the standard. - - -t7z, --torrent-7zip Enable Torrent 7Zip output - Instead of outputting the files to folder, files will be rebuilt to - Torrent7Zip (T7Z) files. This format is based on the LZMA container - format 7Zip, but with custom header information. This is currently - unused by any major application. Currently does not produce proper - Torrent-compatible outputs. - - -tar Enable Tape ARchive output - Instead of outputting the files to folder, files will be rebuilt to - Tape ARchive (TAR) files. This format is a standardized storage - archive without any compression, usually used with other compression - formats around it. It is widely used in backup applications and - source code archives. - - -tgz, --torrent-gzip Enable Torrent GZip output - Instead of outputting the files to folder, files will be rebuilt to - TorrentGZ (TGZ) files. This format is based on the GZip archive - format, but with custom header information and a file name replaced - by the SHA-1 of the file inside. This is primarily used by external - tool Romba (https://github.com/uwedeportivo/romba), but may be used - more widely in the future. - - -r, --romba Treat like a Romba depot (requires SHA-1) - As an extension of the parent flag, this outputs the TGZ files - into directories based on the structure used by Romba. This uses - nested folders using the first 4 bytes of the SHA-1, 1 byte for - each layer of the directory name. It also includes two auxilary - files, .romba_size and .romba_size.backup, that have the - compressed size of the folder inside for use with Romba. - - -tlrz, --torrent-lrzip Enable Torrent Long-Range Zip output [UNIMPLEMENTED] - Instead of outputting the files to folder, files will be rebuilt to - Torrent Long-Range Zip (TLRZ) files. This format is based on the - LRZip file format as defined at https://github.com/ckolivas/lrzip - but with custom header information. This is currently unused by any - major application. - - -tlz4, --torrent-lz4 Enable Torrent LZ4 output [UNIMPLEMENTED] - Instead of outputting the files to folder, files will be rebuilt to - Torrent LZ4 (TLZ4) files. This format is based on the LZ4 file - format as defined at https://github.com/lz4/lz4 but with custom - header information. This is currently unused by any major - application. - - -trar, --torrent-rar Enable Torrent RAR output [UNIMPLEMENTED] - Instead of outputting files to folder, files will be rebuilt to - Torrent RAR (TRAR) files. This format is based on the RAR propietary - format but with custom header information. This is currently unused - by any major application. - - -txz, --torrent-xz Enable Torrent XZ output [UNSUPPORTED] - Instead of outputting files to folder, files will be rebuilt to - Torrent XZ (TXZ) files. This format is based on the LZMA container - format XZ, but with custom header information. This is currently - unused by any major application. Currently does not produce proper - Torrent-compatible outputs. - - -tzip, --torrent-zip Enable Torrent Zip output - Instead of outputting files to folder, files will be rebuilt to - TorrentZip (TZip) files. This format is based on the ZIP archive - format, but with custom header information. This is primarily used - by external tool RomVault (http://www.romvault.com/) and is already - widely used. - - -tzpaq, --torrent-zpaq Enable Torrent ZPAQ output [UNIMPLEMENTED] - Instead of outputting the files to folder, files will be rebuilt to - Torrent ZPAQ (TZPAQ) files. This format is based on the ZPAQ file - format as defined at https://github.com/zpaq/zpaq but with custom - header information. This is currently unused by any major - application. - - -tzstd, --torrent-zstd Enable Torrent Zstd output [UNIMPLEMENTED] - Instead of outputting the files to folder, files will be rebuilt to - Torrent Zstd (TZstd) files. This format is based on the Zstd file - format as defined at https://github.com/skbkontur/ZstdNet but with - custom header information. This is currently unused by any major - application. - - -h=, --header= Remove headers from hash calculations - If this is set, then all files that have copier headers that are - detected will have them removed from the hash calculation. This will - allow for a headered collection to be hashed without possibly - variant information. If a particular header skipper is defined, and - that skipper exists, then it will be used instead of trying to find - one that matches. - - -7z={1} Set scanning level for 7zip archives - -gz={1} Set scanning level for GZip archives - -rar={1} Set scanning level for RAR archives - -zip={1} Set scanning level for Zip archives - For each of the major archive types recognized by the libraries used - by this program, scan the archive in one of the following ways: - 0 Hash both archive and its contents - 1 Only hash contents of the archive - 2 Only hash archive itself (treat like a regular file) - - -sa, --scan-all Set scanning levels for all archives to 0 - This flag is the short equivalent to -7z=0 -gz=0 -rar=0 -zip=0 - wrapped up. Generally this will be helpful in all cases where the - content of the rebuild folder is not entirely known or is known to - be mixed. - - -dm, --dat-merged Create merged sets - Preprocess the DAT to have parent sets contain all items from the - children based on the cloneof tag. This is incompatible with the - other --dat-X flags. - - -ds, --dat-split Create split sets - Preprocess the DAT to remove redundant files between parents and - children based on the romof and cloneof tags. This is incompatible - with the other --dat-X flags. - - -dnm, --dat-non-merged Create non-merged sets - Preprocess the DAT to have child sets contain all items from the - parent set based on the cloneof tag. This is incompatible with the - other --dat-X flags. - - -dnd, --dat-device-non-merged Create device non-merged sets - Preprocess the DAT to have child sets contain all items from the - device references. This is incompatible with the other --dat-X - flags. - - -df, --dat-full-non-merged Create fully non-merged sets - Preprocess the DAT to have child sets contain all items from the - parent sets based on the cloneof and romof tags as well as device - references. This is incompatible with the other --dat-X flags. - - -mt=, --threads= Amount of threads to use - Optionally, set the number of threads to use for the multithreaded - operations. The default is the number of available machine threads; - -1 means unlimited threads created. - - -upd, --update-dat Output updated DAT to output directory - Once the files that were able to rebuilt are taken care of, a DAT of - the files that could not be matched will be output to the output - directory. - - -st, --stats Get statistics on all input DATs - This will output by default the combined statistics for all input DAT - files. The stats that are outputted are as follows: - - Total uncompressed size - - Number of games found - - Number of roms found - - Number of disks found - - Roms that include a CRC - - Roms that include a MD5 - - Roms that include a SHA-1 - - Roms with Nodump status - - -as, --all-stats Write all statistics to all available formats - Output all statistical information to all available formats - - -csv, --csv Output in Comma-Separated Value format - Output all statistical information in standardized CSV format - - -html, --html Output in HTML format - Output all statistical information in standardized HTML format - - -tsv, --tsv Output in Tab-Separated Value format - Output all statistical information in standardized TSV format - - -txt, --text Output in generic text format - Output all statistical information in generic text format. If no - other format flags are enabled, this is the default output. - - -f=, --filename= Set the filename for the output - Set the filename (without extension) for the outputted report - - -out=, --output-dir= Set the name of the output directory - This sets an output folder to be used when the files are created. If - a path is not defined, the application directory is used instead. - - -bc, --baddump-column Add statistics for baddumps to output - Add a new column or field for counting the number of baddumps in the - DAT - - -nc, --nodump-column Add statistics for nodumps to output - Add a new column or field for counting the number of nodumps in the - DAT - - -ind, --individual Show individual statistics - Optionally, the statistics for each of the individual input DATs can - be output as well. + -??, -hd, --help-detailed Show this detailed help + Display a detailed help text to the screen. - -ud, --update Update and manipulate DAT(s) - This is the multitool part of the program, allowing for almost every - manipulation to a DAT, or set of DATs. This is also a combination of - many different programs that performed DAT manipulation that work better - together. - - -ot=, --output-type= Output DATs to a given format - Add outputting the created DAT to one of the following formats: - all - All available DAT types - am, attractmode - AttractMode XML - cmp, clrmamepro - ClrMamePro - csv - Standardized Comma-Separated Value - dc, doscenter - DOSCenter - lr, listrom - MAME Listrom - lx, listxml - MAME Listxml - miss, missfile - GoodTools Missfile - md5 - MD5 - ol, offlinelist - OfflineList XML - rc, romcenter - RomCenter - sd, sabredat - SabreDat XML - sfv - SFV - sha1 - SHA1 - sha256 - SHA256 - sha384 - SHA384 - sha512 - SHA512 - sl, softwarelist - MAME Software List XML - ssv - Standardized Semicolon-Separated Value - tsv - Standardized Tab-Separated Value - xml, logiqx - Logiqx XML - - -dpc, --depreciated Output 'game' instead of 'machine' - By default, XML DATs output with the more modern "machine" tag - for each set. This flag allows users to output the older "game" - tag instead, for compatibility reasons. [Logiqx only] - - -pre=, --prefix= Set prefix for all lines - Set a generic prefix to be prepended to all outputted lines - [*SV, Missfile only] - - -post=, --postfix= Set postfix for all lines - Set a generic postfix to be appended to all outputted lines - [*SV, Missfile only] - - Both prefix and postfix can use one of the following strings: - - %game% - Replaced with the Game/Machine name - - %name% - Replaced with the Rom name - - %crc% - Replaced with the CRC - - %md5% - Replaced with the MD5 - - %sha1% - Replaced with the SHA-1 - - %sha256% - Replaced with the SHA-256 - - %sha384% - Replaced with the SHA-384 - - %sha512% - Replaced with the SHA-512 - - %size% - Replaced with the size - - -q, --quotes Double-quote each item - This flag surrounds the item by double-quotes, not including the - prefix or postfix. [*SV, Missfile only] - - -r, --roms Output roms to miss instead of sets - By default, the outputted file will include the name of the game - so this flag allows for the name of the rom to be output instead - [Missfile only] - - -gp, --game-prefix Add game name as a prefix - Mainly used with the previous flag, this allows for the name of - the game to be used as a prefix to each file. [Missfile, MD5, - SFV, SHA* only] - - -pre=, --prefix= Set prefix for all lines - Set a generic prefix to be prepended to all outputted lines - [*SV, Missfile only] - - -post=, --postfix= Set postfix for all lines - Set a generic postfix to be appended to all outputted lines - [*SV, Missfile only] - - Both prefix and postfix can use one of the following strings: - - %game% - Replaced with the Game/Machine name - - %name% - Replaced with the Rom name - - %crc% - Replaced with the CRC - - %md5% - Replaced with the MD5 - - %sha1% - Replaced with the SHA-1 - - %sha256% - Replaced with the SHA-256 - - %sha384% - Replaced with the SHA-384 - - %sha512% - Replaced with the SHA-512 - - %size% - Replaced with the size - - -q, --quotes Put double-quotes around each item - This quotes only the item and not the prefix and postfix - [*SV, Missfile only] - - -ae=, --add-extension= Add an extension to each item - Add a postfix extension to each full item name. [Missfile only] - - -re=, --replace-extension= Replace all extensions with specified - When an extension exists, replace it with the provided instead - [Missfile only] - - -rme, --remove-extensions Remove all extensions from all items - For each item, remove the extension. [Missfile only] - - -ro, --romba Treat like a Romba depot (requires SHA-1) - Instead of outputting the game or rom name, output the SHA-1 of - the files instead. This requires the source DAT to have SHA-1 - hashes. [Missfile only] - - -f=, --filename= Set the external name of the DAT - Set the base filename for the output DAT(s) - - -n=, --name= Set the internal name of the DAT - Set the internal name for the output DAT(s) - - -de=, --description= Set the description of the DAT - Set the description for the output DAT(s) - - -r=, --root= Set a new rootdir - Set the rootdir (as used by SuperDAT mode) for the output DAT(s) - - -c=, --category= Set the category of the DAT - Set the category for the output DAT(s) - - -v=, --version= Set the version of the DAT - Set the version for the output DAT(s) - - -da=, --date= Set a new date - Set the date for the output DAT(s) - - -au=, --author= Set the author of the DAT - Set the author for the output DAT(s) - - -em=, --email= Set a new email - Set the email for the output DAT(s) - - -hp=, --homepage= Set a new homepage - Set the homepage for the output DAT(s) - - -u=, --url= Set a new URL - Set the URL for the output DAT(s) - - -co=, --comment= Set a new comment - Set the comment for the output DAT(s) - - -h=, --header= Set a new header skipper - Set the header skipper for the output DAT(s) - - -sd, --superdat Enable SuperDAT creation - Set the type flag to "SuperDAT" for the output DAT + --script Enable script mode (no clear screen) + For times when SabreTools is being used in a scripted environment, the + user may not want the screen to be cleared every time that it is called. + This flag allows the user to skip clearing the screen on run just like if + the console was being redirected. - -fm=, --forcemerging= Set force merging - Set the forcemerging tag to one of the supported values: - None, Split, Merged, Nonmerged, Full - - -fn=, --forcenodump= Set force nodump - Set the forcenodump tag to one of the supported values: - None, Obsolete, Required, Ignore - - -fp=, --forcepacking= Set force packing - Set the forcepacking flag to one of the supported values: - None, Zip, Unzip - - -xof, --exclude-of Exclude romof, cloneof, sampleof tags - If this flag is enabled, then the romof, cloneof, and sampleof tags - will be omitted from the outputted DAT. - - -sds, --scene-date-strip Remove date from scene-named sets - If this flag is enabled, sets with "scene" names will have the date - removed from the beginning. For example "01.01.01-Game_Name-GROUP" - would become "Game_Name-Group". - - -clean Clean game names according to WoD standards - Game names will be sanitized to remove what the original WoD - standards deemed as unneeded information, such as parenthesized or - bracketed strings - - -ru, --remove-unicode Remove unicode characters from names - By default, the character set from the original file(s) will be used - for item naming. This flag removes all Unicode characters from the - item names, machine names, and machine descriptions. - - -rmd5, --remove-md5 Remove MD5 hashes from the output - By default, all available hashes will be written out to the DAT. - This will remove all MD5 hashes from the output file(s). - - -rsha1, --remove-sha1 Remove SHA-1 hashes from the output - By default, all available hashes will be written out to the DAT. - This will remove all SHA-1 hashes from the output file(s). - - -rsha256, --remove-sha256 Remove SHA-256 hashes from the output - By default, all available hashes will be written out to the DAT. - This will remove all SHA-256 hashes from the output file(s). - - -rsha384, --remove-sha384 Remove SHA-384 hashes from the output - By default, all available hashes will be written out to the DAT. - This will remove all SHA-384 hashes from the output file(s). - - -rsha512, --remove-sha512 Remove SHA-512 hashes from the output - By default, all available hashes will be written out to the DAT. - This will remove all SHA-512 hashes from the output file(s). - - -dan, --description-as-name Use description instead of machine name - By default, all DATs are converted exactly as they are input. - Enabling this flag allows for the machine names in the DAT to be - replaced by the machine description instead. In most cases, this - will result in no change in the output DAT, but a notable example - would be a software list DAT where the machine names are generally - DOS-friendly while the description is more complete. - - -dm, --dat-merged Create merged sets - Preprocess the DAT to have parent sets contain all items from the - children based on the cloneof tag. This is incompatible with the - other --dat-X flags. - - -ds, --dat-split Create split sets - Preprocess the DAT to remove redundant files between parents and - children based on the romof and cloneof tags. This is incompatible - with the other --dat-X flags. - - -dnm, --dat-non-merged Create non-merged sets - Preprocess the DAT to have child sets contain all items from the - parent set based on the cloneof tag. This is incompatible with the - other --dat-X flags. - - -dnd, --dat-device-non-merged Create device non-merged sets - Preprocess the DAT to have child sets contain all items from the - device references. This is incompatible with the other --dat-X - flags. - - -df, --dat-full-non-merged Create fully non-merged sets - Preprocess the DAT to have child sets contain all items from the - parent sets based on the cloneof and romof tags as well as device - references. This is incompatible with the other --dat-X flags. - - -trim Trim file names to fit NTFS length - In the cases where files will have too long a name, this allows for - trimming the name of the files to the NTFS maximum length at most - - -rd=, --root-dir= Set the root directory for calculation - In the case that the files will not be stored from the root - directory, a new root can be set for path length calculations - - -si, --single-set All game names replaced by '!' - This is useful for keeping all roms in a DAT in the same archive or - folder - - -dd, --dedup Enable deduping in the created DAT - For all outputted DATs, allow for hash deduping. This makes sure - that there are effectively no duplicates in the output files. - Cannot be used with game dedup. - - -gdd, --game-dedup Enable deduping within games in the created DAT - For all outputted DATs, allow for hash deduping but only within the - games, and not across the entire DAT. This makes sure that there - are effectively no duplicates within each of the output sets. - Cannot be used with standard dedup. - - -m, --merge Merge the input DATs - By default, all DATs are processed individually with the user- - specified flags. With this flag enabled, all of the input DATs are - merged into a single output. This is best used with the dedup flag. - - -b, --no-automatic-date Don't include date in file name - Normally, the DAT will be created with the date in the file name - in brackets. This flag removes that instead of the default. - - -di, --diff Create diffdats from inputs (all outputs) - By default, all DATs are processed individually with the user- - specified flags. With this flag enabled, input DATs are diffed - against each other in one of the following ways (flags below are - used for specific diff files to be output instead of all types at - once): - - -did, --diff-du Create diffdat containing just duplicates - All files that have duplicates outside of the original DAT - are included - - -dii, --diff-in Create diffdats for individual DATs - All files that have no duplicates outside of the original - DATs are put into DATs that are named after the source DAT - - -din, --diff-nd Create diffdat containing no duplicates - All files that have no duplicates outside of the original - DATs are included - - -ag, --against Diff all inputs against a set of base DATs - This flag will enable a special type of diffing in which a set - of base DATs are used as a comparison point for each of the - input DATs. This allows users to get a slightly different - output to cascaded diffing, which may be more useful in - some cases. This is heavily influenced by the diffing model - used by Romba - - -bd=, --base-dat= Add a base DAT for processing - Add a DAT or folder of DATs to the base set to be used for all - operations. - - -b, --no-automatic-date Don't include date in file name - Normally, the DAT will be created with the date in the file name - in brackets. This flag removes that instead of the default. - - -c, --cascade Enable cascaded diffing - -rc, --reverse-cascade Enable reverse cascaded diffing - Each of the above flags allow for a special type of diffing in - which the first (or last) DAT is considered a base, and for each - additional input DAT, it only leaves the files that are not in - one of the previous DATs. This can allow for the creation of - rollback sets or even just reduce the amount of duplicates - across multiple sets - - -sf, --skip-first-output Skip output of first DAT - In times where the first DAT does not need to be written out - a second time, this will skip writing it. This can often - speed up the output process. - - -bn, --base-replace Replace item from base DATs in order - -rbn, --reverse-base-replace Replace item from base DATs in reverse - By default, no item names are changed except when there is a merge - occurring. This flag enables users to define a DAT or set of base - DATs to use as "replacements" for all input DATs. Note that - the first found instance of an item in the base DAT(s) will be - used and all others will be discarded. For reverse, the first - instance found in the last DAT inputted will be used. If no - additional flag is given, it will default to updating names. - - -bd=, --base-dat= Add a base DAT for processing - Add a DAT or folder of DATs to the base set to be used for all - operations. + -d, --d2d, --dfd Create DAT(s) from an input directory + Create a DAT file from an input directory or set of files. By default, + this will output a DAT named based on the input directory and the current + date. It will also treat all archives as possible games and add all three + hashes (CRC, MD5, SHA-1) for each file. - -un, --update-names Update item names from base DATs - This flag enables updating of item names from base DATs. - - -uh, --update-hashes Update hashes from base DATs - This flag enables updating of hashes from base DATs. - - -udd, --update-description Update machine descriptions from base DATs - This flag enables updating of machine descriptions from base - DATs. - - -ons, --only-same Only update description if machine name matches - description - Normally, updating the description will always overwrite if the - machine names are the same. With this flag, descriptions will - only be overwritten if they are the same as the machine names. - - -uy, --update-year Update machine years from base DATs - This flag enables updating of machine years from base DATs. - - -um, --update-manufacturer Update machine manufacturers from base DATs - This flag enables updating of machine manufacturers from base - DATs. - - -gn=, --game-name= Filter by game name - -ngn=, --not-game-name= Exclude by game name - -gd=, --game-description= Filter by game description - -ngd=, --not-game-description= Exclude by game description - -rn=, --item-name= Filter by item name - -nrn=, --not-item-name= Exclude by item name - -crc=, --crc= Filter by CRC hash - -ncrc=, --not-crc= Exclude by CRC hash - -md5=, --md5= Filter by MD5 hash - -nmd5=, --not-md5= Exclude by MD5 hash - -sha1=, --sha1= Filter by SHA-1 hash - -nsha1=, --not-sha1= Exclude by SHA-1 hash - -sha256=, --sha256= Filter by SHA-256 hash - -nsha256=, --not-sha256 Exclude by SHA-256 hash - -sha384=, --sha384= Filter by SHA-384 hash - -nsha384=, --not-sha384 Exclude by SHA-384 hash - -sha512=, --sha512= Filter by SHA-512 hash - -nsha512=, --not-sha512 Exclude by SHA-512 hash - For each of the flags above, the user can specify either an exact - match or can use full C#-style regex for pattern matching. Multiples - of each of the above inputs are allowed. - - -ofg, --match-of-tags Allow cloneof and romof tags to match game name - If filter or exclude by game name is used, this flag will allow - those filters to be checked against the romof and cloneof tags as - well. This can allow for more advanced set-building, especially in - arcade-based sets. - - -rt=, --item-type= Filter by item type - This allows users to only include roms or disks to their liking. - Multiples of this input are allowed. - - -nrt=, --not-item-type= Exclude by item type - This allows users to only exclude roms or disks to their liking. - Multiples of this input are allowed. - - -sgt=, --greater= Filter by size >= - -slt=, --less= Filter by size <= - -seq=, --equal= Filter by size == - For each of the flags above, the user can specify a standard integer - or one of the various standard postfixes for size: - e.g. 8kb => 8000 or 8kib => 8192 - - -is=, --status= Include only items with a given status - Include items with one of the supported values: - None, Good, BadDump, Nodump, Verified - Multiples of this input are allowed. + -nm, --skip-md5 Don't include MD5 in output + This allows the user to skip calculating the MD5 for each of the + files which will speed up the creation of the DAT. - -nis=, --not-status= Exclude only items with a given status - Exclude items with one of the supported values: - None, Good, BadDump, Nodump, Verified - Multiples of this input are allowed. - - -gt=, --game-type= Include only items with the given game type - Include items with one of the supported values: - None, Bios, Device, Mechanical - Multiples of this input are allowed. - - -ngt=, --not-game-type= Exclude only items with a given game type - Exclude items with one of the supported values: - None, Bios, Device, Mechanical - Multiples of this input are allowed. - - -run, --runnable Include only items that are marked runnable - This allows users to include only verified runnable games + -ns, --skip-sha1 Don't include SHA-1 in output + This allows the user to skip calculating the SHA-1 for each of the + files which will speed up the creation of the DAT. + + -ns256, --skip-sha256 Include SHA-256 in output + This allows the user to skip calculating the SHA-256 for each of the + files which will speed up the creation of the DAT. + + -ns384, --skip-sha384 Include SHA-384 in output + This allows the user to skip calculating the SHA-384 for each of the + files which will speed up the creation of the DAT. + + -ns512, --skip-sha512 Include SHA-512 in output + This allows the user to skip calculating the SHA-512 for each of the + files which will speed up the creation of the DAT. + + -b, --no-automatic-date Don't include date in file name + Normally, the DAT will be created with the date in the file name in + brackets. This flag removes that instead of the default. + + -fp, --forcepacking Set force packing + Set the forcepacking tag to the given value. + Possible values are: None, Zip, Unzip + + -f, --archives-as-files Treat archives as files + Instead of trying to enumerate the files within archives, treat the + archives as files themselves. This is good for uncompressed sets that + include archives that should be read as-is. + + -ot, --output-type Output DATs to a specified format + Add outputting the created DAT to known format. Multiple instances of + this flag are allowed. + Possible values are: + all - All available DAT types + am, attractmode - AttractMode XML + cmp, clrmamepro - ClrMamePro + csv - Standardized Comma-Separated Value + dc, doscenter - DOSCenter + lr, listrom - MAME Listrom + lx, listxml - MAME Listxml + miss, missfile - GoodTools Missfile + md5 - MD5 + ol, offlinelist - OfflineList XML + rc, romcenter - RomCenter + sd, sabredat - SabreDat XML + sfv - SFV + sha1 - SHA1 + sha256 - SHA256 + sha384 - SHA384 + sha512 - SHA512 + sl, softwarelist - MAME Software List XML + ssv - Standardized Semicolon-Separated Value + tsv - Standardized Tab-Separated Value + xml, logiqx - Logiqx XML + + -dpc, --depreciated Output 'game' instead of 'machine' + By default, Logiqx XML DATs output with the more modern "machine" + tag for each set. This flag allows users to output the older + "game" tag instead, for compatibility reasons. [Logiqx only] + + -ro, --romba Treat like a Romba depot (requires SHA-1) + This flag allows reading and writing of DATs and output files to and + from a Romba-style depot. This also implies TorrentGZ input and + output for physical files. Where appropriate, Romba depot files will + be created as well. - -nrun, --not-runnable Include only items that are not marked runnable - This allows users to include only unrunnable games + -ska, --skip-archives Skip all archives + Skip any files that are treated like archives + + -skf, --skip-files Skip all non-archives + Skip any files that are not treated like archives + + -f, --filename Set the external name of the DAT + Set the external filename for the output DAT(s) + + -n, --name Set the internal name of the DAT + Set the name header field for the output DAT(s) + + -de, --description Set the description of the DAT + Set the description header field for the output DAT(s) + + -c, --category Set the category of the DAT + Set the category header field for the output DAT(s) + + -v, --version Set the version of the DAT + Set the version header field for the output DAT(s) + + -au, --author Set the author of the DAT + Set the author header field for the output DAT(s) + + -em, --email Set a new email of the DAT + Set the email header field for the output DAT(s) + + -hp, --homepage Set a new homepage of the DAT + Set the homepage header field for the output DAT(s) + + -u, --url Set a new URL of the DAT + Set the URL header field for the output DAT(s) + + -co, --comment Set a new comment of the DAT + Set the comment header field for the output DAT(s) + + -sd, --superdat Enable SuperDAT creation + Set the type flag to "SuperDAT" for the output DAT as well as + preserving the directory structure of the inputted folder, if + applicable. + + -xof, --exclude-of Exclude romof, cloneof, sampleof tags + If this flag is enabled, then the romof, cloneof, and sampleof tags + will be omitted from the outputted DAT. + + -sds, --scene-date-strip Remove date from scene-named sets + If this flag is enabled, sets with "scene" names will have the date + removed from the beginning. For example "01.01.01-Game_Name-GROUP" + would become "Game_Name-Group". + + -ab, --add-blank-files Output blank files for folders + If this flag is set, then blank entries will be created for each of + the empty directories in the source. This is useful for tools that + require all folders be accounted for in the output DAT. + + -ad, --add-date Add dates to items, where posible + If this flag is set, then the Date will be appended to each file + information in the output DAT. The output format is standardized as + "yyyy/MM/dd HH:mm:ss". + + -cf, --copy-files Copy files to the temp directory before parsing + If this flag is set, then all files that are going to be parsed are + moved to the temporary directory before being hashed. This can be + helpful in cases where the temp folder is located on an SSD and the + user wants to take advantage of this. + + -h, --header Set a header skipper to use, blank means all + Set the header special field for the output DAT(s). In file + rebuilding, this flag allows for either all copier headers (using "") + or specific copier headers by name (such as "fds.xml") to determine + if a file matches or not. + + -ic, --chds-as-files Treat CHDs as regular files + Normally, CHDs would be processed using their internal hash to + compare against the input DATs. This flag forces all CHDs to be + treated like regular files. + + -t, --temp Set the temporary directory to use + Optionally, a temp folder can be supplied in the case the default + temp directory is not preferred. + + -out, --output-dir Output directory + This sets an output folder to be used when the files are created. If + a path is not defined, the runtime directory is used instead. + + -mt, --threads Amount of threads to use (default = # cores) + Optionally, set the number of threads to use for the multithreaded + operations. The default is the number of available machine threads; + -1 means unlimited threads created. + + -ex, --extract Extract and remove copier headers + This will detect, store, and remove copier headers from a file or folder + of files. The headers are backed up and collated by the hash of the + unheadered file. Files are then output without the detected copier header + alongside the originals with the suffix .new. No input files are altered + in the process. + + The following systems have headers that this program can work with: + - Atari 7800 + - Atari Lynx + - Commodore PSID Music + - NEC PC - Engine / TurboGrafx 16 + - Nintendo Famicom / Nintendo Entertainment System + - Nintendo Famicom Disk System + - Nintendo Super Famicom / Super Nintendo Entertainment System + - Nintendo Super Famicom / Super Nintendo Entertainment System SPC + + -out, --output-dir Output directory + This sets an output folder to be used when the files are created. If + a path is not defined, the runtime directory is used instead. + + -nsh, --no-store-header Don't store the extracted header + By default, all headers that are removed from files are backed up in + the database. This flag allows users to skip that step entirely, + avoiding caching the headers at all. + + -re, --restore Restore header to file based on SHA-1 + This will make use of stored copier headers and reapply them to files if + they match the included hash. More than one header can be applied to a + file, so they will be output to new files, suffixed with .newX, where X + is a number. No input files are altered in the process. + + The following systems have headers that this program can work with: + - Atari 7800 + - Atari Lynx + - Commodore PSID Music + - NEC PC - Engine / TurboGrafx 16 + - Nintendo Famicom / Nintendo Entertainment System + - Nintendo Famicom Disk System + - Nintendo Super Famicom / Super Nintendo Entertainment System + - Nintendo Super Famicom / Super Nintendo Entertainment System SPC + + -out, --output-dir Output directory + This sets an output folder to be used when the files are created. If + a path is not defined, the runtime directory is used instead. + + -sp, --split Split input DATs by a given criteria + This feature allows the user to split input DATs by a number of different + possible criteria. See the individual input information for details. More + than one split type is allowed at a time. + + -ot, --output-type Output DATs to a specified format + Add outputting the created DAT to known format. Multiple instances of + this flag are allowed. + + Possible values are: + all - All available DAT types + am, attractmode - AttractMode XML + cmp, clrmamepro - ClrMamePro + csv - Standardized Comma-Separated Value + dc, doscenter - DOSCenter + lr, listrom - MAME Listrom + lx, listxml - MAME Listxml + miss, missfile - GoodTools Missfile + md5 - MD5 + ol, offlinelist - OfflineList XML + rc, romcenter - RomCenter + sd, sabredat - SabreDat XML + sfv - SFV + sha1 - SHA1 + sha256 - SHA256 + sha384 - SHA384 + sha512 - SHA512 + sl, softwarelist - MAME Software List XML + ssv - Standardized Semicolon-Separated Value + tsv - Standardized Tab-Separated Value + xml, logiqx - Logiqx XML + + -dpc, --depreciated Output 'game' instead of 'machine' + By default, Logiqx XML DATs output with the more modern "machine" + tag for each set. This flag allows users to output the older + "game" tag instead, for compatibility reasons. [Logiqx only] + + -out, --output-dir Output directory + This sets an output folder to be used when the files are created. If + a path is not defined, the runtime directory is used instead. + + -ip, --inplace Write to the input directories, where possible + By default, files are written to the runtime directory (or the output + directory, if set). This flag enables users to write out to the + directory that the DATs originated from. + + -es, --extension Split DAT(s) by two file extensions + For a DAT, or set of DATs, allow for splitting based on a list of + input extensions. This can allow for combined DAT files, such as + those combining two separate systems, to be split. Files with any + extensions not listed in the input lists will be included in both + outputted DAT files. + + -exta, --exta Set extension to be included in first DAT + Set the extension to be used to populate the first DAT. Multiple + instances of this flag are allowed. + + -extb, --extb Set extension to be included in second DAT + Set the extension to be used to populate the second DAT. Multiple + instances of this flag are allowed. + + -hs, --hash Split DAT(s) or folder by best-available hashes + For a DAT, or set of DATs, allow for splitting based on the best + available hash for each file within. The order of preference for the + outputted DATs is as follows: Nodump, SHA-512, SHA-384, SHA-256, + SHA-1, MD5, CRC (or worse). + + -ls, --level Split a SuperDAT or folder by lowest available level + For a DAT, or set of DATs, allow for splitting based on the lowest + available level of game name. That is, if a game name is + top/mid/last, then it will create an output DAT for the parent + directory "mid" in a folder called "top" with a game called "last". + + -s, --short Use short output names + Instead of using ClrMamePro-style long names for DATs, use just + the name of the folder as the name of the DAT. This can be used + in conjunction with --base to output in the format of "Original + Name (Name)" instead. + + -ba, --base Use source DAT as base name for outputs + If splitting an entire folder of DATs, some output files may be + normally overwritten since the names would be the same. With this + flag, the original DAT name is used in the output name, in the + format of "Original Name(Dir - Name)". This can be used in + conjunction with --short to output in the format of "Original + Name (Name)" instead. + + -szs, --size Split DAT(s) or folder by file sizes + For a DAT, or set of DATs, allow for splitting based on the sizes of + the files, specifically if the type is a Rom (most item types don't + have sizes). + + -rad, --radix Set the midpoint to split at + Set the size at which all roms less than the size are put in the + first DAT, and everything greater than or equal goes in the + second. + + -ts, --type Split DAT(s) or folder by file types (rom/disk) + For a DAT, or set of DATs, allow for splitting based on the types of + the files, specifically if the type is a rom or a disk. + + -ss, --sort Sort inputs by a set of DATs + This feature allows the user to quickly rebuild based on a supplied DAT + file(s). By default all files will be rebuilt to uncompressed folders in + the output directory. + + -dat, --dat Input DAT to be used + User-supplied DAT for use in all operations. Multiple instances of + this flag are allowed. + + -out, --output-dir Output directory + This sets an output folder to be used when the files are created. If + a path is not defined, the runtime directory is used instead. + + -dep, --depot Assume directories are romba depots + Normally, input directories will be treated with no special format. + If this flag is used, all input directories will be assumed to be + romba-style depots. + + -del, --delete Delete fully rebuilt input files + Optionally, the input files, once processed and fully matched, can be + deleted. This can be useful when the original file structure is no + longer needed or if there is limited space on the source drive. + + -in, --inverse Rebuild only files not in DAT + Instead of the normal behavior of rebuilding using a DAT, this flag + allows the user to use the DAT as a filter instead. All files that + are found in the DAT will be skipped and everything else will be + output in the selected format. + + -qs, --quick Enable quick scanning of archives + For all archives, if this flag is enabled, it will only use the + header information to get the archive entries' file information. The + upside to this is that it is the fastest option. On the downside, it + can only get the CRC and size from most archive formats, leading to + possible issues. + + -ic, --chds-as-files Treat CHDs as regular files + Normally, CHDs would be processed using their internal hash to + compare against the input DATs. This flag forces all CHDs to be + treated like regular files. + + -ad, --add-date Add dates to items, where posible + If this flag is set, then the Date will be appended to each file + information in the output DAT. The output format is standardized as + "yyyy/MM/dd HH:mm:ss". + + -t7z, --torrent-7zip Enable Torrent7Zip output + Instead of outputting the files to folder, files will be rebuilt to + Torrent7Zip (T7Z) files. This format is based on the LZMA container + format 7Zip, but with custom header information. This is currently + unused by any major application. Currently does not produce proper + Torrent-compatible outputs. + + -tar, --tar Enable Tape ARchive output + Instead of outputting the files to folder, files will be rebuilt to + Tape ARchive (TAR) files. This format is a standardized storage + archive without any compression, usually used with other compression + formats around it. It is widely used in backup applications and + source code archives. + + -tgz, --torrent-gzip Enable Torrent GZip output + Instead of outputting the files to folder, files will be rebuilt to + TorrentGZ (TGZ) files. This format is based on the GZip archive + format, but with custom header information and a file name replaced + by the SHA-1 of the file inside. This is primarily used by external + tool Romba (https://github.com/uwedeportivo/romba), but may be used + more widely in the future. + + -ro, --romba Treat like a Romba depot (requires SHA-1) + This flag allows reading and writing of DATs and output files to + and from a Romba-style depot. This also implies TorrentGZ input + and output for physical files. Where appropriate, Romba depot + files will be created as well. + + -tzip, --torrent-zip Enable Torrent Zip output + Instead of outputting files to folder, files will be rebuilt to + TorrentZip (TZip) files. This format is based on the ZIP archive + format, but with custom header information. This is primarily used by + external tool RomVault (http://www.romvault.com/) and is already + widely used. + + -h, --header Set a header skipper to use, blank means all + Set the header special field for the output DAT(s). In file + rebuilding, this flag allows for either all copier headers (using "") + or specific copier headers by name (such as "fds.xml") to determine + if a file matches or not. + + -7z, --7z Set scanning level for 7zip archives (default 1) + -gz, --gz Set scanning level for GZip archives (default 1) + -rar, --rar Set scanning level for RAR archives (default 1) + -zip, --zip Set scanning level for Zip archives (default 1) + Scan archives in one of the following ways: + 0 - Hash both archive and its contents + 1 - Only hash contents of the archive + 2 - Only hash archive itself (treat like a regular file) + + -sa, --scan-all Set scanning levels for all archives to 0 + This flag is the short equivalent to -7z=0 -gz=0 -rar=0 -zip=0 + wrapped up. Generally this will be helpful in all cases where the + content of the rebuild folder is not entirely known or is known to be + mixed. + + -dm, --dat-merged Force creating merged sets + Preprocess the DAT to have parent sets contain all items from the + children based on the cloneof tag. This is incompatible with the + other --dat-X flags. + + -ds, --dat-split Force creating split sets + Preprocess the DAT to remove redundant files between parents and + children based on the romof and cloneof tags. This is incompatible + with the other --dat-X flags. + + -dnm, --dat-non-merged Force creating non-merged sets + Preprocess the DAT to have child sets contain all items from the + parent set based on the romof and cloneof tags. This is incompatible + with the other --dat-X flags. + + -dnd, --dat-device-non-merged Create device non-merged sets + Preprocess the DAT to have child sets contain all items from the + device references. This is incompatible with the other --dat-X flags. + + -df, --dat-full-non-merged Create fully non-merged sets + Preprocess the DAT to have child sets contain all items from the + parent sets based on the cloneof and romof tags as well as device + references. This is incompatible with the other --dat-X flags. + + -ud, --update-dat Output updated DAT to output directory + Once the files that were able to rebuilt are taken care of, a DAT of + the files that could not be matched will be output to the output + directory. + + -mt, --threads Amount of threads to use (default = # cores) + Optionally, set the number of threads to use for the multithreaded + operations. The default is the number of available machine threads; + -1 means unlimited threads created. + + -st, --stats Get statistics on all input DATs + This will output by default the combined statistics for all input DAT + files. + + The stats that are outputted are as follows: + - Total uncompressed size + - Number of games found + - Number of roms found + - Number of disks found + - Items that include a CRC + - Items that include a MD5 + - Items that include a SHA-1 + - Items that include a SHA-256 + - Items that include a SHA-384 + - Items that include a SHA-512 + - Items with Nodump status + + -as, --all-stats Write all statistics to all available formats + Output all statistical information to all available formats. + + -csv, --csv Output in Comma-Separated Value format + Output all statistical information in standardized CSV format. + + -html, --html Output in HTML format + Output all statistical information in standardized HTML format. + + -tsv, --tsv Output in Tab-Separated Value format + Output all statistical information in standardized TSV format. + + -txt, --text Output in generic text format + Output all statistical information in generic text format. If no + other format flags are enabled, this is the default output. + + -f, --filename Set the external name of the DAT + Set the external filename for the output DAT(s) + + -out, --output-dir Output directory + This sets an output folder to be used when the files are created. If + a path is not defined, the runtime directory is used instead. + + -bc, --baddump-column Add baddump stats to output + Add a new column or field for counting the number of baddumps in the + DAT. + + -nc, --nodump-column Add statistics for nodumps to output + Add a new column or field for counting the number of nodumps in the + DAT. + + -ind, --individual Show individual statistics + Optionally, the statistics for each of the individual input DATs can + be output as well. + + -ud, --update Update and manipulate DAT(s) + This is the multitool part of the program, allowing for almost every + manipulation to a DAT, or set of DATs. This is also a combination of many + different programs that performed DAT manipulation that work better + together. - -out=, --output-dir= Set the name of the output directory - This sets an output folder to be used when the files are created. If - a path is not defined, the application directory is used instead. - - -ip, --inplace Write to the input directories, where possible - By default, files are written to the runtime directory (or the output - directory, if set). This flag enables users to write out to the - directory that the DATs originated from. - - -mt=, --threads= Amount of threads to use - Optionally, set the number of threads to use for the multithreaded - operations. The default is the number of available machine threads; - -1 means unlimited threads created. - - -ve, --verify Verify a folder against an input DAT - When used, this will use an input DAT or set of DATs to blindly check - against an input folder. The base of the folder is considered the base - for the combined DATs and games are either the directories or archives - within. This will only do a direct verification of the items within and - will create a fixdat afterwards for missing files. - - -dat= Input DAT to be used - User-supplied DAT for use in all operations. Multiple instances of - this flag are allowed. - - -dep, --depot Assume directories are romba depots - Normally, input directories will be treated with no special format. - If this flag is used, all input directories will be assumed to be - romba-style depots. - - -ho, --hash-only Check files by hash only - This sets a mode where files are not checked based on name but - rather hash alone. This allows verification of (possibly) - incorrectly named folders and sets to be verified without worrying - about the proper set structure to be there. - - -qs, --quick Enable quick scanning of archives - For all archives, if this flag is enabled, it will only use the - header information to get the archive entries' file information. The - upside to this is that it is the fastest option. On the downside, it - can only get the CRC and size from most archive formats, leading to - possible issues. - - -h=, --header= Remove headers from hash calculations - If this is set, then all files that have copier headers that are - detected will have them removed from the hash calculation. This will - allow for a headered collection to be hashed without possibly - variant information. If a particular header skipper is defined, and - that skipper exists, then it will be used instead of trying to find - one that matches. - - -ic, --chds-as-files Treat CHDs as regular files - Normally, CHDs would be processed using their internal hash to - compare against the input DATs. This flag forces all CHDs to - be treated like regular files. - - -dm, --dat-merged Create merged sets - Preprocess the DAT to have parent sets contain all items from the - children based on the cloneof tag. This is incompatible with the - other --dat-X flags. - - -ds, --dat-split Create split sets - Preprocess the DAT to remove redundant files between parents and - children based on the romof and cloneof tags. This is incompatible - with the other --dat-X flags. - - -dnm, --dat-non-merged Create non-merged sets - Preprocess the DAT to have child sets contain all items from the - parent set based on the cloneof tag. This is incompatible with the - other --dat-X flags. - - -dnd, --dat-device-non-merged Create device non-merged sets - Preprocess the DAT to have child sets contain all items from the - device references. This is incompatible with the other --dat-X - flags. - - -df, --dat-full-non-merged Create fully non-merged sets - Preprocess the DAT to have child sets contain all items from the - parent sets based on the cloneof and romof tags as well as device - references. This is incompatible with the other --dat-X flags. + -ot, --output-type Output DATs to a specified format + Add outputting the created DAT to known format. Multiple instances of + this flag are allowed. + + Possible values are: + all - All available DAT types + am, attractmode - AttractMode XML + cmp, clrmamepro - ClrMamePro + csv - Standardized Comma-Separated Value + dc, doscenter - DOSCenter + lr, listrom - MAME Listrom + lx, listxml - MAME Listxml + miss, missfile - GoodTools Missfile + md5 - MD5 + ol, offlinelist - OfflineList XML + rc, romcenter - RomCenter + sd, sabredat - SabreDat XML + sfv - SFV + sha1 - SHA1 + sha256 - SHA256 + sha384 - SHA384 + sha512 - SHA512 + sl, softwarelist - MAME Software List XML + ssv - Standardized Semicolon-Separated Value + tsv - Standardized Tab-Separated Value + xml, logiqx - Logiqx XML + + -pre, --prefix Set prefix for all lines + Set a generic prefix to be prepended to all outputted lines. + [*SV, Missfile only] + + -post, --postfix Set postfix for all lines + Set a generic postfix to be appended to all outputted lines. + [*SV, Missfile only] + + Some special strings that can be used for both prefix and postfix: + - %game% - Replaced with the Game/Machine name + - %name% - Replaced with the Rom name + - %crc% - Replaced with the CRC + - %md5% - Replaced with the MD5 + - %sha1% - Replaced with the SHA-1 + - %sha256% - Replaced with the SHA-256 + - %sha384% - Replaced with the SHA-384 + - %sha512% - Replaced with the SHA-512 + - %size% - Replaced with the size + + -q, --quotes Double-quote each item + This flag surrounds the item by double-quotes, not including the + prefix or postfix. [*SV, Missfile only] + + -r, --roms Output roms to miss instead of sets + By default, the outputted file will include the name of the game + so this flag allows for the name of the rom to be output instead. + [Missfile only] + + -gp, --game-prefix Add game name as a prefix + This flag allows for the name of the game to be used as a prefix + to each file. [Missfile, MD5, SFV, SHA* only] + + -ae, --add-extension Add an extension to each item + Add a postfix extension to each full item name. [Missfile only] + + -rep, --replace-extension Replace all extensions with specified + When an extension exists, replace it with the provided instead. + [Missfile only] + + -rme, --remove-extensions Remove all extensions from all items + For each item, remove the extension. [Missfile only] + + -ro, --romba Treat like a Romba depot (requires SHA-1) + This flag allows reading and writing of DATs and output files to + and from a Romba-style depot. This also implies TorrentGZ input + and output for physical files. Where appropriate, Romba depot + files will be created as well. + + -dpc, --depreciated Output 'game' instead of 'machine' + By default, Logiqx XML DATs output with the more modern "machine" + tag for each set. This flag allows users to output the older + "game" tag instead, for compatibility reasons. [Logiqx only] + + -f, --filename Set the external name of the DAT + Set the external filename for the output DAT(s) + + -n, --name Set the internal name of the DAT + Set the name header field for the output DAT(s) + + -de, --description Set the description of the DAT + Set the description header field for the output DAT(s) + + -r, --root Set a new rootdir + Set the rootdir (as used by SuperDAT mode) for the output DAT(s). + + -c, --category Set the category of the DAT + Set the category header field for the output DAT(s) + + -v, --version Set the version of the DAT + Set the version header field for the output DAT(s) + + -da, --date Set a new date + Set the date header field for the output DAT(s) + + -au, --author Set the author of the DAT + Set the author header field for the output DAT(s) + + -em, --email Set a new email of the DAT + Set the email header field for the output DAT(s) + + -hp, --homepage Set a new homepage of the DAT + Set the homepage header field for the output DAT(s) + + -u, --url Set a new URL of the DAT + Set the URL header field for the output DAT(s) + + -co, --comment Set a new comment of the DAT + Set the comment header field for the output DAT(s) + + -h, --header Set a header skipper to use, blank means all + Set the header special field for the output DAT(s). In file + rebuilding, this flag allows for either all copier headers (using "") + or specific copier headers by name (such as "fds.xml") to determine + if a file matches or not. + + -sd, --superdat Enable SuperDAT creation + Set the type flag to "SuperDAT" for the output DAT as well as + preserving the directory structure of the inputted folder, if + applicable. + + -fm, --forcemerging Set force merging + Set the forcemerging tag to the given value. + Possible values are: None, Split, Merged, Nonmerged, Full + + -fn, --forcenodump Set force nodump + Set the forcenodump tag to the given value. + Possible values are: None, Obsolete, Required, Ignore + + -fp, --forcepacking Set force packing + Set the forcepacking tag to the given value. + Possible values are: None, Zip, Unzip + + -xof, --exclude-of Exclude romof, cloneof, sampleof tags + If this flag is enabled, then the romof, cloneof, and sampleof tags + will be omitted from the outputted DAT. + + -sds, --scene-date-strip Remove date from scene-named sets + If this flag is enabled, sets with "scene" names will have the date + removed from the beginning. For example "01.01.01-Game_Name-GROUP" + would become "Game_Name-Group". + + -clean, --clean Clean game names according to WoD standards + Game names will be sanitized to remove what the original WoD + standards deemed as unneeded information, such as parenthesized or + bracketed strings. + + -ru, --remove-unicode Remove unicode characters from names + By default, the character set from the original file(s) will be used + for item naming. This flag removes all Unicode characters from the + item names, machine names, and machine descriptions. + + -rmd5, --remove-md5 Remove MD5 hashes from the output + By default, all available hashes will be written out to the DAT. This + will remove all MD5 hashes from the output file(s). + + -rsha1, --remove-sha1 Remove SHA-1 hashes from the output + By default, all available hashes will be written out to the DAT. This + will remove all SHA-1 hashes from the output file(s). + + -rsha256, --remove-sha256 Remove SHA-256 hashes from the output + By default, all available hashes will be written out to the DAT. This + will remove all SHA-256 hashes from the output file(s). + + -rsha384, --remove-sha384 Remove SHA-384 hashes from the output + By default, all available hashes will be written out to the DAT. This + will remove all SHA-384 hashes from the output file(s). + + -rsha512, --remove-sha512 Remove SHA-512 hashes from the output + By default, all available hashes will be written out to the DAT. This + will remove all SHA-512 hashes from the output file(s). + + -dan, --description-as-name Use description instead of machine name + By default, all DATs are converted exactly as they are input. + Enabling this flag allows for the machine names in the DAT to be + replaced by the machine description instead. In most cases, this will + result in no change in the output DAT, but a notable example would be + a software list DAT where the machine names are generally + DOS-friendly while the description is more complete. + + -dm, --dat-merged Force creating merged sets + Preprocess the DAT to have parent sets contain all items from the + children based on the cloneof tag. This is incompatible with the + other --dat-X flags. + + -ds, --dat-split Force creating split sets + Preprocess the DAT to remove redundant files between parents and + children based on the romof and cloneof tags. This is incompatible + with the other --dat-X flags. + + -dnm, --dat-non-merged Force creating non-merged sets + Preprocess the DAT to have child sets contain all items from the + parent set based on the romof and cloneof tags. This is incompatible + with the other --dat-X flags. + + -dnd, --dat-device-non-merged Create device non-merged sets + Preprocess the DAT to have child sets contain all items from the + device references. This is incompatible with the other --dat-X flags. + + -df, --dat-full-non-merged Create fully non-merged sets + Preprocess the DAT to have child sets contain all items from the + parent sets based on the cloneof and romof tags as well as device + references. This is incompatible with the other --dat-X flags. + + -trim, --trim Trim file names to fit NTFS length + In the cases where files will have too long a name, this allows for + trimming the name of the files to the NTFS maximum length at most. + + -rd, --root-dir Set the root directory for calc + In the case that the files will not be stored from the root + directory, a new root can be set for path length calculations. + + -si, --single-set All game names replaced by '!' + This is useful for keeping all roms in a DAT in the same archive or + folder. + + -dd, --dedup Enable deduping in the created DAT + For all outputted DATs, allow for hash deduping. This makes sure that + there are effectively no duplicates in the output files. Cannot be + used with game dedup. + + -gdd, --game-dedup Enable deduping within games in the created DAT + For all outputted DATs, allow for hash deduping but only within the + games, and not across the entire DAT. This makes sure that there are + effectively no duplicates within each of the output sets. Cannot be + used with standard dedup. + + -m, --merge Merge the input DATs + By default, all DATs are processed individually with the + user-specified flags. With this flag enabled, all of the input DATs + are merged into a single output. This is best used with the dedup + flag. + + -b, --no-automatic-date Don't include date in file name + Normally, the DAT will be created with the date in the file name + in brackets. This flag removes that instead of the default. + -di, --diff Create diffdats from inputs (all outputs) + By default, all DATs are processed individually with the + user-specified flags. With this flag enabled, input DATs are diffed + against each other in all ways specified by the --diff-X flags. + + -ag, --against Diff all inputs against a set of base DATs + This flag will enable a special type of diffing in which a set of + base DATs are used as a comparison point for each of the input + DATs. This allows users to get a slightly different output to + cascaded diffing, which may be more useful in some cases. This is + heavily influenced by the diffing model used by Romba. + + -bd, --base-dat Add a base DAT for processing + Add a DAT or folder of DATs to the base set to be used for + all operations. Multiple instances of this flag are allowed. + + -b, --no-automatic-date Don't include date in file name + Normally, the DAT will be created with the date in the file name + in brackets. This flag removes that instead of the default. + + -c, --cascade Enable cascaded diffing + This flag allows for a special type of diffing in which the first + DAT is considered a base, and for each additional input DAT, it + only leaves the files that are not in one of the previous DATs. + This can allow for the creation of rollback sets or even just + reduce the amount of duplicates across multiple sets. + + -rc, --reverse-cascade Enable reverse cascaded diffing + This flag allows for a special type of diffing in which the last + DAT is considered a base, and for each additional input DAT, it + only leaves the files that are not in one of the previous DATs. + This can allow for the creation of rollback sets or even just + reduce the amount of duplicates across multiple sets. + + -sf, --skip-first-output Skip output of first DAT + In times where the first DAT does not need to be written out + a second time, this will skip writing it. This can often + speed up the output process. + [Both Cascade and Reverse Cascade] + + -did, --diff-du Create diffdat containing just duplicates + All files that have duplicates outside of the original DAT are + included. + + -dii, --diff-in Create diffdats for individual DATs + All files that have no duplicates outside of the original DATs are + put into DATs that are named after the source DAT. + + -din, --diff-nd Create diffdat containing no duplicates + All files that have no duplicates outside of the original DATs are + included. + + -b, --no-automatic-date Don't include date in file name + Normally, the DAT will be created with the date in the file name + in brackets. This flag removes that instead of the default. + [All 3 diff-X flags] + + -br, --base-replace Replace from base DATs in order + By default, no item names are changed except when there is a merge + occurring. This flag enables users to define a DAT or set of base + DATs to use as "replacements" for all input DATs. Note that the first + found instance of an item in the base DAT(s) will be used and all + others will be discarded. If no additional flag is given, it will + default to updating names. + -rbr, --reverse-base-replace Replace item names from base DATs in reverse + By default, no item names are changed except when there is a merge + occurring. This flag enables users to define a DAT or set of base + DATs to use as "replacements" for all input DATs. Note that the first + found instance of an item in the last base DAT(s) will be used and + all others will be discarded. If no additional flag is given, it will + default to updating names. + + -bd, --base-dat Add a base DAT for processing + Add a DAT or folder of DATs to the base set to be used for all + operations. Multiple instances of this flag are allowed. + [Both Base Replace and Reverse Base Replace] + + -un, --update-names Update item names from base DATs + This flag enables updating of item names from base DATs. + [Both Base Replace and Reverse Base Replace] + + -uh, --update-hashes Update hashes from base DATs + This flag enables updating of hashes from base DATs. + [Both Base Replace and Reverse Base Replace] + + -udd, --update-description Update machine descriptions from base DATs + This flag enables updating of machine descriptions from base + DATs. + [Both Base Replace and Reverse Base Replace] + + -ons, --only-same Only update description if machine name matches description + Normally, updating the description will always overwrite if + the machine names are the same. With this flag, descriptions + will only be overwritten if they are the same as the machine + names. + + -uy, --update-year Update machine years from base DATs + This flag enables updating of machine years from base DATs. + [Both Base Replace and Reverse Base Replace] + + -um, --update-manufacturer Update machine manufacturers from base DATs + This flag enables updating of machine manufacturers from base + DATs. + [Both Base Replace and Reverse Base Replace] + + -gn, --game-name Filter by game name + Include only items with this game name in the output. Additionally, + the user can specify an exact match or full C#-style regex for + pattern matching. Multiple instances of this flag are allowed. + + -ngn, --not-game-name Filter by not game name + Include only items without this game name in the output. + Additionally, the user can specify an exact match or full C#-style + regex for pattern matching. Multiple instances of this flag are + allowed. + + -gd, --game-description Filter by game description + Include only items with this game description in the output. + Additionally, the user can specify an exact match or full C#-style + regex for pattern matching. Multiple instances of this flag are + allowed. + + -ngd, --not-game-description Filter by not game description + Include only items without this game description in the output. + Additionally, the user can specify an exact match or full C#-style + regex for pattern matching. Multiple instances of this flag are + allowed. + + -ofg, --match-of-tags Allow cloneof and romof tags to match game name filters + If filter or exclude by game name is used, this flag will allow those + filters to be checked against the romof and cloneof tags as well. + This can allow for more advanced set-building, especially in + arcade-based sets. + + -rn, --item-name Filter by item name + Include only items with this item name in the output. Additionally, + the user can specify an exact match or full C#-style regex for + pattern matching. Multiple instances of this flag are allowed. + + -nrn, --not-item-name Filter by not item name + Include only items without this item name in the output. + Additionally, the user can specify an exact match or full C#-style + regex for pattern matching. Multiple instances of this flag are + allowed. + + -rt, --item-type Filter by item type + Include only items with this item type in the output. Additionally, + the user can specify an exact match or full C#-style regex for + pattern matching. Multiple instances of this flag are allowed. + + -nrt, --not-item-type Filter by not item type + Include only items without this item type in the output. + Additionally, the user can specify an exact match or full C#-style + regex for pattern matching. Multiple instances of this flag are + allowed. + + -sgt, --greater Filter by size >= + Only include items whose size is greater than or equal to this value + in the output DAT. Users can specify either a regular integer number + or a number with a standard postfix. e.g. 8kb => 8000 or 8kib => 8192 + + -slt, --less Filter by size =< + Only include items whose size is less than or equal to this value in + the output DAT. Users can specify either a regular integer number or + a number with a standard postfix. e.g. 8kb => 8000 or 8kib => 8192 + + -seq, --equal Filter by size == + Only include items of this exact size in the output DAT. Users can + specify either a regular integer number or a number with a standard + postfix. e.g. 8kb => 8000 or 8kib => 8192 + + -crc, --crc Filter by CRC hash + Include only items with this CRC hash in the output. Additionally, + the user can specify an exact match or full C#-style regex for + pattern matching. Multiple instances of this flag are allowed. + + -ncrc, --not-crc Filter by not CRC hash + Include only items without this CRC hash in the output. Additionally, + the user can specify an exact match or full C#-style regex for + pattern matching. Multiple instances of this flag are allowed. + + -md5, --md5 Filter by MD5 hash + Include only items with this MD5 hash in the output. Additionally, + the user can specify an exact match or full C#-style regex for + pattern matching. Multiple instances of this flag are allowed. + + -nmd5, --not-md5 Filter by not MD5 hash + Include only items without this MD5 hash in the output. Additionally, + the user can specify an exact match or full C#-style regex for + pattern matching. Multiple instances of this flag are allowed. + + -sha1, --sha1 Filter by SHA-1 hash + Include only items with this SHA-1 hash in the output. Additionally, + the user can specify an exact match or full C#-style regex for + pattern matching. Multiple instances of this flag are allowed. + + -nsha1, --not-sha1 Filter by not SHA-1 hash + Include only items without this SHA-1 hash in the output. + Additionally, the user can specify an exact match or full C#-style + regex for pattern matching. Multiple instances of this flag are + allowed. + + -sha256, --sha256 Filter by SHA-256 hash + Include only items with this SHA-256 hash in the output. + Additionally, the user can specify an exact match or full C#-style + regex for pattern matching. Multiple instances of this flag are + allowed. + + -nsha256, --not-sha256 Filter by not SHA-256 hash + Include only items without this SHA-256 hash in the output. + Additionally, the user can specify an exact match or full C#-style + regex for pattern matching. Multiple instances of this flag are + allowed. + + -sha384, --sha384 Filter by SHA-384 hash + Include only items with this SHA-384 hash in the output. + Additionally, the user can specify an exact match or full C#-style + regex for pattern matching. Multiple instances of this flag are + allowed. + + -nsha384, --not-sha384 Filter by not SHA-384 hash + Include only items without this SHA-384 hash in the output. + Additionally, the user can specify an exact match or full C#-style + regex for pattern matching. Multiple instances of this flag are + allowed. + + -sha512, --sha512 Filter by SHA-512 hash + Include only items with this SHA-512 hash in the output. + Additionally, the user can specify an exact match or full C#-style + regex for pattern matching. Multiple instances of this flag are + allowed. + + -nsha512, --not-sha512 Filter by not SHA-512 hash + Include only items without this SHA-512 hash in the output. + Additionally, the user can specify an exact match or full C#-style + regex for pattern matching. Multiple instances of this flag are + allowed. + + -is, --status Include only items with a given status + Include only items with this item status in the output. Multiple + instances of this flag are allowed. + Possible values are: None, Good, BadDump, Nodump, Verified + + -nis, --not-status Exclude only items with a given status + Include only items without this item status in the output. Multiple + instances of this flag are allowed. + Possible values are: None, Good, BadDump, Nodump, Verified + + -gt, --game-type Include only games with a given type + Include only items with this game type in the output. Multiple + instances of this flag are allowed. + Possible values are: None, Bios, Device, Mechanical + + -ngt, --not-game-type Exclude only games with a given type + Include only items without this game type in the output. Multiple + instances of this flag are allowed. + Possible values are: None, Bios, Device, Mechanical + + -run, --runnable Include only items that are marked runnable + This allows users to include only verified runnable games. + + -nrun, --not-runnable Include only items that are not marked runnable + This allows users to include only unrunnable games. + + -out, --output-dir Output directory + This sets an output folder to be used when the files are created. If + a path is not defined, the runtime directory is used instead. + + -ip, --inplace Write to the input directories, where possible + By default, files are written to the runtime directory (or the output + directory, if set). This flag enables users to write out to the + directory that the DATs originated from. + + -mt, --threads Amount of threads to use (default = # cores) + Optionally, set the number of threads to use for the multithreaded + operations. The default is the number of available machine threads; + -1 means unlimited threads created. + + -ve, --verify Verify a folder against DATs + When used, this will use an input DAT or set of DATs to blindly check + against an input folder. The base of the folder is considered the base + for the combined DATs and games are either the directories or archives + within. This will only do a direct verification of the items within and + will create a fixdat afterwards for missing files. + + -dat, --dat Input DAT to be used + User-supplied DAT for use in all operations. Multiple instances of + this flag are allowed. + + -dep, --depot Assume directories are romba depots + Normally, input directories will be treated with no special format. + If this flag is used, all input directories will be assumed to be + romba-style depots. + + -t, --temp Set the temporary directory to use + Optionally, a temp folder can be supplied in the case the default + temp directory is not preferred. + + -ho, --hash-only Check files by hash only + This sets a mode where files are not checked based on name but rather + hash alone. This allows verification of (possibly) incorrectly named + folders and sets to be verified without worrying about the proper set + structure to be there. + + -qs, --quick Enable quick scanning of archives + For all archives, if this flag is enabled, it will only use the + header information to get the archive entries' file information. The + upside to this is that it is the fastest option. On the downside, it + can only get the CRC and size from most archive formats, leading to + possible issues. + + -h, --header Set a header skipper to use, blank means all + Set the header special field for the output DAT(s). In file + rebuilding, this flag allows for either all copier headers (using "") + or specific copier headers by name (such as "fds.xml") to determine + if a file matches or not. + + -ic, --chds-as-files Treat CHDs as regular files + Normally, CHDs would be processed using their internal hash to + compare against the input DATs. This flag forces all CHDs to be + treated like regular files. + + -dm, --dat-merged Force creating merged sets + Preprocess the DAT to have parent sets contain all items from the + children based on the cloneof tag. This is incompatible with the + other --dat-X flags. + + -ds, --dat-split Force creating split sets + Preprocess the DAT to remove redundant files between parents and + children based on the romof and cloneof tags. This is incompatible + with the other --dat-X flags. + + -dnd, --dat-device-non-merged Create device non-merged sets + Preprocess the DAT to have child sets contain all items from the + device references. This is incompatible with the other --dat-X flags. + + -dnm, --dat-non-merged Force creating non-merged sets + Preprocess the DAT to have child sets contain all items from the + parent set based on the romof and cloneof tags. This is incompatible + with the other --dat-X flags. + + -df, --dat-full-non-merged Create fully non-merged sets + Preprocess the DAT to have child sets contain all items from the + parent sets based on the cloneof and romof tags as well as device + references. This is incompatible with the other --dat-X flags. + ** Section 3.0 - Examples Here are a few usage examples based on features that are commonly used by most diff --git a/SabreTools/SabreTools.Help.cs b/SabreTools/SabreTools.Help.cs index fdb4ed77..3cf2e0f1 100644 --- a/SabreTools/SabreTools.Help.cs +++ b/SabreTools/SabreTools.Help.cs @@ -54,7 +54,7 @@ namespace SabreTools new List() { "-as", "--all-stats" }, "Write all statistics to all available formats", FeatureType.Flag, - longDescription: "Output all rom information to all available formats."); + longDescription: "Output all statistical information to all available formats."); } } private static Feature archivesAsFilesFlag @@ -1434,7 +1434,7 @@ namespace SabreTools return new Feature( "threads", new List() { "-mt", "--threads" }, - "Amount of threads to use (default = # cores, -1 unlimted)", + "Amount of threads to use (default = # cores)", FeatureType.Int32, longDescription: "Optionally, set the number of threads to use for the multithreaded operations. The default is the number of available machine threads; -1 means unlimited threads created."); } @@ -1765,28 +1765,29 @@ Possible values are: None, Good, BadDump, Nodump, Verified"); "Output DATs to a specified format", FeatureType.List, longDescription: @"Add outputting the created DAT to known format. Multiple instances of this flag are allowed. + Possible values are: -all - All available DAT types -am, attractmode - AttractMode XML -cmp, clrmamepro - ClrMamePro -csv - Standardized Comma-Separated Value -dc, doscenter - DOSCenter -lr, listrom - MAME Listrom -lx, listxml - MAME Listxml -miss, missfile - GoodTools Missfile -md5 - MD5 -ol, offlinelist - OfflineList XML -rc, romcenter - RomCenter -sd, sabredat - SabreDat XML -sfv - SFV -sha1 - SHA1 -sha256 - SHA256 -sha384 - SHA384 -sha512 - SHA512 -sl, softwarelist - MAME Software List XML -ssv - Standardized Semicolon-Separated Value -tsv - Standardized Tab-Separated Value -xml, logiqx - Logiqx XML"); + all - All available DAT types + am, attractmode - AttractMode XML + cmp, clrmamepro - ClrMamePro + csv - Standardized Comma-Separated Value + dc, doscenter - DOSCenter + lr, listrom - MAME Listrom + lx, listxml - MAME Listxml + miss, missfile - GoodTools Missfile + md5 - MD5 + ol, offlinelist - OfflineList XML + rc, romcenter - RomCenter + sd, sabredat - SabreDat XML + sfv - SFV + sha1 - SHA1 + sha256 - SHA256 + sha384 - SHA384 + sha512 - SHA512 + sl, softwarelist - MAME Software List XML + ssv - Standardized Semicolon-Separated Value + tsv - Standardized Tab-Separated Value + xml, logiqx - Logiqx XML"); } } private static Feature sha1ListInput @@ -2023,7 +2024,7 @@ Possible values are: None, Zip, Unzip"); new List() { "-h", "--header" }, "Set a header skipper to use, blank means all", FeatureType.String, - longDescription: "Set the header special field for the output DAT(s)"); + longDescription: "Set the header special field for the output DAT(s). In file rebuilding, this flag allows for either all copier headers (using \"\") or specific copier headers by name (such as \"fds.xml\") to determine if a file matches or not."); } } @@ -2084,7 +2085,18 @@ Possible values are: None, Zip, Unzip"); new List() { "-post", "--postfix" }, "Set postfix for all lines", FeatureType.String, - longDescription: "Set a generic postfix to be appended to all outputted lines. [*SV, Missfile only]"); + longDescription: @"Set a generic postfix to be appended to all outputted lines. [*SV, Missfile only] + +Some special strings that can be used: +- %game% - Replaced with the Game/Machine name +- %name% - Replaced with the Rom name +- %crc% - Replaced with the CRC +- %md5% - Replaced with the MD5 +- %sha1% - Replaced with the SHA-1 +- %sha256% - Replaced with the SHA-256 +- %sha384% - Replaced with the SHA-384 +- %sha512% - Replaced with the SHA-512 +- %size% - Replaced with the size"); } } private static Feature prefixStringInput @@ -2096,7 +2108,18 @@ Possible values are: None, Zip, Unzip"); new List() { "-pre", "--prefix" }, "Set prefix for all lines", FeatureType.String, - longDescription: "Set a generic prefix to be prepended to all outputted lines. [*SV, Missfile only]"); + longDescription: @"Set a generic prefix to be prepended to all outputted lines. [*SV, Missfile only] + +Some special strings that can be used: +- %game% - Replaced with the Game/Machine name +- %name% - Replaced with the Rom name +- %crc% - Replaced with the CRC +- %md5% - Replaced with the MD5 +- %sha1% - Replaced with the SHA-1 +- %sha256% - Replaced with the SHA-256 +- %sha384% - Replaced with the SHA-384 +- %sha512% - Replaced with the SHA-512 +- %size% - Replaced with the size"); } } private static Feature replaceExtensionStringInput @@ -2296,15 +2319,17 @@ Possible values are: None, Zip, Unzip"); new List() { "-ex", "--extract" }, "Extract and remove copier headers", FeatureType.Flag, - longDescription: @"This will detect, store, and remove copier headers from a file or folder of files. The headers are backed up and collated by the hash of the unheadered file. Files are then output without the detected copier header alongside the originals with the suffix .new. No input files are altered in the process. The following systems have headers that this program can work with: -- Atari 7800 -- Atari Lynx -- Commodore PSID Music -- NEC PC - Engine / TurboGrafx 16 -- Nintendo Famicom / Nintendo Entertainment System -- Nintendo Famicom Disk System -- Nintendo Super Famicom / Super Nintendo Entertainment System -- Nintendo Super Famicom / Super Nintendo Entertainment System SPC"); + longDescription: @"This will detect, store, and remove copier headers from a file or folder of files. The headers are backed up and collated by the hash of the unheadered file. Files are then output without the detected copier header alongside the originals with the suffix .new. No input files are altered in the process. + +The following systems have headers that this program can work with: + - Atari 7800 + - Atari Lynx + - Commodore PSID Music + - NEC PC - Engine / TurboGrafx 16 + - Nintendo Famicom / Nintendo Entertainment System + - Nintendo Famicom Disk System + - Nintendo Super Famicom / Super Nintendo Entertainment System + - Nintendo Super Famicom / Super Nintendo Entertainment System SPC"); extract.AddFeature(outputDirStringInput); extract.AddFeature(noStoreHeaderFlag); @@ -2317,15 +2342,17 @@ Possible values are: None, Zip, Unzip"); new List() { "-re", "--restore" }, "Restore header to file based on SHA-1", FeatureType.Flag, - longDescription: @"This will make use of stored copier headers and reapply them to files if they match the included hash. More than one header can be applied to a file, so they will be output to new files, suffixed with .newX, where X is a number. No input files are altered in the process. The following systems have headers that this program can work with: -- Atari 7800 -- Atari Lynx -- Commodore PSID Music -- NEC PC - Engine / TurboGrafx 16 -- Nintendo Famicom / Nintendo Entertainment System -- Nintendo Famicom Disk System -- Nintendo Super Famicom / Super Nintendo Entertainment System -- Nintendo Super Famicom / Super Nintendo Entertainment System SPC"); + longDescription: @"This will make use of stored copier headers and reapply them to files if they match the included hash. More than one header can be applied to a file, so they will be output to new files, suffixed with .newX, where X is a number. No input files are altered in the process. + +The following systems have headers that this program can work with: + - Atari 7800 + - Atari Lynx + - Commodore PSID Music + - NEC PC - Engine / TurboGrafx 16 + - Nintendo Famicom / Nintendo Entertainment System + - Nintendo Famicom Disk System + - Nintendo Super Famicom / Super Nintendo Entertainment System + - Nintendo Super Famicom / Super Nintendo Entertainment System SPC"); restore.AddFeature(outputDirStringInput); #endregion @@ -2350,13 +2377,13 @@ Possible values are: None, Zip, Unzip"); sort.AddFeature(tarFlag); sort.AddFeature(torrentGzipFlag); sort[torrentGzipFlag].AddFeature(rombaFlag); - //sort.AddFeature(tlrzFeature); - //sort.AddFeature(tlz4Feature); - //sort.AddFeature(trarFeature); - //sort.AddFeature(txzFeature); + sort.AddFeature(torrentLrzipFlag); + sort.AddFeature(torrentLz4Flag); + sort.AddFeature(torrentRarFlag); + sort.AddFeature(torrentXzFlag); sort.AddFeature(torrentZipFlag); - //sort.AddFeature(tzpaqFeature); - //sort.AddFeature(tzstdFeature); + sort.AddFeature(torrentZpaqFlag); + sort.AddFeature(torrentZstdFlag); sort.AddFeature(headerStringInput); sort.AddFeature(sevenZipInt32Input); sort.AddFeature(gzInt32Input); @@ -2429,7 +2456,9 @@ Possible values are: None, Zip, Unzip"); new List() { "-st", "--stats" }, "Get statistics on all input DATs", FeatureType.Flag, - longDescription: @"This will output by default the combined statistics for all input DAT files. The stats that are outputted are as follows: + longDescription: @"This will output by default the combined statistics for all input DAT files. + +The stats that are outputted are as follows: - Total uncompressed size - Number of games found - Number of roms found @@ -2442,15 +2471,15 @@ Possible values are: None, Zip, Unzip"); - Items that include a SHA-512 - Items with Nodump status"); stats.AddFeature(allStatsFlag); - stats.AddFeature(baddumpColumnFlag); stats.AddFeature(csvFlag); - stats.AddFeature(filenameStringInput); - stats.AddFeature(outputDirStringInput); stats.AddFeature(htmlFlag); - stats.AddFeature(nodumpColumnFlag); - stats.AddFeature(individualFlag); stats.AddFeature(tsvFlag); stats.AddFeature(textFlag); + stats.AddFeature(filenameStringInput); + stats.AddFeature(outputDirStringInput); + stats.AddFeature(baddumpColumnFlag); + stats.AddFeature(nodumpColumnFlag); + stats.AddFeature(individualFlag); #endregion