TiDir V4.2a 20040601
--------------------

TiDir 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. TiDir runs on Win98 and should run
on Win 95/ME/NT/2000 (Not tested).

On startup TiDir should contain a path or name of a .DSK file on the
command line, i.e. 

	TIDIR c:\myfiles\somefile.dsk

if somefile.dsk is a TI-99/4A disk image, or

	TIDIR c:\mytifiles 
	
if the directory c:\mytifiles is a directory loaded with all sorts of
TI-99/4A files and disk images.

It is also possible to create a shortcut for this program with all the
info its needs:

If tidir.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\tidir.exe c:\mytifiles
	Start in:	c:\utl

TiDir saves information in a file called tidir.ini including the current
size and font and the positions and sizes of the maximum of 16 view
windows.

The following keys can be used in TiDir:

The up and down arrow keys and the scroll-wheel on the mouse.

The F2 key or [view file or DSK info] button (the button on the left with
the closed notepad):

	if on a subdirectory shows some more information
	if on a upperdirectory shows some more information
	if on a *.DSK file shows some more information about this DSK
	if on a TI file shows some more information about this file

The F3 key or [view file or DSK contents] button (the button with the half
open notepad):

	o if on a subdirectory enters the subdirectory
	o if on a upperdirectory goes to the upperdirectory
	o if on a *.DSK files shows all the files and subdirectories of
	  this DSK
	o if on a TI file, opens an editor in read-only mode and shows the
	  contents of the file in readable or hexadecimal form (like Dm2k).
     If the TI file is an basic program or INT/VAR 254 or a basic
     DIS/VAR 163 merge file, the contents will be translated to basic
     listing.
	  The editor/viewer works like Windows Notepad. The maximum size
	  of a file to show seems to be 60Kb after conversion (!).
	o if on a DOS file, opens an editor and shows the contents of this
	  lower form of file.

Maximum number of edit/show windows to open at the same time is 16.

The F4 key:

	o if on a TI file, opens an editor in read-only mode and shows the
	  contents of the file in hexadecimal form (like Dm2k).
	  The editor/viewer works like Windows Notepad. The maximum size
	  of a file to show seems to be 60Kb after conversion (!).

The F5 key or [extact file from DSK] button (the button with the loose
yellow page):

	o if on a file included in a .DSK or .DSK subdirectory allows you
	  to extract the file and copy it to another non .DSK folder.
	  An Error message will appear if you try to extract from a
	  non.DSK subdirectory.
	o if on a file included in an Archive allows you to extract the
	  file and copy it to another folder.

The F6 key or [convert file to pc TXT file] button (the button with the
loose blue page):

	o if on a file or a file included in a .DSK or .DSK subdirectory
	  allows you to convert the file to a pc TXT file to another
	  folder.
	  An Error message will appear if you try to convert .DSK's
	  directories or subdirectories.
	o if on a file included in an Archive allows you to convert the
	  file to a pc TXT file to another folder.

The F7 key or [Convert TIFILES file to V9T9 file] menu item:

	o if on a file with a TIFILES header
	  allows you to convert the file to V9T9 format

The F8 key or [Convert V9T9 files to TIFILES file] menu item:

	o if on a file with a V9T9 header
	  allows you to convert the file to TIFILES format so that
          this file can be transmited with terminal-emulators

The F9 key or [View picture] menu item:

	o if on a GIF87 picture (DIS/FIX128) or a TI-artist picture
	  (PGM) allows you to view the picture. TI-artist pictures
	  are shown by TiDir. GIF pictures are shown by an external
	  viewer (like irfanview). In the TiDir.ini file, under
	  section [TIDIR] add the key picviewer=c:\somewhere\your_viewer.exe

The ENTER key or double mouse-click:
	o if on a subdirectory enters the subdirectory.
	o if on a upperdirectory goes to the upperdirectory.
	o if on a *.DSK file shows all the files and subdirectories of
	  this DSK.
	o if on an Archive file shows all the files in this archive.
	
The HOME key:
	o Moves the cursor to the first line of the directory.
	
The END key:
	o Moves the cursor to the last line of the directory.

The PAGE-UP key:
	o Takes you one page up in the file list.
	
The PAGE-DOWN key:
	o Takes tou one page down in the file list.
	
The [goto root] button on the right :
	o Takes you right back to the top-level of the directory structure
	  where you started tidir with.
	   
The [goto upper directory] button on the far right:
	o Takes you one level back in the directory structure.

Although the menu items on the 2 pull down menus are self-explanatory, the
purpose of the item "Feed to edit window" needs some comments. This item
allows you to show the current directory in a format to which comments can
be added and then subsequently printed.

When browsing through Archiver files it isn't always true that every 
DIS/FIX 128 or INT/FIX 128 file really is an Archiver file. A file with
this type can also be some in the GIF format or just some file.

This is the forth 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
De Dadelboom 81
1911KK Uitgeest
The Netherlands
fgkaal@freeler.nl
 
Thanks to Jacques Groslouis and Paolo Bagnaresi for their comments and
ideas.   


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
		
			
