Sign in to follow this  

Programming for Texas Instruments calculators (TI-BASIC and Z80 ASM)

This topic is 3543 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I saw that the post about TI-84 Plus programming has been closed, so I'm starting a new one here. First of all, I would like to recommend TI-BASIC to anyone who has a TI-Calculator that suppords it and who wants to learn programming. For me, it has really been a great way to enter the world of programming (after having learned TI-BASIC, I started learning PHP which I feel that I'm now beginning to master rather well). If you are new to TI-BASIC, I recommend reading the manual that came with your calculator (don't have the manual? It's probably available for download from http://education.ti.com/educationportal/downloadcenter/SoftwareHome.do?website=US&tabId=2). Looking at code written by others and experimenting with it is another great way to learn the language. On my blog (http://exanock.blogspot.com), I have already published one of my TI-BASIC programs (http://exanock.blogspot.com/2007/09/ti-84-plus-program-binomial.html), and you can expect more to come, including tutorials that explains more of the code. Texas-Instruments has links to many good tutorials here: http://education.ti.com/studentzone/getahead/tutorials.html I'm now intenting to learn Z80 ASM to make games for my calculator. Do you have any comments, questions or tips? Post 'em here for your fellow (and comming) TI-Programmers to read :D

Share this post


Link to post
Share on other sites
Ti-Basic helped me get through boring classes in middle-school :-)
I had an old-school TI-85, and by the time I started learning z80 asm, the 85 scene was long dead. I often tried to emulate effects I'd see, using my own algorithms, and compare efficiency. As an introductory machine language, it's not such a bad thing to learn.

Anyways, last year I ended up making a small demo for the Ti-85, including traditional demoscene effects like plasma and rotozoom. I also tried emulating some effects (although I admit my implementation isn't as good) that I saw in games like Plain Jump, and modeled the font off of another demo. A video can be found here:
http://www.youtube.com/watch?v=5GWMN0x8Ijg
I've since started work on a z80 raycaster, but that project is on hold since I've mainly moved on to the PSP for my mobile development fix.

To be honest though, z80 based calculators are a dying breed, but there is a such a wealth of information out there it is easy to develop for.

Share this post


Link to post
Share on other sites
Quote:
Original post by Daniel Talagrand
To be honest though, z80 based calculators are a dying breed, but there is a such a wealth of information out there it is easy to develop for.
I don't think they'll die out until the TI-83+ and compatible calculators (TI-84+) stop being the most popular high-school graphical calculator. [smile]

Learn TI-83 Plus Assembly In 28 Days is probably the best guide to starting Z80 assembly on the TI calculators. MaxCoderz is an assembly-centric programming group and you might find you're more likely to get help from the forum there than here.

Share this post


Link to post
Share on other sites
I just want to say that I've gotten plenty of help with my z80 projects at unitedti.org, and I find it to be a very nurturing environment if you want to learn more about any kind of programming (but z80 and TI-BASIC in particular.) I hope to see you there sometime!

Share this post


Link to post
Share on other sites
The TI-83+ brings back some good memories, even though I'm only 21 :)
Most of the time I had an advantage making exams because I would code small TI-Basic programs that would solve certain general problems (math/physics/chemistry) for me.
I remember all the people who desperately wanted my program and came to me just an hour before an exam. Those were the good times :)

Share this post


Link to post
Share on other sites
I remember programming a calculator at school, (it was a Casio and not a Texas one mind) and I've been kind of yearning to have a handheld since that I could play around with and maybe make really beginner games but with the potential to do something more. I'm wondering how far these calculators have advanced or if theres a recommended PDA/Phone to do this stuff on nowadays.(do kids use calculators nowadays to program stuff, or use advanced phones?) Any thoughts?

Share this post


Link to post
Share on other sites
Quote:
Original post by thumbs
I remember programming a calculator at school, (it was a Casio and not a Texas one mind) and I've been kind of yearning to have a handheld since that I could play around with and maybe make really beginner games but with the potential to do something more. I'm wondering how far these calculators have advanced or if theres a recommended PDA/Phone to do this stuff on nowadays.(do kids use calculators nowadays to program stuff, or use advanced phones?) Any thoughts?


I for one am 17 years old, and me and a couple of my pals at school make programs for our TI-84 Plus-es using TI-BASIC. As I mentioned earlier, I now want to learn z80 asm.

Share this post


Link to post
Share on other sites
Quote:
Original post by magicdanw
I just want to say that I've gotten plenty of help with my z80 projects at unitedti.org, and I find it to be a very nurturing environment if you want to learn more about any kind of programming (but z80 and TI-BASIC in particular.) I hope to see you there sometime!


thanks for the tip, magicdanw. I have now joined unitedti.org

Share this post


Link to post
Share on other sites
Quote:
Original post by benryves
Quote:
Original post by Daniel Talagrand
To be honest though, z80 based calculators are a dying breed, but there is a such a wealth of information out there it is easy to develop for.
I don't think they'll die out until the TI-83+ and compatible calculators (TI-84+) stop being the most popular high-school graphical calculator. [smile]

Learn TI-83 Plus Assembly In 28 Days is probably the best guide to starting Z80 assembly on the TI calculators. MaxCoderz is an assembly-centric programming group and you might find you're more likely to get help from the forum there than here.


Thanks for the tip, I have finished reading the first "Week" of "Learn TI-83 Plus Assembly In 28 Days". I had some trouble with compiling the sample Z80 program that's included in Day 1, though. I don't understand why. I have joined MaxCoderz, so I think I'll follow your suggestion and hear if anyone of 'em can help me :)

Share this post


Link to post
Share on other sites
Escanive, when I was your age, I used to write programs for TI-85, which also has a Z80. ticalc.org used to be a good site back then for info. Also you might be able to get Z80 reference manuals from Zilog for no cost. At least I did. They tell you all you need to know about the Z80 instruction set. Unfortunately that won't teach you to program in assembly, which is tricky even to those who know about higher level programming abstractions and how to implement them in assembly.
Expect a much steeper learning curve than for TI-BASIC. Especially, if you need to hunt for API documentation and run experiments, as I did (TI-85 didn't have any official documentation, everything was reverse engineered and it showed).

BTW, I don't understand why TI is still going with Z80. They could easily slap in a 50 timer more powerful ARM and few MBs of memory; maybe even costing them less than the current solution. If they needed backwards compatibility (which I doubt) they could easily emulate the Z80 (a 66 MHz 486 used to be more than enough to emulate the TI-85). I would really love a graphing calculator that blasted complex graphs on the screen in a fraction of a second, instead of the 10+ seconds it takes my TI-86.

Share this post


Link to post
Share on other sites
Quote:
Original post by SnotBob
BTW, I don't understand why TI is still going with Z80. They could easily slap in a 50 timer more powerful ARM and few MBs of memory; maybe even costing them less than the current solution. If they needed backwards compatibility (which I doubt) they could easily emulate the Z80 (a 66 MHz 486 used to be more than enough to emulate the TI-85). I would really love a graphing calculator that blasted complex graphs on the screen in a fraction of a second, instead of the 10+ seconds it takes my TI-86.

See: TI-NSpire.

It's useless, though. It may as well be not programmable - everything not math related has been removed. No more pixel plotting function, no timing functions, no image functions. Heck, you can't even output text to the screen anymore. The only thing that's supported are function - you can write a function that accepts a bunch of inputs, and emits an output. That's it.

The prevailing theory is that TI did this to curb complaints that too many students were writing (and playing) games during class, so they simply removed the ability to do so.

TI also haven't released any sort of SDK yet as far as I can tell, so you can't write any custom ASM or C programs for it, either, like you could with earlier models. You're basically stuck with the functionality that comes with the calculator.

Share this post


Link to post
Share on other sites
Quote:
Original post by SnotBob
Also you might be able to get Z80 reference manuals from Zilog for no cost. At least I did.


Actually, I have already done that, but thanks anyways :D

Btw, do you guys think the books about Z80 asm available on Amazon (like this one: http://www.amazon.co.uk/Programming-Z80-Assembly-Language-Hutty/dp/0333360893/) will be of any use for me when trying to learn to program for my calculator? 'Cause I've heard that the structure of the Z80 processors that are in the different TI calculators are different, so I was thinking that a book about Z80 asm programming might not be of any use because it's not written for TI calcs at all.

Share this post


Link to post
Share on other sites
The TI calculators don't actually have Zilog Z80s, but clones, if that's what you mean. But that makes no difference, since the instruction set is 100% compatible. I can't comment on the book, since I haven't read it and that Amazon page doesn't give much info, but since it's not written about programming your target calculator, it will be of limited use. Basically what you might find in a book like that is how to write basic algorithms in assembly, like quicksort or something like that or how to implement interrupt routines, but you won't find detailed instructions on how to print a string onto the screen, because that depends on the other hardware. If the book isn't too expensive for you, you might give it a shot, although it's a bit risky, since there's no guarantee that the book is any good. Alternatively, you could just go with internet resources and see how far you get that way.

If you only have experience with TI-BASIC and PHP, you really should learn to program in C, because that will help you to understand some of the concepts that you'll need in assembly programming, such as pointers. Also, there are C ocmpilers for Z80 (e.g. SDCC) that you might be able to use. If you can't rig a C compiler to produce programs directly for your calculator, at least you can write individual functions in C and grab the assembly output to your program.

Share this post


Link to post
Share on other sites
Quote:
Original post by SnotBob
The TI calculators don't actually have Zilog Z80s, but clones, if that's what you mean.
In the interests of accuracy, here's a shot of the inside of my TI-83+:



At least some of their calculators (such as the regular 83+ series) have discrete Z80 CPUs (Z84C0006FEC if my already excessive sharpening isn't clear enough). The later models do, however, bundle the Z80 CPU into ASICs. I'm not sure how much these Z80s differ to the regular ones, but my guess is "not enough to worry about" (if at all).

The official documentation for the Z80 is freely available from ZiLOG.

Share this post


Link to post
Share on other sites

This topic is 3543 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this