Author Topic: Correlation: A New Project Aimed at Ti-Basic Programmers  (Read 68211 times)

0 Members and 7 Guests are viewing this topic.

Offline Hot_Dog

  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: Correlation: A New Project Aimed at Ti-Basic Programmers
« Reply #30 on: November 13, 2010, 03:18:10 am »
Oh ok but what if someone absolutely needs to use the homescreen while using Coorelation?

To use the homescreen, the person would have to use the Ti-OS font--it's the nature of the beast.  You can turn Correlation off in the middle of your Ti-Basic program to use the Ti-OS font.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Correlation: A New Project Aimed at Ti-Basic Programmers
« Reply #31 on: November 13, 2010, 03:19:44 am »
Oh right, I see now.

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Correlation: A New Project Aimed at Ti-Basic Programmers
« Reply #32 on: November 13, 2010, 03:20:35 am »
Yeah, your program is looking very cool. This will be very useful, I can see that. So is this going to use a parse hook and font hook?

Offline Hot_Dog

  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: Correlation: A New Project Aimed at Ti-Basic Programmers
« Reply #33 on: November 13, 2010, 03:22:16 am »
Yeah, your program is looking very cool. This will be very useful, I can see that. So is this going to use a parse hook and font hook?

Only the parse hook.  Font hooks are too slow because they are used by the slow Ti-OS routines.  Instead, fonts will be compiled as programs, such as pgrmMYFONT.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Correlation: A New Project Aimed at Ti-Basic Programmers
« Reply #34 on: November 13, 2010, 03:22:45 am »
* DJ Omnimaga wonders if this will be useable in Axe

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Correlation: A New Project Aimed at Ti-Basic Programmers
« Reply #35 on: November 13, 2010, 03:24:36 am »
Oh, well there is a neat twist!. So you are going to be making the routine for how Output( and the like act? That is really nice and that will make the routine fast as well.

Offline Hot_Dog

  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: Correlation: A New Project Aimed at Ti-Basic Programmers
« Reply #36 on: November 13, 2010, 04:13:29 am »
* DJ Omnimaga wonders if this will be useable in Axe

Not unless we can incorporate it.  Sorry :(--but then since you can display sprites/tilemaps in axe, you really don't need it

Oh, well there is a neat twist!. So you are going to be making the routine for how Output( and the like act? That is really nice and that will make the routine fast as well.

Yes.  Output will display a custom standard 6x8 font, and Text() will display a custom sized font, the default being the size of small text.  The limitation is all characters must be the same size.
« Last Edit: November 13, 2010, 04:14:08 am by Hot_Dog »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Correlation: A New Project Aimed at Ti-Basic Programmers
« Reply #37 on: November 13, 2010, 01:29:28 pm »
Ah ok I see. Still it's an awesome project, though. It will really be useful for BASIC coders because using custom fonts in BASIC with xLIB/Celtic/DCS is slow.

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: Correlation: A New Project Aimed at Ti-Basic Programmers
« Reply #38 on: November 14, 2010, 10:20:06 am »
You mentioned this on the first page, but I wanted to be sure. Each font set can contain a total of 256 characters? Is there a reason for the limit? I will admit though, it seems very unlikely that anyone would need more that 256 characters.

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: Correlation: A New Project Aimed at Ti-Basic Programmers
« Reply #39 on: November 14, 2010, 11:24:16 am »
* DJ Omnimaga wonders if this will be useable in Axe

Not unless we can incorporate it.  Sorry :(--but then since you can display sprites/tilemaps in axe, you really don't need it

Oh, well there is a neat twist!. So you are going to be making the routine for how Output( and the like act? That is really nice and that will make the routine fast as well.

Yes.  Output will display a custom standard 6x8 font, and Text() will display a custom sized font, the default being the size of small text.  The limitation is all characters must be the same size.

So just for clarification, both Output( and Text( draw to the graphscreen, right?

Sounds great! Good luck on this.

You mentioned this on the first page, but I wanted to be sure. Each font set can contain a total of 256 characters? Is there a reason for the limit? I will admit though, it seems very unlikely that anyone would need more that 256 characters.

Well, the TI-OS font has 256 chars, and it seems reasonable...
« Last Edit: November 14, 2010, 12:04:43 pm by Deep Thought »




Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: Correlation: A New Project Aimed at Ti-Basic Programmers
« Reply #40 on: November 14, 2010, 11:29:49 am »
Since I know that you can have the font set archived, I just have one tip from experience. Store the location of the font set in the archive in ram, don't re-find it every time. Sure, it seems instant, but instant * 16 isn't so fast any more. Anyways, this looks like a really cool project. :D
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline Hot_Dog

  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: Correlation: A New Project Aimed at Ti-Basic Programmers
« Reply #41 on: November 14, 2010, 11:51:05 am »
Since I know that you can have the font set archived, I just have one tip from experience. Store the location of the font set in the archive in ram, don't re-find it every time.

No sooner said than done!

But if a font is located in RAM, would deleting and adding variables change its location?

Quote
Each font set can contain a total of 256 characters? Is there a reason for the limit? I will admit though, it seems very unlikely that anyone would need more that 256 characters.

It's a reasonable standard.  But the reasons I'm doing it is there aren't very many tokens available on the Ti-83+.  Sure, there's more than 256, but here's what I have to keep in mind, for example:

1. For people who want to save space in their Ti-Basic program, they'll use tokens instead of lowercase letters in their strings to display.
2. For people who want easy-to-remember characters by using standard ASCII (and don't care about program size), they'll use lowercase letters instead of tokens pertaining to ASCII 97 to 122.

In both instances, the same font characters will be displayed.  But that means I need both sets of tokens available.  So there aren't much more than 256 total possiblitities for a character from a font.  However, with the option to have several fonts available for the same program, that won't make much of a difference.
« Last Edit: November 14, 2010, 12:01:41 pm by Hot_Dog »

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: Correlation: A New Project Aimed at Ti-Basic Programmers
« Reply #42 on: November 14, 2010, 12:56:05 pm »
But if a font is located in RAM, would deleting and adding variables change its location?

That's true. What I would do is put in a safety check. Make the first two bytes of the file $6969 or $1337 or something. So if that's not what your pointer shows, then re-find it. That would even work for the archive in case the BASIC program happens to pull a garbage collect. (I guess technically it can happen)
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Correlation: A New Project Aimed at Ti-Basic Programmers
« Reply #43 on: November 14, 2010, 01:06:40 pm »
As long as the font sets won't take space for 256 chars even when they contain 40 or so, I am fine.

Offline Hot_Dog

  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: Correlation: A New Project Aimed at Ti-Basic Programmers
« Reply #44 on: November 14, 2010, 03:42:49 pm »
But if a font is located in RAM, would deleting and adding variables change its location?

That's true. What I would do is put in a safety check. Make the first two bytes of the file $6969 or $1337 or something. So if that's not what your pointer shows, then re-find it. That would even work for the archive in case the BASIC program happens to pull a garbage collect. (I guess technically it can happen)

Thanks!  That's a good idea.

As long as the font sets won't take space for 256 chars even when they contain 40 or so, I am fine.

Your font will be only as big as you want it to be.  The calculator will tell you if you try to go beyond the range of the number of characters you have.  For example, if your font contains only characters for "A" "B" and "C", the calculator will not let you use "S" and "0".