Cartlist32 : The GUI

Author's Note

Thanks for trying out Cartlist32.  I hope you find it useful in your ROM-image collecting/trading endeavors.  If you're already familiar with the old 16bit, command-line version of Cartlist, then you'll have a pretty good grasp on what Cartlist can do.  To those of you who were very much in favor of the command-line interface : "Sorry".  :)  Personally, I much prefer a CLI over a GUI.  In this case, however, a GUI simplified things tremendously and facilitated user navigation/command control.  There have been requests for Win32/Linux command-line versions of Cartlist and (time-permitting) I'll address the issue.

Overview

At its most rudimentary level, Cartlist32 is a database system.  Although you can use it to catalog *any* file, Cartlist32 has console-specific features that facilitate the management of your ROM image collection.  You can quickly and easily generate lists of your games, sort them, find duplicates in them, compare them to other lists to find out what you don't have, and much more.  

Installation

To install Cartlist32, simply uncompress the files in the archive to a directory on your hard drive.  There will be some DLLs that you can either leave in the same directory as you put cartlist.exe or you can place them in your windows system directory.  This directory is (usually) "\WINDOWS\SYSTEM" on Win95/98 machines and "\WINNT\SYSTEM32" on WinNT machines.  If you are placing the DLLs in your system directory, make sure you are not overwriting a newer version of the DLL.  To run the program, double-click on the cartlist.exe file.  

------------------------------------------------------------------------

Configurations/Settings

When you first start up Cartlist32, you will be presented with an empty document.  It is advised that you set up Cartlist32's configuration before adding any files to the database.  "Configure" is located under the "Settings" menu option on the main screen.  

Configuration - General Tab

There are two options on this property page: 

Clicking on Column Header Performs Sort -  This will perform a sort on the database when a column header is clicked.

Always on Top - Will make the Cartlist32 window be on top of all your other windows at all times.  (Unless you have other windows that are marked as "always on top".)  

Configuration - Insert Tab

Recurse Directories - When this is enabled, cartlist will look for files in any directory you specify and also in any other subdirectory in them.

Generate Checksums - Generate a unique CRC code for each file.  This CRC code is used for database comparisons, database naming, finding duplicates, etc.  It's a very good idea to leave it on for everything because it will make your trading/listing endeavors much more accurate.  It takes a little while longer to process each file, but it's worth it in the long run.

Ignore all unrecognized files - When this option is checked, Cartlist32 will not add any file to the database that it cannot identify.  File types that are currently identifiable are:

	SNES (SWC, SMC, MGD, UFO, FIG, GD3) (and all split file formats)
      SGEN (MGD, BIN, SMD) (and all split file formats)
      Gameboy - (With or without a 512 byte header)
      N64  (V64, Z64)
	Lynx (if it has a header)
	PC-Engine (if it has a header)
	IPS files
	NES (iNES, dNES)

The detection mechanism for SNES and Genesis are not 100% because there are numerous images that do not follow the standard format for these image types.  Some images might also be corrupt or dumped improperly which sometimes results in their not being identified.  For this reason, it's a good idea to leave this option unchecked and explicitly select which files to include or exclude via the filter mechanism (see "Exclude/Include Filter" below.)  

Select all additions - When this option is checked, any new files that are added to the database are automatically selected.  This is useful for when you want to perform certain actions upon only the most recently added rows in a database.

Add only new files - When this option is checked, Cartlist32 will only add files that do not already exist in the current database.  For example, let's say you read in an entire directory into a database.  Then you copied some more files into that directory.  If you were to read that directory again into the same database and you have the "Add only new files" option checked, only the files you recently copied to the directory will be added to the database.

Auto-Extract archive files - Cartlist32 can recognize and extract files from the following archive types : ZIP, LZH, ARJ, RAR, TAR, TGZ, TZ, GZ, and Z.  When this option is checked, Cartlist32 will examine every file in any of the aforementioned archives.  If you check this option, you need to specify a "Temp Dir".  

Temp dir - The temporary directory is used by Cartlist32 as a place into which the archive files can be expanded.  After the files in the archive have been processed, they are deleted from the temporary directory.  

Exclude/Include Filter - These filters allow you to explicitly include or exclude certain files by way of wildcards.  Separate each file filter by a comma and *no* spaces unless you want them included in the filter.  

Examples:
	Include Filter - *.smc,*.swc,*.1,sf*a.078,*.058,*.fig,*.gb
      Exclude Filter - *.2,*.3,*.4,*b.078,*c.078,*d.078

Show this dialog before each insert - If this option is checked, then whenever you drop any files into the current database you will be presented with the current dialog box and all of its options.

Configuration - Reporting Tab

This property page assists the user in maintaining groups of reporting scripts.  For information on how to create a report script, see the section entitled "Reporting".  

Clicking on the Help button will bring up the list of valid commands that can be used in a report script along with the column variable names.  

Clicking on the Examples button will show you some examples of how to use these commands and variables in a report script. 

To add a new report script, first type in the script in the big edit box in the middle of the screen.  Then enter the name you wish to give this report into the combo box directly below the big edit box.  Then click on the "Add" button to save your script under the name you gave.  

If you later want to delete that script, you can select the name you assigned it from the combo box and then click on "Delete".  

If you want to change the report script, select its name from the combo box, edit the report script in the big combo box, and the click on "Update".  

To assign the script you created to be your default report (which will then be the output format for any Database/Report command you issue), first select the name of the report script you wish to use from the combo box.  Then click on the "Report" button.  You should see the name of the report script appear in the "Report" field.

To assign the script you created to be your default clipboard report (which will then be the output format for any "copy to the clipboard" command you issue), first select the name of the report script you wish to use from the combo box.  Then click on the "Clipboard" button.  You should see the name of the report script appear in the "Clipboard" field.

----------------------------------------------------------------------

Adding Files to Cartlist32

Once you have configured Cartlist32 to your liking, you can begin adding files to the database.  To do this, first open up either Explorer or File Manager.  Simply select the files you wish to read in Explorer or File Manager, drag them over to the Cartlist32 window, and drop them someplace on the big, empty, part of the window (or on the grid if you already have files added.)  If you have configured Cartlist32 to display an insertion dialog before adding any files, you will be presented with it at this point.  Make any changes you like and press OK to begin the addition process.  When Cartlist32 is adding files, it will display a little window to inform you of its progress.  This window will display the name of the file it is currently processing.  If Cartlist32 hangs during this procedure, it is most likely due to an error on the media you are trying to read (CDROM, Hard Drive, Zip/Jazz cartridge, etc.)  

If Cartlist32 is processing any archive files during the addition process, it will look for certain files to use in populating the "Comments" column.  If the archive file being processed is called (for example) "GAMEROM.ZIP", then Cartlist32 will look for the following files in this order:

FILE_ID.DIZ
GAMEROM.NFO
GAMEROM.TXT
GAMEROM.DOC
*.NFO  (the first .NFO file it finds in the archive)

If at any point Cartlist32 finds one of the above files, it will copy the first 767 bytes of the file into the Comments column for every file it adds from the archive into the database.

-----------------------------------------------------------------------

Image Checksums and CRC codes

If you have "Generate Checksums" enabled then Cartlist32 will generate a CRC value for every file it adds to the database.  If the file happens to be a recognized SNES, Genesis, Gameboy, or Nintendo 64 file, it will calculate the checksum value of the image to see if it is valid.

The CRC value that is generated is specific to Cartlist32.  It uses an algorithm that generates a 32-bit value for each file.  This value is used as a unique identifier for each row/file in a Cartlist32 database.  It is used for things like finding duplicates, comparing databases, assigning names to unnamed images, etc.  

When generating a CRC value for a game image, however, Cartlist32 uses intelligent processing to ensure that even if some information has been altered in a file, it will still yield the same CRC result.  Cartlist32 ignores headers and the cart information sections of game image files no matter what format they're in.  This means (for example) that a SNES SMC image with a 512 byte header and an internal name of "I WAS HERE" will yield the same CRC value as the same SNES image in split MGD format without a header and with an internal name of "CLAYFIGHTERS".  It does this for SNES, Genesis, Gameboy, and Nintendo 64.  In addition, Cartlist32 makes provisions in ignoring as much variable information as possible when looking at other game image files that may contain headers, etc.  This is to ensure that when it comes time to use the CRC code to match it up against other files, it will produce much more accurate results.  

Additionally, some game image formats (SNES, SGEN, GB, and N64) make use of an internal checksum to ensure that the image is uncorrupted.  Cartlist32 will calculate the checksums for these game images so they can be checked against the internal checksum to see if you have a "clean" version of a game.  Cartlist32 is the *only* program (to date) that will correctly calculate the checksum for *any* format and *any* size of a SNES, SGEN, GB, or N64 file.  

-----------------------------------------------------------------------

Interpreting the Results

Different game formats yield different information.  This section should help you in making sense of the information in the Cartlist32 grid.

Super Nintendo

Mbit - lists the size (in megabits) of the cart image.  The first number is the number that is located internally in the SNES cart image.  The second number is the actual size of the image calculated by the filesizes.

Extra Info
First value is the format the file is in:
	SWC - Super Wild Card
	FIG - Pro Fighter
	GD3 - Game Doctor
	MGD - Multi Game Doctor/Hunter
	UFO - Super UFO

Next value is LoROM/HiROM - specifies the location of the game information in the file

Next value is SlowROM/FastROM - indicates whether the image is a "Slow" or "Fast" image

Next values is 1.??? - Indicates the version number of the game image

Next value is Int/NonInt - Indicates whether the image file is interleaved or not.

Sega Genesis 

Game Name/Alt Game Name - Sega Genesis images have 2 game names in them.  One is usually the English name and the other is the Japanese name.

Country - Valid country codes are:
	1 - Europe
	4 - Europe
	8 - Europe
	A - EurAsia
	B - Brazil
	C - Czechoslovakia
	E - Europe
	F - France
	J - Japan
	U - USA

Extra Info
First value is the image format :
	MGD - Multi Game Doctor
	SMD - Super Magic Drive
	BIN - Binary

Next value is the date the image was released
Next value is the game identification
Next value is the different input types
	A = Analog controller
	J = 3 Button Gamepad
	4 = Team Player
	6 = 6 Button Gamepad
	L = Activator
	M = Mega Mouse
	G = Light Gun
	T = Multitap adapter
	K = Keyboard

Gameboy

Extra Info 
First value indicates the presence of a Battery
Next value indicates whether image is SuperGameboy compatible
Next value indicates the presence of a header
Last value is the version number

Nintendo 64

Extra Info
First value is unique cart ID
Next value indicates presence of Rumble pak or Controller pak

---------------------------------------------------------------------

Selecting Rows

There are a number of options available from the Select menu option:

Select All - Selects all of the rows in the current database

Unselect All - Unselects all of the rows in the current database

Invert Selection - Any row that is selected becomes unselected and vice-versa

Needed Images - Selects all rows without filename information.  If you have a listing of a game that doesn't have a filename attached to it, then it means it is a game that exists but you don't have it yet.

Unique to List 1 - Only useful during a comparison.  Selects all the rows that belong to list 1 but do not exist in list 2.

Unique to List 2 - Only useful during a comparison.  Selects all the rows that belong to list 2 but do not exist in list 1.

Filters Dialog - Brings up a custom selection dialog box that allows you to select rows on the criteria you specify.

Options for the Selection Filters dialog box

You can specify up to 5 different criteria at any one time using the selection filter dialog box.  First, choose the column you wish to examine under the "Column" heading.  Then choose the type of condition you want to test for under the "Equality" heading.  Then enter the value you wish to use under the "String" heading.  If you also want to match any of the rows whose column value is blank for the column you specified, check the "Match Blank" checkbox.  For example, if you wanted to select every row that had a filename like *.2 you would make the following specifications:

Column   - Filename
Equality - Ends with
String   - .2

In this example, if you wanted to match all of the rows whose filename was also blank, check on the "Match Blank" checkbox.

Remove currently selected items before this select - If any rows are already selected in the database, then checking this box will unselect them first before any new selections are made.

Select all items with bad checksums - This will examine the last 4 characters of the "Comp Checksum" and "Cart Checksum" fields.  If they are not equal (and Cart Checksum is not 0x00000000) then the row will be selected.

Select items unique to your list - Same as "Unique to list 1"

Select items unique to other list - Same as "Unique to list 2"

Deselect all of the above criteria - This will unselect the criteria you specify instead of selecting it.

------------------------------------------------------------------------

Sorting

There are a number of different sort options available under the "Sort by" menu option:

Type,name - This will sort first by the Format and then by the Game name.

Name - This will sort by the game name

Manufacturer - This will sort by the manufacturer

Filename - This will sort by the filename

Custom - This will bring up a custom sort dialog where you can select what fields upon which you wish to sort.  Specify up to 4 columns (sort keys) and choose any of the following options:

Use only alphabetic characters in sorting - Any garbage characters (including high ascii used in japanese game names) or punctuation, etc are ignored during the sort.

Case insensitive - "name" = "NAME"

Ignore leading whitespace - "    name" = "name"

Reverse order - Sorts from highest to lowest.

------------------------------------------------------------------------

How to Use the Database Grid
(Examining the Contents of your Database)

Use the cursor keys to move the focus box around the grid.  Use the PGUP, PGDN, HOME, and END keys as you would normally.  The mouse can be used to move the scrollbar position.  Please note that if the scrollbar position looks like it's all the way at the top or bottom, it might not actually be at the top or bottom of the file.  Try paging up or paging down to ensure that you're where you expect to be.  If you think there should be more files at the end, scroll down using the cursor keys or PGUP/PGDN.  

If you have selected a number of rows and wish to see them all at once, go to (V)iew/(S)elections Only from the main menu.  Most functions will be disabled while viewing selections only.  Return to the normal view to continue normal processing.

Double clicking on any row will bring up an update screen for that row.  For more information on updating, see the section on "Updating the Database".

Double clicking on any of the vertical grid lines will change the width of the column to fit the largest entry in that column.

You can resize columns by clicking the vertical grid line, holding the button down, and moving the line left or right.

If you right click on the grid then the following options will be presented for the column upon which you just clicked:

Hide column        - Removes the column from your view
Lock column        - Fixates the column on the left
Unlock column      - Unfixates the column
Unhide all columns - Makes all columns visible again
Unlock all columns - Unfixates all columns

You can change the grid font by clicking on the toolbar button that looks like a large, uppercase 'A'.

Clicking on a column heading will sort the grid by that column if you have specified that option in Se(t)ings/Configure.

You can autosize all the visible columns to fit on the screen at the same by selecting (V)iew/(A)utosize Columns from the main menu.

If you press an alphanumeric key, then Cartlist32 will check to see what column the focus box is in and will search that column for the key you just pressed.  This makes it easy to quickly navigate the database listing.  For example, let's say you had 1000 snes images sorted by game name and wanted to get to the 'R' section quickly.  Just click on one of the cells in the game name column, then press 'R' and you'll be at the beginning of the 'R's.  You can continually refine your search by typing in as much or as little of the name as you want.  For example, you could have continued typing in something like 'ROCKET' and you'll be at the game names that start with 'ROCKET'.

Another quick way to quickly move around the database is via the (D)atabase/(J)ump to a specific row option from the main menu.  This allows you to input the row number that you wish to see.

------------------------------------------------------------------------

Updating Information in the Database

There are two different ways to update data in the database.  The first way is single-row updating.  If you select one row and then select (D)atabase/Mass (U)pdate from the main menu, you will be presented with an update screen that has the values filled in for that one row.  Similarly, if you double click on any row, you'll be brought into a single-row updating screen with the information for that one row already filled in.  Any changes you make to this screen will just update the one row.  If you wish to make a field blank, you must click on the "Erase" box.  

The other way is multiple-row updating or mass updating.  If you select more than one row from the database and then select (D)atabase/Mass (U)pdate from the main menu, you will be presented with an update screen where all the fields are blank.  Any changes you make to this screen will update *all* of the rows you selected.  Leaving a field blank indicates no changes are desired.  However, you can force a field to be blank by checking the "Erase" box.  

For either type of updating (single or multi row) you can use reporting function/macros as field values.  For example, you could select 50 rows that have information in the "Alt Game Name" field but have the "Game name" field blank.  Perform a mass update on those rows and put %4% in the Game name field.  When you press OK, you'll see that the "Alt. Game Name" information gets copied into the "Game Name" field.  There are many ways to make use of this feature.  Perhaps you rom images don't have game names, but the "Comments" field contains the game name at a specific place for each row.  You could easily construct a reporting macro to fill in the "Game Name" from the information in the "Comments" field.  

-----------------------------------------------------------------------

Copying/Moving Rows From One Database To Another

To copy rows from one database to another, select the rows you wish to copy, and then select (D)atabase/(C)opy.  You will be prompted for the database into which you want to copy the files.  If you input a filename that doesn't exist, a new database file will be created that contains the rows you selected for copying.  After selecting the file, you will be presented with a couple of different options. 

"Yes" will make an exact copy of the data you've selected.  
"No" will copy just the game information and none of the file information.  The "Filename" and "Path/Archive" fields will be erased when they are copied into the destination database.  This is used to identify those images that you don't already have.  For example, let's say you get a Cartlist32 database file from a friend.  You've identified the images that your friend has and you don't and want to keep a record of it.  Copy those rows without copying the file information and you'll have a database of rows/files that you can later perform a (S)elect/(N)eeded images upon to see what you're still missing.  

Deleting From the Database

To delete rows from the database, simply select the rows to delete and perform a (D)atabase/(D)elete.

------------------------------------------------------------------------

Finding Duplicates

To find duplicates in your database, select (D)atabase/(F)ind Duplicates from the main menu.  You will be presented with three ways to search for duplicates.  

Search by CRC Checksum - this will identify those rows that have the same CRC value.  

Search by Filename/Size - this will identify those rows with the same file name and file size.

Search by Game Type/Name - this will identify those rows with the same Format and Game Name.

Remove Duplicates - checking this box will remove any duplicates that are found.  It is recommended that you look over the duplicates first before removing them.  When you select "Remove Duplicates" Cartlist32 will merge all of the information from the duplicated rows into a single row and delete the remaining duplicates.  For instance if you had the following 2 rows:

FILE123.DAT   Super Nintendo                            
FILE123.DAT                     Final Fantasy 3             USA  Square

Finding/removing duplicates based on the filename will result in one row being left:

FILE123.DAT   Super Nintendo    Final Fantasy 3             USA  Square

This is to help ensure that no information is destroyed in the removal process.

-----------------------------------------------------------------------

Comparing Databases

To compare two databases, first load one of the databases to compare.  Then select (D)atabase/C(o)mpare database files from the main menu.  You will be prompted for the second database file.  After you enter the second database file, you will be presented with 3 ways to compare the databases.  

Compare by CRC Checksum    - Compares by the CRC checksum
Compare by Game name/Type - Compares by the Format/Game name
Compare by Filename/Size  - Compares by the file name and file size

Please note that when you perform a compare, any changes you made to the database that was loaded will be lost, so save your work first.  When the compare finishes, you'll be presented with a list of rows of two different colors.  One color represents those rows that are unique to the first database.  The other color represents those rows that are unique to the second database.  You can use the (S)elect/Unique to list (1) or (2) from the main menu to see which is which.  These comparison results will *not* be saved, however.  If you sort the list, the comparison flags will be reset.  It is advised that you move one of the comparison groups to another database before doing any changes to the content or order of the comparison.  

-----------------------------------------------------------------------

Assigning Names to Unnamed Images

There are plenty of ROM image formats that do not contain the game name embedded in the image itself.  When this is the case, there is (obviously) no way for Cartlist32 to obtain a game name from the image.  The solution to the problem is naming databases.  Naming databases are simply Cartlist32 databases with Game Name and Format information that has been manually entered.  Game Name databases exist for a number of different platforms include NES, TG16, Lynx, Gamegear, Sega Master System, Atari 2600, Atari 5200, Amstrad, Colecovision, IPS, Jaguar, and X68000.  Using them is simple.  Let's say you've already loaded in your collection of NES ROM images without game names.  Select (D)atabase/(S)earch-Assign name to unnamed images and you will be presented with a File Dialog asking you to select the Cartlist32 naming database file.  In this case, you would select NES.CDB.  Your images should now have their proper names assigned to them.  You must ensure that you loaded in your NES images with the "Generate Checksum" option set.  (See Configuration/Settings for more information on this option.)  If you don't have a valid CRC code for your files, then the naming database will not work.

You can generate your own naming databases as well.  Any Cartlist32 database can be used as a naming database as long as it has valid CRC codes inside.  For example, if you've been diligently maintaining a Cartlist32 database of Commodore 64 disk images and have been assigning names to them, then anyone can use your database as a naming database.  They would simply need to follow the procedure mentioned above for naming their C64 disk images and use your Commodore 64 Cartlist32 database as the naming database.

-----------------------------------------------------------------------

Importing Files into the Database

You can use this feature to load data directly into Cartlist32 from a flat file.  The only requirement is that the flat file has to have fixed width columns of data.  For example:

FIELD1      Field 2     Fie3   FFF
FIELD1123   Field 2333  Fie31  FFF123
FIELD       Field       Fie    FFF
FIELD1      Field 2     Fie3   FFF

Note how all the fields start on the same column position for every line of text.  If you have a file like this you can import it into a Cartlist32 database file.  For example, let's say you've been keeping a list of your NES ROM images in a text file with the format:

FILE1.NES     Game name 1
FILE2.NES     Game name 1
FILE3.NES     Game name 1
.
.
.
FILE9999.NES  Game name 9999

You would select (F)ile/(I)mport and then select the file you want to import.  You'll then be presented with a dialog where you can specify the column position, length, and line for each row of data.  In this case, you would fill in:

Filename :  Column = 1  ; Length = 12  ; Line = 1 
Gamename :  Column = 15 ; Length = 999 ; Line = 1

The column field tells Cartlist32 to start reading from that column position.  The length field indicates how long the field value is.  (The 999 on the gamename length is simply a very large number to read to the end of the line.)  The line field indicates upon what line the field resides.  This allows you to read in data that uses more than one line per row of data.  An example of this is a 2-line cartlist listing:

ALADDIN.GB      262144 06-04-97  [GB  /16/USA] [ALADDIN                ]       
[Nintendo            ] [ROM/MB1/   /   /   ]   [  Ca                   ]
ASG-ALAD.GB     262656 14-03-95  [GB  /16/USA] [ALADDIN                ]
[Nintendo            ] [ROM/MB1/   /   /HDR]   [  Ca                   ]

Notice how each game takes up 2 lines of text.  If we were importing this file, we would specify the following for the manufacturer field:

Manufacturer : Column = 2 ; Length = 20 ; Line = 2

If you are going to be using a file format for importing over and over again, you can save your settings by typing in a name into the combobox below the import settings and pressing the "Add" button.  Now any time you wish to reuse these settings you can select it from the combobox.  The "Update" and "Delete" buttons respectively update and delete the combobox entries.  

Match filenames in current database - You can use this option as a way to name your ROM images from a text file you're been maintaining.  Let's say you've just loaded NESROM1.NES, NESROM2.NES, and NESROM3.NES into a Cartlist32 database.  They don't have any game names associated with them, but you've maintained a file that holds their names that looks like:

NESROM1.NES   A Boy and His Blob
NESROM2.NES   Dragon Warrior 2
NESROM3.NES   Zelda

You could import this file :

Filename :  Column = 1  ; Length = 12  ; Line = 1 
Gamename :  Column = 15 ; Length = 999 ; Line = 1

and check the "Match filenames in current database" box.  Now when the file is imported it will find the filenames you loaded and assign the appropriate game name to them from your import file. 

Use long filename from Path/Archive - works the same way as "Match filenames in current database" but it uses the long filename from the Path/Archive field instead.

------------------------------------------------------------------------

Reporting

Cartlist32 has an extremely robust reporting feature that allows you to dump the contents of your database files into text files or to copy rows of your database into the clipboard so you can paste them into another application.  Once you have specified a report script in Se(t)tings/(C)onfigure you can select the rows you wish to dump to a flat file, and then select (D)atabase/(R)eport.  It will then ask you for the name of the file into which you want to write the output.  

To copy information to the clipboard, you need to specify the clipboard script you wish to use, select the rows you wish to copy, and then press Control-C or (E)dit/(C)opy.  Now you can paste it as normal text into the application you wish.

Writing Reporting Scripts

For the examples below, we'll be using the following truncated data rows as examples:

Filename      Format        Game Name              Path/Archive
---------------------------------------------------------------------
dw2.nes       NES           Dragon Warrior 2       E:\NES\DW2.NES
gunhead.pce   PCE/TG16      Gunhead                E:\PCE\GUNHEAD.PCE

The reporting feature of Cartlist32 is basically a macro-expansion processor.  Each column is assigned a value as described below:

Filename        - %1%
Format          - %2%
Game Name       - %3%
AltGameName     - %4%
Mbit            - %5%
Country         - %6%
Manufacturer    - %7%
Chip            - %8%
SRAM            - %9%
CRC             - %10%
ChecksumCart    - %11%
ChecksumComp    - %12%
ExtraInfo       - %13%
Size            - %14%
PathArchive     - %15%
Comments        - %16%

A simple script that would display the filename would be:

%1%

which would result in an output of:

dw2.nes
gunhead.pce

A simple script to display the filename with the game name in square brackets would be

%1% [%3%]

which would result in an output of:

dw2.nes [Dragon Warrior 2]
gunhead.pce [Gunhead]

Basically, anything you type into a script that is not a column variable listed above will be written back out exactly the same.  A script that looks like:

ABCD%1%EFGH

would result in an output of:

ABCDdw2.nesEFGH
ABCDgunhead.pceEFGH

In addition to this, however, there are a number of functions that you can apply to each column variable to assist you in formatting your text.  The functions are applied to the variable name inside the %'s.  For example, there is a function called "upper" which converts all the characters in the column specified by the column variable to upper case.  You would write it like this:

%1.upper%

which would produce output of:

DW2.NES
GUNHEAD.NES

-----------------------------------------------------------------------

Reporting Functions

left#(start,len)
This takes the substring of the column starting at the "start" character position from the left and going for a length of "len" characters.  For example:

%1.left#(2,5)%

would produce the following output:

w2.ne
unhed

"len" can also be negative - which means to copy characters backwards:

%1.left#(3,-3)%

means to start at the 3rd character from the left and read for 3 characters backwards.  It would produce the following output:

dw2
gun

right#(start,len)
This takes the substring of the column starting at the "start" character position from the right and going for a length of "len" characters.  For example:

%1.right#(4,3)%

would produce the following output:

.ne
.ne

"len" can also be negative - which means to copy characters backwards:

%1.right#(1,-3)%

means to start at the 1st character from the right and read for 3 characters backwards.  It would produce the following output:

nes
nes

left(str,len)
This is similar to left#, but instead of specifying a numerical character position to start at, you specify a character or string to search for in the column and start at that point.  For example:

%1.left(.,4)%

means to search the column for the first "." character from the left and read 4 characters from that point.  The output would be:

.nes
.nes

Len can be negative here as well.  

%1.left(.,-3)%

means to search the column for the first "." character from the left and read 3 characters backwards.  The output would be:

w2.
ad.

You can also specify a string to search for:

%1.left(nes,3)%

means to search for the first occurrence of the string "nes" and read 3 characters from that point.  The output would be

nes
nes

Again, you can specify a negative length.  

%1.left(nes,-3)%

means to search for the first occurrence of the string "nes" and read 3 characters from that point backwards.  The output would be

2.n
d.n

right(ch,len)
This is similar to right#, but instead of specifying a numerical character position to start at, you specify a character to search for in the column and start at that point.  For example:

%1.right(n,3)%

means to search the column for the first "n" character from the right and read 3 characters from that point.  The output would be:

nes
nes

Len can be negative here as well.  

%1.left(n,-3)%

means to search the column for the "n" character and read 3 characters backwards.  The output would be:

2.n
d.n

lpad(ch,len)
This function will left pad the column with "ch" up to length "len".  For example

%1.lpad( ,15)

Means to left pad the filename with " " so that it is 15 characters in length.  The output would be:

        dw2.nes
    gunhead.nes

%1.lpad(-,15)

Means to left pad the filename with "-" so that it is 15 characters in length.  The output would be:

--------dw2.nes
----gunhead.nes

rpad(ch,len)
This function will right pad the column with "ch" up to length "len".  For example

%1.rpad( ,15)

Means to right pad the filename with " " so that it is 15 characters in length.  The output would be:

dw2.nes        
gunhead.nes    

%1.rpad(-,15)

Means to right pad the filename with "-" so that it is 15 characters in length.  The output would be:

dw2.nes--------
gunhead.nes----

upper
This function will convert the column value to upper case.

%1.upper%

results in

DW2.NES
GUNHEAD.NES

lower
This function will convert the column value to lower case.

%1.upper%

results in

dw2.nes
gunhead.nes

ltrim(chars)
This function will remove all of the characters in "chars" from the left of the column value.  For example

%1.ltrim(2dw)%

will results in

.nes
gunhead.nes

rtrim(chars)
This function will remove all of the characters in "chars" from the right of the column value.  For example

%1.rtrim(aends.)%

will results in

dw2
gunh

These functions can also be used in conjunction with one another.  The order of precedence is from left to right.  For example

%1.lpad(z,15).upper%

results in

ZZZZZZZZDW2.NES
ZZZZGUNHEAD.NES

however

%1.upper.lpad(z,15)%

results in

zzzzzzzzDW2.NES
zzzzGUNHEAD.NES

because the upper function is processed before the lpad function is processed.  

Here is an example of how to extract the filename from the Path/Archive field without the path information:

%15.right(\,99).right#(2,99)%

results in:

DW2.NES
GUNHEAD.NES

To get the path information without the filename:

%15.right(\,-99).right#(2,-99)%

results in:

E:\NES
E:\PCE

----------------------------------------------------------------------

Rereading Images

Occasionally Cartlist32 will misread a file as a different format or it will read the game information in the wrong location.  When that happens, you can use the rereading functions to correct the situation.  You can reread as the following game types:

SNES - LoRom 
SNES - HiRom
SGEN - BIN
SGEN - SMD Forward
SGEN - SMD Reverse
SGEN - MGD Forward
SGEN - MGD Reverse
Gameboy
Nintendo 64 - V64
Nintendo 64 - Z64
NES
Nothing - interprets the file as a normal file.

---------------------------------------------------------------------

Cart Utils

There are several utilities that Cartlist32 will perform upon various console images.

IPS Patch

This will apply an IPS patch file to the file of your choice.

Clean SNES Image

This will attempt to remove all PAL, SRAM, and FastROM patches/cracks applies to a SNES image in order to convert it back to its original form.

Remove header from GB image

This will remove the 512 byte header from some Gameboy images that prevents them from being run on some emulators.

NES Header Cleaner

This will clean up the iNES header of NES files that prevents them from being run on some emulators.

---------------------------------------------------------------------

Miscellaneous Notes 

When copying/moving rows into another database, do not have that database already open in Cartlist32.  Close it first, then perform the copy/move operation.

In general, when you're making an external change to any database file, make sure it is not currently open in Cartlist32.

Do *not* import the old cartlist CRC values for SNES or SGEN.  The CRC algorithm had to change for these two formats.  You really should reload all of your SNES/SGEN files into Cartlist32.  All of the other CRC routines for the other platforms should be the same, but it's probably best to just reload everything into Cartlist32 if you already have old Cartlist files.  

----------------------------------------------------------------------

Troubleshooting

Cartlist32 seems to bomb when unarchiving a file
I am aware of a problem when un-taring or un-gzipping some files.  I'm working on a solution.  

Cartlist32 freezes when it loads in a CDB file
Try deleting the corresponding .GRD file and reloading it.

When I select rows with my mouse, not all of them get selected.
You're moving the mouse too fast during selection.  Slow down a little.