Results 1 to 27 of 27

Thread: TI-83+ File format

  1. #1

    Thread Starter
    Addicted Member Flip's Avatar
    Join Date
    Jun 2002
    Location
    Burke, VA
    Posts
    247

    TI-83+ File format

    can any one tell me the file format for TI-83+ BASIC programs or, even better, how to create them from text in VB? Or do you know where i can learn about it? Im making an application similar to TI-Graph Link, only much better. It already includes syntax highlighting, a real TI image to click on and insert commands, and many useful options. But it is kinda useless unless you can actually send the progs to the TI.

    Another question- do you know how to send data through the serial port and if there is any extra neccesary things to do to send data to a TI (like do you have to wait for some kind of signal to send the next piece of data)?

    All ideas or solutions are welcome. Thanks!

  2. #2
    Fanatic Member sql_lall's Avatar
    Join Date
    Jul 2002
    Location
    Up Above (i.e. AUS)
    Posts
    571

    Talking have you got one??

    Have you actually got a ti83+?? If you have, then you probably have a book with all the detail about Ti BASIC programming. If not, go to www.ticalc.org (i think) - plenty of stuff there.

    About the serial port - there is a computer cable you can get (it came free with my Ti 83+) that hooks up your calc with the computer, and it comes with a program u can use to send and receive stuff from it.

    This program also comes with a window set up exactly like the calculator, so you can write your programs there (no need for VB)

    If you have any more queries just e-mail me:
    [email protected]
    sql_lall

  3. #3

    Thread Starter
    Addicted Member Flip's Avatar
    Join Date
    Jun 2002
    Location
    Burke, VA
    Posts
    247
    yeah, i know all that about the GraphLink, ticalc.org, the handbook. And there is a need for VB because GraphLink SUCKS! The app im making is MUCH, MUCH better and if i finish it, it will actually be useful to people. And yes, i have one. So, anyone have any more info?

  4. #4
    Fanatic Member bugzpodder's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    787
    VB6 executables needs VB run time files, which needs Windows OS
    VB .NET needs .NET framework, which needs Windows NT 2000 or XP. so you gotta have these things before you can run your executables on your TI83. of course, to install Windows you need at least a CD-Rom drive. also its processor power and memory capacities needs to be increased in order for fast performance. I don't know if you can do these things or not but i won't recommend it.
    Massey RuleZ! ^-^__Cheers!__^-^ Massey RuleZ!


    Did you know that...
    The probability that a random rational number has an even denominator is 1/3 (Salamin and Gosper 1972)? This result is independently verified by me (2002)!

  5. #5
    Addicted Member
    Join Date
    Jul 2002
    Location
    BC, Canada
    Posts
    152
    What VeryConfused is trying to do, BugZ, is create a Windoze program that is a replacement for the one that talks to a TI-83+, not a program that runs on it. I think (s)he's asking, essentially, the format in which to send data to the calculator.

    I did a search, which took a while, actually, and found one decent site (may be more):

    http://gladstone.uoregon.edu/~tsinge...83+/index.html

    It looks like a fair bit of work, but I imagine it's not too hard.

    Best of luck.

    Destined

  6. #6

    Thread Starter
    Addicted Member Flip's Avatar
    Join Date
    Jun 2002
    Location
    Burke, VA
    Posts
    247
    Destined Soul has got it right. Thanks for your time and the site, it's just what i need

  7. #7

    Thread Starter
    Addicted Member Flip's Avatar
    Join Date
    Jun 2002
    Location
    Burke, VA
    Posts
    247
    Ok, that site gave me all the "Tokens" for TI-BASIC, but im not quite sure how to write them to a file. For anyone who know's TI-BASIC, here's an example program:

    ClrHome
    Disp "Hello"

    How would i get all the values for those commands (which i already know) and combine them into a TI-83 prog? I would be more than happy which just a link or idea.

  8. #8
    Frenzied Member markman's Avatar
    Join Date
    Nov 2000
    Location
    Florida.
    Posts
    1,197
    do it in assembly
    retired member. Thanks for everything

  9. #9

    Thread Starter
    Addicted Member Flip's Avatar
    Join Date
    Jun 2002
    Location
    Burke, VA
    Posts
    247

    VB

    I want to do it in VB 6, this a Visual Basic App. It doesn't run on the TI, it makes TI-BASIC programs that run on the calc.

    What i need to do now is compile all the tokens for the TI-BASIC program into a 8XP program.

  10. #10
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    Ok, here's a sample. This is what is contained in the 8xp file for my example program KG2LB:
    Code:
    **TI83F*
     Program file 09/01/02, 16:19              . 
      KG2LB       ÝN?N2:204623X?Þ*POUNDS>*+Xu
    And this is the code of it:
    Code:
    PROGRAM:KG2LB
    :Prompt N
    :N2.204623->X
    :Disp "POUNDS:",X
    Of course the -> is merged, but I don't have that kind of thing on my keyboard From this, we can determine that the 3rd, 4th, 5th, 6th, and 7th bytes contain the type of calculation (TI83F = TI83 Plus I suppose). Then, the description and date. We then have the Ý which I suppose is the Prompt, and the ? which stands for newline (I'd suppose). Then the next line is 2:204623 (meaning 2.204623), then a null char, then X. We can determine the box (null) is the store command. Simply run it through VB and look up the ASCII value. Then, you've got a new line, and then that weird p-looking thing. That must be the Disp keyword. Then, * means ", POUNDS means POUNDS, > means :, + means comma (,), and a small u means end of program I think. I hope you learn something from that
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  11. #11

    Thread Starter
    Addicted Member Flip's Avatar
    Join Date
    Jun 2002
    Location
    Burke, VA
    Posts
    247
    I really don't have a clue, but i doubt that's right (unless you're sure it is). The 8XP file format just shows up that way in Notepad because thats the only way it can represent it - the file doesn't contain text (or not all text, anyway). Everything in the file except the strings in quotes is represented in some kind of number format, like hex or something. But im new in this sort of programming, so i don't really have a good idea of what i need to do.

    If you look on http://gladstone.uoregon.edu/~tsinge...3+/tokens.html, you'll see a table of TI-86 tokens (which are the same for 83+). Those are representations of all the commands in the calc. What I'm not sure about is if that is code created before the program runs or code that the program is made up of. Any thoughts? This is a tuffie.

  12. #12
    Fanatic Member gwdash's Avatar
    Join Date
    Aug 2000
    Location
    Minnesota
    Posts
    666
    The format sasitrax was using is a text representation of the file format. You can view it in a hex editor to view the actual bytes, or you can simply figure out the ascii codes of those commands. For example, the ascii code for "Þ" is 222, the same as 0xDE, which is the token for the Disp Command. So, what you do is, put at the beginning of you file:

    Code:
    **TI83F*
     Program file 09/01/02, 16:19              .
    and then the commands, as per the format that sasitrax gave, but insearting the correct tokens. Depending on how the interface is setup, it may or may not be easy to parse the commands and tokenize them. Writing the file can be done using the binary write options in VB. As for serial communication, you use the MSComm control, the protocol is included at that webiste

    However, i would build my own cable and link through the a parallel port, the serial comm can become complicated
    GWDASH
    [b]VB6, Perl, ASP, HTML, JavaScript, VBScript, SQL, C, C++, Linux , Java, PHP, MySQL, XML[b]

  13. #13
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    Yes, that was only meant as a starter reference Even though it should be right, at least most of the commands (unless I've done something to my calculator, my link cable, my computer, or all 3! )
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  14. #14

    Thread Starter
    Addicted Member Flip's Avatar
    Join Date
    Jun 2002
    Location
    Burke, VA
    Posts
    247
    Ok, thats all great, thanks for the help! I understand the process but im still a tad confused.

    On the chart, Disp is D-E. Why did gwdash say 0XDE? I don't undestant this concept of Hex.

    Once i have the hex, how do i write it to a file (the commands)?

    What is the process of opening a hex file?

    The file format is hex, right?

  15. #15
    Fanatic Member gwdash's Avatar
    Join Date
    Aug 2000
    Location
    Minnesota
    Posts
    666
    That was a table of the codes with the first and second places as the axese(sp?). "0x" is just to denote Hexidecimal thus, "0xDE" means "D(or 14 * 16 (sixteens place)) + E(or 15 * 1 (ones place)), which is 222 decimal. The file format is binary, just like all files. Hex 0xDE is just easiry to write in than binary "11011110" Sastraxi showed a ASCII representation of the data. You can write the specific bits into the file to create it. The specific file format still eludes me, but i'm still looking for it.
    GWDASH
    [b]VB6, Perl, ASP, HTML, JavaScript, VBScript, SQL, C, C++, Linux , Java, PHP, MySQL, XML[b]

  16. #16

    Thread Starter
    Addicted Member Flip's Avatar
    Join Date
    Jun 2002
    Location
    Burke, VA
    Posts
    247
    Should i re-submit this question or do any of you wish to continue the conversation here?

  17. #17
    Fanatic Member gwdash's Avatar
    Join Date
    Aug 2000
    Location
    Minnesota
    Posts
    666
    Keep talking here. No reason to recreate the thread and lose the auto email capability

    Any Questions?
    GWDASH
    [b]VB6, Perl, ASP, HTML, JavaScript, VBScript, SQL, C, C++, Linux , Java, PHP, MySQL, XML[b]

  18. #18

    Thread Starter
    Addicted Member Flip's Avatar
    Join Date
    Jun 2002
    Location
    Burke, VA
    Posts
    247
    i dont mean to be making my app all off of others' knowlage, but could comeone please give me on doing what gwdwash is saying? Like make it take a command, like Disp or Output( and print the hex value on the form.

    And what is a hex file viewer i can use to look at the TI83 files?
    Last edited by Flip; Sep 7th, 2002 at 10:52 PM.

  19. #19

    Thread Starter
    Addicted Member Flip's Avatar
    Join Date
    Jun 2002
    Location
    Burke, VA
    Posts
    247
    OK, it's been a while. I just came back and re-read all the posts, and i UNDERSTAND! The file is ASCII and you get that by taking the ascii value, translating to hex, and looking the hex value on that chart from the link.

    The only things i need to know:
    > how do you get the hex value from the ASCII
    > how do you get the ASCII value from the hex

    Thanks a million, and sorry for my slowness
    Last edited by Flip; Sep 20th, 2002 at 06:21 PM.

  20. #20
    Hyperactive Member Kagey's Avatar
    Join Date
    Sep 2000
    Location
    The Wilderness of New Brunswick
    Posts
    294
    hey,

    just read your last question and you can find tons of conversion tables on the net. just go to google and search for hex ascii table.

    alternativly, the text editor called ultra edit has a character conversion table in it.

  21. #21

    Thread Starter
    Addicted Member Flip's Avatar
    Join Date
    Jun 2002
    Location
    Burke, VA
    Posts
    247
    Thanks! Got a table.

    Another thing: on gladstone, the system variables have more than 2 characters in the hex value.

    For example: "[B]" is 01-5C. Is this 0X015C or 01X5C or what?

    And another thing , up at the top of the table from gladstone, it says 0X11 is ")", towards the bottom in the "BB XX" section, it says 0X11 is "invNorm". There are repeated values throughout the entire table. The titles say something about significant digits, first bytes, and second bytes. Can someone please translate into simpler and smaller words ?
    The "company" website My homepage: nerisoft.com
    scars heal but glory is forever

  22. #22

    Thread Starter
    Addicted Member Flip's Avatar
    Join Date
    Jun 2002
    Location
    Burke, VA
    Posts
    247
    I just realized that you dont need a table. Just convert the decimal ASCII value to hex using the Hex() function.

    But is this the most efficiant way to convert hex to dec?

    VB Code:
    1. Function HexToDec(HexVal as string) as integer
    2.  
    3. Dim D as Integer
    4.  
    5. For D = 1 to 255
    6.     If Hex(D) = HexVal Then
    7.         HexToDec = D
    8.         Exit function
    9.     End If
    10. Next D
    11.  
    12. End Function

    (my previous question still stands)
    Last edited by Flip; Sep 25th, 2002 at 05:24 PM.
    The "company" website My homepage: nerisoft.com
    scars heal but glory is forever

  23. #23
    Fanatic Member sql_lall's Avatar
    Join Date
    Jul 2002
    Location
    Up Above (i.e. AUS)
    Posts
    571

    Talking two things:

    1) If you are going to use that code, it would be best to use a loop from 0 to 255, that way "00" is not missed.

    2) It may be better to use this:
    VB Code:
    1. Function HexToDec(HexVal as string) as integer
    2.  
    3. dim D as integer
    4. dim S as string
    5.  
    6. for a = 1 to 2
    7.   S = mid$(HexVal,a)
    8.   if val(S) = 0 then
    9.   D = D+ (CHR$(S)-86) * (16 ^ (a-1)) 'use 54 if uppercase letters
    10.   Else D = D+ val(S) *(16 ^ (a-1))
    11. Next a
    12. HexToDec = D
    13.  
    14. End Function
    sql_lall

  24. #24

    Thread Starter
    Addicted Member Flip's Avatar
    Join Date
    Jun 2002
    Location
    Burke, VA
    Posts
    247
    I don't know what that does (does it work?). All my function does is convert every number from 1 (or 0, as you pointed out) to 255 to hex and checks to see if thats the number you gave it. Maybe not the most efficiant, but not so time-consuming that i would change it. The simpler the better
    The "company" website My homepage: nerisoft.com
    scars heal but glory is forever

  25. #25
    New Member
    Join Date
    Oct 2002
    Location
    VA
    Posts
    3
    Oh wow, I too fiddle around with ports in VB for my TI. You see, I wanted to make a VB based application that allowed basic programmers to execute any wav/midi from the computer thru simple TI-basic command(s). To do this, it needs valid connection between your calc and your computer. Then use simple commands like Send() to execute various sounds.

    My program allowed up to 20 different wav sounds and 6 different midi's. To function this, you need to download/get a wav or midi file. You assign what number they are going to be . For example, using my VB application, you assign Sound #1 as Laugh.wav. Then assign Midi music #1 as Theme01.mid and so on. So in order to execute this you need this on your calculator

    :Clrhome
    :Send(A 'Execute soundFX #1
    :Send(V 'Execute MidiMusic #1
    :Stop

    You get it? For awhile it worked great. Using this VB application I've made, I was able to have computer wav/midi music during the opertion of the game. Unfortunately, my tester revealed that this didn't work on his computer. That's where I need help. I know that when you use a command "Send(A)", it sends weird variable to the PC. And that variable is read gibberish. So how do I receive a variable to the computer and transulate that gibberish to more readable format... like HEX or something.
    Last edited by Hitoshi; Oct 4th, 2002 at 01:09 PM.

  26. #26

    Thread Starter
    Addicted Member Flip's Avatar
    Join Date
    Jun 2002
    Location
    Burke, VA
    Posts
    247
    I'm not sure what your question is, but i wouldn't be able to answer it anyway.

    Can you post the code for your app (if it works)? That would be awsome! I need to know how to send data through the Graph Link.
    The "company" website My homepage: nerisoft.com
    scars heal but glory is forever

  27. #27
    Junior Member 347Studboy's Avatar
    Join Date
    Apr 2003
    Location
    New Milford, Inthemiddleofnowhere
    Posts
    17

    Re: TI-83+ File format

    Hello,

    Has anyone been able to answer this question? About sending and receiving data, and/or constructing TI programs from within Visual Basic (or preferably VB.Net)? I've been looking into doing this myself.
    You might see me on the Neo Productions forums!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width