Author Topic: I don't know what tokens to use and need suggestions  (Read 21505 times)

0 Members and 1 Guest are viewing this topic.

Offline Hot_Dog

  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
I don't know what tokens to use and need suggestions
« on: November 11, 2010, 12:54:18 am »
In designing the Ti-Basic Text routines, I'm going to use hooks so that Ti-Basic programmers won't have too much to learn.  I'm going to use Output() to display 6x8 characters (for compatability and familiarity) and Text() for custom size text, where the default is 3x5. 

However, not having a huge knowledge of Ti-Basic, I need some suggestions as to what tokens to use for the following:

1. A command that will update the screen after all text has been drawn
2. A command to change the program that the font is located in
3. A command to allow people to switch back to the normal TI-OS routines, and also back to the custom font routines
4. A command that allows a user to specify the custom size of his font

Thanks for anything you can offer

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: I don't know what tokens to use and need suggestions
« Reply #1 on: November 11, 2010, 12:58:44 am »
Hmm, you know Output( is on homescreen, right? Also you can display large fonts with Text(-1,Y,X instead of Text(X,Y. It's an undocumented trick.

I would suggest DispGraph to update the screen, maybe, since it's already used for displaying the graph screen content in BASIC anyway.

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: I don't know what tokens to use and need suggestions
« Reply #2 on: November 11, 2010, 01:04:28 am »
I don't know a whole lot about hooks and assembly libraries and such but if it actually changes the use of the token then I would maybe suggest DispTable instead of DispGraph since that can still be used in a game while I've never seen DispTable used.
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: I don't know what tokens to use and need suggestions
« Reply #3 on: November 11, 2010, 01:24:46 am »
1. A command that will update the screen after all text has been drawn
2. A command to change the program that the font is located in
3. A command to allow people to switch back to the normal TI-OS routines, and also back to the custom font routines
4. A command that allows a user to specify the custom size of his font

1. DispGraph or DispTable
2. Get( or OpenLib(
3. Stop, PlotsOff, rref(
4. setTmFmt(, fnInt(, Graphstyle, Real(

For the last one, a custom token might be your best bet.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: I don't know what tokens to use and need suggestions
« Reply #4 on: November 11, 2010, 01:39:12 am »
I would avoid OpenLib( and setTmFmt(, because they are not available on the 83+ and 83+SE.

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: I don't know what tokens to use and need suggestions
« Reply #5 on: November 11, 2010, 02:01:15 am »
Oh, I didn't know that. Openlib really is a useless command, though.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: I don't know what tokens to use and need suggestions
« Reply #6 on: November 11, 2010, 02:22:54 am »
In designing the Ti-Basic Text routines, I'm going to use hooks so that Ti-Basic programmers won't have too much to learn.  I'm going to use Output() to display 6x8 characters (for compatability and familiarity) and Text() for custom size text, where the default is 3x5.  

However, not having a huge knowledge of Ti-Basic, I need some suggestions as to what tokens to use for the following:

1. A command that will update the screen after all text has been drawn
2. A command to change the program that the font is located in
3. A command to allow people to switch back to the normal TI-OS routines, and also back to the custom font routines
4. A command that allows a user to specify the custom size of his font

Thanks for anything you can offer
My thoughts:

1. DispGraph
2. Select( or Prompt
3. ExprOn/ExprOff
4. Get or Prompt maybe?
« Last Edit: November 11, 2010, 02:24:48 am by Art_of_camelot »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: I don't know what tokens to use and need suggestions
« Reply #7 on: November 11, 2010, 02:48:30 am »
Oh, I didn't know that. Openlib really is a useless command, though.
Yeah I think it only has uses for some apps. I think USB8x is one of them.

Offline Hot_Dog

  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: I don't know what tokens to use and need suggestions
« Reply #8 on: November 11, 2010, 11:44:08 am »
The verdict:

1. DispTable
2. Select(
3. ExprOn/Off
4. Real(

Thanks to everyone for their input!

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: I don't know what tokens to use and need suggestions
« Reply #9 on: November 11, 2010, 12:25:47 pm »
Oh, I didn't know that. Openlib really is a useless command, though.

What does it do? I don't have an 84+, but just wondering.

The verdict:

1. DispTable
2. Select(
3. ExprOn/Off
4. Real(

Thanks to everyone for their input!

Those sound pretty reasonable. And as a request, could the new hook be enabled by a prgm header? Some of those might actually be useful in plain BASIC programs.

Can't wait to see how this turns out :D




Offline JosJuice

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1344
  • Rating: +66/-14
    • View Profile
Re: I don't know what tokens to use and need suggestions
« Reply #10 on: November 11, 2010, 12:44:13 pm »
Oh, I didn't know that. Openlib really is a useless command, though.

What does it do? I don't have an 84+, but just wondering.
It opens a lib. This is useless because there is only one lib in the whole world as far as I know (USB8x) and that lib not exactly something you would use in a normal TI-BASIC program :P

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: I don't know what tokens to use and need suggestions
« Reply #11 on: November 11, 2010, 01:01:49 pm »
Wait, so TI actually added that feature for third-party apps? :o




Offline JosJuice

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1344
  • Rating: +66/-14
    • View Profile
Re: I don't know what tokens to use and need suggestions
« Reply #12 on: November 11, 2010, 01:10:23 pm »
I think so. I've never seen a TI lib.

Offline Hot_Dog

  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: I don't know what tokens to use and need suggestions
« Reply #13 on: November 11, 2010, 01:29:19 pm »
Those sound pretty reasonable. And as a request, could the new hook be enabled by a prgm header? Some of those might actually be useful in plain BASIC programs.

You use asm(pgrmTEXT) at the beginning of your BASIC program to turn the hook on, and you use asm(pgrmTEXT) at the end of your program to turn it off.

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: I don't know what tokens to use and need suggestions
« Reply #14 on: November 11, 2010, 01:47:41 pm »
Oh, that's great! Don't forget about real( conflicting with xLIB.