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

0 Members and 2 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 #150 on: January 28, 2011, 07:30:36 am »
So if we don't want that, we can just leave it disabled? Will this still work correctly on someone else's calc who has that option enabled?

You enable it inside of the program.  Basically, if your program uses outside libraries terrible calculator crashes MIGHT occur if you do not enable this option inside of your program.  When the program exits the option is disabled.  So by default it is disabled unless your program turns it on, and then it is disabled when the program is finished running.

I guess what I'm trying to say is, your program will always work no matter what calculator it is being used on, unless the calculator is low on memory.

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Correlation: A New Project Aimed at Ti-Basic Programmers
« Reply #151 on: January 28, 2011, 11:28:23 am »
Sounds like a good idea - I guess there's only so much Safe RAM.

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 #152 on: January 29, 2011, 01:41:27 am »
So basically that 800 byte of RAM will be some sort of arbitrary buffer? Sounds good to me, providing it can be enabled/disabled in-game so the player doesn't have to manually do so. :P

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 #153 on: January 29, 2011, 11:28:17 pm »
Hmm, actually I like this idea Hot_Dog. Do you mind if I use the idea? I'll give you credit in the readme of BatLib for sparking the idea...

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 #154 on: January 30, 2011, 12:09:36 am »
So basically that 800 byte of RAM will be some sort of arbitrary buffer? Sounds good to me, providing it can be enabled/disabled in-game so the player doesn't have to manually do so. :P

Yeah, it's a buffer that copies appbackupscreen, plus a couple of small other sections.  That way any data that needs appbackupscreen will be intact when it needs to be

Hmm, actually I like this idea Hot_Dog. Do you mind if I use the idea? I'll give you credit in the readme of BatLib for sparking the idea...

I don't mind in the least bit if you use it!  Be my guest!  ;)
« Last Edit: January 30, 2011, 12:10:12 am by Hot_Dog »

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 #155 on: January 30, 2011, 12:12:51 am »
Thanks! I won't be using it immediately, but I plan to when the un-betafied version is released ^-^

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 #156 on: February 24, 2011, 10:25:56 pm »
Another new feature!  Althought sadly, this feature won't be available in the beta version of Correlation.  Sorry, folks

In many, many Ti-Basic Text-Based games, when you draw a single character you need to erase where it was drawn when in moves to another spot.  For instance, in Pokemon Purple and Illusiat 13 and other RPG games, when the character moves to the right the program needs to erase the area where the character of text had been previously drawn.  Otherwise your screen will get clogged with text  0_0

By using int("BY, Correlation will do all this for you, saving program space and speeding up your program.  Just use int("BY, and from that point on every time you draw a character Correlation will erase where the character was previously drawn WHILE PRESERVING THE BACKGROUND.

The catch is you can only use this for one character.  If you try to use this for several moving characters at once you'll get some very...interesting results.

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 #157 on: February 25, 2011, 04:12:25 pm »
That is cool. So basically when displaying a char it keeps in memory what was behind it? Or does it just capture the entire screen content? I fear the latter might require a lot of SafeRAM, right?

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 #158 on: February 25, 2011, 06:10:29 pm »
That is cool. So basically when displaying a char it keeps in memory what was behind it? Or does it just capture the entire screen content? I fear the latter might require a lot of SafeRAM, right?

It just captures what's behind it, 32 bytes of RAM

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 #159 on: February 25, 2011, 06:14:27 pm »
Nice! Also, as a side note, I am not going to be finishing that font editor any time soon, as far as I know, sorry. I will get to it eventually even if one already exists, but I am not going to be able to work on it for a while !_!

But yeah, saving the background like that is a pretty cool idea! Also, do the sprite routines draw directly to the LCD, a buffer, or both?

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 #160 on: February 25, 2011, 06:15:57 pm »
Nice! Also, as a side note, I am not going to be finishing that font editor any time soon, as far as I know, sorry. I will get to it eventually even if one already exists, but I am not going to be able to work on it for a while !_!

But yeah, saving the background like that is a pretty cool idea! Also, do the sprite routines draw directly to the LCD, a buffer, or both?

Don't worry, take your time on the font editor

The sprite routines draw to a buffer unless you ask Correlation to draw directly to the LCD one character at a time.  The former displays loads of text very fast, the latter displays small amounts of text very fast

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 #161 on: February 25, 2011, 06:21:51 pm »
Awesome, that could be useful. I like to draw moving sprites directly to the LCD and then update that portion of the screen from the graph buffer.

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Correlation: A New Project Aimed at Ti-Basic Programmers
« Reply #162 on: February 25, 2011, 08:07:10 pm »
Ooooh, that's cool.  Wonderful idea, Hot Dog! ;D

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 #163 on: February 25, 2011, 08:23:55 pm »
That is cool. So basically when displaying a char it keeps in memory what was behind it? Or does it just capture the entire screen content? I fear the latter might require a lot of SafeRAM, right?

It just captures what's behind it, 32 bytes of RAM
I see, does it work based on the 8x8 grid? For example if your char is located at x,y 39,41 it would keep in memory sprite 32,40, sprite 40,40, sprite 32,48 and sprite 40,48? What if the character is aligned?
« Last Edit: February 25, 2011, 08:24:09 pm by DJ_O »

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 #164 on: February 25, 2011, 09:04:42 pm »
That is cool. So basically when displaying a char it keeps in memory what was behind it? Or does it just capture the entire screen content? I fear the latter might require a lot of SafeRAM, right?

It just captures what's behind it, 32 bytes of RAM
I see, does it work based on the 8x8 grid? For example if your char is located at x,y 39,41 it would keep in memory sprite 32,40, sprite 40,40, sprite 32,48 and sprite 40,48? What if the character is aligned?

I forgot about that.  Okay, 64 bytes of RAM (NOT user RAM) and everything is taken care of.  Thanks for pointing this out to me!