Omnimaga
Calculator Community => Discontinued => Major Community Projects => Correlation => Topic started by: Hot_Dog 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
-
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.
-
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.
-
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.
-
I would avoid OpenLib( and setTmFmt(, because they are not available on the 83+ and 83+SE.
-
Oh, I didn't know that. Openlib really is a useless command, though.
-
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?
-
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.
-
The verdict:
1. DispTable
2. Select(
3. ExprOn/Off
4. Real(
Thanks to everyone for their input!
-
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
-
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
-
Wait, so TI actually added that feature for third-party apps? :o
-
I think so. I've never seen a TI lib.
-
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.
-
Oh, that's great! Don't forget about real( conflicting with xLIB.
-
Oh, that's great! Don't forget about real( conflicting with xLIB.
And det( and identity( conflicting with Celtic III and sum( conflicting with DCS7.
-
Will he use them for this, though?
-
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.
As was said, it opens a library. I don't think TI did it for 3rd party development though. I seem to remember hearing about how there were certain restrictions placed on the type of libraries it would call that made it useless for pretty much everyone except TI.
-
Oh, that's great! Don't forget about real( conflicting with xLIB.
Actually, you won't be able to use both at the same time. It's the way the OS is built. But I'll use Label On and Label Off to allow a user to switch between xLIB and the font routines.
-
Will Label On/off be useable in BASIC so we can swap between them in our games when needed? That would be cool!
-
Will Label On/off be useable in BASIC so we can swap between them in our games when needed? That would be cool!
Yes, they will be useable in BASIC! However, you would have to use Label On every time you wanted to switch from Xlib/CelticIII/etc. to Correlation (as it's now called) and Label Off every time you wanted to switch from Correlation to Xlib etc.
-
Ah that would be fine I think.
Btw you rename tokens, right? I hope you don't create new ones, because Omnicalc 1.0/1.1 did that and we couldn't send files to another calc or the computer.
-
Btw you rename tokens, right? I hope you don't create new ones, because Omnicalc 1.0/1.1 did that and we couldn't send files to another calc or the computer.
Tokens remain just the way they are, I don't change names or anything. That way, for people who want to switch between Correlation and Ti-OS routines in their programs, they won't have to be confused with names.
-
But where is Label Off located, then? ??? I never saw that on my 83+ ???
-
It's with AxesOn/Off, GridOn,Off and all those.
-
Just go to 2nd -> Format
-
Oh right, I remember now ^^. Thanks.
-
Keep in mind that Select(), ExprOn/Off, and LabelOn/Off are all two byte tokens. :)
-
Keep in mind that Select(), ExprOn/Off, and LabelOn/Off are all two byte tokens. :)
Ah, yes. Thanks for letting me know :D
-
Now I know what you meant by Correlation earlier. I didn't notice the project name change. ;D
-
I'm glad things are decided. This is gonna be sweet! ^^
-
I'm using real( for selecting fonts now.
For those of you interested, Select(), like Output(), is a class 2 function. It is difficult for a custom parser to work with class 2 functions.
-
What does class 2 means?
-
What does class 2 means?
Class 2 is a lot of Ti-Basic programming functions, such as If, While, End and Goto. Output( is a class 2 function because you can't use it outside of a Ti-Basic program. (A goof-up by the Ti-OS)
For more information:
http://wikiti.brandonw.net/index.php?title=83Plus:Hooks:9BAC
-
Ah I see, thanks for the info. :)
-
What does class 2 means?
Class 2 is a lot of Ti-Basic programming functions, such as If, While, End and Goto. Output( is a class 2 function because you can't use it outside of a Ti-Basic program. (A goof-up by the Ti-OS)
Oh, so it was just a mistake? I've always thought it was annoying how it couldn't be used from the homescreen.
-
What does class 2 means?
Class 2 is a lot of Ti-Basic programming functions, such as If, While, End and Goto. Output( is a class 2 function because you can't use it outside of a Ti-Basic program. (A goof-up by the Ti-OS)
Oh, so it was just a mistake? I've always thought it was annoying how it couldn't be used from the homescreen.
It was done on purpose. By goof-up, I mean that TI once again stinks at OS development
-
I guess they thought it would be best to disallow basic control/output commands from being used on the home screen. If I remember, some casio calcs allowed you to use those commands on the home screen, but I might be wrong. It might be more commands but not all.