PDA

View Full Version : Calculator Code



Knight
02-26-2007, 04:06 PM
Well the title is a very good idea about what I am going to ask. Is it possible to create a game on my PC and install it on my TI-84 Plus? I would at least like to mod a game. I have dipped my feet in some C++, but that is a different story. :cool:

I just want to have some fun by creating some mods for games and boot screens.

Am I out of my mind? :p: I can create programs on the calculator using its system, but I want to try somethings more advanced.

Any input is welcome (well most :D ).

L33T
02-26-2007, 07:33 PM
I used to develop software for the TI-89. From what I could remember, the TI-84 uses ASM, but lacks NOSTUB features in most situations. It is definitely possible to create a game on your PC and install it; in fact, that is probably the easiest way.(1)

There are two ways to do that:

The first way is to find an ASM compiler -- that is, an editor that allows you to write/edit assembly code. You'll wanna read up on ASM for this; it sounds quite intimidating, but it is really quite easy once you get the hang of it. This was the "old school" method of programming for TI-89, but it will result in the fastest running and smallest software (both of which are important for calculators which do not have that much memory, especially if you still expect to have space for other concerns, such as work).

The second way, if available, is to use a C++ IDE, which will compile your C++ code.

Either way, you'll end up with an ASM file which you will then transfer to your calculator. If you developed your program so that it is NOSTUB, nothing will be required to run it; otherwise, you'll need a launching OS. I'm not familiar with the OS's for the TI-84 platform, but for the TI-89 there are quite a few OS's, some of which are very good.

Now for either case (ASM or C++), writing poor code (including memory leaks, &c) will result in a most nasty freeze. On the TI-89, the restart procedure is hitting some buttons, which would cause a hard or soft reset depending on the combination. You'll want to look up the combination for the TI-84 if there is one; if not, removing the batteries (including the backup one if necessary) will do the trick, albeit it is quite annoying. A better way to test code, rather than uploading it onto your calculator is to download an emulator. You can download an emulator at www.ticalc.org. There is one emulator that mostly everyone uses... Okay, you'll need a ROM. You get a ROM by uploading the image of the ROM (i.e., the primary OS) to your computer. Do this by using the link software provided on the CD (actually, there are several link software now provided by TI, and by others too)... Upload the ROM image (Receive --> Get OS). Then load the ROM image into the emulator. You're not supposed to get a ROM from somebody else or give away ROM's, since you're supposed to only have them if you own the calculator (kinda like software). Once you do all of this, you will have a platform to test your software on. At least one of the C++ IDE's comes with a built-in emulator that requires no ROM to use; I often used that one because I had troubles with my link cable ... for some reason my computer could never detect it... that is, until my brother took my TI-89 and I bought a TI-89 Titanium, which uses a USB link, which is quite awesome.

Okay. You'll want to go to www.ticalc.org and start looking for information there. You'll want to look at examples of programs -- source code. Also, discuss things with other members on the site. It is a site quite like this one, but focused only on TI's.

Good luck!

Any other questions: ask away!


EDIT:
____________________
1. When I said "easiest" it was because for the TI-89 somebody wrote an on-calc ASM editor, which was very cool. The major issue was that writing poor code will result in your calculator freezing. Thus, the on-board method was a very difficult one.

Knight
02-26-2007, 07:47 PM
That is a great post. :slobber: So many answers. :clap:

The only part that is a little difficult for me to figure out is what do you mean by "OS". I have an idea about what you might mean. Right now I have something on my 84 called "MirageOS". Is that it? I use that to play my games. :)

Sorry to sound stupid because it says OS in the name.

bullet2urbrain
02-26-2007, 08:54 PM
little assembly never hurt nobody :D

As to further this, basically when you are doing the programming, the reason he mentions OS is because you would be writing only ASM (assembly language) which is easily translated to Machine code (binary) by the inner circuits of the Calculator/Microcontroller etc.

The OS is a "higher" level interface for you to do basic functions.

I'm not sure what the OS is called on the TI series (i have an 86 but would love an 89) think GUI almost for calculators. and some of that is OS.

Good Luck

PS: If someone wants to write games for a PIC16F877 i'd appreciate it :D


EDIT: the whole point of my rambling was the ASM, check out MPLAB IDE. it is free from Microchip... Its what i use to write my assembly stuff.

L33T
02-26-2007, 09:29 PM
That is a great post. :slobber: So many answers. :clap:

The only part that is a little difficult for me to figure out is what do you mean by "OS". I have an idea about what you might mean. Right now I have something on my 84 called "MirageOS". Is that it? I use that to play my games. :)

Sorry to sound stupid because it says OS in the name.

Ah well its confusing the first time around for everyone.

The OS I was referring to in the beginning was for running ASM programs; that's correct. MirageOS is one of them. The reason MirageOS is needed for a given program is because that specific program isn't NOSTUB.

Of course, the TI-84 itself also has a primary OS, which I referred to later in my reply. That allows you to do just about everything you do on the calculator: solving equations, graphing functions, performing transformations... &c. I'm not sure about the other calculator series.. but for the TI-89, the OS is called "Advanced Mathematics Software". You can think of that OS as the firmware. Keep in mind that our MirageOS lives inside AMS (not to be confused with ASM, which is assembly stuff).

However, AMS doesn't have to exist the way it does.

Yes, you can upload your own primary OS. I wouldn't recommend doing that as the first thing you try though, as recovery is quite annoying. But knowing what you're doing, you can do something from the mundane, such as a new small feature or two, to something totally crazy: such as writing an entirely new primary OS. I remember a totally new OS project going on somewhere. I'm not sure if it got anywhere beyond alpha, but it was still pretty neat.

One heads up as a side note. It is difficult, but not impossible, to wreck your calculator using ASM or using a non-AMS primary OS. Using BASIC, it also is possible, but you will need to call ASM handles or by calling machine code (using, in TI-89 BASIC, the function "exec"). Mind also that by this method, you can write code in BASIC and implement some ASM-type features; however, BASIC code is and always will be slow, so it isn't recommended for something like a game, where the response time will make it quite annoying).

ASM will not allow you to do anything you want, unless you override the built-in checks. Many games hinge on these "checks", so you need to execute an ASM file that will disable this check. However, there are some things that are very difficult or impossible to disable with the AMS (not ASM) in place.

Knight
02-26-2007, 10:38 PM
Thanks to the both of you for taking your time and giving me some great info.:) It is time for me to study are this foreign stuff. :banana: I will test over the weekend and report back on my progress (Parents will barely let me look on the forums on school days). :( I might have to pick more in your brains soon. :p:

Thanks :)

Knight
02-27-2007, 06:15 PM
Well my mom has a Ti-83 and I have the Ti-84. I would like to know if the Ti-83 emulator will also work for my 84. I'm asking because I do not see a emulator for a 84 on the page below.

http://www.ticalc.org/programming/emulators/romdump.html

Edit: Well I was trying to run the emulator for the 83 and I forgot that the 83 calculator does not have a USB port, rather that cord (I do not know the name for it). What is the solution?

ahmad
02-27-2007, 06:49 PM
Serial and USB connections can accomplish the same task. USB - Universal Serial Bus :)

I think the 83 and the 84 use the same hardware. The only differences maybe the screen and the button layout? I haven't seen either in a while.

Knight
02-27-2007, 08:12 PM
I just didn't want to ruin a $80 calculator. :eek:

That being said, I will try using the 83 emulator for my 84 then. Hope it works. :slobber:

Knight
02-28-2007, 07:39 AM
Well I tried to use the emulator for the 83 when I am using a 84. I have trouble running the "rom83.83p" on my calculator. It gives me a syntax error. I tried all the different options for different links as well, but still a no go. :(

L33T
02-28-2007, 02:47 PM
Well, the older cables use the serial COM ports, which sometimes does not work. You have to make sure you have a serial COM port; if you don't, you'll want to see if you have one of those big serial ports (about twice the size of a COM port), and then use an adaptor. The software, as a remember, wasn't too reliable with a COM port. It sometimes would not detect my calculator, and other times would timeout.

You may want to try a creative modding solution, if buying a cable isn't what you want to do. If you have the regular TI-83, I believe it uses a port that looks like an audiojack; and the TI-83 for use with projector have a COM port built-in, if I remember correctly. I don't really know about the TI-84's.

Knight
02-28-2007, 04:42 PM
Well, the older cables use the serial COM ports, which sometimes does not work. You have to make sure you have a serial COM port; if you don't, you'll want to see if you have one of those big serial ports (about twice the size of a COM port), and then use an adaptor. The software, as a remember, wasn't too reliable with a COM port. It sometimes would not detect my calculator, and other times would timeout.

You may want to try a creative modding solution, if buying a cable isn't what you want to do. If you have the regular TI-83, I believe it uses a port that looks like an audiojack; and the TI-83 for use with projector have a COM port built-in, if I remember correctly. I don't really know about the TI-84's.

Yeah, I have the 83 with the "audio jack" looking plug. I will try Radio Shack to see if I can find the right connector. :(

I was getting impatient with the fact that I can not do anything with the 83, so I installed the "rom83.83p" to my calculator and ran that. It game me the warning that it was archived, so I went into the mem and unarchived it and ran it. It just gave me a syntax error. :(

serialk11r
02-28-2007, 08:58 PM
I have an 84, I need to get mirage... Hey can you give me the game when you're done? :)

Knight
03-01-2007, 04:40 PM
I have an 84, I need to get mirage... Hey can you give me the game when you're done? :)

LOL

If that is to me, then yeah sure. :) If I ever get the right software. :(

L33T
03-03-2007, 04:17 PM
Yeah, I have the 83 with the "audio jack" looking plug. I will try Radio Shack to see if I can find the right connector. :(

I was getting impatient with the fact that I can not do anything with the 83, so I installed the "rom83.83p" to my calculator and ran that. It game me the warning that it was archived, so I went into the mem and unarchived it and ran it. It just gave me a syntax error. :(

Wait if you can't connect to your calculator, how did you install a program? I hope you didn't have to type it by hand :confused:

Aside. I remember back in the day when my buddy Derek copied everything by hand. Unfortunately, he forgot to copy a single line (out of a program that was something like a few hundred lines). I remember trying to debug the program to no avail. Man... HS.. those were the days alright.

Okay, you want to buy this:

http://www.cti-texas.com/tigraphlinkusb.html

I can't believe it... $5! Everywhere else its for $20-25. Dang, I might pick one up for my brother's TI-89. Sweet

Knight
03-03-2007, 05:18 PM
Wait if you can't connect to your calculator, how did you install a program? I hope you didn't have to type it by hand :confused:

Aside. I remember back in the day when my buddy Derek copied everything by hand. Unfortunately, he forgot to copy a single line (out of a program that was something like a few hundred lines). I remember trying to debug the program to no avail. Man... HS.. those were the days alright.

Okay, you want to buy this:

http://www.cti-texas.com/tigraphlinkusb.html

I can't believe it... $5! Everywhere else its for $20-25. Dang, I might pick one up for my brother's TI-89. Sweet

Yes, the L33T man speaks. :)
I thought this thread was dead (not yet at least). :(

My 84 has a USB port in it, so I hooked that up to my PC to transfer the program (the website said that the 83 programs are compatible with my 84). I did that and I was able to transfer the "dump" program. My calculator would give me a syntax error when I try running it. :(

What else do I need to get (software or hardware wise)?

Edit:

By the way, when I edit "rom83" on my calculator it just shows a lot of numbers and letters (about two screens long). At the end there are two "End" statements.:confused:

L33T
03-03-2007, 08:01 PM
Haha

Hmm, you're supposed to be able to do it without any programs. Somewhere in TICONNECT there should be a GetOS or ReceiveOS -- prolly the latter. As for the program itself, it seems like its mostly garbage if there isn't anything that you can gather from it...

Nanometer
03-03-2007, 09:20 PM
I couldn't figure out how to get text from the computer to the ti-89. I could get text from the ti-89 to the computer, but not the other way around. For some reason it always assigned random formats to the files I made on the 89...

Knight
03-03-2007, 10:37 PM
Haha

Hmm, you're supposed to be able to do it without any programs. Somewhere in TICONNECT there should be a GetOS or ReceiveOS -- prolly the latter. As for the program itself, it seems like its mostly garbage if there isn't anything that you can gather from it...

Darn

In my attempt to make more space for games and such, I got rid of that program. :( I will try once I get it again.

L33T
03-05-2007, 03:18 PM
I couldn't figure out how to get text from the computer to the ti-89. I could get text from the ti-89 to the computer, but not the other way around. For some reason it always assigned random formats to the files I made on the 89...

You seem to be saying that you can't get text made on the computer to go onto the TI-89 in the first part and the other way around in the second... I'll assume the first one is what you mean. Okay, we need to know how you are sending text to the TI-89. Are you using TICONNECT, or one of the other software? Also, note the text files you are sending. Are they created within TI software, or were they made using files such as Wordpad? The TI-89 isn't capable of displaying a full range of characters we can see on the computer. You'll want to open a text file that is on your computer using TI software. When you send a file to your TI-89, make sure it is *.89T format.


Darn

In my attempt to make more space for games and such, I got rid of that program. I will try once I get it again.

Yep you'll need it to send things to your calc (or some other program).

Knight
03-05-2007, 04:12 PM
TI Connect will not even detect my calculator. I am try to connect my 84 to the PC with a USB cable not for the calculator (I can not find the original cable). :( The cable I am trying to use has the right fittings but TI Connect will not see my 84. Windows does however. :rolleyes:

I think I will have to spend that $5 on the cord.

L33T
03-06-2007, 07:14 PM
Hmm. That is strange; however, I don't think there is much of a difference between the TIGraphLink and a regular usb cable; however, there might be an internal resistance difference in the two. For example, if you use a regular USB cable in place of a USB cable directly purchased from Motorola, it might not work. I've tried four different cables, one of which is a Motorola cable and the others go to a GPS unit, and two digital cameras. Only one of the non-Motorola cables worked consistently, and one worked only some of the time. Yep, you might have to just buy the cable... I guess $5 isn't too bad.

Knight
03-06-2007, 07:38 PM
That was what I was somewhat thinking.:)

I will hopefully post back with some good news. :woot:

Nice cube project you got there. ;)

L33T
03-06-2007, 07:47 PM
That was what I was somewhat thinking.:)

I will hopefully post back with some good news. :woot:

Nice cube project you got there. ;)


^___^ thanks