Name: Swim 3
Author: Andrew Oliver (aoliver@techplus.com)
Version: 3.5.8
Platform: TI-OS
Language: TI-83 BASIC
Memory: 5730 bytes 
Release Date: 01/18/2000


------------------------------------------------------
TABLE OF CONTENTS

I. Description
II. Included Files
III. Installation
IV. Usage
V. Customizing
VI. Synchronizing
VII. Overview
VIII. History
------------------------------------------------------




I. DESCRIPTION
	Swim 3 is a database program for recording, tracking, and graphing swimmer performance.  It is able to hold an unlimited number of entries (barring memory) as well as 8 seperate swimmers.  It is able to report what standard (A, B, or NT) of time a swimmer has achieved.  Swim 3 is highly customizable to a users liking, allowing the removal of modules to save space, different graphics modes, and a graphing feature for graphing a swimmers improvement.

------------------------------------------------------

II. INCLUDED FILES
	swim3.83g
		-S3ADV - Advanced Options
		-S3DRAW - Screen draw control
		-S3EVENT - Event lists
		-S3GRAPH - Time graphing
		-S3INPUT - Input routines
		-S3LINK - For synchronizing 2 calcs
		-S3LOAD - The splash screen
		-S3OUT - The data-out pipeline
		-S3OUTPUT - The screen formatting routines
		-S3SETUP - The initial setup program
		-S3SWIMID - A-B Time routines
		-S3SWMR - Swimmer Profiles
		-S3TIME - Time decompression routines
		-SWIM3 - The executable

	Readme.txt - This file


REQUIREMENTS
	5730 free bytes of memory for the initial install, Modules not needed may be deleted after install.  And however much memory the database takes up (37 bytes per entry) 
------------------------------------------------------

III.  INSTALLATION

	1) Transfer swim3.83g to your calc
	2) On your calc, open S3SWMR for edit.  You will see the following:
0->S
Menu("CHOOSE SWIMMER","SWIMMER 1",A1,"SWIMMER 2",A2)
Lbl A1
1->S
16->A
Return
Lbl A2
2->S
16->A
Return

In line 2,  change "SWIMMER 1" and "SWIMMER 2" to the swimmer's names, more can be added by appending the names and a label. IE:

Menu("CHOOSE SWIMMER","SWIMMER 1",A1,"SWIMMER 2",A2,"SWIMMER 3",A3,"SWIMMER 4",A4)

For each swimmer entered into the menu, you must also add a "profile".  When you edited the swimmer menu, you placed "A1", "A2", etc behind the names as in the example. The format is as follows:

Lbl A[X]
[X]->S
[swimmers age]->S
Return

So if you entered 4 swimmer names into the menu, you would place 4 sets of the above code in.  [X] represents the number that you placed in the menu after the swimmer's name.  You should replace [swimmer's age] with the swimmers current age.
The following example should help if you do not understand.

0->S
Menu("CHOOSE SWIMMER","SWIMMER 1",A1,"SWIMMER 2",A2,"SWIMMER 3",A3,"SWIMMER 4",A4)
Lbl A1 - profile for swimmer 1 (#1 in this case)
1->S   - the profile # (#1 in this case)
16->A  - the swimmer's age (16 in this case)
Return
Lbl A2 - profile for swimmer 2 (#2 in this case)
2->S   - the profile # (#2 in this case)
13->A  - the swimmer's age (13 in this case)
Return
Lbl A3 - profile for swimmer 3 (#3 in this case)
3->S   - the profile # (#3 in this case)
18->A  - the swimmer's age (18 in this case)
Return
Lbl A4 - profile for swimmer 4 (#4 in this case)
4->S   - the profile # (#4 in this case)
12->A  - the swimmer's age (12 in this case)
Return

As many as 8 swimmers can be used at any one time.  It is not recommended to change the swimmers names and/or "profile" after a database has been started.  However if an error was made in the initial entry, no known problems will occur if the data is changed.  Changes are immediate.

If you have problems with this step, please e-mail me, aoliver@techplus.com

	3) This step also involves editing code to enter swimmer data into the program.  On your calc, open S3SWIMID for edit.  The following code we are interested in:

" "->Str9
If LBUF(4)=1
Then
16->X
"AO"->Str9
End
If LBUF(4)=2
Then
16->X
"TF"->Str9
End

For every swimmer you entered in step 2, you will need to create another "profile" for. The format is as follows:

If LBUF(4)=[X]
Then
[swimmers age]->X
"[swimmers initials]"->Str9
End

You will need to replace [X] with the swimmer ID # you gave in step 2 (A1, A2, etc) you just need to enter the number, not the "A".  Then replace [swimmers age] with the swimmers age as in step 2.  Next replace "[swimmers initials]" with a 2 or 3 letter initail.  If the swimmer is female, add one hundred (+100) to the age.  For example the code would be as follows:

" "->Str9
If LBUF(4)=1 - Profile #
Then
16->X	     - Swimmer's age - This swimmer is 16 years old and male
"AO"->Str9   - Swimmer's initials
End
If LBUF(4)=2 - Profile #
Then
13->X	     - Swimmer's age - This swimmer is 13 years old and male
"TF"->Str9   - Swimmer's initials
End
If LBUF(4)=3 - Profile #
Then
118->X	     - Swimmer's age ((NOTE!!)) This swimmer is 18 years old and female
"KYL"->Str9   - Swimmer's initials
End
If LBUF(4)=4 - Profile #
Then
112->X	     - Swimmer's age((NOTE!!)) This swimmer is 12 years old and female
"FG"->Str9   - Swimmer's initials
End

Once again, if you have trouble, e-mail me, aoliver@techplus.com

	4) Now all of the hard parts are over!  Run S3SETUP and the program will set itself up and start for the first time.  If Steps 2 and 3 were correct, the program will boot and run fine.  To run the program from now on, run SWIM3


------------------------------------------------------


IV. USAGE

ENTERING A TIME - go "Input Time" from the main menu, you are then presented with a list of swimmers, events, and distances, and finally you will get:

MM/DD/YEAR


Input Date 

To enter Jan 5th, 2000, you would press the following keys: [0][1][/][0][5][/][2][0][0][0][ENTER]

NOTE - it is not necessary to enter the "/"s, and character will do.
You are then presented with:
00:00.00

Input Time

To enter a time of 1:22.43 you would press the following keys:
[0][1][Alpha][.][2][2][.][4][3]
Note - it is not necessary to enter the : or the .  Any character will do.

You are then returned to the Main menu.

VIEWING TIMES - Choose View Time from the main menu, then choose the sorting method, swimmer, event, and distance. Vola!

NOTE - nether the date or time are checked for validity.

------------------------------------------------------


V. CUSTOMIZING

Swim 3 is designed to be flexible and customizable to a users likes.  If any features of Swim 3 are not wanted, the corresponding module may be deleted without harm.

Program Name  |  Function
--------------------------
S3ADV		Advanced Options, accessable from the main menu
S3DRAW		Graphics engine if using graphics level 3 (see below)
S3GRAPH		Graphing program, accessable from the view times menu
S3LINK		Synchronizing routines for merging databases from 2 calcs together
S3SETUP		Setting up a new database, can be deleted once excuted the first time

GRAPHICS OPTIONS

Swim 3 offers 3 graphics options.  They are as follows and are set using: [X]->LSWIM3(2)
IE. If you want graphics mode 1, use "1->LSWIM3(2)"

Mode	Function
-----------------
1	Full graphics, uses PIC6 to store the graphics template, may not be desireable 	if space is a concern.

2	Half Graphics, draws a quick template each time it is required, most as nice 	looking as other modes, but saves space and is as fast as mode 1.

3	Full/Space Graphics, draws a complete graphics template each time it is 	required, saves space, looks as good as mode 1, but is slow.

SWIMMER .VS OPTION

You can set how many records are displayed when a Swimmer .VS is used.  Measured in lines, the default is 48, which is one full page.  If set higher than 48, all records are displayed, if set lower, 1 record less is displayed for every 6 lines.  IE, if set to 42, 8 records will be displayed, if set yo 36, 7 records are displayed, etc.

GRAPHING
When you choose to graph a time, you are asked for the swimmer, event, and distance.  Swim 3 will then parse it's database into lists for graphing.  You are presented with a graph of all the times for the search criteria.  The arrows can are used to select data, and pressing enter will bring up all data on that record in the standard display interface.
------------------------------------------------------
VI. Synchronizing

This module (S3LINK) is used to merge databases from 2 calculators together into one.  IE. If one calc has a database for swimmer X, and another calc has a database for swimmer Y.  The calc that runs S3LINK would end up with a database containing both swimmers X and Y.

To use, place the sending calc at the home screen and connect the link cable.  Then execute S3LINK on the receiving calc.  You will see the current status of the merger, and normally finishes in <30 seconds.

NOTE!  DO NOT MERGE 2 DATABASES WITH DIFFERENT SWIMMERS!!.  To properly merge 2 databases, each calc must have the same swimmers (See Installation, steps 2 and 3) entered into them.

The optimal use of S3LINK is to install Swim 3 on one calc, then transfer the installed Swim 3 files to other calcs.  You are then absoutly sure that the setup is the same, and no errors will occur.

S3LINK can be used to transfer databases between 2 calculators, or it can be used on 1 calc as a central hub for several calcs.

------------------------------------------------------

VII. Overview - The internal workings of Swim 3

I'll just quickly go over how Swim 3 stores, works with and displays data.
The database is comprised of 4 lists, LDATA1, LDATA2, LDATA3, and LDATA4. 
LDATA1 contains the compressed Dates, using the following format:
[month]0[day]0[year]   IE, 8015099 represents 8/15/1999

LDATA2 contains the event ID #'s
LDATA3 contains the Swimmer ID #'s
LDATA4 contains the race times in second format.  IE. 121.54 is 2:01.54

The database is indexed by the swim times, this greatly improves the search times, and helps keep everything organized.

When an entry is made to the database, the information is parsed apart and stored to the appropriate lists.

When a view times is excuted, you are asked for the relavant information, such as swimmer's name, event, and distance.  This information is used to search the database until a match is found.  Once this happens, because the database is indexed, it is able to find other match to the criteria very quickly as like records reside immediatly next the the match.

When a match is found to the search criteria, the information is read from the database into LBUF for processing.  The date and time are uncompressed, and the data then passed down to the output routines.  For the technical documents on how exactly the programs interface, please e-mail me.  aoliver@techplus.com

LSWIM3 - is the control list for Swim 3, it contains data vital to it's operation, and will likely crash if it is edited for reasons other than the ones in this readme.

LSWIM3 has the following format:
{[# of database entries],[graphics mode],[swimmer .vs mode]}


------------------------------------------------------

VIII. HISTORY

Private revisions are not listed.

Version:
    3.5.8
	-Fixed a fatal graphing error

    3.5.5
	-fixed date input/output bug.
	-Changed splash screen
	-Finished S3LINK for linking databases
	-greatly optimised the date and time compression and decompression routines, 15% speed increase
	-Added advanced options and the ability to easily edit the raw data
	-Tweaked Y2K compliance
	-New record input interface

   3.3.8
	-The use of custom addons 
	-Data compression allows databases 48% smaller 
	-Database indexing 
	-Unlimited data (735 records, assuming 25,000 bytes free) 
	-Y2K Compliance 
	-Output customization 

                     









