FMGUIDE.TXT Chess FileMate for Windows, 4.0 Copyright (c) 1994-1996 William H. Dyche Contents: 1: The MDI User Interface 1.1: Menu handling 1.2: MDI Child Windows 2: Keyboard Interface 2.1: File windows 2.2: Board and Board Data windows 2.3: Text editors 3: File Processing 3.1: Data Safety 3.2: Filename extensions 3.3: Open processing 3.4: Save processing 3.5: Restore processing 4: Component Descriptions 4.1: File Window 4.1.1: Create a New file ( New button, menu ) 4.1.2: Open... ( Open button, menu ) 4.1.3: Append to current file... ( menu ) 4.1.4: Save, SaveAs..., Restore ( Save button, menu items ) 4.1.5: MRU list ( MRU button, menu ) 4.1.6: Set Mouse-Click Actions...( button ) 4.1.7: Send game to board, editor( mouse click, keyboard ) 4.1.8: Make Backups ( menu ) 4.1.9: Import to a new file ( menu ) 4.1.10: Import to current file ( menu ) 4.1.11: Cancel I/O ( menu ) 4.1.12: Games List Window 4.1.12.1: Copy games list ( menu ) 4.1.12.2: Print games list... ( menu ) 4.1.12.3: Select Font... ( menu ) 4.1.12.4: Cut ( Cut button, menu ) 4.1.12.5: Before, After ( Before and After buttons, menu items ) 4.1.12.6: Undo ( Undo button ) 4.2: Board Windows 4.2.1: Entering moves ( mouse-drag pieces on board, text editor ) 4.2.1.1: Special moves ( mouse-drag, etc. ) 4.2.1.2: Variations ( mouse-drag, etc. ) 4.2.1.3: Deletions ( Undo button, BkSp and Delete keys, menu ) 4.2.2: Rotate the board ( Rotate button, right mouse-click, menu ) 4.2.3: Setup-Position Dialog... ( Setup button, menu ) 4.3: Board Data Window 4.3.1: New game ( New button, menu ) 4.3.2: Save game to file ( Save button, menu ) 4.3.3: Add game to file ( Add button, menu ) 4.3.4: Post game to Clipboard... ( Post button, menu ) 4.3.5: Editing game data ( mouse button click... ) 4.3.6: Set text formatting options dialog... ( button... ) 4.3.7: List moves horizontally or vertically ( arrow buttons ) 4.3.8: Erep (Error Reporter) dialog... ( automatic... ) 4.3.9: Board Customizer dialog...( button... ) 4.2.10: Select Font... ( menu ) 4.3.11: Notation ( menu, customizer dialog ) 4.3.12: Language ( menu, customizer dialog ) 4.3.13: Opening names displayed in the status area ( automatic ) 1: The MDI User Interface MDI (Multiple Document Interface) is a standard way of designing larger applications which use a number of child windows within the program's main window. WinCIM and MS Excel are a couple of well-know MDI applications. In general, multiple instances of some or all MDI child windows can be created. Each can be resized, moved around, minimized to an icon, and maximized. 1.1: Menu handling All MDI child windows share the main menu area. When a child is activated, the menu for that child is displayed. A small default menu is displayed when no child windows are active. This menu-switching may take some getting used to, but it's standard procedure in MDI. The File submenu always has items for creating new MDI child windows. The Window submenu always has a list of currently existing MDI child windows. TIP: If you loose a child window because of overlapping, select it in the child window list to make it visible. 1.2: MDI Child Windows FileMate has five different MDI child windows... - File - The basic functions are reading and writing files containing chess games, and listing file contents. Double-clicking an entry in the games list will send the game data to the board which was last active. Multiple File windows can be created, each having a different id-number, e.g. File:2. - Board - Each Board window can contain data for a single game. The board can import and export games from and to other windows. The size of each board window can be changed to one of three sizes. Unlike the other windows, board windows must be resized by using its resize buttons, or by selecting menu items - Options / Larger(or Smaller) Board. - Board Data - This window is used to access a board's game data. There is only one Board Data window and, when multiple boards are used, it is always logically connected to the board which was last active. - Text Editor - This editor was designed to be very similar to NotePad. In addition, it has two menu items for copying text data to and from the last active board window. - Clipboard Viewer - The integrated Clipboard viewer can be used to view text and bitmaps, and to clear the Clipboard. Screen layout: Feel free to move and resize the child windows. It is not necessary to close child windows before exiting the program. In fact, when you terminate the program, it will record sizes and locations of the child windows in the .ini file. If you ever want to go back to the default layout, delete all the lines in the WINDOW section of filemate.ini. Starting a second copy: Attempting to start a second copy of the program will activate the window of the current copy. Multiple copies may be supported in a future release. 2: Keyboard Interface Most menu items can be accessed by using the Alt key with the underlined character. Some standard accelerators which use the Ctrl key are also defined and shown in the menus. In addition, the following accelerators are defined... F1 - show the About dialog F6 - activate the next window F8 - show the Registration dialog Navigation and Control: The keyboard can be used with any of the child windows. Use F6 to select one of the windows to be the "active" window with the keyboard "focus". (F6 is commonly used for this purpose.) Within the active window, some or all of the standard navigation keys can be used. 2.1: File windows Home, End, Page Up, Page Down - scroll the games list Up- and Down-Arrow - Use these to select the next or previous entry in the list. Scroll to the page containing the entry you want, then use these arrow keys to get to the desired entry. Enter - play the currently selected game. Ctrl+N - new file Ctrl+O - open file Ctrl+S - save file 2.2: Board and Board Data windows Home, End - go to the start or end of the game Page Up, Page Down, Up and Down Arrow - go backward or forward 4 plays Left and Right Arrow - go backward or forward 1 play BackSpace - Undo the last play (board must be at last position) Delete - Delete the currently selected play and its descendents 2.3: Text editors F3 - find next F4 - find previous Ctrl+X - cut Ctrl+C - copy Ctrl+V - paste Ctrl+Z - undo Shift+Delete - cut Ctrl+Insert - copy Shift+Insert - paste Alt+BackSpace - undo 3: File Processing There are commands for editing, adding, deleting, and moving games in the current file. They will make the program behave as though the file has been immediately updated. But no changes are actually made to the file until you explicitly tell the program to save changes. Even then, the original file is renamed and kept as a backup (but you can turn off backup creation). Save changes to the current file by using the File window Save and SaveAs commands. The program will ask if you want to save changes when you close a file (if changes have been made, and it isn't marked read-only). A file is implicitly closed when you open another file (or New) and when you exit the program. 3.1: Data Safety In general, the program is designed to be forgiving of user mistakes at the expense of a little extra effort on the part of the user. So, for example, two save requests have to be made (save-to-file, and save-file-to-disk) to actually change a file. And then, you have another opportunity to recover from a mistake by restoring the file from its backup. Another example is that you have to make two delete requests to delete a series of moves in a game. The first request will only indicate which moves will be deleted if you make the second request. As a safety precaution, the current file will be marked as read-only if the Open-and-read operation does not complete, otherwise a save would result in the file ending up with only the data that was read. An Open may not complete because 1. Cancel I/O was selected, or 2. MAXGAMES was reached (200 for the shareware version, 14000 for the registered version), or 3. an I/O error or memory allocation error occurred. Warning about multiple concurrent updates... The program will not allow the same file to be opened in more than one File window. However, it is possible to have the same file opened in a File window and a Text Editor window at the same time. Be aware that, in general, making changes to the same file in two different windows (or two different programs) at the same time will result in data loss, because they are unaware of each other's changes. 3.2: Filename extensions It doesn't matter to the program what file names and extensions you use, with the following exceptions... - .cbf and .cbi are assumed to be valid ChessBase database files - If the extension begins with '_', the file is regarded as a backup file, and will be flagged as readonly. 3.3: Open processing When a file Open is requested, FileMate reads through the entire file to locate the games. A memory resident index is built to hold this information. The file is closed after it has been read through, and is then designated as "the current file". The current file is opened, read, and closed when games are selected in the gamelist. Append-to-Current-File (menu item) invokes the file open dialog. The file opened will be logically added on to the current file, and the program will behave as though it is a single disk file. FileMate can read and recognize the following: 1. Valid and near-valid PGN, NTR, and NIC formated games 2. An NTR game without the second header line. format code will be "NTR" 3. A game with no header (i.e. just the moves). format code will be "MOV" 4. games in .CBF files Any other contiguous block of text (i.e. without embedded blank lines) will be regarded as an unidentified block of text. The format code will be "UNK", meaning "unknown" format. 3.4: Save processing When a file Save is requested, FileMate creates a new file (extension .TMP) into which the current file and its updates are merged. After this is done, the current file is renamed with a '_' in the first character of the extension to indicate that it will serve as a backup file. (The previous backup is now gone.) The new .TMP file is then renamed to whatever extension the original file had, and it now serves as the "current file". A Save request will cause no actions if no changes have been made to the current file, or if the current file is marked as read-only. A SaveAs request will simply cause the creation of a new file with whatever name you specify. Verification will be requested for overwriting an existing file. ( But It will not accept a name with a '_' in the first character of the extension. Such names are reserved for backup files. ) SaveAs to the currently opened file will be handled as a Save. 3.5: Restore processing When a Restore is requested, the program will verify that a backup of the current file is available and then ask if you wish to proceed. The restore function will exchange the names of the files, i.e. the current file becomes the new backup, and the old backup will be opened and read. Note that no data is changed or deleted. You can effectively undo a restore by immediately doing another restore. 4: Component Descriptions 4.1: File Window The game-lister window is a custom child window designed to behave much like a standard listbox control. Each entry in the list represents a game (or a block of text) in the current file. Select an entry in the gamelist to copy the game to the editor. Double-click an entry to send the game to the active board. (Note: If you have multiple board windows and are not sure which one is the currently active board, just click the one you want to use.) 4.1.1: New file creation - closes the current file if there is one, and resets the interface. Games can be added to a file from a Board (via the Board Data window), or imported from the Clipboard. You will be prompted to use the SaveAs dialog when the new file is closed. 4.1.2: Open... - See the section above on "Open processing". 4.1.3: Append to current file... - allows you to open a file and add its games to the current file. The added games reside in memory until the file is saved or closed. 4.1.4: Save, SaveAs..., Restore... - See the sections above on "Save processing" and "Restore processing". 4.1.5: MRU list - holds up to eight names of the most recently opened files. Selecting an entry (in the menu, or double-clicking in the MRU window) will open the file. 4.1.6: Set Mouse-Click Actions dialog - When the dialog is opened, the "show move" ply setting defaults to that of the current board. 4.1.7: Send game to board, editor - Use the Set Mouse-Click Actions dialog to control how and when to send a game to the board and editor. 4.1.8: Make Backups - The default setting is automatic backup file creation whenever an existing file is Saved. You can turn this off if you wish. Backup file names will have a '_' in the first position of the extension. They are used by the File / Restore command. 4.1.9: Import to a new file (from Clipboard) - The current file, if any, will be closed. Then a collection of games will be read from the Clipboard in the same way that a file is read during an Open (except that the data will be temporarily stored in memory). 4.1.10: Import to current file (from Clipboard) - is similar to the "Append to current file..." mentioned in 4.1.3. 4.1.11: Cancel I/O - may be used to abort a file Open or Save operation. When an Open is canceled, the portion already read will be available for viewing; but as a safety precaution the file will be marked as read-only so that it can't be saved. (But SaveAs can be used.) The Save processing has been designed to allow it to be cancelled without loss of data to either the actual file or to the program's internal working information about the file. 4.1.12: Games List Window - is similar to a listbox control, and lists the games of a file. Each entry represents a game. Lists any number of games. Multiple selection and drag-and-drop are not currently supported. 4.1.12.1: Print games list... - causes the games list to be printed. 4.1.12.2: Copy games list - sends a copy of the games list to the Clipboard. For a large list, this may be time-consuming and use alot of memory. Tip: You may want to clear the Clipboard soon after copying alot of data to it, to free the memory being tied-up by the Clipboard. 4.1.12.3: Font Select... - The font selected for the games list will be remembered in the .ini file. Edit Controls: 4.1.12.4: Cut - serves two different purposes: deleting and moving games in the current file. To delete a game, select its entry in the games list, then select "Edit/Cut". The entry will be grayed to indicate the game is marked for deletion during the next file save. 4.1.12.5: Before, After - The game move operation uses the Windows cut&paste paradigm (but the Clipboard is not actually used). To move a game, select its list entry and select "Cut" as though you are marking it for deletion. Then select another entry in the gamelist to indicate the insertion point. Finally, select either "Before" or "After" to effect the move and redisplay the list. The program will understand you are moving, not deleting, the game. 4.1.12.6: Undo - is used to "un-delete" a game which has been marked for deletion. Just select a grayed entry, then select "Undo". Undo only works on deletions, not game changes, moves, or additions. These other file changes can effectively be undone by closing the file without doing a file save. 4.2: Board Windows 4.2.1: Entering moves Making a move on the board is simply a matter of dragging a piece to its destination. Illegal moves are rejected by the program. An alternate way of entering moves is to type them in a text editor window. When typing moves, you'll need to type move numbers and periods, and end the moves with a game result. Refer to fmdata.txt for more information on data requirements. 4.2.1.1: Special moves ( mouse-drag pieces on board ) A castle is performed simply by moving the king. The program will recognize attempts to castle, capture en-passant, and promote pawns. When a pawn reaches the first or eight rank (while mouseing-in moves), a dialog will pop-up for selecting a promotion piece. 4.2.1.2: Variations ( mouse-drag pieces on board ) The program will know to start a variation whenever you make a move different from the (next) one already recorded. You will see in the text display that variations are displayed enclosed in parenthesis according to PGN syntax rules. When the game is saved, variations are saved along with the main line. There are no limitations regarding variations per-se. The relevant limits are MAXGAMESIZE, and MAXPNODES = 400 plys (= 200 fullmoves) per game. 4.2.1.3: Deleting moves ( Undo button, Delete key, menu items ) Undo (button or BkSp key) will delete the last play. The button is enabled only when the last position of a line is showing on the board. Delete the Selected Play (menu and Delete key) - deletes the play selected in the game text, and deletes all of the play's successors including comments and variations. The first time you select this item, the program will only indicate the moves which will be deleted by displaying them in yellow. Make a second delete request to commit the deletion. Or else click anywhere in the moves list window to abort the delete. 4.2.2: Rotate the board ( Rotate button, right mouse-click, menu item ) You can rotate a board at any time. Only the board display is affected. 4.2.3: Setup-Position Dialog... ( Setup button, menu item ) Warning: Clicking the setup OK button will overwrite any game data associated with the board. The new data will appear in the Board Data window in the form of a FEN-notation partial game. - add a piece to the board: click a piece-button, the cursor will change shape, then click a board square to set the piece down. (This is not a mouse-drag operation.) Repeat this procedure for each piece you want to add. The piece color will always be white. Kings cannot be added or deleted. - change the color of a piece: right button click on the piece - delete a piece: drag it off the board, or else drag another piece on top of it. - set an ep target square: click the set-target button, then click a square. The target square is defined to be the empty square behind the pawn, i.e. the destination of the capturing pawn. Attempts to set an ep target are tested for consistency with the active-color setting. For example, if white-to-play, clicking any square on rank-6 will set a target... clicking any other square will turn off the ep target flag. - move piece: pieces on the board can be mouse-dragged anywhere - init... sets-up the initial game position - clear... removes all pieces except for the kings - active color... indicates whose turn it is to play. - fullmove number... is the move number for the next play (i.e. for the first ply of the partial game) - castle availability... indicates whether or not castling will be possible. Turning one of these flags off implies that a rook or king has moved. If the position has a rook or king not on its home square, the program will automatically set the appropriate flags off. The following situations will be allowed, but the program will display error messages and beep at you until you correct them... - pawn on rank 1 or 8 - bishops on same square color - too many pawns - too many pieces - to-play color has opposing king in check (including adjacent-kings) 4.3: Board Data Window There can be only one Board Data window (and one *should* always exist for correct program operation). This window is like a supplimentary controller and viewer for the Board windows. When multiple boards exist, you can logically connect the Data window to a particular Board by clicking (and thereby "activating") the Board window. Click on a "safe" spot such as an empty square or the buttons-area. The text display can be scrolled, and any play can be selected with the mouse. The play corresponding to the current board position is always hilighted. Moves not in the current variation are grayed. Moves in a pending deletion are shown in yellow. 4.3.1: New - erases all game data associated with the board. 4.3.2: Save - sends a copy of the board's data to the current (or new) file. The original game (not necessarily the currently selected game) is replaced in a Save operation. If the game is new, or the original can't be found, only the Add function will work. Game data exported by a board will be in PGN format with English standard algebraic notation, regardless of the notation and language settings in the menu. Comments, suffix-annotations, and variations will all be saved. 4.3.3: Add - adds the game to the end of the current file. The game is temporarily stored in memory until a Save-file-to-disk is done. 4.3.4: Post... displays a dialog which allows you to selectively copy data to the Clipboard. The default settings will output player names followed by the last three full-moves of the game. The Post dialog now has a checkbox called Board, for displaying a simple ASCII board diagram. The small edit control to the right of the checkbox is for changing the empty-square character... the default is the underline character '_'. Lower case letters indicate black pieces, uppercase are white pieces. The current board position will be displayed, so you must remember to have the last position of the game on the board, if that's what you want to output. The receiver may need to switch to a fixed-width font for viewing the diagram. Use Ctrl-T in WINCIM for a fixed-font. 4.3.5: Editing game data: You will notice that the Board Data window shows the entire text of the game, and different parts are color-coded to make it easier to read. The cursor turns to a hand when it is over something that can be selected. Plays can be selected with a single-click. Double-clicking a play, comment, or header field will invoke an edit dialog. This makes it unnecessary to edit the data in a regular text editor where there would be no error checking. Each play can have a comment and/or an annotation symbol. Also, a comment may precede the first move (double-click the blank line between the header and the movetext). The only limit on comment size is that the entire game cannot exceed MAXGAMESIZE. 4.3.6: Set text formatting options. Invokes a dialog for setting text formatting options such as margins and line breaks for comments and variations. 4.3.8: Erep (Error Reporter) dialog... - The dialog is displayed auto- matically when errors are found in a game being imported to a board. Selecting an error message will cause the offending line to be hilighted in the edit control. (In some cases, the error may actually be near the end of the previous line.) You can type corrections in the edit control and then click the Retry button. Since errors may prevent some information from being extracted, saving a game that has errors could result in loss of data. 4.3.9: Board Customizer dialog... - Your settings will be remembered in the .ini file. The piece images on the board are moved in a series of steps. Scrollbars are provided to change the distance and duration of these steps. The settings that will work best for you will depend upon... the speeds of your cpu and video, and the board size and the video resolution you are using. You can play around with these controls while autoplay is in progress. The autoplay scrollbar sets the time-lag between plays in autoplay. 4.3.10: Select Font... - The font selected for the game text display list will be remembered in the .ini file. 4.3.11: Notation "Discriptive" refers to English Descriptive Notation (EDN) (but a non-English language can be selected). "Std. Algebraric" is Standard Algebraic Notation. It is the required notation in PGN (Portable Game Notation). Long Algebraic always specifies the "from" square coordinates. The "from" and "to" coordinates are separated by a hypen in non-captures. Coordinate notations - These notations specify only squares, not pieces, and are used in situations where language may be a problem (pieces have different names in different languages). 4.3.12: Language - selects the set of letters to use for the pieces. The Board window caption shows the last play and a number in parentheses. That number is white's material advantage (not an evaluation). Material is valued in points as follows: pawn = 1 knight = 3 bishop = 3 rook = 5 queen = 9 4.3.13: The opening names displayed in the Board Data window are based on the ECO code, if any, in the header (i.e. it is de-coded). It is not derived by the program from the moves. Be aware that a three character ECO code often does not provide much specificity. For example, if the program finds A00 in the header, it can only report the opening name "Polish opening", even though there are many different named lines in the A00 category. This is often the case with other codes as well. This is a problem with the ECO code scheme itself. In a future release, I hope to have a routine which will bypass the code and determine the specific opening name by examining a game's moves/positions.