+-------------------------------------------------------+ | TI PROTOCOL INFORMATION | +-------------------------------------------------------+ by Pascal BOURON (bouron@ENS-Cachan.fr) Version 1.1 (30/05/96) +-==========================-+ | O - Table of contents | +-==========================-+ O - Table of contents I - Protocol Texas Instruments 11 Generalities 12 Devicetype 13 Command 14 Protocol 15 Variable Header Format 151 TI-82 152 TI-85 153 TI-92 16 DataPart Format 161 TI-82 162 TI-85 163 TI-92 II - Backup 21 TI-82 22 TI-85 23 TI-92 III - Special 31 TI-85 311 Screendump 312 PrtScrn 32 TI-92 321 Screendump 322 SEND command 323 GET a 324 Request function 3241 Backup 3242 Variable 3242 Content 325 Remote control of the TI-92 326 Command 92 by link port IV - Reference documents Section A : Index A1 TI-82 A2 TI-85 A3 TI-92 Section B : Examples B11 Transmission of Var with the 82 B12 Transmission of Var with the 85 B13 Transmission of Var with the 92 ( B21 Information about the TI-82 Backup ) B22 Information about the TI-85 Backup ( B23 Information about the TI-92 Backup ) Section C : Other informations ( C11 Format of Variable in the TI82 ) C12 Format of Variable in the TI85 C13 Format of Variable in the TI92 +-==========================-+ | I - Protocol T.I. | +-==========================-+ 11 Generalities -===============- Thanks to Per Finander, Ben Eater and George Nachman. The TI82/TI85 and TI92 have the same protocol. All transmissions are in packets. Format af a packets: 1 Byte : Devicetype 1 Byte : Command 1 Word : Datalength n bytes : Data 1 word : Checksum if n>0 All words are in LLHH format (LSB before MSB) Datalength : In the 92, Datalength's word can be different of 0 WITHOUT data and checksum. In this case, this word in an indormation: 09 87 xx xx : See 326 89 56 00 01 : 92 Receive OK but Not ready 09 09 xx xx : Ready to receive xx xx bytes Checksum : Exist if n>0. Checksum in the sum of all byte of the data. 12 Devicetype -=============- 02 : Computer > TI82 05 : Computer > TI85 09 : Computer > TI92 12 : TI92 > CBL ??? 15 : ?? > TI85 82 : TI82>TI82 or TI82>Computer 85 : TI85>TI85 or TI85>Computer 89 : TI92>TI92 or TI92>Computer 13 Command -==========- 06 : Variable header 09 : Wait Data/Continue 0D : SEND ??? 15 : Data part 36 : Refused (Not used on the 92, 92 can accept all var ?) 56 : OK 5A : CHK error , send again 68 : Test if 92 is ready (See 327) (Only found on the 92) 6D : Screen Dump 78 : Continue (See 325) (Only use by TI-92) 87 : Direct command (See 326) (Only found on the 92) 92 : End of transmission A2 : Request (See 325) (Only found on the 92) 14 Protocol -===========- Transmission of a variable from device1 to device2 1)Device1 : Var header (Name,type,length) 2)Device2 : OK 3)Device2 : WAIT 4)Device1 : OK 5)Device1 : DATAPART 6)Device2 : OK 7)Device1 : END of transmission 8)Device2 : OK If there are several variable, repeat 1) to 6) 15 Variable Header Format -=========================- 151) TI-82 ---------- Variable header: Always 11d bytes Ll Lh Ty [NAME] $100*Lh+Ll = Size of the Var Ty = Type of the variable NAME = Always 8 char, zero-terminated if length<8 (See Linkprot.txt by Per Finander for the var-code) 152) TI-85 ---------- Variable header: From 5 bytes to 12d bytes Ll Lh Ty Nl [NAME] $100*Lh+Ll = Size of the Var Ty = Type of the variable Nl = Name length (See Linkprot.txt by Per Finander for the var-code) 153) TI-92 ---------- Variable header: From 7 bytes to 23d bytes LL LH HL HH Ty Nl [NAME] HH HL LH LL= Size of the Var in Memory (Real Size +2) Ty = Type of the variable Nl = Name length (See "TI-92 LINK INTERFACE PROTOCOL" by Ben Eater and George Nachman) 16 DataPart Format -===================- 161) TI-82 ---------- Same as in Memory LL HH xx xx xx .... xx HHLL : length of the variable Example: (See Section B-11) 162) TI-85 ---------- Same as in Memory For PRGM,STRING... LL HH xx xx xx .... xx HHLL+4+length(NAME) : length of the variable in the MEM Menu For REAL,PICT,... xx xx xx Example: (See Section B-12) 163) TI-92 -------- 00 00 00 00 HH LL ....... HHLL : length of the variable.(real size) In memory, there are from HH LL to byte before chk Example: (See Section B-13) +-==========================-+ | II - BACKUP | +-==========================-+ 21) TI-82 -=========- Sorry , no informations about this. 22) TI-85 -==========- Thanks to David Boozer (adb2y@virginia.edu) TI-85 : 85 06 09 00 B1 08 1D 12 00 23 00 F7 8B 8D 02 Computer : 05 56 00 00 05 09 00 00 TI-85 : 85 15 B1 08 .. .. Part 1 .. .. Computer : 05 56 00 00 TI-85 : 85 15 12 00 .. .. Part 2 .. .. Computer : 05 56 00 00 TI-85 : 85 15 23 00 .. .. Part 3 .. .. Computer : 05 56 00 00 ( These values have been found with a ROM 3.0 after a reset.) More Detail : See B-22 23) TI- 92 -===========- Thanks to David Ellsworth (davidells@aol.com) for his help. The TI-92 Send backup if "anyone" ask it. Here is the conversation of the request send by a computer and the answers reply by 92. WHO? Byte send TRANSLATE ------------------------------------------------------------------------ Computer : 09 68 00 00 Test TI-92 : 89 56 00 00 OK Computer : 09 A2 11 00 00 00 00 00 1D 0B 6D 61 Send me (Backup) 69 6E 5C 62 61 63 6B 75 70 9F 04 main/backup TI-92 : 89 56 00 00 OK 89 06 09 00 00 04 00 00 1D 03 31 2E 33 B6 00 Backup 1kb 1.3 Computer : 09 56 00 00 OK 09 09 00 04 Ready to receive 1kb TI-92 : 89 56 00 00 OK 89 15 00 04 .. .. 1 k Of data .. .. .. CH CL 1kb of data Computer : 09 56 00 00 OK TI-92 : 89 06 09 00 00 04 00 00 1D 03 31 2E 33 B6 00 Backup 1kb 1.3 Computer : 09 56 00 00 OK 09 09 00 04 Ready to receive 1kb TI-92 : 89 56 00 00 OK 89 15 00 04 .. .. 1 k Of data .. .. .. CH CL 1kb of data Computer : 09 56 00 00 OK (* N with N>=38) TI-92 : 89 06 09 00 ll hh 00 00 1D 03 31 2E 33 B6 00 Backup hhll bytes 1.3 Computer : 09 56 00 00 OK 09 09 hh ll Ready to receive hhll TI-92 : 89 56 00 00 OK 89 15 00 04 .. hhll bytes of data .. CH CL 1kb of data Computer : 09 56 00 00 OK TI-92 : 89 92 00 00 END of Transmission Computer : 09 56 00 00 OK Rem : 1) When the computer reply 09 09 00 04, the 00 04 is not important, and can be replaced by another value, with no change. 2) I think that the 1.3 is version of the Rom. If anyone with another version as the 1.3 can confirm to me. 3) If the first reply of TI92 is 89 56 00 01, then the 92 is not ready. (See 327) +-==========================-+ | III - Special Function | +-==========================-+ 31) TI-85 -==========- 311) Screendump --------------- Computer : 05 6D 00 00 TI-85 : 85 56 00 00 85 15 00 04 .. .. Memory part , From FC00 to FFFF ... CHK Computer : 05 56 00 00 312) PrtScrn ------------ TI-85 : 85 06 03 00 00 04 14 18 00 Computer : 05 56 00 00 05 09 00 00 TI-85 : 85 56 00 00 85 15 00 04 .. .. Memory part , From FC00 to FFFF .. CHK Computer : 05 56 00 00 32) TI-92 -==========- 321) Screendump --------------- Computer : 09 6D 00 00 TI-85 : 89 56 00 00 89 15 00 0F .. .. .. .. .. .. .. .. .. .. .. .. .. .. CHK Computer : 09 56 00 00 322) Send {1,3.1} ----------------- TI-92 : 89 06 07 00 07 00 00 00 04 01 FF 0B 01 (List lenght 7 , name $FF) Computer : 09 56 00 00 09 09 00 00 TI-92 : 89 15 0B 00 02 00 00 00 20 31 20 33 2E 31 00 05 01 (02 = # of number) Computer : 09 56 00 00 TI-92 : 89 92 00 00 Computer : 09 56 00 00 323) Get a ---------- TI-92 : 89 A2 06 00 00 00 00 00 00 00 00 00 Computer : 09 56 00 00 ??????????? Can anyone help me for the end of this conversation 324) Request function --------------------- To ask a variable, backup or content to the 92. 3241) Backup : See 23 3242) Variable (Example of request : main\abd , type TEXT) Computer : 09 68 00 00 ; TI-92 ready ? TI-92 : 89 56 00 00 ; 0000= yes, 0001= no Computer : 09 A2 0E 00 00 00 00 00 00 0B 08 6D 61 69 6E ; The request 5C 61 62 64 3B 03 ; (0B = TEXT) TI-92 : 89 56 00 00 If the variable doesn't exist, the conversation stops here. TI-92 : 89 06 09 00 12 00 00 00 0B 03 61 62 64 ; Var header Computer : 09 56 00 00 09 09 00 00 TI-92 : 89 56 00 00 89 15 16 00 00 00 00 00 00 10 00 0C 20 4A 75 ; The TEXT 73 74 20 61 20 74 65 73 74 00 E0 23 05 Computer : 09 56 00 00 TI-92 : 09 92 00 00 Computer : 09 56 00 00 3242) Content (DIR) Computer : 09 68 00 00 ; See 3241 TI-92 : 89 56 00 00 ; See 3241 Computer : 09 A2 06 00 00 00 00 00 19 00 19 00 ; Order of DIR ? TI-92 : 89 56 00 00 89 06 0A 00 0E 00 00 00 53 04 main 0A 02 ; Current folder=main Repeat Computer: 09 56 00 00 ; OK 09 09 FF FF ; Waiting ... TI-92 : 89 56 00 00 89 15 18 00 00 00 00 00 m a i n 00 00 00 00 ; 31 = 31 00 01 00 00 00 C5 01 ; 01 =# of var in FOLD. Computer: 09 56 00 00 TI-92 : 89 xx 00 00 ; xx= 78 :Continue until xx= 92 ; xx= 92 :End Computer : 09 56 00 00 Each entry of the 92 is in this format : 00 00 00 00 n1 n2 n3 n4 n5 n6 n7 n8 : Name of the variable ty : Type of the variable 31 = Folder 00 = Variable is editing : No type ( Or EXPR) st : 00 = Variable OK 01 = Variable is editing ll lh hl hh : Size of the variable (or # of variable for folder) 325) Remote control of the TI-92 -------------------------------- Press ++<(>+ To control the 92, you must send a word through the link port. This word is the code of the key (page 484 of the US manual, Section B8 to B12 of the French manual) After each word send, the 92 replies by a $FF. When there is a result (after an ENTER), the 92 send this result in FF-terminated. Ex: Computer : 0031 002B 0041 000D TI -92 FF FF FF FF 412B31FF <1> <+> , the 92 reply You can do graph, factor, edit-text... To leave this mode, send the command of 326) Command 92 by link port ---------------------------- To use this mode, not necessary to put the 92 in remote mode. Format of this mode : Computer : 09 87 ll hh : Send code of the hhll key TI-92 : 89 56 00 00 : OK For example, to do <1> <+> Computer : 09 87 31 00 <1> TI-92 : 89 56 00 00 Computer : 09 87 2B 00 <+> TI-92 : 89 56 00 00 Computer : 09 87 41 00 TI-92 : 89 56 00 00 Computer : 09 87 0D 00 TI-92 : 89 56 00 00 => The result is NOT sent by the link port. You can use this mode to put the 92 in the remote mode +-==========================-+ | IV - REFERENCE DOCUMENTS | +-==========================-+ LINKPROT.TXT : V2.0 (January 1995) By Per Finander (pfimdt93@tufvan.hv.se) In this document, you can find all var-code of the TI-82 and TI-85, C and Pascal IO-routines to send or receive variables, and a demo program. TI-92 LINK INTERFACE PROTOCOL (January 1996) By Ben Eater (themouse@wam.umd.edu) and George Nachman (ltduck@wam.umd.edu) In this document, you can find all(?) var-code of the TI-92, C IO-routines to send or receive with the parallele link. Hacking the TI-85 CALCULATOR (September 1994) By David Boozer (adb2y@virginia.edu) Lot of very interesting informations about the TI85. TI-RAM.TXT V0.9 (April 1996) By Dan Eble and Rob Taylor A description of the 85'RAM TI-92 Technical Information (1996.03.29) by David Ellsworth (davidells@aol.com) ftp://users.aol.com/davidells/TI-Calc/TI-92_tech.txt Lot of very interesting informations about the TI92. --------------------------------------------------------------------------- SECTION A - Index TI-82 : Backup : 21 Checksum calcul : 11 Command byte : 13 DataPart : 161 Devicetype (02 or 82) : 12 Format of .. See this word Header format : 151 Protocol : 11,14 Transmission : 11,14 TI-85 : Backup : 22 Checksum calcul : 11 Command byte : 13 DataPart : 162 Devicetype (05 or 85) : 12 Format of ... See this word Header format : 152 Protocol : 11,14 PrtScreen : 312 ScreenDump : 311 Transmission : 11,14 Variable format : C12 VAT : C22 TI-92 : Backup : 23 Checksum calcul : 11 Command byte : 13 DataPart : 163 DataLength (Special ...) : 11 Devicetype (09 or 89) : 12 Format of ... See this word Get (command) : 323 Header format : 153 Protocol : 11,14 Remote : 325,326 Request : 324 backup : 23,3241 content : 3243 variable : 3242 ScreenDump : 321 Send (command) : 322 Transmission : 11,14 Variable format : C13 --------------------------------------------------------------------------- SECTION B : Examples ------------------------ B1 - Transmission of var ------------------------ B11) Transmission of Var with the 82 ==================================== Transmission of ABC:PROGRAM :[A] : : : : 1)TI-82 : 82 06 0B 00 09 00 05 41 42 43 00 00 00 00 00 D4 00 2)Computer : 02 56 00 00 3) 02 09 00 00 4)TI-82 : 82 56 00 00 5) 82 15 09 00 07 00 5C 00 3F 3F 3F 3F 3F 9E 01 6)Computer : 02 56 00 00 7)TI-82 : 82 92 09 00 8)Computer : 02 56 00 00 1) Var header (Length 000B) 09 00 : Size of the var , here 9 bytes 05 : Type , here PRGM 41 42 43 00 00 00 00 00 = ABC : Name D4 00 : Checksum 2) OK 3) Ready to receive 4) OK 5) Data part (Length 0009) 07 00 : Length 5C 00 : [A] 3F 3F 3F 3F 3F : CR CR CR CR CR 9E 01 : Ckecksum 6) OK 7) End of transmission, 0009h bytes was sent. 8) OK B12) Transmission of Var with the 85 ==================================== Transmission of ABC:REAL=3.1415926535898 1)TI-85 : 85 06 07 00 0A 00 00 03 41 42 43 D3 00 2)Computer : 05 56 00 00 3) 05 09 00 00 4)TI-85 : 85 56 00 00 5) 85 15 0A 00 00 00 FC 31 41 59 26 53 58 98 30 03 6)Computer : 05 56 00 00 7)TI-85 : 85 92 0A 00 8)Computer : 05 56 00 00 1) Var header (Length 0007) 0A 00 : Size of the var , here 10d bytes 00 : Type , here real 03 : Length of the name 41 42 43 = ABC : Name D3 00 : Checksum 2) OK 3) Ready to receive 4) OK 5) Data part (Length 000A) 00 00 FC 31 41 59 26 53 58 98 = 3.1415926535898 6) OK 7) End of transmission, 000Ah bytes was sent. 8) OK B13) Transmission of Var with the 92 ==================================== Transmission of a:Expr=1.23 1)TI 92 : 89 06 07 00 0C 00 00 00 00 01 61 6E 00 2)Computer : 09 56 00 00 3) 09 09 00 00 4)TI 92 : 89 56 00 00 5) 89 15 10 00 00 00 00 00 00 0A 40 00 12 30 00 00 00 00 00 23 AF 00 6)Computer : 09 56 00 00 7)TI-92 : 89 92 00 00 8)Computer : 09 56 00 00 1) Var header (Length 0007) 0C 00 00 00 : Size of the var , here 12d bytes 00 : Type , here EXPR 01 : Length of the name 61 : a : Name 6E 00 : Checksum 2) OK 3) Ready to receive 4) OK 5) Data part (Length 0010) 00 00 00 00 : ??? 00 0A : Length of var 40 .. : Var (See 163b) 6) OK 7) End of transmission, 000Ah bytes was sent. 8) OK ------------------------ B2 - Backup Informations ------------------------ B22 Information about the TI-85 Backup ====================================== In the BACKUP.85B 0000 >0007 **TI85** 0008 >000A 1A 0C 00 000B >0034 "Backup file dated 04/28/96,17:02",0 0035 >0036 ll hh : # of byte from next to Checksum 0037 >0038 09 00 : Size of the Var header 0039 >003A Size of Part 1 ($08B1) 003B Code of Backup (1D) 003C >003D Size of Part 2 (n2) 003E >003F Size of Part 3 (n3) 0040 >0041 $F7 $8B 0042 >0043 Size of Part 1 (Always? B1 08) 0044 >08F4 Part 1 08F5 >08F6 Size of Part 2 (here 12 00) (n2) 08F7 >08F6+n2 Part 2 nnnn >nnnn+1 Size of Part 3 (here 23 00) (n3) nnnn+2>nnnn+1+n3 Part 3 xxxx >xxxx+1 Checksum Description of each packet -------------------------- Part 1 :TI-85 Memory (0000 is the first byte of this packet) Size = $08B1 (2225d bytes) 0000->08B0 : Memory from : $8346 -> $8BF6 byte $8B2C : Floating point mode (3=Normal;4=Float0;5=Float1;..;F=Float11) word $8B2D : Pointer of current Floating point. (07E6) Part 2 :User Memory ($8BF7) (0000 is the first byte of this packet) 0000->nnnn-1 : Memory from $8BF7 to $8BF7-1+nnnn Part 3 :VAT (From $FA6F downto ($8BEB+1)) (Variable Allocation Table) (See C22) --------------------------------------------------------------------------- SECTION C : Other -------------------- C1 - Variable format -------------------- C11 Information about the TI-82 Variables ? ========================================= C12 Information about the TI-85 Variables ========================================= Format of some variables: PRGM : LL HH PROGRAM STRNG : LL HH STRING REAL : El Eh Rg N1 N2 N3 N4 N5 N6 N7 With EhEl : Exponent \ Rg : Range > Value =Number*10^(Exponent+100*(Range-$FC)) Ni : Number / (See the document of David Boozer for more development) C13 Information about the TI-92 Variables ========================================= Expr (00) ----------- 00 00 00 00 Th Tl [EXPR] ThTl : Size of EXPR * Data part format for an expr An expression must be read from the end to the begining. The first byte (Last) is an ID with number ID TYPE SIZE Example ------------------------------ 1F INTEGER Var. 0C 01 1F =12d >> 0C=12 01=1 byte 23 Real 12 40 00 12 30 00 00 00 00 00 23 = 1.23>> Value=*10^[-$4000-$D] Special ID ---------- 02 = r 03 = s 04 = t 05 = u 06 = v 07 = w 08 = x 09 = y 0A = z 0B = a 0C = b 0D = c 0E = d 0F = e 10 = f 11 = g 12 = h 13 = i 14 = j 15 = k 16 = l 17 = m 18 = n 19 = o 1A = p 1B = q 26 = i (i^2=-1) 8B = + 8F = * 91 = / Example : 00 00 00 00 : ?? 00 10 : size = 16 bytes 40 : exponent =(4001$ and 7FFF$)-4000$-$D=-12d 01 : signe =4001$ and $8000 =0 => (+) 12 20 00 00 00 00 00 : number=12200000000000 => 12200000000000*10^(-12) =12.2 23 : real 04 : value = 4$ \ 01 : size=1 > Integer size 1 , value 4 1F : integer / 18 : n 8F : * 8B : + => +(*(n,4),12.2) = 12.2+4*n TEXT (0B) ----------- 00 00 00 00 Th Tl Ch Cl [YOUR TEXT] 00 E0 ThTl : Size of text + 4 ChCl : Cursor Pos ! Warning ! The first byte after CR is a command and is put before ":" PIC (10) ---------- 00 00 00 00 Sh Sl Rh Rl Ch Cl [YOUR PIC] 00 DF ShSl : Size of Pic + 6 RhRl : # of row ChCl : # of col In "Normal" PIC , ShSl = RhRl*INT(((ChCl-1)/8)+1) But, the 92 don't verify this. RhRl and ChCl is only use when you display the picture. --------------- C2 - VAT format --------------- C21 Information about the TI-82 VAT ? =================================== C22 Information about the TI-85 VAT =================================== The format of each entry is : NN .. NN Ln HH LL Ty With : Ty = Type of variable HHLL = Position in RAM Ln = Length of the name NN..NN = NAME Example of VAT (without Zshell): 43 42 41 03 8C 16 12 43 42 02 8C 13 0C 41 01 8C 09 00 23 01 8C 00 12 21 C B A C B A # ! 01 8B FE 12 73 6E 41 03 8B FB 0C 74 61 74 53 79 05 8B F9 04 74 61 74 53 s n A t a t S y t a t S 78 05 8B F7 04 x xStat : LIST $8BF7 (Type $04) yStat : LIST $8BF9 (Type $04) Ans : STRNG $8BFB (Type $0C) ! : PRGM $8BFE (Type $12) # : PRGM $8C01 (Type $12) A : REAL $8C09 (Type $00) BC : STRNG $8C13 (Type $0C) ABC : PRGM $8C16 (Type $12) ! and # are used by ENTRY. C23 Information about the TI-92 VAT ? ===================================