Ti99Dir V8.3c 20220703 ---------------------- Ti99Dir is a Windows program to browse through TI-99/4A files (v9t9 format), Archive files (v9t9 format and created with Barry Boones archiver) and .DSK files (v9t9 and PC99*) on a PC. Ti99Dir is build on Windows XP and should still runs on Win 95/98/ME/NT/2000 (Never tested on 95/ME by myself). On startup Ti99Dir can accept a path or name of a .DSK file on the command line, i.e. TI99DIR c:\myfiles\somefile.dsk if somefile.dsk is a TI-99/4A disk image, or TI99DIR c:\mytifiles if the directory c:\mytifiles is a directory loaded with all sorts of TI-99/4A files and disk images. If a path is not given on the commandline, a browser window is opened at startup of Ti99Dir to browse to a path yourself. It is also possible to create a shortcut for this program with all the info its needs: If ti99dir.exe is located in the subdirectory c:\utl and all your ti-files are in the subdirectory c:\mytifiles, a shortcut could look like this: Path: c:\utl\ti99dir.exe c:\mytifiles Start in: c:\utl Ti99Dir saves information in a file called ti99dir.ini including the current size and font and the positions and sizes of the maximum of 16 view windows. See also the Ti99Dir help Ti99dir.chm for more info. This is the fifth version of an universal TI-99/4A file viewer for the PC. If you have ideas to add to this tool let me know. Enjoy. Fred G. Kaal Goudsbloem 68 3984CP Odijk The Netherlands fredgkaal@gmail.com Thanks to Jacques Groslouis, Paolo Bagnaresi and Joe Delekto (and others) for their comments and ideas and Stefan Bauch for creating the LibXBTKN32.dll to make it possible to convert TI/Extended Basic programs from PC text files to a PROGRAM or DISPLAY VARIABLE 163 in the TIFILES format. v1.1a Shows a list of TI files in a subdirectory. v2.1a Show dos name of a .DSK file with F3 Show no_name!! if .DSK name is blank Added method to extract files from a .DSK Added menu functions for showing files in .DSK info and extracting files v3.1a Showfile.cpp - check if not writting beyond end of text buffer PC99Doad.cpp - added to also read PC99 dsk files convert PC99 dsk file to a v9t9.dsk file show side track sector layout for a PC99 dsk file Showfile.cpp - added PC99 dsk stuff extract file replaces * or ? in ti-name to @ Tidir.cpp - added PC99 dsk stuff Viewer.cpp - remembers position and size of the edit/view windows v3.1b Showfile.cpp - Extract: File name can't contain \ / : * ? " < > |, will be replaced by @ Tidir.CPP -added VK_F2 to show FILE or DSK or DIR info VK_F3 only view upperdir, subdir, *.DSK or file function. A new opened view window is always on top. Added icons for the buttons. Tooltip.CPP - added to show tooltips when mouse cursor moves over buttons. v3.1c Pc99Doad.cpp - Reading the right sector from side 2. v3.1d Showfile.cpp - Convert TI-files and TI-files on .DSK to pc TXT files Doad.CPP - Calls PC99Doad if .DSK file on command line seems to be a PC99 .DSK file v3.2a Showfile.cpp - SaveDosFile replaced fprintf() for fputs(). fprintf is not a good choice if the data contains % characters. Added PCfilename in files-window V3.2b Doad.cpp - Also get the number of Fixed records from file header. showfile.cpp - Conv_Rec_Fix takes the numer of Fixed recrords into acount while showing files. Conv_Rec_Fix & Conv_Rec_Var convert files in DISPMODE when converting for the viewer. After every record a 0x0D 0x0A pair is added. Every non printable is replaced by a '.' Conv_Rec_Fix convert files in RAWMODE when converting to dos file. No 0x0D 0x0A pair is added after everry record V4.1a Archiver.cpp - Added. Now you can browse through archiver files. V4.1b Tidir.cpp and Showfile.cpp - added code to convert TIFILES header to V9T9 header. Doad.cpp - Different kinds of TIFILES headers around: "\x7TIFILES\0" or "\x7TIFILES\x?" also with and without TI-name on offset 16. replaced strcmp(name,"TIFILES") for strncmp(name,"\x7TIFILES",8) Archive.cpp - Header length of TIFILES header is also 0x80 bytes and not 0x70! what was I thinking, and why did it work anyway? V4.1c Showfile.cpp - Added TIFILES header conversion to V9T9 header (F7) Added V9T9 header conversion to TIFILES header (F8) Tidir.cpp - When started without a commandline now opens a directory browser. THe choosen directory is also saved in the ini file for next time. V4.1d Showfile.cpp - If file is on a DSK or PC99 dsk, first extract file to a V9T9 format file in a temp directory before showing. Check for basic PROGRAM, basic INT/VAR 254 or basic DIS/VAR 163 and if true showfile as basic listing. Archiver.cpp - If going into an archive and this archive is on a DSK or a PC99 DSK, first extract this file to a V9T9 format archive file in a tmp directory before showing. Unpack0() - Check if file is a GIF and return 100 if so. TiDir.cpp - Added F4 for showing files in hexadecimal form. PCname, TIname, size, type, attr are now buttons to sort the file list. Find the windows tmp directory voor extracting archives or files from DSK or PC99 dsk. V4.2a Picture.cpp - Added routines to view TiArtist and Gif files. TiArtist seems to be program files NAME_P is picture data and NAME_C is color data. Gif files can be viewed with some external viewer like irfanview (http://www.irfanview.com/index_inside.htm) add the the key to the path of to the viewer at section [TIDIR] picviewer=c:\somewhere\your_viewer.exe V4.2b Tidir.cpp - If rootdir is # in tidir.ini file, the workingdir is used so that tidir.exe can be autostarted from CD. V4.2c Doad.cpp - If pathname is X:\\ than this is a root directory. Couldn't read from roots. Also check if pathname doesn't end with '\' before adding a '\' V4.3a hdimg.cpp - Added functions to look into harddisk images, read and write images from and to physical TI-formated CF-cards or ZIP-disks etc. splash.cpp - added a splashscreen doad.cpp - Tidir now remembers where it was when returning from subdirectory. V4.3b showfile.cpp - SaveTiFile() uses PC-name when converting "TIFILES" to V9T9 format picture.cpp - Less strict when searching correspeding colortable of PAINT picture. checks if number of records=24 of a "name_c" file instead of length is precise >1800 bytes V4.3c showfile.cpp - GetChain() fixed for SD & DD .DSK files (not able to test HD yet) Seems that 3 bytes (6 nibbles) of datachain gives first sector number of chain and total number of sectors so far, i.e: First Total Filesector 022 002 0 1 2 027 008 3 4 5 6 7 8 02F 00E 9 A B C D E V5.1a Total new version. Double browse window. Added Cf7a+ support. Can create .DSK images and add files to it. Rearranged functionkeys. Multiple file copy/delete etc. Added Help file (Tidir.chm =compiled html) Removed # (see V4.2c) but you can use Tidir.exe .\ anyway for this purpose. etc etc. V5.1b Repaired some minor glitches. V5.2a confpcfile.cpp: added functions to convert PC file to all kinds of TI-files (thanks to Joe Delekto for this idea and comments). picture.cpp: added funtion ShowCharFile() to view those CHARA1 files. tidir.cpp(): added 5 recent used directories in the menu Repaired some minor glitches. V5.2b picture.cpp: added functions for displaying myart files. tidir.cpp: clicking on path selectes side. shift-click and control- click selects range or individual files. V5.2c tidir.cpp, pc99doad.cpp, dialogs.cpp: added functions for converting multiple selected PC99 disk images to v9t9 disk images. V5.2d tidir.cpp: Always enable some menu items if not dependend from other rules dialogs.cpp: Added checkbox for copy diskimages to CF7 card or image and fixed multiple selected PC99 images to copy to CF7 card or image. Added contect menu. Added menu function Reread directory (Ctrl-R). Added menu function swap file list windows (Ctrl-U) V5.2e doad.cpp, GetFileInfo(): Added extra check for TIFILES header. If byte 16 is >CA and byte 17 is >53 or byte 16 and 17 are both >00 then TI-name is made equal to DOS-name else TI-name is at byte 16-25. picture.cpp, ShowPictFile(): If TI artist file ix XXX_C find XXX_P else if XXX_P find XXX_C. Both methods now show correct picture. V5.2f Renamed TiDir to Ti99Dir. cf7afunc.cpp: Added posibility to mount volumes in CF7A images as suggested by Filip van Vooren. V5.2g cf7afunc.cpp: Added posibility to mount volumes in CF7A disks also conserves original mount info when overwriting sector 0 of card. ti99dir.cpp: Popup menus consistent with main menu. Added 'v9t9' or 'tifiles' to file attribute if file list is a ordinary PC directory as sugested by Gregory McGill. V5.2h ti99dir.cpp: Repaired help() to open ti99dir.chm When convert V9t9 to Tifiles and visa-versa also updates file list. Doad.cpp: FoadDir() result of FindFirstFile() does not need to have a FILE_ATTRIBUTE_DIRECTORY. Reading root of A: failed because of this. Have nu clue where this was for. V5.2i cf7afunc.cpp: ReadCf7aDsk(): Save cursor location previous screen. Reset list position to 0 to prevent blank screens. ti99dir.cpp: OnContextMenu(): Check ListSelect < ListLast to prevent sending emails to uncle Bill. doad.cpp: FoadDir(): When FindFirstFile() returns INVALID_HANDLE_VALUE first check GetLastError() so that user is informed when reading directory of a TI_FORMATED or unreadable floppy or other storage device (Bob Carmany). V5.2j Handling TIFILES from the Classic99 emulator as requested bij Guillaume Tello. In file list this kind of TIFILES is marked with Classic99. The Classic99 TIFILES header is defined/repaired while reading the directory list. Viewing and copying these kind of files now allows a sector size less than 256 bytes. What is wrong with the Classic99 TIFILES header: FIXED files: File size in sectors is one sector short. A partly filled sector is not taken into account. EOF offset should be >00 VAR files: File size in sectors is one sector short. A partly filled sector is not taken into account. EOF offset is 1 byte beyond the EOF marker (the >FF byte). PGM files: File size in sectors is one sector short. A partly filled sector is not taken into account. Number of level 3 records allocated should be >0000. Records per sector should be zero instead of >FF. Record length should be >00 instead of >01 V5.2k convpcfile.cpp: ConvertPcFileToDisVar(): Records per sector for a VARIABLE length record file is (SECSIZE-1)/(RecordLength+1) for records < 255 or SECSIZE/(Record length+1) for records equal to 255. DIS/VAR 255 is allowed! showfile.cpp: Correct display of DIS/VAR 255 files. End or sector is reached if read offset + record length + 1 > sectorsize. Add 3 words / 6 bytes header for program file as suggested by Jon Guidry. User can define values for PROGRAM/GRAM etc. V5.2l misc.cpp: checklefttop(): Is aware of two screens left-right or right-left splash.cpp: CreateSplashScreen(): Is aware of two screens left-right or right-left dialogs.cpp: Shows arhive bit in file dialog ti99dir.cpp: PrintScreen() Shows archive bit in file list as A, protect as P. ti99dir.cpp, viewer.cpp: multiscreen aware. copy function doesn't rewrite destination window after every file. Should speeds things up when copying many many many files. v5.2m cf7afunc.cpp: Selecting a FAT16 FAT32 or NTFS formatted CF-card, DsCard or memorystick for Cf7a+ card is allowed but warning is issued if this really is the intend. So you don't have to format the first volume on the TI anymore. Volume numbering is 4 digits instead of 3. v5.3a Copying IDE/WDS/SCS/CF7A+ images to directory is allowed. Support for Windows 95/98/ME/SE for IDE/WDS/SCS/CF7A+ images. Selection of IDE/WDS/SCS/CF7A+ driveletters in configuration. Show image VIB, FDIR, directory DDR or file FDR in dialog boxes. Repaired HDIMG backup restore progress bar. Added reading-writing sector of maxsectors to backup restore dialog. Warning "CF7A+ Disk full" given and copying of disk images is stopped when copied beyond compact flash card capacity. v5.3b Mount volumes directly on CF-card also for Windows 9x Initialize volumes directly on CF-card also for Windows 9x v5.4a Returning from ARC file on DSK, HDIMG or CF7A+ image now returns to correct directory location where ARC was found. To prevent errors the program doesn't allow to read an unformatted VIB of CF7A+ volume anymore with tool function Show image VIB, DDR, FDIR or FDR. The name of an unformated volume is displayed as UNFORMATED. v5.4c Added a space character after the REC clause when viewing a Basic program. v5.5a Added a Ti994w / Ti99Hdx compatability switch. If a TI file is extracted from a DSK, HD or ARC image and in the TI file name occurs a character like '\ / : * ? " < > |' then the most significant bit of this characters is set for the PC file name instead of replacing it with a '@' character. Added option to create disk image of Double sided, Single density, 80 tracks and 9 sectors per track (1440 sectors) for al the people with an 80 track update or Lotharek HxC floppy emulator. v5.5b Added option to create disk image of Double sided, Double density, 80 tracks and 18 sectors per track (2880 sectors) for al the people with an 80 track update or Lotharek HxC floppy emulator and the new DSDD 80 tracks disk controller to be build. Added feature to read and display description of FDIR added with John Birdwell's DSKU program as suggested by R. van Kleunen. Fixed: vibddrfdr.cpp::FdFdrProc() Swabed byte offset 18, number of level 3 records allocated. Fixed: showfile.cpp::Conv_Rec_Fix() and Conv_Rec_Var() when adding data to view window beyond end of buffer. Fixed: Ti99Dir.cpp::InitMenu() when files are selected and cursor is not on same file type then option in tool menu is enabled according to type of selected file. v6.1a Added option to extact all files from one ore more selected ARC-files and/or DSK-images and copy these to a directory with the same TI-name as the original ARC-file or DSK-image. Added option to convert one ore more selected ARC-files to a DSK-image with the same TI-name as the original ARC-file (for Berry Harmsen). Fixed: dialogs.cpp:: Handling of the progressbar so that files falling out of the criteria of the choosen function is not counted. Fixed: dialogs.cpp::SetAttrFile() removed Sleep(500) for debug purposes which was accidently left and slowing things down. Fixed: doad.cpp::GetFileInfo() Creating better TI-file name for downloaded files (TIFILES) with no original TI-file name. Fixed: dskfunc.cpp::CopyFileToDisk() Copying an empty file to a DSK-image doesn't fail anymore with error "Disk full". v6.2a Fixed: dskfunc.cpp::RenameFileOnDsk() Resort file FDR's sector numbers in FDIR sector to keep files in alphabetical order. Bonus: RenameFileOnDsk() als works for TI files on TI DSK images in a CF7A image. v6.3a Added: Now ctrl-enter, ctrl-double click, ctrl-f3 and context menu option "show directory (in opposite window)" shows file list in opposite file list window instead of current file list window. Double clicking a DIS/VAR 80 or PROGRAM file open these files in one of the 16 file viewers. (was allready added in 20151101 but I forgot all about this). Added: viewer.cpp: ctrl-a now selects all in viewer window. Fixed: viewer.cpp, print.cpp, printdlg.cpp: Added page setup dialog for viewer window and these margins are also used when content of viewer window is printed. If viewer contains long lines then these long lines are splited over several lines when printed so that these characters does not fall of the page (thanks to Norman Rokke to make me aware of this glitch). v6.4a Added: viewer.cpp: Shift-f3 for opening a DIS/FIX 128 file in the viewer containing FORTH screens/blocks. When F3 is used and it is a DIS/FIX 128 file and the first three blocks of 1024 bytes are all printable characters and it contains at least one : ; combination it is assumed to be a FORTH screens/blocks file. (maybe a bit to simple like this) v6.4b Fixed: Ti99Dir.cpp::RecalcScreen() removed call to MoveWindow. The WM_MOVE and WM_SIZE allready handled this and the program only needs the new window dimensions to reposition the other objects. Calling MoveWindow will move the window off screen for some reason if the taskbar is at the left or top side of the screen. v7.1a Fixed: ShowFile.cpp::ShowFile() the level3 records allocated is the highest sector written to for a VARIABLE file and the highest record number for a FIXED file. Fixed: Doad.cpp::GetFileInfo():Also display the original forbidden characters for the DOS file name (the 0x80 bit is set) if it is a TIFILES file. Added: ShowFile.cpp::ExtractFile() new option to extract files from DSK, PC99 disk, CF7A+ or HD images in TIFILES format. Added: Archiver.cpp::Dfaotg() new option to extract files from ARC file in TIFILES format. v7.1b Fixed: convpcfile.cpp::fgetline():Returns line length if CR/LF is missing instead of a line length of zero. Fixed: convpcfile.cpp::ConvertCrLf(): Adds when desired a CR or LF at the end of a line when CR/LF is missing in the source line. v7.2a Added: ShowFile.cpp::ShowFile(): Show V9T9/TIFILES file header in edit window. Added: ConvPcFile.cpp(): Convert PC file in TIFILES format if option in confiuration is set. v8.1a Added: hdimg.cpp:: Use the Ti99HdImg32.Dll which contains the translated IDE DSR from TMS9900 assembly code to C-code. Added: hdimg.cpp:: Functions for creating renaming deleting sub directories. Added: hdimg.cpp:: Functions for copying, renaming, deleting files. Added: hdimg.cpp:: Function for set/reset file protected and archive bits. Changed: hdimg.cpp, dialogs.cpp, dskfunc.cpp:: Reset FT_ARC bit when copying file. Added:hdimg.cpp, dialogs.cpp:: Functions for creating IDE/SCS HD image. Added: xbtkn.cpp:: Use the LibXBTKN32.dll written by Stefan Bauch for converting text files containing a TI Basic or Extended Basic source to a TI program or Dis/Var 163 (merge) file. Added: dialogs.cpp:: Functions for converting text files to TI Basic or Extended basic files. Fixed: basic.cpp:: MakeBasicLine() A single quote in a quoted string must be doubled. Fixed: basic.cpp:: Tokens for , : ; must also check if space must be inserted first. Looks better with DATA and PRINT statements (DATA , instead of DATA,) Bugfix: dskfunc.cpp::FreeFdrAu(): Freeing of AU's of a fragmented file on a DSK image fixed; HighSec = (b3<<4) + (b2>>4); and not HighSec += v8.2a Added: convpcfile.cpp, dialogs.cpp:: Added option for conversion of tabs to n (1-20) spaces if PC file is converted to TI-file. Added: dskfunc.cpp:: Reserved space for FDR's at beginning of DSK image now depends on the disksize; up to 720 sectors this number is 34, up to 1440 is 50, up to 2880 is 66, up to 3202 is 256 otherwise 512 sectors. v8.2b Fixed: dialogs.cpp:: When renaming a TI-file on a DSK, CF7DSK or HD image then all characters are allowed, except the '.' or ' ' (dot or space) characters. v8.2c Fixed: dialogs.cpp:: Problem fixed with padding spaces when renaming a TI-file on a DSK, CF7DSK or HD image. v8.3a Fixed: showfile.cpp:: Problem fixed with showing maximum file size of ~60Kb. EM_LIMITTEXT can also be used to set the edit buffer size if this is bigger then the dafault maximum (64Kb) for an edit control. Added: Options to preserve/keep the case of a file name when converting file from a TI file to a PC file. Added: Options to preserve/keep the case of a file name when converting file from a PC file to a TI file. Fixed: hdimg.cpp, dialogs.cpp, misc.cpp:: When renaming TI files lowercase characters are also accepted. Fixed: hdimg.cpp, dialogs.cpp, misc.cpp:: When copying a TI file from one medium to another medium then the original case of the file name is preserved. This means that on a DSK or HD or CF7A image a file with a name AbCd can exist next to a file with a name abcd and/or ABCD. These are all different files. However for a Windows directory these are all the same file and/or directory names. v8.3b Fixed: Doad.cpp: TiDir():: When reading a Linux directory via samba does not guarantee that the first thing to find is the \. directory and the \.. directory next. This test is skipped because it was already determined that we are entering a directory. v8.3c Fixed: Basic.cpp: MakeBasicLine():: Prevent writing outside the Basic Line buffer which corrupts te stack. This can happen with a corrupt file. Fixed: convpcfile.cpp: fgetline():: When converting Unix/Linux text file then also set variable Byte to the same value as Char to prevent strange characters at the beginning of a new text line. v8.3d Fixed: confpcfile.cpp: ConvertPcFileToTiFile(): Prevent overwriting existing TI files in a PC directory (DSK and HDIMG was allready covered). v8.3e Fixed: hdimg.cpp::ReadDirFromHdImg(): Use the flag UsePrevDdrInfo properly after leaving an ARC and re-reading the HDIMG directory. [EOF]