	             TI99-PC Code Development History
	             ================================

Filename: History.txt
	             
Febr.2000  Started developing TI99_PC.COM. 

28.05.2000 Added reading "Deleted Data Mark" sector to TI-PC24.ASM (petty 
           changes) and INT13_H6.INC (major changes), to comply with Geneve 
           1.44 MB 3" 1/2 disks. Logic: if it fails with normal Data Mark, 
           try next with Deleted Data Mark, in the same try. 
           
29.05.2000 Changed TI-xfer8.bas. Fixed losing source and destin. filenames 
	   in 3)Transfer disk image to PC99. Bug happened when going back 
	   and forth in PC disk catalog.
	   
29.05.2000 Heavily rewritten Extract to DOS. New version: Extract7.bas. 
	   Added Geneve 1.44 MB compatibility. Managed up to 4 directories. 
	   No apparent bug, so far, Logic: sector 1 is not the only sector 
	   that holds filenames..., there may be other sectors as well. 

30.05.2000 Fixed bug in Splitim4.bas with Bit Map Allocation table on 2880 
	   sector drives: each AU=2 sectors. Added Sector Viewer (F7) in 
	   Splitim5.bas
	   
04.06.2000 Changed logic in TI99_PC.COM. Now, when reading sector zero, the 
	   first attempt is made by using the Density and disk drive type 
	   used to read the previous disk. During first attempt, no DISK 
	   CHANGE test will be performed. So, even if you opened the drive 
	   door, the parameters used in the last attempt will be used. 
	   
	   If first attempt fails, then a disk type test will be performed.
           This approach is most useful for sector zero problems (first 
           sector after the Index Hole), in a computer with the Index Pulse 
           wire (#8) cut in disk drive cable. In this case, you first read 
           a good disk of the same density of the bad one. You just read a 
           few sectors and then abort. Next, you insert the bad disk. 
           Since no test will be performed and Index Pulse wire is cut, the 
           disk will be read immediately, without any problem. 
           
05.06.2000 Added V9T9 support, with creation of an additional ".DIS" file. 
	   ".DIS" file is used by V9T9 to identify the Disks. ".DIS" file 
	   contains a full disk catalog of the disk.  
          	  
06.06.2000 Added Help file management (files .IDX e .DAT): added HELP.DAT, 
	   HELP.IDX and ACKNOW.DAT, ACKNOW.IDX, CRHelp.bas and CRAcnow.bas 
	   will create the indexed .DAT file starting from a 77 column max. 
	   .TXT file. Nice work! 

08.06.2000 Corrected bug in PC disk catalog. On a Non-Windows DOS, a shelled 
	   Dir command cannot contain the path name embedded in quotes. 
	   However, the same thing is needed by Windows DOS, to take into 
	   account the Directories names with Blanks inside the name. Now 
	   TI-Xfer8.bas checks if we are in Windows DOS or true DOS and 
	   acts accordingly (sets a flag for PC_Dir.bas). 
           Also, path for a non-Windows DOS cannot end with a reversed 
           slash (In Windows DOS it can, though).

08.06.2000 Corrected small bug in TI99_PC.COM: Now we have release 1.0.26. 
	   Bug: when changing disk density, TI99_PC.com will first try with 
	   old density. If that fails, it will return to caller. At this 
	   point of time, outputting an error message would be misleading, 
	   since we still have to try other densities too. 
           This modification corrects this small bug (no error message at 
           first failed attempt). Also, lowered first attempts with 
           recalibrating, from 48 to 45, down to 48 to 43. 
           
10.06.2000 Corrected Input Field Length in Xinput routine in TI-XFER8.BAS. 
	   On some cases, it was fixed to the original length of the string, 
	   that couldn't be made any wider. 
  	   
10.06.2000 Changed MENU, added UTILITIES MENU. 
           Added ConvAna.bas.  In case TI99_PC.COM doesn't work (and it 
           really doesn't on some computers, see Barry Peterson e-mail), 
           the user can resort to Anadisk. ConvAna.bas should be safe to 
           use, because it goes to a great length in trying to avoid bad 
           sectors. 

10.06.2000 Fixed bug in 6) Extract. When path name was wrong, program would 
	   break. Added <ON ERROR GOTO>. Thanks to Jim "juzzell" 
	   <juzzell@surfsouth.com>.
	   Also, fixed other bug. Extract would forget path names when 
	   getting back from Disk Catalog. 
	   
16.06.2000 Now 5760 sector disk are named DSHD and not DS8D as it was 
	   before. Also, added wait_for_a_key_pressed, after user has 
	   pressed ESC during TI99_PC.COM operation.
           
17.06.2000 Andy Becker <ab31@juno.com> starts today supervising the help 
           files.
           
18.06.2000 Changed TI99_PC.COM. Named as 1.0.27. Now it recognizes 5.25 ", 
	   360 KB drives. Sent out as TI99-PC5.ZIP. 

20.06.2000 Added editing output filenames in Extract to DOS, Option 6) in 
	   Main Menu. 

24.06.2000 Added /P switch in command line of TI99_PC.COM. User can now 
	   modify INT 1E DISKETTE DATA PARAMETER table. Thus, as an example, 
	   user can change the Stepping Rate, if needed. 
	   Syntax: " TI99_PC.COM  /Py=xx " 
	   will set byte # y to value xx in INT 1E DISKETTE DATA PARAMETER 
	   table. All numbers must be in Hexadecimal notation. As an 
	   example, " TI99_PC.COM  /P0=6F " will set Byte 0 to 6F in INT 1E 
	   DISKETTE DATA PARAMETER table. 
	   So, "6" will set the stepping rate to 20 ms and "F" wil set the 
	   head unload time to 240 ms. You must know the meaning of the 
	   bytes in INT 1E DISKETTE DATA PARAMETER table before attempting 
	   any change. In case of syntax error, the command will be 
	   ignored and no error message will be issued. 
	   
25.06.2000 Added the /D switch. This should be used only by the programmer. 
	   The user will not benefit from it. When enabled, it will show 
	   some values from registers or memory on the screen. On some 
	   situation, a commom debugger would stop execution, and this could 
	   spoil what will happen next. As an example, if you stop execution 
	   during disk access, the program will not execute properly once 
	   you resume the program. In those conditions, debugging could be 
	   very difficult. 
	   
27.06.2000 Fixed (hopefully) the drive type recognition bug. This bug 
	   plagued TI99_PC.COM from the very beginning, but was discovered 
	   only recently.  
           It turns out that if you move the drive head to a given cylinder 
           (seek), the software will not check if the cylinder written on 
           all the IDS of that cylinder on the floppy disk is the same you 
           requested. 
           The drive head move is considered successful if just the 
           mechanical movement is succesful. You have to perform a Read IDs 
           and then check the value of the found cylinder if you want to 
           make sure you are on the rigth cylinder. TI99_PC.COM will now 
           seek cylinder 3, and check it, to tell an 40 track drive from an 
           80 track drive. 
           
30.06.2000 Changed cylinder # for 40/80 track recognition in TI99_PC.COM. 
	   Not cyl. 3 any more. Now cylinder 4 is tested. A floppy disk 
	   formatted at 80 track and reformatted at 40 track on an 80 
	   track drive would still have valid intertracks (odd tracks). 
	   On the other hand, even tracks are safe, because these get 
	   really re-written. 

30.06.2000 Reset disk is performed through a real DOS "Int 13h", ah=0, and 
	   not a simulated disk reset via "call int_13h", ah=0
          
04.07.2000 Got rid of "double attempt" bug. When replacing an 80 track disk 
	   with a 40 track (or vice-versa), at the beginning TI99_PC.COM 
	   does not understand the difference between the two disks. 
           Thus, it will start reading in a normal way. However, after track 
           zero is read, and it gets to first sector of track 1, the problem 
           shows up. 
           Under these conditions, TI99_PC.COM used to try to find the right 
           transfer rate, track per disk for two times before finding the 
           rigth combination. Instead of just one attempt that it is 
           logical, it had to try one time, find the right cominations, exit 
           with an error "sector not found/read error", and then, at the 
           second attempt, it did eventually read the sector. 
           The problem has been solved by re-writing the "perform_io" and 
           the "Exec_p_io" routines. It turned out that there were two tries 
           in these routines and that the second try always failed, because 
           some register were mangled on first try. The second try was 
           added to handle DSHD Geneve disk (3.5", 1.44 MB, 5760 sectors). 
           These disks use the "Read Deleted Data" NEC 765 Command. 
           Now the "Exec_p_io" does everything, even what was done by 
           "perform_io". Thus all the registers can be saved before the call 
           to "Exec_p_io" and restored afterwards. 

04.07.2000 Andy Becker <ab31@juno.com> has received all the source files and 
	   will start to investigate a bug that appears on his computer but 
	   not on mine. His problem is now similar to mine ("double attempt 
	   bug"). 
	   Before I solved my "double attempt bug" (see 04.07.2000), his 
	   problem was worse: he had to entirely exit from the program and 
	   start all over again when changing disk densities. 
           
08.07.2000 Modified Extract to DOS (it was Extract08.bas, now it is 
	   Extract08.bas). Added TIFILES Header option. Thus, an file can 
	   be temporarily exported to DOS and later easily re-imported. 
	   
           
14.07.2000 Modified "Split Large Image File to Smaller Image Files" 
	   (Splitim8.bas). Now you can use the number keys, 0 through 9, to 
	   give each filename a precedence (priority) over the other 
	   filenames at copying time. 
           When a priority is used, after all the files belonging to the 
           same priority have been copied, the current output disk will be 
           closed and a new output disk will be opened.
           
16.07.2000 Modified the Help.bas. I've extracted a quick routine that can be 
	   added to any program (filename: Hlp-Incl.bas). User presses the 
	   F1 key, and there it goes. Only 300 lines. It has been already 
	   implemented in Splitim8.bas, but it should be extended to all 
	   other programs. Caller can select what title # has to be 
	   enlightened when the help is entered. 
           
18.07.2000 Changed the main program, namely TI-xfer8.bas. I've changed it so 
	   much, that I've also changed the name. 
	   New name is Main-01.bas. I made room for the missing options: 
	   exporting from DOS, PC99, V9T9 to TI99-PC native format. And, 
	   from TI99-PC native format to TI99/4A floppy disk. Finally, there 
	   is room for a FORMAT TI-99/4A disk option. (When will I have the 
	   time to write it?)
	   Enlarged the COMMON strings section. MyVal$() array now has 30 
	   elements (it used to have 10). 
	   Path names have been built directly into the array. Thus, I don't 
	   need any longer to back-up path names before CHAINing to other 
	   programs. 
	   
23.07.2000 Added "Transfer a PC-99 virtual disk to a TI99-PC disk image 
	   file" (PC992i-2.bas). Two SUB Routines now handle PC99 and V9T9 
	   virtual disks. First routine is for Opening and Reading Sector 
	   Zero, the second routine gets all the other sectors. Caller 
	   doesn't have to specify if V9T9 or PC99 virtual disk; callee will 
	   determine that by itself. 
	   
24.07.2000 Revising Main-02.bas.  A SUB routine now takes care of accessing 
	   all external programs (I got rid of the cumbersome GOSUB 
	   routines). Source shrank from 62 KB down to 45 KB! Also, given to 
	   numbers [to identify variables in MyName() array] a meaninful 
	   name (for menmonic purposes). 
	   
24.07.2000 Added "Transfer a V9T9 virtual disk to a TI99-PC disk image file" 
	   (PC992i-2.bas). Two SUB Routines now handle PC99 and V9T9 virtual 
	   disks. First routine is for Opening and Reading Sector Zero, the 
	   second routine gets all the other sectors. Caller doesn't have to 
	   specify if V9T9 or PC99 virtual disk; callee will determine that 
	   by itself. 
	   
29.07.2000 PC-Cat-01.bas created. It will collect files from several PC 
	   directories. F7 for showimg sectors of a PC file has also been 
	   created. 
	   
02.08.2000 F1 help transformed into a SUB. See Hlp-Inc2.bas. Simply add the 
	   "TYPE IDXType" in top of your program and add the SUB anywhere at 
	   the bottom of your program. Implemented in Splitim9.bas. 

11.08.2000 Bug discovered (by me). Lonfilenames or longfilename directories 
	   under Windows 95/98 are not accesible as such by QBasic. An error 
	   76, path or filename not found, will be issued by QBasic. 
           Fix: Added A SUB ShortName that invokes INT7160.COM. The latter 
           converts long path/filenames into short path/filenames (8.3 
           characters) and then prints it on the screen. INT7160.COM uses 
           the MS DOS INT 21h, AX=7160h CX=0001h. Shell command will then be 
           redirected to a "--" named file, that will next be opened by the 
           QBasic code. 
           
11.08.2000 PC-Dir05.bas has now a built-in sector viewer (F7), that can 
	   inspect long filenames too.

14.08.2000 Long filename handling capability has been added to all existing 
	   modules. For Output file types, the SUB ShortName cannot be used 
	   as such; since the output file does not exist yet (it has to be 
	   yet created), the INT7160.COM will return an empty string. 
	   Thus, we must use INT7160.COM on the path only. So, a new SUB, 
	   TellPathFrom (DestinPath$, MPath$, MName$) will tell the path 
	   from the filename. INT7160.COM will then be used on the Path only 
	   (which, of course, must exist). 
	   
October.2000 Developed Comp2.com, Decomp4.com, which are LZW compressor/
           decompressor for TI99/4A on a PC according to Archiver III format 
           of Barry Traver/Barry Boone. The original Archiver III source 
           code was made available over the Net by Barry Boone on Summer 
           2000. The PC source code was found on the Net: its author, Tom 
           Pfau, Digital Equipment Corporation, Parsippany, NJ, USA, most 
           probably used the same source code used by Barry Boone. As a 
           matter of fact, all the labels have the same names on both the 
           Boone and the Pfau versions. Hovever, the Boone version has an 
           additional twist (level of complexity) that the Pfau version 
           hasn't. I added the PC code for that particular twist and, 
           starting from scratch, built in the code for Directory List. 
	   
	   Quite honestly, although the Comp2.com, Decomp4.com fully emulate 
	   the Archiver III behaviour, and in spite of the fact I tried to 
	   understand the process of compression, I only vaguely understood 
	   what was going on when a file gets compressed or decompressed. 
	   I simply translated the TI-99/4A assembler source code into 80x86 
	   source code. The program works. This proves, if there was need 
	   for it, that a code-writer (programmer ?) doesn't have to be 
	   particularly smart, as long as he sticks to the original code and 
	   exactly duplicates the output of the source code to be translated 
	   ;-). 

Winter.2000 - Spring.2001 
	   The assembler part that takes care of writing and formatting a TI 
	   floppy disk has been written. This assembler program, that can be 
	   invoked by the .BAS program via a SHELL command, can:
	   - Format a TI disk
	   - Format any other disk in unusual format
	   - Execute a special list of formatting commands from an external 
	     file. In a way, this will provide a formatting language to the 
	     user. Copying some protected disk should be possible. 
	   - Transfer a TI disk to PC file (was already present in previous 
	     version)
	   - Transfer a PC file to TI disk 
	   - Catalog a TI floppy disk
	  
03.06.2001 Development of TI99-PC.BAS Taken up again. 

03.06.2001 Modified Extract9.bas. 
	   Added the capability of creating .ARK files on a PC, according to 
	   the Archiver III format of Barry Traver/Barry Boone.
	   This files are useful for transferring files via RS232 to a TI 
	   transfer program that handles the TIFILES header, such as TELCO, 
	   FAST-TERM or others. 
	  
04.06.2001 Extract9.bas. Added the help section (F1) and modified the 
	   MenuHlp.txt: added section A6, EXTRACT (TO DOS) SINGLE TI-FILES 
	   FROM DISK IMAGE FILE.
	   
	   
TI99_PC VERSION 2.0.4
=====================
	   
18.08.2001 Extract9.bas. Fixed bug. CalcWord would give an error when 
	   copying files in a disk with sub-directories. When StartCopying, 
	   the loop to check all the files to be copied has to skip the 
	   directories names.
           Thus, 
           FOR FileToCopy% = ActiveDirs%+1 
           and not 
           FOR FileToCopy% = 1 
           
18.08.2001 PC992I-2.bas. Fixed bug. When Editing Sector (F7) a file in last 
	   track of Side 0, then a file in last track of Side 1, and then 
	   again a file in last track of Side 0 the wrong sector was read. 
           Explanation: OldDskSide#  was not DIM SHARED (OldDskSide was!). 
           As a consequence, OldDskSide# could not remember the Old Disk 
           Side. 

21.08.2001 DOS2I2.bas. Fixed bug. F5 (Toggle TI filenames/DOS Long 
	   Filenames) would not show the correct Header: it always show "TI 
	   Filename   Type   RecLen". Now it toggles correctly, and shows 
	   "DOS Long Filename" as well. 

14.01.2002 Finished writing DOS2I2.bas and DOS2I3.bas. Added capability of:
           - including single files from an .ARK file
           - cataloging .ARK files
           - viewing sector of an .ARK file on the fly

15.01.2002 Sent TI99-PC2.zip to Tony Knerr, Peter Killick, and Andy Becker 
	   (through  <rsrussell1@worldnet.att.net>).

17.01.2002 Sent Archiver source files (compress and decompress) to Mike 
	   Wright. 

02.02.2002 Sent TI99-PC2-B.zip  to Bill R. Sullivan, to test it on a NT 
	   system. It works only in a DOS partion. No way to make it work in 
	   NTFS partition, not even with NTFSDOS.EXE of 
	   http://www.winternals.com/.

06.02.2002 Written a great deal of Help-on-Line. Practically, help for all 
	   sections has been written. Suitable code for on-line-help has 
	   been added to MAIN-02.BAS,  DOS2I1.bas,  DOS2I2.bas,  DOS2I3.bas 
	   and others. 

07.02.2002 Modified TI99_PC.COM. Bug: when copying a Geneve HD (1.44 MB) 
	   image file to floppy disk, the "3.5 FLOPPY (Y/N)" option was left 
	   to N. Now it can change to Y. 
           Also, I've changed the "3.5 FLOPPY (Y/N)" name too (because even 
           I did not know the meaning any more); now it is "Del.Data Mark 
           (Y/N)". It must be "Y" for Geneve HD only. 
           TI99_PC.COM now is version 2.0.1

07.02.2002 Corrected comments in TI99_PC.COM. Andy Becker flagged out some 
	   errors in commenting lines of INT13AB4.INC MOV   SI,90h  -  XOR   
	   DH,DH  - and following, before the "p_io_gap_ok:" label. 

07.02.2002 Sent new TI99_PC.COM version 2.0.1 to Tony Knerr. 
           
2002.02.13 DMA Boundary Crossing problem showed up. It depends on where
           in 640 KB DOS memory TI99_PC.COM is loaded, which, in turn, 
           depends on what you have previoulsy loaded. It can stop any 
           TI99_PC.COM activity: formatting, reading, writing, cataloging. 
           It is more likely it happens with large disk formats, i.e.
           1440 MB HD 3.5" Geneve disks.             
           The problem has been solved by enabling an alternate buffer 
	   (Altern_Buffer). Any time an INT13h is called a check will 
           be performed (eg DMA_Buff_Tx_Wr) to see if the DMA Boundary 
	   falls into the portion of memory that is being used as a buffer.

2002.02.14 Minor bugs solved. 
	    1) Option 6) Disk Catalog would show access codes as if the /D 
	       switch had been set. This happened only when called with the 
	       /DIR command. Rather obvious, the /DIR command begins with a 
	       "D". Solved by changing the "D" with "X". So, now the new 
		"Show access codes" switch is "/X". 
            2) Added a secondary reset disk (int 13h, ah=0) as 
	       "call int13h", which is an internal reset. I hope it will 
	       help, because sometimes the DOS INTI 13H reset doesn't seem 
	       to work. 
	    3) Added ":" for drive letter (eg "A:") in Opt. 6 Disk Catalog
               It's useless, but we are used to seing a colon there :-)   
	    4) Cleaned error messages in Opt.4 and 5 (Read from Disk, Write 
	       to disk an Image file. No more overlapping or leftover 
	       strings. 
            5) Corrected bug while attempting to create an Image file from 
               floppy. TI99-PC tried to reformat the disk it is not capable 
	       of reading (it could be a DOS disk!)
	    6) Better screen cleaning in Opt. 1 (TI Disk Formatter) after
	       F6 key has been pressed. 

2002.02.18  Version 2.0.3
	    1) Verify checks only track 0. Andy Becker reported this one.
	       Added another variable, VLowestTrack, where VStartingTrack  
               is copied when starting verifying. Thus VStartingTrack can be 
	       incremented on Side 1 and checked it doesn't go below 
	       VLowestTrack when doing Side 2. 
            2) Skew showed (1-8). Changed to (0-8). 
            3) A 360 KB drive now forces Double Step: N. 
            
2002.03.18  Long Filename Support
            Added support to Long Filenames.
            Developed INT716C.ASM, that not only returns a Short Filename 
            from an existing Long Filename, but also creates a new Long 
            Filename (returning the corresponding new Short Filename). 
            
2002.03.19  EXTRACT9.BAS - Corrected bug: when .ARK and normal files were 
   	    requested, the last normal file would get screwed, and the 
   	    .ARK file would be missing. It worked well only when either all 
   	    or none of the files were ARKed. 

TI99_PC VERSION 2.2.0
=====================
      
2002.03.26  EXTRACT9.BAS - Option X added   Option
            X will extract, from an Image File, all the files belonging to 
            an ARK file. The extracted files will be placed to a new DOS 
            directory. The new DOS directory will be named after ARK 
            filename. 
            If several ARK files are contained in a single Image File, 
            this option will be very handy, because each ARK file will 
            create its new DOS directory, avoiding any possible confusion 
            and/or overwriting of files with the same name under different 
            ARK files. Use Menu 1.6, Option "X". 
   	    
2002.04.12  DOS2I3.BAS and SPLITIM9.BAS. Corrected 2 similar bugs on each 
            file. 
            
            1st bug: Only on 720 and 1440 KB disks. When normal disk area is
            full and FDR area is used for storage, each new sector would
            force a new entry in the CHAIN block. After a short time, the 
            CHAIN table is full. Reason: LeftOver% variable is wrongly 
            reset to zero when WriteChainPointers subroutine is called. 
            This forces a new sector search when GetAFreeSect routine is 
            invoked, which leaves the OldFreeSect% out of sync. The latter, 
            in turn, forces the closing of the current CHAIN, because
            OldFreeSect% is different from NewFreeSect% (see at 
            NextClusterPr: label). 
            Fix: LeftOver% must not be changed  by WriteChainPointers. 
            It will be reset anyhow when UTM% gets to zero (see at
            GetAFreeSect: .) [On SPLITIM9.BAS this variable is named 
            LeftOver2880%.]
            
            2nd bug: Only on 720 and 1440 KB disks. At GotFreeSec:, when a 
            new File is allocated and a new FDR is used, StillFree% (number
            of sectors still free) is decremented by 1 only, even with 720 
            and 1440 KB disks.  
            Fix: StillFree% is further decremented by 1 with 720 disks and 
            by 3 with 1440 KB disks at GotFreeSec:. 
           
2002.08.29  Restored original wait routines in "wait0" and "wait1". They 
            were modified shortly after I started working on this code, 
            hoping to ovoid the problems encountered while trying to read 
            some old TI disks. They were made more "aggressive": instead 
            of waiting a keyboard refresh (15.09 microseconds) before 
            attempting a new I/O port read, the routine would keep on 
            reading the I/O port continuously. 
            I don't think it helped any and, recently, a sustained 5.25" 
            floppy disk driver failure rate (dead drive) while reading bad 
            disks gave me the idea that, maybe, the drive doesn't like to 
            be accessed so often. 

2002.09.06  TI99_PC VERSION 2.2.0 to be released in International TI-Treff
            in Nottingham is ready. 
            
2002.10.30  Fixed bug in IMG2DSK.BAS. Bug description: in option 2.1, 
	    "1) TRANSFER A TI99-PC DOS IMAGE FILE TO A TI-99/4A FLOPPY DISK"
	    after copying to a real TI-99/4a floppy and returning to 
	    the file listing menu, accessing any file through the SECTOR
	    VIEWER would trigger an error, "bad File Name or Number". 
	    Reason: the image file was erronously closed before attempting
	    to access the real TI-99/4a floppy disk. 
	    Fix: "CLOSE # 1 " statement at line 423 was deleted on 
	    IMG2DSK.BAS file. 
	    
2003.08.30  Version 2.2.1
	    Fixed bug: Total sectors count does not reset on Menu 1.7                   
            While in Menu 1.7 [Split a large disk image file (from opt. 1)   
            into smaller disk image files] the total count of selected files 
            does not properly reset once the splitting has been carried over.
            Fixed on August 27, 2003 from a tip of Ben Yates. Thank you, Ben!
            Now the variable TotSizeFiles2Copy# = 0 is reset to zero every   
            time the splitting is started.                                   

2004.01.03  Version 2.2.1
            Fixed bug: an 80 Track DS/SD disk newly formatted by TI99_PC.COM
	    would have 719 Free and 721 Used sectors. 
            TI99_PC.COM would properly format an 80 Track DS/SD 
            disk (1440 sectors, 360 KB, according to the new Eprom released 
            by Tony Knerr for the Texas Instruments Single Density Floppy 
            Disk Controller). However it would fail while writing the map 
            of free/used sectors in sector zero. Thus,the formatted disk 
            would result in 719 Free and 721 Used sectors, while it should have 
            1438 Free and 2 Used sectors. This fix corrects the above error.
	    Kudos to Robert Boyd on ti99-4a@yahoogroups.com, for reporting 
	    the error.  
	    
2004.01.28  Version 2.5 
            ===========
            
	    1)	    Added 80 Track DS/SD image file (and others) 
            ====================================================
            Due to popular demand, new disk image file formats have been added, 
            the most important being the DS/SD 80 Track. The new formats will 
            be available in the following menu options: 
            a) - 1,6 - Extract (to DOS or ARK file) single TI-Files from TI99-PC 
                       disk image file
            b) - 1,7 - Split a large disk image file (from opt. 1) into smaller 
                       disk image files
            c) - 2,6 - Import Files from DOS or ARK files to a TI99-PC disk image 
                       file
            
	    2)          Extended PC99 disk image file handling 
	    ==================================================
	    No need any more to convert a PC99 DSK disk image file to native 
	    TI99-PC format prior to either Extracting to DOS (Option 1,6) or 
	    Splitting (Option 1,7). The PC99 file will be directly extracted 
	    or splitted as is. The splitted file will always be in the TI99-PC 
	    format, though.
             	    	
	    3) 	    Added TI disk catalog in main menu 
            ==========================================
	    F5 key (while the cursor is on the DOS filename input field on any 
	    main menu selection) now performs a catalog of any TI disk image file 
	    encountered (V9T9, PC99 or uncompressed Mess Hard Disk). 
	    F8 key while you are on the catalog will list the content of the 
	    ARK file the cursor is on. 
	    
	    The same holds true while you are on the DOS Navigator (you get on 
	    the DOS Navigator by pressing the F6 key on any main menu selection).
	    This is very handy; up to now you had to select the file and enter
	    the conversion program before you could see what was inside the TI 
	    disk image. 

            4)	    You can add files to an existing disk image file (Splitting) 
            ====================================================================
	    In option 1,7 is now possible to split a disk image file over an 
	    existing disk image file without overwriting the existing files on 
	    the destination disk image file. The program will verify if the 
	    destination disk image file exists. 
	    
	    If so, the user will be asked whether he wants to Overwrite, Skip 
	    or Append to the existing disk image file. If Append is chosen, 
	    the new files coming from the disk image files being split will 
	    be simply added to the existing files on the destination disk 
	    image file. 
	    
	    Maybe I should change the name of this option, to better reflect 
	    the changed nature of it. Any suggestion about it? 
	   
	 
	 
	    5)	    ARK File Naming Problem while Extracting Solved
	    =======================================================
	    An ARK file can be extracted to DOS (option 1,6) as an archived
	    or an unarchived file. If archived, a simple DOS file with the 
	    same name will be created. If unarchived ("X" command key), a DOS 
	    directory with the name of the TI file will be created and all the 
	    files contained in the TI ARK file will be store in there. 
	    The user cannot change the name of the output file.
	    
	    A DOS naming problem arises when (in two sessions) you try to do both 
	    things, that is you try to extract an ARK file both as archived 
	    and unarchived. In the second session DOS will issue an error and crash
	    the program, saying that either it cannot create a new directory 
	    with the name of an existing file (if you first extract the ARK file
	    as archived), or that it cannot create a file with the same name of 
	    an existing directory (if you first extract the ARK file as unarchived).
	    
	    This error was difficult to track down and I must admit it took me a 
	    while before I was able to make out what was going on. 
	    
	    A patch has now been added, to avoid crashing the program. A warning 
	    will tell you you either have to rename the file or the directory, 
	    so as to solve the conflict. 
	    
	    6) 	    Avoid TIFILES Name while Importing and Extracting TIFILES
            =================================================================
            On Option (2,6) [Importing Files from DOS], if a DOS file with TIFILES 
            header gets imported with the "K" command (do away with the header 
            before importing) the TI Name suggested is always "TIFILES", literally, 
            which is not very helpful. 
            
            Fix: the DOS2I1.BAS file has been changed so as to make an exception 
            when that happens. Instead of the silly "TIFILES" name, the DOS 
            filename will be used to form the TI filename. That is allowed only 
            to the first file of a TIFILES DOS file. 	    
            
            
            7)Fix  Tunnel of Doom bug in Option 2.6, "Import disk image file" of TI99-PC
            ============================================================================ 
            A bug in Option 2.6, "Import DOS or ARK files to a TI99-PC disk image file" 
            of TI99-PC has been recently discovered by Jonathan Andersson. Tunnel of 
            Doom disk are not be copied properly. 
            
            The bug occurs when importing program files or Dis/Fix files
            whose size *EXACTLY* fit in a TI99/4A sector (256 bytes). 
            In this case an extra sector, full of zeroes, will be added to 
            the file being created. Tunnel of Doom will not accept 
            a program file of a wrong length and will issue an error.
            
            
            The added sector is computed in the file reported length and 
            normally this doesn't pose a problem. 
            As an example, TI Program files have an internal header that 
            tells the program loader how many bytes have to be transferred 
            from VDP to CPU. So, up to a certain degree, the length of a 
            program reported by the OS is irrelevant, but not in the case 
            of Tunnel of Doom.
            
            Jonathan has been kind enough as to provide the fix to the bug
            as well, and this is all the fix is about. 
            
            DOS2I3.bas is the program that has the bug. 
            
            For those that are more technicallly inclined and can't abstain 
            from getting into the subtilties and intricacies of 
            QBASIC programming, I will say that only now have I discovered 
            an unexpected behaviour of the EOF instruction. 
            
            When the EOF instruction checks the End Of File of any 
            file behaves differently when it does it on a SEQUENTIAL 
            file from when it does it on a RANDOM or BINARY file. 
            
            On a SEQUENTIAL file the EOF will issue TRUE when the 
            file pointer has read the last available record on a file,
            i.e. there is nothing left to be read. 
            
            Under the same conditions on a RANDOM or BINARY file 
            the EOF will issue FALSE. 
            It will issue TRUE only when trying to read PAST the last 
            byte of a file. 
            That may happen either because the number of bytes left 
            in the file are not enough to fill the allocated read buffer, 
            or because there really are no byte left to be read in the file 
            (i.e. we were already at the physical end of file). 
            
            The second case is when the DOS2I3.bas bug arises. 
            
            Kudos to Jonathan Andersson for reporting the error and 
            finding the fix. 
            any additional problem to you.
           
2004.05.10  Version 3.0.0

	    In March 2004 Beery Miller pointed out to me that TI99-PC could 
	    not strip the TIFILES header when importing a TIFILES from DOS, 
	    thus making it impossibile to use the file in the TI environment.
	    
	    While I was at fixing it, I realized that importing DOS files and 
	    storing them into an ARK file inside a Disk Image File was rather 
	    cumbersome: 
	    a) you had to import the files from DOS as single files 
	    b) export them to DOS in an ARK file 
	    c) import the ARK file from DOS
	    
	    Also, you could not add files to a populated disk image file while 
	    importing files from DOS. 
	    
	    Finally, no provision was made to Delete files from a Disk Image 
	    Files under TI99-PC. Thus, disk maintenace at file level with 
	    TI99-PC was quite impossible.
	    
	    The current TI99-PC version 3.0.0 tries to address the above problems.
	    
	    Particularly, disk maintenance at file level is now possible by 
	    selecting as a destination disk the disk you want to work upon 
	    with option 1.7 (Splitting a Disk Image File) and by using the 
	    new Delete File function as needed. 
           
	    1) "T" new command key to strip TIFILES header in Option 2.6 (Import files from DOS)
            ===================================================================================        
            It's now possible to strip a TIFILES header from a TIFILES 
            file being imported from DOS, thus importing just the body 
            of the file. This new command acts as any TI-99/4A file transfer 
            program over RS232 would (TELCO and the like). 
            These programs strip the TIFILES header when importing a file 
            from DOS. 
            
            You can always use the new "T" command instead of the "C" 
            command if you are not sure if the file being imported really 
            has or hasn't a TIFILES header. 
            As a matter of fact the new command key will always be 
            automatically reset to "C" if the file doesn't prove to have 
            a real TIFILES header. 
            
            The only drawback you will experience is a slight slow down 
            in performance, since each file will now have to be checked 
            to ascertain if there is indeed a TIFILES header. 
            This involves launching an external program for each file to 
            be tested.      
            
            
	    2) "K" Command key changed to "X" for Extracting in Option 2.6 (Import files from DOS)
            =====================================================================================
            An ARK file imported from DOS can be unArked before importing 
            in Option 2.6. 
            The Command key for that purpose used to be "K". Now it has 
            been changed to "X". 
            This way it's more logical, since it matches the command 
            key used in option 1.6 (Extract files to DOS) for the same 
            purpose. See also below, at point 3).
            
	    3 "K" Command added for Collecting and Archiving files in Option 2.6 (Import files from DOS)
            ============================================================================================
            Files collected for importing may be archived in an Archiver 
            III way before importing if they are marked with the "K" 
            command. Only one archive file will be created per session, 
            containing all the files selected with the "K" command. 
            Make sure you don't add too many files, otherwise the ARK 
            file just created won't fit in the Disk Image File you 
            have chosen. 
            
            The ARK file type (Compressed or Uncompressed) and the 
            filename are at user's choice. 
            The files to be ARKed will be processed before all the 
            others, even before those marked with priority numbers 
            ("0", "1", "2" and so on). In other words, the ARK file 
            will surely go to the first output Disk Image File you 
            have selected. 
            
	    4) Append files to a populated disk in Option 2.6 (Import files from DOS)
            =========================================================================
            You can now add files to a populated disk when importing 
            files from DOS. The output Disk Image File will not necessarily 
            have to be a new one. Select an existing Disk Image File as 
            an output disk and chose Append when prompted for Overwriting, 
            Skipping or Appending the existing disk. The new files will 
            simply be added to the existing ones and alphabetically 
            reordered. 
            
            Duplicated file names will be automatically checked and 
            resolved by adding a tilde character "~", if needed, to the 
            new file being added. 
            
            
	    5) Deleting files and entire directories from a Disk Image File
            ===============================================================
            It is now possible to delete files and directories in a 
            Disk Image File. This option is only active in all the 
            TI Disk Directory (the green one) launched by F5 key 
            from any menu in Main Menu. These menus are very common 
            and you can spot this bottom note "F5-F6=TI-DOS listing" in 
            them.
            
            Simply mark with a "D" any file or directory you want to 
            delete. When you are through with your selection, hit "F6" 
            key to proceed and confirm. All the selected files and 
            directories will be deleted and the freed disk sectors will 
            be added to the free ones.
	    
	    This new command will work on both the V9T9 and the PC99 
	    disk image files. 
	    
	    6) Fixed Bugs in Option 2.6 (Import files from DOS)
            ===================================================
            A) Importing a normal file after importing and extracting an 
               ARK file from a different directory would crash the program. 
               Fixed! (Sel.DArk left set to "K" by mistake in DOS2I1.BAS)
            B) Fixed wrong total size of files to be imported in DOS2I1.BAS
            C) Fixed "Subscript Out of Range" error when importing just 
               one file in DOS2I3.BAS
            
	    7) Fixed Bug in Option 1.7 (Split a large disk image file)
            ==========================================================
	    There was an extra sector wrongly marked as used 
	    In the Free/Used Sectors Bit Map in sector zero. 
	    This happened in 1.44 MB disk image only. 
            
	    8) Fixed Bug and Added "T" switch in "DECOMP4.COM" 
            ==================================================
            "DECOMP4.COM"  is an external assembler program used to 
            decompress and catalog an Archiver III compressed file. 
            Uncompressed files got sometimes corrupted by this program 
            at offset 4096 from the file start. Reason: miscalculated 
            file length. Bug fixed.
	    
	    In the same program, the newly added "T" switch simply strips 
	    the TIFILES header from an  Archiver III compressed file. 
	    This reflects the changes in option Option 2.6 (Import files 
	    from DOS), see above at 1).
            
	    9) Fixed "FILE ALREADY OPEN" error
            ==================================	
	    Sometimes an annoying "File Already Open" error would show up. 
	    Fixed with a RESET command added at the beginning of the 
	    MAIN02.BAS file, the main TI99-PC file. 
	    
               
             