## Scanner Dialog

The Scanner - The 'heart' of clrmamepro. Here the action takes place. You have a separated resizeable scan-results window where all 'errors' are displayed. Don't forget to set the correct merge mode ! See below if you don't know how. The Scanner scans your filesets - and samplepaths and reports wrong sized files, wrong named games, missing samples and on and on and on....and it can even fix most of the problems.

#### The Scan Results Window

clrmamepro lists all problems in this additional window. It's resizeable, minimizable and moveable. By clicking on the [+] symbols in the tree control you are able to see a more detailed information about the problem. Cloneitems have a different textcolor. You can change that color via the popup-menu (See below).

The statusline at the bottom of the window shows some additional information about the selected item. You can also drag'n drop files in this window. clrmamepro will use the current Rebuilder options and rebuilds the dropped files. After the rebuilding process it will do a Fastscan operation (see below). So you should only do that after a finished Scan operation. You will be warned if the rebuilder and scanner mergemodes differ. You will also see a warning if the scanner uses 'fix-missing uses sysdefpaths' while rebuilder's destination doesn't use sysdefpaths or vice versa. You can disable that warning by cmpro.ini -> Scan_SysDefRebuildWarning = off.

By single-clicking the reported messages you will be able to copy parts of them (e.g. the CRC32).

The "?" Symbol will open a new Set-Information window.

#### The Set-Information Window

The Set Information window will be automatically updated when you click on an item in the Scan-Results window. It shows the name, used BIOSSet, description, clone, sourcefile, sampleclone and manufacturer information about the currently selected set. It also lists all files and samples with detailed information like crc32, size, md5, sha1, date/timestamp and name.

CHD md5s are the ones from the chd header which represent the md5 of the decompressed image.

Missing, wrong sized, wrong named and wrong-crc32 files/samples are shown with a different icon and a red-backgroundcolor. If the files are fixable, the color is orange. This color-display is only taken from the current scan. So if you only scanned for wrong-sized files, you won't see a red background for missing files. You can use the name-editbox to switch to a different set (even if it's not listed in the scan-results window). If the set isn't shown in scan-results, you don't get any additional coloring of files with problems !

Hide Parent-ROMs will hide parent files in clonesets. Hide BIOS-Roms will hide BIOSfiles in non-bios sets. Rightclicking an item in a column gives you the chance to copy the belonging string to the clipboard.

The spinnercontrols at the left will let you step to the next/prev active set.

The tree on the left shows an alphabetically sorted (by setname, not by description!!!) list of all sets. Clicking on an item there will update the setinfo.

The crc search editbox and the spinnercontrols on the right will let you search for crc32 values in the currently loaded dat. You can jump to the next/previous crc32 match by pressing the spinnerbuttons.

##### Set Selection

In front of each setname you see a checkbox. Toggling this checkbox enables/disables the set (for scanning, merging, rebuilding). This doesn't work while a scan is active. There are several options to allow some special selection of sets:

- Invert

  This button will invert the currently selected items.

- Avail. Sets

> You can automatically disable all the sets you don't own by pressing this button. It will enable only those sets which can be found in your current ROM paths. This button is only enabled in the 'sets' view. If 'Mark Parent/Clones' is checked and you press this button clrmamepro will mark parent/clones sets too.

- Export DatFile...

  Exports the current data to a file in 'datfile syntax'. Useful if you want to convert ROMCenter datfiles.

- From File / Load

> You can enter a filename (or browse for a file) here. The file is a plain text file which lists setnames (one per line) which get activated if you press the Load Button.

- Select sets / Apply

  Here you can enter the set-folder-name(s) you want to check. The entered values is applied by pressing the apply button. Wildcards are allowed and you have to separate names by ';'.

> Examples:

> - pacman - enables the set pacman
> - pac* - enables all sets starting with 'pac'
> - a*; 1*; - enables all sets starting with a or starting with 1
> - *[[]b?[]]* enabled all sets with a "[b?]" where the ? can be any character. Useful for Cowering's Goodsets :)

> The names are the folder names not the descriptionname...e.g.: 'pacman' not 'PuckMan (Japan set 1)'. If 'Mark Parent/Clones' is checked it will enable the parent/clone sets, too.

> For more information check out fnmatch() syntax which can be found in the internet...e.g here:

> http://www.cee.odu.edu/cgi-bin/cee_man-cgi?fnmatch+5
> http://www.cee.odu.edu/cgi-bin/cee_man-cgi?regex+5

> This editbox also knows some variables: %b, %s, %y, %d, %m, %f, %c, %C ...bios, sourcefile, year, description, manufacturer, setname, cloneOf, sampleOf. If you want to enable all sets which got "capcom" as manufacturer, you can enter %m=*capcom* for example. Or only games from the year 2000, 2001 and so on. Simply set %y=200* (ok..only to 2009 in this case...but I guess you know what you can do with it).

- logical not

> This applies a logical 'not' to each selection. Similar to the invert button but this can be enabled/disabled.

- Parent/Clones

> This button is only enabled in the 'sets' view. If this checkbox is checked and you're trying to activate a set, clrmamepro will automatically active all clones and the parent set. Same for disabling a set.

You can also drag files and folders into the window to enable the dropped sets only.

#### The Options

The title bar shows the currently selected profile and the number of selected sets. This behaviour was changed to a tool tip appearing when hovering over the title.

#### You want to scan

- Sets

> Check this option if you want to check sets. Combine this e.g. with unneeded, name, missing or case check.

> Sets have to be stored in this way:

> <rompath>\<setname>.zip (for compressed sets)
> <rompath>\<setname\ (for not compressed sets)

- ROMs

  This option should be enabled if you want to scan the files of a set. Combine this option with e.g. missing, unneeded, length, CRC32/MD5 checksum, case or name check.

  Files have to be stored in this way:

  <rompath>\<setname>.zip (for compressed sets)
  <rompath>\<setname>\file 1 .... file n (for not compressed sets)

- Samples

> Check this option if you want to check sample files. Possible with unneeded, missing and case check.

> Samples have to be stored in this way:

> <samplepath>\<setname>.zip (for compressed sets)
> <samplepath>\<setname>\sample 1 .... sample n (for not compressed sets)

- CHDs

  Check this option if you want to check CHD files. Possible with missing, case, chd_md5 checksum and name check

  CHDs have to be stored in this way:

  <rompath>\<setname>\CHD 1 .... CHD n

####

#### You Prefer

With the merge-settings within the scanning mode you only tell clrmamepro what sets you're using. While scanning you don't merge things. It's only necessary to know what kind of sets you currently have.

- Non-Merged Sets

> You're using sets which aren't merged. Than means every single set has all needed files in it.

- Split Sets

> You're using split-sets. You have a folder/zipfile for the parent and one for each clone. The files in the clonefolders only belong to the clone but not to the parentset.

- Merged Set

  You're using merged sets. You have only one folder for the parent and the clone files.

####

#### Scan the checked Systems

> Enable the sets you want to check. The scanner only checks checked systems. For example if the listbox shows 'standard' and 'neogeo' and you enable 'neogeo', the scanner will only scan the neogeo sets. Double click this box to specify default-system-paths.

####

#### Check & Fix

- Missing / fix missing

> Checks if a Set/ROM/sample file is missing. If you enable fix missing clrmamepro tries to add the missing files from one of your 'add paths'. This fixing option isn't affected by the 'ask before fixing' option. Only correct files (right checksum and right length) will be added. BIOS-files will be added to the biosset or, if "allow separated bios.." is enabled, in each set. You can specify your 'add paths' in the settings dialog. The fix-missing operation only looks for the current gameset (or its clones / parent) in all addpaths. Fix missing will also search all your rompaths (in a very fast way) for missing roms. clrmamepro will place new files in the specified System-Default-Paths when 'Use SysDefault Paths' (see Advanced..) is enabled.

- Checksum...

> Here you can setup which checksums (if available in the datfile) can be checked for. Be warned: Some checksums will lead to long scan time. Checksums are greyed out if they aren't used in the belonging datfile. Check the checksum-checkbox to enable/disable global checksum checking.

> Perform ROM Checksum Anaylsis

> If you enable this option, clrmamepro tries to fix the checksum of a file which normally gets listes with a bad checksum. This operation can slow down the scanning process. The right 'fix file if possible' checkbox will directly fix the file (without asking). So...what it does. Serveral things. Mirror, padding with 0x00, 0xff, Byteorder change, even/odd split, blockswap. Real baddumps can't be fixed of course. This option is only available if CRC32 is enabled, too.

> Decompress ROM and check CRC32 (or SHA1/MD5)

> This will enable a slow scanmode which decompresses each file AND sample to memory, calculate its checksum and compares it with the stored one. It's like a PKUNZIP/WINZIP test operation. Possible Errors will be displayed in the warnings-window. If Inflate or bad crc32 errors are listed, you have a corrupt archivefile !

> CHD MD5/SHA1

> Tests checksums (md5, sha1) for CHD files. This is a chd header entry compare check.

> When Decompress CHD and check SHA1/MD5 is enabled, clrmamepro will check the integrity of any chd block. This takes long ! You will see a second progressbar while scanning and you can use CANCEL button there to skip this check.

- Unneeded / Fix Unneeded

> Reports unneeded sets/ROMs/samples. Be warned: Everything which isn't a set/ROM/sample (in your ROM/samplepaths) will be reported as unneeded. This may include executable or other files. So be sure that your ROM- and sample paths are set correctly. If backup is enabled you won't lose any files because they'll be stored in your backupfolder. If you specified UnneededMasks (See Settings Dialog), clrmamepro won't mark files which match any UnneededMask. You can also exclude folders from being marked as unneeded. Useful if you're using sub-romfolders. You have to specify Excludepaths (See Settings Dialog).

- Name / Fix Name

> Checks for the correct name of a set/ROM file.

- Size / Fix Size

> Checks for the correct size of a file.

- Date / Fix Date

> Checks for the correct date/timestamp of a file.

- Case / Fix Case

> Checks for the right case of a set/ROM/samplename. This is useful for case-sensitive operating systems.

- All/None

> Enables/Disables all check/fix options (if available).

#### Prompts

- Ask Before Fixing

> clrmamepro will ask you before any fixing operation if you're really sure.

- Add/Show Statistics

> The statistics are added to the logfile if this option is enabled. And you'll see the statistics after a scan operation.

- Advanced...

  This will show you the advanced scanner options window:

#### Adv. Options

- Allow Not Separated BIOS ROMs

> Normally not separated BIOS files are marked as unneeded. Enable this option if ClrMame shouldn't mark them as unneeded.

- Move not renamed sets to Backup

  Only available when fix name is active. When a renaming operation of a set fails, clrmamepro moves that still wrong named set to the backupfolder.

- Use Optimized ROMPath Scanning

  clrmamepro reorganizes the order of the ROMpaths at runtime to increase scanner speed. If disabled, clrmamepro takes the rompath order which is set in the Settings dialog.

- Show 'baddump' ROMs & inverted CRCs

  Shows inverted CRC32 files and files which are marked as 'baddump'.

- CHDs use SysDefault assignments

> If enabled, CHDs should be stored in a setup sysdefault path of the system. This should be used in combination with the following option.

- Detect Sets in wrong SysDefault Paths

> By enabling this option (and Set+Missing), clrmamepro will check if a set is in the belonging SysDefault Path (e.g. a neogeo file in the belonging neogeo sets folder). The SysDefault Paths have to be correctly setup for this option.

- Unneeded Check Looks For Dupe Sets

  When unneeded check and this option is enabled, clrmamepro reports rom- and samplesets which exist in more than one rom- and/or samplepath. Sets with CHDs aren't checked because it's rather common to keep image and files separated.

- Deeper Check For Fixable Missing Files

> Looks for fixable missing files even when fix-missing is disabled. If clrmamepro finds a fixable file you'll get a "missing (but fixable)" message plus the name of the set where it can be found. This additional check will make the scanner slower.

- Additionally test SHA1/MD5 for matches

  As soon as a file is matched by crc32 + size match, this option will do a further sha1/md5 check (if these hashvalues are available) for verification. Since crc32 + size is easy to fake these days, you should enable this option as well to be really sure. Of course this option slows down the process.

- Fix Missing scans all sets

  Same as fix missing, but it scans any (!) set in the addpath for a possible missing file. Not only the parent/clone sets. This takes long !

- Allow CHDs in rompath root

  If you store CHD files in a rompath rootfolder instead of using a rompath subfolder named after the set of the chd, you should turn this option on.

- Use SysDefault Paths for fix-missing

  This option is only used when fixmissing is active. Files will be added to the specified System-Default-Path if this option is enabled.

#### Scan & Fastscan

> Press the Scan button to start the scanning process. After it is ended you'll see a scanning summary with some statistics. If you don't abort the scan you'll be able to do fastscans.

> Fastscan is the same as scan but it'll only scans the files which reported 'errors' in a previous ended (not aborded) scan operation. So you have to do a valid scan operation first. After an ended fastscan or scan operation, ClrMame will update the fastscan file. If you do a Fastscan all scanner-settings are set to the old values. Exception: You can enable/disable the 'fix' settings.

#### Logfile & Fastscan...

> ####

> Enter (or browse) a filename of the logfile. The reported lines will be saved in this file if you press 'Save Logfile'. Press the Save Logfile (disk symbol) button to save the current scan-results to a text-file.

> Fastscan File: Enter (or browse) a filename of a fastscan-data-file. This file holds the information about a fastscan. This file will be updated after every ended (not aborded) scan- or fastscan operation.

> You can manually remove the logfile and fastscan files by clicking on remove buttons (red cross). You can also VIEW the logfile by clicking on the ? symbol.

- Save Logfile Automatically

  If this option is enabled, the logfile will be saved without prompting after a successful scan/fastscan.

#### Other Buttons

> Press the 'Statistics' button to see the last scan results statistics again.

> Press the 'Save-Missing List' (Right Symbol) button to create a "miss" set list. It will do a quick scan through your rom/samplepaths to create these lists.

> Press the 'Save-Have List' (Left Symbol) button to create a "have" set list. It will do a quick scan through your rom/samplepaths to create these lists.

> After the filecreation you will be asked if you want to view the saved files. clrmamepro runs the default application (if defined) for the file. Usually a texteditor for .txt files. You can disable that question by cmpro.ini -> Scan_OpenMissHaveLists = off.

#### Hide & Show

> After a Scan or Fastscan operation you're able to hide or show items in this outputwindow. The output depends on the values of the sets, files, Samples, Missing, Length, Case, Unneeded, Name and Checksum.

> Let's assume you did a 'missing' + 'ROMs' + 'Samples' scan. A lot of output was added to the scan-results window. Now you only want to see the missing samples. Disable the 'ROMs' button and the scan-results window will reorganize itself and you'll only see the missing samples. Don't forget: You can only hide / show things which your scan or fastscan operation reported. For example: If you didn't scan for unneeded files, you can't show them after the scan. You have to do a rescan with an enabled 'unneeded' option.

> Two little exceptions: 'unneeded' files are displayed if you enable 'unneeded' and sets OR files OR samples.

#### Popup Menus

By clicking on the little button at the bottom-right you will toggle the WarningsWindow.

The warningswindow (below the scanner) has a popupmenu. With the two options you can dock the window to the scanner window and you can clear the messages in that warnings window. Auto-Scroll takes care of scrolling when more than one message is shown in that warnings-window. Copy To Clipboard copies all listed items to the clipboard. If you right-clicked an item which includes a filename you will see another menu string: Delete File '<filename>'. With this option you can remove the listed file from your hd. The file won't be backup'ed!!! With Move File '<filename>' to folder you have the chance to move the selected file to a folder. With Move All and Delete All you move/delete all listed files.

When right-clicking an item in the scan-results (all but unneeded files) you'll see a popup menu, too.

- By clicking on Copy To Clipboard -> Current Set-Messages you'll copy all messages of the currently selected set to the clipboard. So..e.g. all messages from the '005' set (and only '005') will be placed in the clipboard.
- Copy To Clipboard -> All Sets Messages will copy all listed items to the clipboard.
- Copy To Clipboard -> Current Setname copies the currently selected setname to the clipboard
- Copy To Clipboard -> Current Parent-Setname copies the currently selected parent -Setname (if available) to the clipboard

- Add Description To Miss/Have lists Adds the descriptionstring of the listed when creating have/miss lists. Otherwise you only get the setname.
- Save -> Missing List... does a quick scan for missing sets and saves a short list of setnames.
- Save -> Mising List incl. URL&Extension... does the same as Save->Missing List but adds the url and extension.
- Save -> Log-File... saves a logfile (all the reported messages)
- Save->Fix-DatFile This option gives you several options to create fixdatfiles. Fix-DatFile (All Listed Set Issues) Creates a datfile from the currently listed missing files (and files with a wrong size or checksum). The created datfile can ONLY be used with the rebuilder to generate these missing sets. For example you and a friend simply share this missing dat and so one can create the missing files from the other one. If the current scanresults window doesn't include anything for a fixdat, you won't see a filenamedialog and nothing will be saved. Fix-DatFile (incomplete sets only) does the same...but only includes incomplete sets (not fully missing ones). Fix-DatFile (completely missing sets only) and Fix-DatFile (currently selected set only) well...guess what ;) You can also enable the option Autoprompt For Fix-DatFile After (Fast)Scan. In this case the fixdatfile is automatically saved to clrmamepro's fixdatfolder. Autodelete Fixdat (If Empty) deletes a previous auto-fixdat if the current scan lists nothing to fix.

- If you want to see all items and child-items of the scan results window, you can use the 'View->Expand All Items' switch.
- To prevent the treeview from scrolling (e.g. when a new item is added) you can disable the 'View->Auto Scroll' option.
- The scan-results window stays in the front of any window if View->Stay On Top is enabled.
- With View->Show checksum with leading "0x" you can toggle the display of CRC32s (with out without leading 0x)
- With View->Set Clone Color you can specify the textcolor of listed clone-file-messages. You have to do a scan/fastscan again before the changes are visible.
- With View->Set 'nodump' ROMs Color you can specify the textcolor of listed bad dumps-messages. You have to do a scan/fastscan again before the changes are visible.
- With 'View->Show All Missing Files' you can show/hide completely missing sets with that option. You have to rescan before you see a difference.
- View->Hide Scanner Window While Scanning: The Scanner window won't appear while a scanning. You'll only see the progress- and the scan-results window.
- View->Keep Scanner Output: The Scanner remebers all scan-results. Even after a clrmamepro restart.

- WWW open->Open '<setname><extension>' At <url> -> Here you can send the current setname to a specified url. clrmamepro uses urls.ini (urls01.ini...urls10.ini) for the listed urls.
- WWW open->Set URL-> Here you set the URL which should be added to the filename.
- WWW open->To Clipboard-> url + set-name + extension is copied to the clipboard. Nice for download managers which monitor the clipboard for urls.

- With Drag & Drop->Show Drag'n Drop Warning you can enable/disable the warningbox when dropping files in the scanresultswindow.
- With Drag & Drop->Rebuilder->Show Statistics you can show/hide the rebuilder statistics.
- With Drag & Drop->Rebuilder -> Recompress you can enable/disable the belonging Rebuilder option.
- With Drag & Drop->Rebuilder -> Remove Matched Source-Files you can enable/disable the belonging Rebuilder option.
- With Drag & Drop->Rebuilder -> Scan Subfolders you can enable/disable the belonging Rebuilder option.
- With Drag & Drop->Rebuilder -> Destination you can chose which destinationpath you want. You can use systemdefaultpaths or you can set a new one.
- With Drag & Drop ->Fastscan After Drag'n Drop, you can toggle the option to do an automatic fastscan after dropping files or not.

- Delete -> Current Set removes the selected set from any rom/samplepath. The file will be moved to the backupfodler if backup is enabled.
- Delete -> All Listed Incomplete Sets removes all sets which have missing files/samples from any rom/samplepath. The file will be moved to the backupfodler if backup is enabled. It also removes sets with bad crc32 files.
- Delete -> All Listed [not fixed] Sets removes all sets which are listed with [not fixed]. This doesn't include [not fixed] wrong named sets. You can use the scanner advanced option for that.
- Move -> Current Set moves the selected set from any rom/samplepath. The file will be moved to a selectable folder
- Move -> All Listed Incomplete Sets moves all sets which have missing files/samples from any rom/samplepath. The file will be moved to a selectable folder. It also removes sets with bad crc32 files.
- Move -> All Listed [not fixed] Sets moves all sets which are listed with [not fixed]. This doesn't include [not fixed] wrong named sets. You can use the scanner advanced option for that.

New since 3.91b:

Export Set List options: These options replace several options which you can still see in the above screenshot. Generally the listed items in Export Format are loaded at startup by reading the file "setformat.xml". You select one entry and got ToFile and ToClipboard options to export the current sets with the chosen format. If you want to avoid overwriting of setformat.xml when installing an update, you can use setformat01.xml to setformat10.xml.

Setformat.xml:

It's a small xml file which got Format elements defining the export format. The attributes are:

- name - an identifier which is also displayed in the menu
- pre - a pre-string which is attached before all set-strings
- post - a post-string which is attached after all set-strings
- separator - a string which is put after each set-string but not behind the last one.
- string - the important info. This string is used for each set. You can also use variables in here
  - %y - year
  - %m - manufacturer
  - %s - source file
  - %d - description
  - %f - set name
  - %c - parent rom set name
  - %C - parent sample set name
  - %b - bios set name
  - %A - first character of description
  - %a - first character of set name
  - %Z - "0-9" in case of first description character is a number, otherwise description
  - %z - "0-9" in case of first set name character is a number, otherwise set name
  - %U - currently selected URL (Popupmenu -> WWW Open -> Set URL) from urls.ini file
  - %u - currently selected URL Extension (Popupmenu -> WWW Open -> Set URL) from urls.ini fileSo you got: prestring + string_1 + separator + string_2 + separator + .... + separator + last string - poststring

Example: A simple set output where the single sets are listed (line by line) by their set name is: <Format name="Sets" pre="" post="" separator="&#xd;&#xa;" string="%f"/> That's no pre and poststring, separator is a \n\r and the string is simply the placeholder for set names.