This doc is obsolete. The html doc is now the authoritative source.


*********************************************************
* TiLT - link program for TI calculators           *
* Copyright (C) 1999-2000, Romain Lievin                *
*                                                       *
* Informations about the source code of the /tilink	*
* directory						*
* Last update: 01/04/2000				*
*********************************************************

This directory contains all functions to manage the communication between a
Texas Instruments' calculator and a computer.


Description of the different files
----------------------------------

- ti82.c to ti92p.c: these files contain the different functions to communicate with the calculator.
- trans.c: the 82 and 83 calcultors require that some variable names must be translated in a more explicit varname.
- verbose.c: used to enable/disable the display of debug informations (disabled by default in the Windows version: DOS term window is very slow and bring about some transfer crashs.
- pcx_xpm.c: some functions to load and save pixmaps and/or PCX files.
- error.c: this file contain a unique function which displays an error message
according to an error number.
- defsXX.h: include all defs82.h to defs92p.h headers.

- errormsg.h: contains all error messages.
- keys89.h and keys92.h: contains the list of key codes (we can found this list in the user's manual of your calc).
- typedefs.h: some definitiobns of types
- ti_link.h: contains the definitions of external variables and function pointers for low-level, general and communication routines.


Description of the main functions
---------------------------------

Some functions may do nothing according to the calculator type.

- const char *ti82_byte2type(byte data): translates a vartype into string.
- byte ti82_type2byte(char *s): translates a string into vartype.
- const char *ti82_byte2fext(byte data): translates a vartype into file extension.
- byte ti82_fext2byte(char *s): translates a file extension into a vartype.

- int ti82_isready(void): tests if the TI is ready.

- int ti82_send_key(int key): send a keyboard code to the TI.

- int ti82_remote_control(void): remote control in curses mode.

- int ti82_screendump(byte **bitmap, byte *width, byte *height): do a screen capture of the calc and put the screen in the bitmap and also its dimensions in width and height.

- int ti82_receive_backup(FILE *file, int mask_mode, longword *version): receives a backup and the ROM version is put in version (depending of calc type).
The mask_mode var is used for the 89/92/92+ only. See t_defs.h for mask definition.

- int ti82_send_backup(FILE *file, int mask_mode): send a backup.
The mask_mode var is used for the 89/92/92+ only.

- int ti82_directorylist(struct varinfo *list, int *n_elts): do a directory listing of the calc and put the dirlist in a single linked list. The n_elts variable contains number of variables and folders.

- int ti82_receive_var(FILE *file, int mask_mode, char *varname, byte vartype, byte varlock, int mode): receive one or more variables. If varname[0]='\0' then the file received is a group file else it is a single file. 
The mask_mode variable is used to specify how the function works. See t_defs.h
for masks.

- int ti82_send_var(FILE *file, int mask_mode, int local, int mvar): send one or more variables. If a single file must be sent, mvar=0. If several variables: n-1 sent with mvar=1, the last one with mvar=0. The local parameter tells if the variable is sent in the current folder or in its original place.
The mask_mode variable is used to specify how the function works.


Romain Lievin <roms@TiLT.ticalc.org> 



