Last update: Decmber 22nd 2020
Download Cf2k version 2.6 now
Compact Flash 2000 is a file manager for the TI99/4a home computer with a CF7A+ or nanaPEB compact flash adapter from Jaime Maililong. With Compact Flash 2000 it is possible to browse through volumes and files stored on a compact flash card. Cf2k is adapted from Dm2k with a few functions removed and some new features added. Version 1.0 up to 1.4 of Cf2k was build and tested on a PC with Windows XP. Version 2.0 up to 2.3 of Cf2k was build and tested on a PC with Windows 7 (x64). Version 2.4 and newer of Cf2k was build and tested on a PC with Windows 10 (x64). Building Cf2k was done with a 32bits console version of Clint Pulley's 'C' compiler, 32bits console versions of my own optimizers (C99o, C99x, C99f), cross assembler XA99 and linker (L99). Testing was done with my own written TI99 emulator for windows (TI994w) and the final test was done on the real thing. Version 2.1 of Cf2k is able to type files as text or in hexadecimal format in 40 or 80 columns if your TI99/4A console is equipped with the F18A VDP replacement board of M. Haggerty or some device able to display 80 characters per line. Cf2k does not test if such a device is really available. Version v2.3 Removed define CF7A_CRU and added global variable CF7A so that it is possible to patch the CRU address by wish of Ralph (firstname.lastname@example.org) The global variable can be found at the file CF2K at offset >00DC CF 7A 11 00 Change the value >11 into the CRU address for your CF7A+ or nanoPeb device. Version 2.4 Bug fix in textm1() and textm2() functions. A 9938/9958 VDP requires that the two least significant bits of R2 (pattern name table) are set to 1 when switched to text mode 2 (80 columns mode) So R2=0 for PNT address >0000 in text mode 1 and R2=3 for PNT address >0000 in text mode 2. The F18A VDP board doesn't care. Version 2.5 There are nanoPeb version 1 without the SIO device name and therefore these will not be recognized as a nanoPeb. Changed: Cf2k5.c99::detcfmod(): Looking at CRU address >1300: 1) If device name "SIO." is available it is a nanoPeb 1. 2) If device name "COM1." is available it is a nanoPeb 2. 3) If device name "RS232." is available it is a nanoPeb 1. 4) If device name "PIO." is available it is a Cf7a+. Looking at CRU address >1000: 5) If device name "PIO." is available it is a Cf7a+ running in the Ti994w emulator environment. Version 2.6 Bug fix in main(). Used destination device name (DSK2) instead of source device name (DSK3) for executing a program.
An impression of Cf2k displaying a catalog of a volume.
With Compact Flash 2000 it is possible to: - Protect and un protect files - Rename files and volumes - Copy files - Move files - Delete files - View a file as text or hexadecimal (program files only in hex) in 40 or 80 characters per line. - Execute a program file - Print a catalog of a volume or a complete volume list - Format a volume - Mount a volume as DSK1, DSK2 or DSK3
Cf2k has two screen major screens layout. The first type of screen displays compact flash card and volume information. The second type of screen displays file information.
The screen with compact flash card and volume information shows: - The source volume number, which is 0000 for compact flash card and volume information. - Model of the compact flash card in use. - The version of the compact flash card in use. - The maximum number of volumes that can be stored on the compact flash card in use. - A maximum of 12 volume names with their size (fixed at 1600 sectors) free and used sectors. - Which volumes are mounted as DSK1, DSK2 or DSK3 - An immediately command to execute (if any) - An error message (if any occurred) Unformatted volumes will have a volume name like '**********' and a size of 0 sectors.
The screen with file information shows: - The source volume number of which the filenames are read. A volume number from 0001 till maximum number of volumes can can be chosen. - The destination volume number to which files are copied or moved. A volume number from 0001 till maximum number of volumes can be chosen. - The name of the volume (Name) - The total size in sectors of the volume (Size) - The number of free sectors on the volume (Free) - The number of used sectors on the volume (Used) - The number of files in a directory (Files) - The number of used sectors in a directory (Used) - The number of selected files (Selct) on which a file command will be executed - The total number of sectors the selected files are using in the volume currently showed (Tsect) - A maximum of 12 filenames with their sector size, file-type, protection status. - The command, if any, currently being executed ( (copy / move / delete / protect / un protect). - An immediately command, if any, to execute (RENAME / FORMAT / MOUNT) - An error message (if any occurred) - The first sector number reading or writing of a block of 8Kb while copying
To be able to work with Compact Flash 2000 place the Editor/Assembler module in the TI99/4A console. Choose option 5 Run program file and enter DSK1.CF2K When Compact Flash 2000 is loaded, your computer screen will show the help screen. This screen can be called any time by pressing the 'H' key. Press enter to go to the Compact Flash 2000 main screen. Before the filenames on a device can be read a source volume number must be entered. When a source volume of 0 is entered, then a list of volume names is presented. A volume number of 1 through the maximum number of volumes available will result in displaying the catalog of the chosen volume.
When volume or files names are displayed on the computer screen you can browse through the list by using the arrow keys fctn-E and fctn- X. Use ctrl-E and ctrl-X to browse page by page. Ctrl-H will take you back to the top of the list. Use ctrl-S and ctrl-D to browse directly from one volume to the other.
When the volume list of a compact flash card is displayed it is possible to directly enter a volume. If the cursor character '>' is in front of a volume name simply press ENTER to go to that volumes and read the filenames on it. To return to the volume list just press enter when the cursor character is pointing at the upper directory name '..'. Use ctrl-H to move the cursor directly to the top of the current volume catalog. Press fctn-0 the input a new source volume number as described above. Pressing fctn-9 at this stage will abort this function. Pressing ctrl-s will swap the source with the destination volume number.
The direct commands are: - Type a file on screen - Rename a file or volume - Print a catalog or volume list to a printer - Formatting a volume - Mount a volume - Execute a program and will be executed immediately.
To view the contents of file move the cursor to the filename to view and press 'T' for an ASCII representation in 40 characters per line or ctrl-T in 80 characters per line (not for program files). To view the file in a hexadecimal representation press 'B' for 40 characters per line or ctrl-B for 80 characters per line. Use ctrl-E and Ctrl-X to browse through the file. While viewing an ASCII representation you can use fctn-7 (tab) to view records which are longer than 40 or 80 characters. Pressing Q while take you back to the main screen.
To rename file or volume move the cursor to the file name or volume name to change and press 'R'. At the bottom of the main screen the following line will appear: Rename NAME______ to NAME______ Use the cursor keys fctn-S and fctn-D to move the cursor through the name. Use fctn-3 to remove the complete name so that a new name can be entered. The maximum length of a file name or volume name is 10 characters. Pressing ENTER will rename the file or volume. Press fctn-9 to cancel the operation.
To print a catalog or volume list actually shown in the main screen press ctrl-P. At the bottom of the main screen the following line with a default device name will appear: Print: PIO. when using a CF7A+ device or: Print: SIO.BA=9600.DA=8.PA=N when using a nanoPEB device. Use the cursor keys fctn-S and fctn-D to move the cursor through the device name. Use fctn-3 to remove the complete device name so that a new device name can be entered. Pressing ENTER will start the print function. Press fctn-9 to cancel the operation. See appendix B for changing the default printer name and/or settings.
Press ctlr-F to format a volume. The following information will be displayed on the screen: First enter the volume number to format or accept the presented volume number. The presented volume number is the volume number of the volume pointed by the cursor in the volume list or the volume number of the volume of which the catalog was currently displayed. Next, enter a volume label with a maximum of 10 characters and finally choose Y when you wish to verify the formatted volume. The following line will appear: Format Volume 0012 (Y/N) Press 'Y' to start formatting or 'N' to return to the main screen. If you start the formatting routine, the next line will appear: Formatting... After formatting the volume will be verified if the verify option was selected. Formatting...Done Verifying <xxxx> If a problem occurs with one of the sectors read, this sector will be marked as bad: Bad sectors <xxxx> in which <xxxx> means the total number of unusable sectors for that volume. While entering the information for formatting a volume or during verifying the formatted volume it is always possible to press fctn-9 to return to the main screen. After formatting a floppy disk, the results will be displayed on screen: Press 'Y' to format another volume or 'N' to return to the main screen.
Press ctlr-M to mount a volume. The volume to mount is the volume pointed by the cursor in the volume list or the volume of which the catalog is currently displayed. At the bottom of the screen the following line will appear: Mount volume <0012> as DSK (1-3) _ Enter 1, 2 or 3 to mount the volume as DSK1, DSK2 or DSK3 respectively. Press fctn-9 to cancel the operation.
Press X to execute a program file. At the bottom of the main screen the following line will appear only if the file type is PROGRAM: Execute PROGRAMNAME? ([y],n). Pressing ENTER or Y at this stage, Cf2k will attempt to load and start the program. If an error occurs the following line will be displayed at the bottom of the screen: Load Error X Where X will be between 0 and 7. See appendix C for an explanation of the error codes. In case of an error Cf2k returns to the title screen.
File commands will only be executed on all selected files. Move the cursor in front of the name of the file by using the cursor keys fctn-E, fctn-X, ctrl-E or ctrl-X and mark the file by pressing fctn-2. A '+' sign will be displayed before the file or directory name. By pressing fctn-2 again the file or subdirectory will be de-selected. Next press fctn-6. At the bottom of the main screen the following line will appear: Press: Unpr Prot Copy Move Delete: - Press 'U' to remove the protection of all selected files. - Press 'P' to protect all selected files. - Press 'C' to copy all selected files.. - Press 'M' to move all selected files. - Press 'D' to delete all selected files. Any other key will return you to the catalog list. Pressing fcnt-9 will abort execution of the chosen command. If a file on a volume seems write protected while attempting to overwrite this file, the following message will appear at the bottom of the screen: Copy:
FILENAME Protected! Overwrite (y, [n], a) Press 'Y' to overwrite the file. Press 'N' to keep the original file. Press 'A' to overwrite all write protected files. If a file on a volume seems write protected while attempting to delete this file, the following message will appear at the bottom of the screen: Del : FILENAME Protected! Delete (y, [n], a) Press 'Y' to delete the file. Press 'N' to keep the original file. Press 'A' to delete all write protected files.
The following function keys are used by Compact Flash 2000 A All: Select all files N None: Deselect all files R Rename file or volume T / ctrl-T Type the contents of a file on screen in ASCII in 40 or 80 characters per line. B / ctrl-B Type the contents of a file on screen in a Hexadecimal form in 40 or 80 characters per line. ctrl-P Print the volume list or a volume catalog ctrl-F Format a volume Q Exit the Cf2k program fctn-3 Erase line fctn-6 Execute file commands fctn-7 Tab while viewing files fctn-9 Cancel / Escape fctn 0 Input a volume number fctn-E Filename / Volume name up fctn-X Filename / Volume name down ctrl-E Page up ctrl-X Page down ctrl-S Previous volume ctrl-D Next volume cltr-L Begin of line ctrl-J End of line ctrl-S Swap source with destination volume number while entering source volume number ENTER Accept line, name, go into volume, go back to the volume list
A few variables can be manipulated to change the operation of Cf2k to your desires: - Auto repeat delay, this is the time to wait before the auto repeat function will start after holding the same key on the keyboard. - Auto repeat speed, to define the rate at which the same key will be generated. - Printer name, to change the default printer name and/or properties. These variables are located at the beginning of the file Cf2k and can be changed with any sector editor: Offset Value TI Description ------------------------------------------------------ >0000 FFFF Loader flag >0002 1FFA Module size >0004 A000 Module start address >0006 02E0 83E0 LWPI >83E0 instruction >000A 020B FFD0 LI 11,>FFD0 instruction >000E C80B A06C MOV 11,@@C99STK instruction >0012 020B 0024 LI 11,>0024 instruction >0016 0460 A056 B @@START instruction >001A 0250 Auto repeat delay >001C 0050 Auto repeat speed >001E A01A Pointer to printer name >0020 PIO. Printer name for CF7A+ (max 30 characters) >0028 SIO.BA=... Printer name for nanoPEB (max 30 characters)
An error message consists of 3 parts: - An error number - The function for which the error occurred - The reason for the error (explanation of the error number) The following functions can result in an error: - Opendir - Open a catalog - Readdir - Read a catalog - Delete - Delete a file - Opensrc - Open a source file for reading - Readsrc - Reading a source file - Opendst - Open a destination file for writing - Writedst - Writing to a destination file - Protect - Write protect a file - Unprotect - Make a file accessible for both reading and writing - Rename - Renaming a file or volume - Mount - Mounting a volume The following errors can occur: 0 - Device name A device name like "DSK1" was entered that doesn't exist. 1 - Write protected An attempt was made to delete, rename or write over a file that is write protected. 2 - Bad open attribute An attempt was made to open a file without the proper attributes. This error should not occur in Cf2k. 3 - Illegal operation I.e. an operation not supported by the peripheral or a conflict with the open attribute. This error should not occur in Cf2k. 4 - Out of buffers To many files are open. Cf2k is build with a 'C' library which can handle a maximum of 4 open files. This error should not occur in Cf2k. 5 - Read past eof An attempt was made to read past the end of a file. This error should not occur in Cf2k. 6 - Device error Covers all hard device errors such as parity and bad medium errors. 7 - File error Program or data file mismatch, non existing file opened in INPUT mode etc. 8 - File to big The file is to big for Cf2k to handle. The file doesn't fit in Cf2k's internal buffers. 9 - Not formatted An attempt is made to rename or mount an unformatted volume or to copy a file to an unformatted volume.