I have nothing relevant to request, but I do like the idea of this :)
Z80 Assembly>English>TI-BASIC>Python>French>C>0
I tried to program the fly the copter game on my ti-84+ SE and it works except for one huge flaw. Instead of the tunnel being white space and the walls being dark pixel, it's the other way around!, so whenever the game starts, the pixel helicopter just "crashes" into the dark tunnel. I copied the code exactly as the site showed, but it still doesn't work, any ideas on what might be wrong?
Well, none of us can really help until we know the source code, but you might try changing all the pxl-test() commands to not(pxl-test())'s. Basically add a not() in front of every pxl-test() command.
However, depending by how your program works, this may not work. If it doesn't, please post the code of a link to the code so we can help further!
The code for the fly the copter thing I was talking about earlier is on this website at http : //tibasicdev. wikidot. com /fly-the-copter
ok, I know I've seen some discussion on this but cannot relocate it.
what is some code to take a number with decimals and figure out how to represent that number with radicals? for example, it will take 6.196773345 and return 8√(15)/5.
Assuming it's only for square root radicals, you can square the number, then put it in fractional form and simplify from there. You can't use the ▶Frac command 'cause it only outputs the fraction - it won't tell you the numerator and denominator.
Weregoose has some code for this, so I'll do some code and let him finish it.
Where the number you need to simplify is in Ans:
:ClrHome
:Ans²→C
:[Weregoose's thing's numerator given C]→B:1→A:2→I
:While I²≤B
:While not(fPart(B/I²
:B/I²→B
:AI→A
:End
:I+1+(I>2→I
:End
:Text(0,0,A,"√",B
:Text(8,0,"--------------------------------------"
::[Weregoose's thing's denominator]→B:1→A:2→I
:While I²≤B
:While not(fPart(B/I²
:B/I²→B
:AI→A
:End
:I+1+(I>2→I
:End
:Text(16,0,A,"√",B
Note: I got got this code from the Wiki page: simplify-radicals. Also, there was a question regarding this exact question a few months ago, but I couldn't find it.
Same question, yes… I dug it up and polished it up some more:
PROGRAM:RADICALS
:Ans→X
:Ans²+i
:While real(round(Ans,4
:Ansi+real(AnsiPart(imag(Ans/real(Ans
:End
:√(int(abs(Ans-1→Y
:For(Z,0,1
:1
:While fPart(round(AnsY
:R►Pr(Ans,1
:End
:{Y/Ans,Ans²→X
:If not(Z
:Ans→Y
:√(round(X²Y²,0→Y
:End
:LXLY
:{LX(1),Ans(2),prod(LY
12√(56/78)/34 returns {4 273 221}—numerator, radicand, and denominator. It tries to make sense of lower-precision numbers like your 6.196773… example by adjusting the first round( and expanding on what would otherwise be XY→Y in the fourth-from-last line.
Thanks, Weregoose, that works wonders except the return order is numerator, denominator, radicand not numerator, radicand, and denominator.
This code uses some commands I don't even know the syntax or outputs of…
Fixed. Don't fall into believing that the way my code feels or operates is in the same category as what the developers intended. Eight years is a long time to take a lot of long hard looks.
Hi, I am looking for the basic command to display the equation formula vs. the result. The output I'm after is the standard formula screen echo (pretty print?) of the user command line as it appears on a Voyage200 screen that precedes the display of the result. (For instance, the quadratic equation would appear in its fractional form with the individual values uncombined under the square root bracket in the numerator). Thank you in advance for the assistance.
I'm pretty certain that Weregoose wrote TI-BASIC code to do this, or that his code could be migrated for this purpose, but I myself am not sure quite how to accomplish this task :/ Rest assured, it almost certainly has been done, and I'm 100% certain it's possible to do.
Roquebantha, I am hoping there is a more generic solution than having to write a reverse algorithm for each equation I use in a program, but, along those lines, if I were to define each term in my equation as a constant times some unique variable the result would be forced to display symbolically (i.e. "1+1" would display as "1a+1b" instead of "2"). This is both tedious and likely to confuse a third party user. Absent a better solution, however, do you know of a way to suppress symbols so the "1a+1b" would appear as "1+1"? Thanks
Hey! First of all, I would like to congratulate you guys on the site. It is amazing, friendly, and very helpful. Secondly, I would like to ask: Exactly how does one edit lock a program? A step by step guide would really be appreciated. Also, graphlink is not compatible with my computer, so I have been unable to use it.
Hey A Programmer!
There are quite a few ways to go about this, most of them involve downloading a program. If you aren't familiar with how memory works then I don't suggest using CalcSys (if you do figure it out, though, you will be changing a 05 to a 06). Alternatively, a bunch of Apps will let you lock programs, such as BatLib, Celtic 3, MirageOS, and DoorsCS. Since GraphLink doesn't work and I don't know if you have access to other linking software, you can put this assembly opcode on your calc and that should also solve your problem:
AsmPrgm
EFD74AFE04C0 ;Get some info about Ans, check if it is a string. If not, exit
3C ;Kinda cheating to make a=5 >:D 5 is for the program type
EB4E234623 ;Get the size of the string, HL points to the data
11788412 ;DE points to OP1, write 'a' to the first byte
1CEDB0 ;Increment E (so that DE is incremented), then copy BC bytes from HL to DE
AF12 ;set a=0, then write it where DE is pointing
EFF142 ;Search for the var, return info. We want HL in this case
D8 ;quit if it doesn't exist
EE03 ;This does some bit logic. A should be either 05 (regular) or 06 (locked). This will toggle
77C9 ;Change to the new type, then exit.
Basically, you just put the name of the program in Ans and run this program and it will toggle the locked status :) Example:
"HELLO
Asm(prgmLOCK
That will toggle the lock status of prgmHELLO
I hope this helps!
Z80 Assembly>English>TI-BASIC>Python>French>C>0
BatLib lets you do this? What command is it?
Command 25-VarType. If you check out the chart (there should be a link within the document to the chart that is also in the document), you will see that protected programs have a type of 6. Since protected programs and regular programs can have the same naming scheme (using a prefix byte of any of the following: BoxPlot,[,E,F), you can do this:
dim(25,6,"EPROGNAME
This function also returns the value of the type it was previously (not really useful, though).
Z80 Assembly>English>TI-BASIC>Python>French>C>0
Oh aha, yes I never thought that far into it lol. I have so far just used the locking asm program you posted awhile ago and also DoorsCS's locking routine to lock and unlock my programs :)
Thank you for the quick replies! I do have MirageOS now and can lock/unlock programs. But out of curiosity, how do i put assembly opcode on my calculator? I know how to to make and execute basic programs, but Assembly programs are different. If it makes a difference, I have a Ti-84 Plus. Thank you in advance!
*to
I have located the AsmPrgm Command and placed it at the beginning of the program. The problem I am having is that the program refuses to run due to a Syntax error. The Syntax error is apparently the first line of the program. But the first line of the program is just AsmPrgm…
Ah, so the only way to do it in vanilla BASIC (pure BASIC, no libraries or anything installed which I'm assuming you don't which is fine :) is to write a seperate program for them. Here's a really quick rundown tutorial:
Create a new program exactly how you would a normal BASIC program. Type in the name, it can be anything, and hit enter to get the editor. Then type this as your first line:
AsmPrgm
You can find this token in the Catalog as the ninth option. After that, you type your opcode in, which can be a lot of different things, and don't create a new Line to type it in. Just keep typing right after the "AsmPrgm" token. For example, to enable lowercase chars:
AsmPrgm21148A3E08AE77C9
If the opcode doesn't already, end it with the characters "C9". "C9" is kind of like the Stop command in BASIC. Or better put, the Return command. As you can see in the example above, it already has it :) Most people put it in their opcodes by default and all the opcodes I've seen here do but in some places they do omit them so always check. Then, in your original program where you want to execute the opcode, type in the prgm name with the preceding token "Asm(" which is the 7th token in the catalog, two before AsmPrgm. Here's an example:
My opcode:
PRGM:LOWERC
:AsmPrgm21148A3E08AE77C9
PRGM:BASICLOW
Menu("Lowercase","Lowercase",A,"Quit",B
Lbl A
Asm(prgmLOWERC
Lbl B
Stop
Hope this helps! You can also run Asm programs from the homescreen exactly like you did in the BASIC program, that is "Asm(prgmLOWERC" will work on the homescreen as well. Certain libraries will let you actually type Asm directly into the BASIC code but there's no way to do this normally.
Oh look, I got ninja'd by your own intuition XD You're welcome haha everyone here is always willing to help :)
So I'm trying to write a function that takes another function as input. So, for example, lets say I Define g(x)=x+2x^2 and I want to run that through my function so I do myFunction(g(x)) and it does its thing and returns a value. And it would probably work just the same if you just do myFunction(x+2x^2). Does anyone know how to do this?
For which calculator would you like to do this?
Z80 Assembly>English>TI-BASIC>Python>French>C>0
Is there a way to get the calculator's ID from within a program?
Okay so for math class I have to do MAD (mean absolute deviation) and i was wondering if anyone has or can make a program to do this.
If the numbers are in L1, this will return the mean absolute deviation:
mean(abs(L1-mean(L1
That is what the mean( command does. Basically, this code finds the mean of the list, then subtracts it from each element of the list, takes the absolute value of each difference, and computes the mean of the distances (which is the MAD).
I need help with text sprites, I don't understand how to create one, I looked at all the text sprite articles on this website and youtube videos but they weren't helpful. Can someone create an example program with a text sprite that displays an image like a donut/cat, by writing the code, like the creation of the string, for loop, and line with the "text" command?
0→R
0→C
ClrDraw
For(A,1,7
Text(R,C+A,sub("([X[( ",A,1 //2 spaces
Pause
End
This code draws a donut shape at R,C I added a Pause so you can see how it makes the donut (just keep pressing enter).
Notice that the for loop cycles 7 times, that because the string "([X[( " is 7 characters long.
Why do apps need to be signed
(This is probably one of those questions that has a very obvious answer, but still…I really can't figure out the answer… :)
If I already have a definite matrix written down on a piece of paper, how do I store it in a matrix (within a program) without having to go manually into [2nd] [MATRIX] to type it in? (I have a TI-84 Plus). Basically, is there a code that I can use to store the numbers in the matrix into, for example, Matrix A, within a program?
Thanks!
you can use the old method using brackets, so a matrix like
A B
C D
would be [[A,B][C,D]] and you would just store it to [A] or so. more information onmatrices
The Silver Phantom welcomes you
What would be the best way to "simultaneously" move a fairly large number of objects at once? I am making a game in which the player (an X) moves around avoiding objects (O's) that are bouncing back and forth across the walls, while trying to collect +'s which make more O's appear.
I can use output, text, sprites, any form of displaying. Keep in mind that the O's will be moving across the screen and then "bounce" off the edge and go back the other way.
Hmmmm text wrapping wouldn't really help here because the objects are moving vertically as well as horizontally. The original plan was to just use real variables to store the location of each object but I'm realizing that i'll run out of variables at some point..
use a list instead of variables.
I definitely suggest trying lists. The beauty of lists is that you can apply mathematical and even logic commands to the entire list at once. Keep in mind that when using list functions, try to avoid For loops until you're actually displaying the objects.
Say you have your lists set up such that LX and LY are your X and Y coordinate lists for each object, LH and LV are your vertical and horizontal speed of each object (probably 1 of you're moving across the homescreen or moving them slowly, but the values aren't really an issue).
LX + LH -> LX // moves all elements horizontally, positive to the right, negative left
LY + LV -> LY // moves vertically, positive down, negative up (or inverted depending on how they are displayed)
LH - 2( (LX = [xmax]) -/+ (LX = [xmin]) )*(LH) -> LH //bounces horizontaly, see notes bellow
LV - 2( (LY = [ymax]) -/+ (LY = [ymin]) )*(LV) -> LV //bounces vertically, see notes bellow
The bouncing algorithm will subtract 2 times the current movement speed of each element from the speed, in effect reversing it (a - 2a = -a). The (x/y)(max/min)s are whatever you want to set them to be to contain the objects in the walls. If you're speed will only be 1 in each direction, then you can take off the *(LH) and *(LV), but you will have to use a subtraction method to determine what direction it will be changing to when it reaches the maximum or minimum of your bounds, otherwise you can get away with always adding the logic expressions together and multiplying by the current speed (either negative of positive for it's direction).
I'm sure there's some fantastically faster way of doing this with strings or some other obscure method, but this structure should keep it nice a clean. You might have to play around with the positives and negatives a bit to get bouncing to work.
I really like this idea but the one problem is that not all the objects will be "bouncing" at once. Would there be a way to associate 3 value to each object, like an x coordinate a y coordinate and a direction movement? Well obviously there would but I mean would there be an efficient way to identify the places in the list that correspond with the object that has hit the edge and reverse that directional value?
Okay, so I connected my black link cable and opened up graph link. i opened a .8XP and clicked 'send to RAM', but it said "Can't open the communiction port." I checked 'link', and it said COM Port 1, COM port 2… COM Port 5, but no USB 1, which i was using. Help?
I have Several questions:
- What type of Calculator do you have?
- What type of computer are you using?
I am assuming you are on a PC and using the graph link cable (you said it was black)
I'm not sure exactly how to help you, but I do know that when I connect my BASIC Stamp II Microcontroller to the USB port at the front of my PC, it establishes a link through COM 4, & it is successful in communicating (although it has recently failed for unknown reasons; something to do with Latancy timing settings…). If you have a PC try going to the control panel/settings and see if you can find something under a hardware page with different ports and what not. See if you can find that, and maybe change some of the settings. Sorry if that was a bit vague.
Also, I've heard that graph link doesn't work very well with the newer calculator models. Maybe this is part of the problem? Oh, it could also be that you may need to download an update for your computer's USB drivers. Try looking into that?
If you provide more information, I (or someone with more experience with Graph Link than myself) might be able to help you more effectively.
—Wolfgang
I am very new to TI Basic, so the answer to the following question might be fairly obvious:
I have 2 variables. I need to display them as ordered pairs, for example: (A,B)
I tried storing the variables to a matrix and then displaying it using: List▶matr({A},{B},[A] but it churned out an ugly [[A B]], not exactly the nice (A,B) I was looking for. I also tried just displaying ( , ) and then using Output( to place the variables in the spaces, but then I realized that the variables might be multiple digits long, causing them not to fit. Does anybody know how I can display the variables A and B in (A,B) format at a specified location (I could display the "(A,B)" at whatever coordinates I wanted to)?
Try Output(R,C,{A,B})
Thank you! That works wonderfully :D
Ahhh, so the command was Output(4,1,{A,B}), I was trying Output(4,1,(A,B))
Just out of curiosity, with the Output( command, what does the third value do? I've seen and am familiar with Output(A,B) but not Output(A,B,C)
likeawhisper
The man shuddered as the shadow drew a glistening sword from his back. Creeping closer and closer with his pale eyes burning into the man, the shadow slowly raised his blade and before he could thrust it down, the man heard the shadow hiss something.
"The Shadow Clan's presence must be like a whisper. Always felt, but never seen…"
That's your statement, what you want to display, such as, "hi" or a variable
The Silver Phantom welcomes you
Hello I have a problem with the sprite command of xlib, because the tilemaping works, but not the sprites
my command is:
real(1,0,0,1,8,2,2,0,0,0,1)
I am using the ti 84 plus
I have already read you xlib rreadme and tutorial but it isn't helpfull in this case:
It always throw an syntax error even in the "ADEMO" from xlib.
mounTI
ps: i am german so may there are mistakes, i'm sorry for that
Did you install xLib? What OS do you have?
Sunrise 3 Progress: 30%
Size: around 20 KB, not including the save lists and in-game RAM.
Yes i have installt xlib(the tilemap function works)
my os is: ti 84 plus 2.53MP(is it that what you want?)
My xlib version is:v0.602b
Thabks for the quick answer.
mounTI
Ah, it is because of your OS version :/ OS 2.43 is what I use. You can also try DoorsCS7 which has xLIB built in and it works as well :)
Z80 Assembly>English>TI-BASIC>Python>French>C>0
Thank you,
I allready thought it could be something like that.
So i will try doorsCS7 then
monuTI
DoorsCS7 works on 2.53 MP? What about 2.55 MP? And, can you turn xLIB off?
Sunrise 3 Progress: 30%
Size: around 20 KB, not including the save lists and in-game RAM.
Yep, it works on both and you can disable the hooks from in DCS7 if you want :)
Z80 Assembly>English>TI-BASIC>Python>French>C>0
In te end I didn't took doors.
First tried grammer2 , but I don't liked it, because the commands not do what I expect. So Now I'm coding with axe and i like it.
.
I have written a foil program, but I get a DIM Mismatch. What should I do? I want to program something that does polynomials.
Sincerely,
Marky
I have written a program on my nspire with the 84+ keypad that encodes and decodes a message using matrices. Basically, A is 26, B is 25, C is 24, and so on. I end up with these numbers in a matrix and I need to get them back into letter and into a string so that I can show the decoded message. Is there an easy way to do this?
If you're using a one-row matrix, then you should switch to lists.
But if you are storing "HELLOWORLD" like so:
[[19 22 15 15 12
[4 12 9 15 23]]
Then this should reverse the process:
:dim([A]→L1
:"?
:For(R,1,L1(1
:For(C,1,L1(2
:Ans+sub("ZYXWVUTSRQPONMLKJIHGFEDCBA",[A](R,C),1
:End
:End
:sub(Ans,2,prod(L1
I tried this, and it work the first few times, but then I started getting a domain error. Can you help?
Which line is it referring to when you hit 'Goto'? If it goes to the 'Ans+sub(" line, then you probably just have a number bigger than 26 in your matrix.
It does go to the Ans+sub( line, but I just realized that the error appears when it reaches a 0 in the matrix.
Would that happen to be a space or something? If so, change
:Ans+sub("ZYXWVUTSRQPONMLKJIHGFEDCBA",[A](R,C),1
to
:Ans+sub(" ZYXWVUTSRQPONMLKJIHGFEDCBA",[A](R,C)+1,1
I think
That makes A=27. If you move the space to the end of the string, A will still be 26, and the space will be 27. Does that make sense?
It happens when the matrix is bigger than the string. It should stop when it reaches a 0, because that means it's the end of the string.d
There's nothing in there to do that yet, and I can't think of any way to do that without slowing down the code, although
:Ans+sub("/ZYXWVUTSRQPONMLKJIHGFEDCBA",[A](R,C)+1,1
:If sub(Ans,1,1)="/":Stop
Might not slow it down too much.
Then I get an invalid dim error in sub(Ans,2,prod(L₁
Either Ans is not long enough, or prod(L1 is returning a decimal value, negative value, or zero.
Z80 Assembly>English>TI-BASIC>Python>French>C>0
It shouldn't be doing that. It should be getting the dimensions of the matrix (in this case, 3 and 3) and storing them to L1 as {3,3}, which should then be used in the for loops.
Are you sure you copied down the code right? It shouldn't be doing that.
Yeah, honestly, for a function like this, I use lists, because they make things a lot easier to read, and compute, plus, the program/routine to do this is already documented and is easily modifiable. Also, you could get BatLib which comes with its own, much faster, assembly coded routine to do this.
Hmm, it could get yucky with BatLib code, though. You could, though, make use of the DataString command. (There are also some cool matrix manipulation commands)
dim(67 is used to convert a string of bytes into list elements, and vice-versa. For example:
,dim(67,"HELLO WORLD!") returns {72,69,76,76,79,41,87,79,82,76,68,45}. From here, you can perform operations on the list to encrypt the values, then convert them back to a string using the same command. Here is a simple routine that I did:
Encryption:
(Ans is the string to encrypt)
dim(67,7+3cumSum(dim(67,Ans
"HELLO WORLD!" turns into "DispGraph'ZoomSt0FuncùSortA(Elsetan(FVxyLine"
Decryption:
(Ans is the encrypted string)
dim(67,Ans
dim(67,171augment({Ans(1)-7,ΔList(Ans
Since the dim(67 command reads the list elements in mod 256, you have to be careful about how you choose encryption functions to make sure their is a decrypting function. since 3-1=171 (mod 256), the inverse function of multiplying by 3 is multiplication by 171. Likewise, the inverse for cumSum( is ΔList(, almost. I used cumSum( so that the same letter wouldn't have the same encrypted value.
Z80 Assembly>English>TI-BASIC>Python>French>C>0
dim(67, is exactly what I used :) It's led to some huge performance boosts in some of my programs :)
I had to use matrices because this was for math class.
I'm assuming you're at the cryptography part of pre-cal?
That was the only part I paid attention in, lol. The rest of it was just a repeat of algebra II.
Except for Trig. I. Hate. Trig. I tried to skip PreCal with a test, but I failed the trig part of the precalculus test. Trig sucks…
Trig is the confusing part. I was considering writing something for it last year, but I never got around to it since it would require me to know the stuff in the first place.
I just put the formulas in a string and then archived it, since all my teachers have only ever ram cleared.
Haha I always just put my programs in a group and recalled them later :)
That's always fun, too. Plus it never hurts to have backups.
It sucks when a group doesn't get the proper headers so the calculator will crash on trying to ungroup them, although I forget the specific Celtic 3 command that can still ungroup them program by program.
Oh wow, that would be a helpful feature; I have Celtic 3, but don't have any experience in using it.
i have a brand new ti-84+c silver edition, and i'm looking for a dice roller program, preferrably not a download. keep in mind that i am new to programming, so i would appreciate a simple program. thanks!
I don't have a Color calculator, but… If it's anything like my TI83+, this will work:
randInt(1,6
But I've ordered my Color. It should be arriving in days, so I'll be able to figure out some commands and help then!
it's me again! this time, my problem is a little more advanced. on my ti-84+c silver, i tried installing mirageos with the official TI-Connect software, but it wouldn't let me upload, saying that it was an invalid file type. and when i tried getting it from someone who had it on their ti-84+, it gave me an error in xmit message. does anyone know what's going on?
Yes, you will not be able to install MirageOs on a C edition calculator, because of the hardware and software differences when it comes to assembly and how Apps work. If you've ever used DoorsCS, which is similar to Mirage, a beta version for the C edition is currently being tested, although it has not been released for public consumption yet.
will doorsCS run programs like ztetris that cant be run without an os or cs app?
Well I doubt it can yet (since all assembly programs will need to be ported to the new edition) nearly all TI-BASIC programs will work. I'm not sure what stage DoorsCS for the C edition is at yet. I know it will be supporting at least xLib soon. If you want to find out more, go to cemetech.net and look for KermMartian.
Ive not been able to find it anywhere. How do I display custom text, like lowercase or arrows.
There is no way to do lowercase that i know of. if you mean commands like ClrHome, when writing a program, press the PRGM key (this is the key with thee most useful commands; other ones that do similar things are MATH, VARS and STAT to name a few.) and navigate the menu for the command you want. same for funky symbols like < or >.
To make lowercase letters go to your home screen an then hit:
[prgm][<][enter][)][)][enter][2nd][0]8x[\/][enter][2nd][alpha][cos][x-1][prgm][apps][alpha][2][4][2nd][alpha][x-1][sin][prgm][alpha][9][2nd][mode][2nd][0]6x[\/][prgm] *select prgmLL* [enter][enter]
In words:
Make a program* (I called it LL up there), search in the catalalog** for AsmPrgm and type after it: FDCB24DEC9.
Now return to the homescreen and search in the catalog** for Asm(. Go to the prgm menu, search for prgmLL (or however you named) it and paste the name after asm(. Press enter and you should have enabled lowercase letters. Select them by hitzing alpha twice and then typing them like normal letters:)
*to make a program hit [prgm] and [<] here you input a name for it and press enter.
**to acess the catalog press [2nd][0]. In this large menu you select a comand like in a normal menu and press enter. It should be pasted.
!! THIS WORKS ON A TI 83+, I DO NOT KNOW IF IT WORKS ELSEWERE!!
The code Nik gave works on 83+ and almost all 84 models. To get special symbols such as arrows, I know there is a way to use to-connect to send the symbol to a variable and then recall that variable into a line of text. Xeda or Burr should be able to help you with this. Just send them a PM