Would this be a worthwile project to take on?
yes
 100%  [ 20 ]
no
 0%  [ 0 ]
Total Votes : 20

One of the rare occasions that an English teacher wouldn't count you off for capitalizing all the letters in the name of this topic.

If made and completed, who all here would consider a TI-BASIC interpreter written in Java to be useful? It would look just like a calculator screen and run any program written in 83+/83+SE/84+/84+SE BASIC. Look at http://calcgames.org/cgi-bin/teemz/teemz.cgi?board=_master&action=opentopic&topic=2&forum=Haveacalcs_CodeinaProgram_Doing for a couple more details on what I plan to do.

It could be used for many different things:
1) Testing to see if a program/game is worthy of being loaded onto a server
2) When using GraphLink, you wouldn't need to pull out your calc to test code
3) Testing code from any computer with internet access
4) Playing TI-BASIC games online? (lame)
5) Learnin' it, if you ain't got it down already
6) Avoiding a dangerous syntax error on your calc. Those things are deadly!

I obviously like the idea, but I don't know about anyone else yet.
Yup, this has been proposed before. What you're better off doing is not making just an interpreter, but instead making an emulator; in the long run that's going to be much simpler and far more powerful.
Wouldn't an interpreter be faster for its purposes, though? I was starting to like the idea of a built-in RTF program editor... maybe to make GraphLink completely obsolete. TI might beat me over the head if I ran a real emulator online (for all to use without their own ROM copies).

Also, why would emulation be simpler (real question)? I can only imagine I would have to hand-code for every ASM instruction and stuff if I made an emulator.

From what I can make of emulators, (which is not much, seeing as all I know of them comes from the conclusions I draw when using them) it requires re-coding a processor for things to run. I could be completely wrong without knowing it, so don't hesitate to make fun of me (and then correct me) Laughing .
Everyone would still need their own legal ROM to use an interpretter. If information on what calculators do with each function isn't in documentation, you need to have a ROM for it.
i think this would be a worthy project, as long as it is leagal
But once the processor is coded and memory is emulated, that's it. You're done. With interpreted code, you'll have to rewrite huge chunks of the OS: display routines, math routines, input routines, etc etc. You're totally right about the legal issues, though, so in that sense maybe an interpreter is the way to go.
I would like to see if an interpreter could be done. I am learning Java in school right now, so I should be able to help you soon.
If you suceeded in making this, I'd love to add it to SC2 ... killer app, anyone? Smile
foamy3 wrote:
Everyone would still need their own legal ROM to use an interpretter. If information on what calculators do with each function isn't in documentation, you need to have a ROM for it.


An interperator wouldn't need or use a ROM at all. It would involve recoding every one of the TI-Basic functions.

Doing an interperator would be interesting (and probably easier than a full on emulator, where accuracy is important), but I'm not sure if it would be helpful or useful...
There's also the issue of speed with a full-blown emulator written in java. Razz
KermMartian wrote:
There's also the issue of speed with a full-blown emulator written in java. Razz


Lol, but do remember, its only a z80, so even though java is like, 1/10th the speed of C, its still more than fast enough on a modern CPU Laughing
...plus BASIC things would be pre-coded here (not so with an emulator), making it run yet even faster.

Ok, judging by everyone's interest, it looks like it would indeed be a worthwhile project to take on. *starts project*

Quote:
KermMartian wrote:
If you suceeded in making this, I'd love to add it to SC2 ... killer app, anyone? Smile

I'll keep SC-compatibility stuff in mind as its made. How does inputting the entire program(s) as a string sound? String arrays (1 element per line of code) would work, too.


Quote:
rivereye wrote:
I would like to see if an interpreter could be done. I am learning Java in school right now, so I should be able to help you soon.

Thanks for volunteering. I'll let you know when you can help out.

Well, enough with the self-promotion Smile . I'll be back with progress.
haveacalc wrote:

I'll keep SC-compatibility stuff in mind as its made. How does inputting the entire program(s) as a string sound? String arrays (1 element per line of code) would work, too.
Excellent. How about this: make it a binary string - ie, keep the token definitions that TI uses instead of trying to make a text format. That will make it so much easier for everyone.
i hope this comes out good, and can i get a copy of it when it is done, that way i can show a demo of my files online, and how would it interface with sourcecoder Kerm, i do not know how you would link between the 2 languages
Kllrnohj wrote:
An interperator wouldn't need or use a ROM at all. It would involve recoding every one of the TI-Basic functions.


Yes, but you would have to be able to find out exactly what the functions do. Just off of the top of my head, something like L1*L2. Just using guess and check on a real calc to see what happens is illegal. You would have to find what happens in TI's documentations.

...at least that's what the Tablet83 developer(I can't remember his name) told me...
All you need to do is know what you start with (L1 and L2), and what the function/command does (L1 times L2), and the results (L1(x) * L2(x)). Figuring this out on a calc is not illegal or difficult. If you decode the OS and use its functions, then yes, that is illegal. But if you recode your own function from scratch, it is far from illegal. For your example, that is easy to do. Here would be a python equivelant (assuming, of course, that it didn't have built in list multiplication)


Code:
L1 = [1,2,3]
L2 = [4,5,6]

def mult_list(l1, l2):
    if (len(l1) != len(l2)):
        raise DimError
        return
     temp
     for i in range(len(l1)):
        temp.append(l1[i] * l2[i])
     return temp


This is obviously not at all how TI's OS does it (as it isn't in Python Very Happy ), but it accomplishes the exact same task, and produces the exact same output. The TI-Basic "guide" in the back of the manual provides more than enough information to accomplish this
If it's possible, then why do emulators need ROMS? To me, it seems the hardest part of an emulator would be the program exuction and what to do with all of the functions. All that's left are the menus and homescreen math.
actually, all the is emulated is the hardware. Then the emulator uses the ROM to do the stuff it needs.
Because emulators mimic hardware, not software. While it is not impossible to recode the entire TI-OS, it is rather difficult. Some functions are, obviously, easier than others (such as list multiplication), but there are many rather complex and difficult, along with all the things you take for granted (for example, all the assembly bcall's, which don't have complete documentation). I'm not saying it will be EASY to remake a complete TI-Basic interperator, but just having Basic and not complete support (such as assembly), will greatly reduce the required work.
Ah, I see. That explains some other questions I had. Thanks
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 4
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement