Omnimaga
Omnimaga => News => Topic started by: DJ Omnimaga on April 13, 2011, 03:27:57 am
-
Although ARM9 assembly and C language files are still not possible on them, the new TI-Nspire OS'es definitively have support for an extra programming language with more possibilities than the crippled TI-Nspire BASIC. As reported (http://ourl.ca/10340) in our previous news, it seemed that OS 3.0 also included Lua interpreted language or a similar form of it. Now Goplat has made the following Wacky Fun Ran... er... I mean 15 Puzzle clone:
(http://www.omnimaga.org/index.php?action=dlattach;topic=7770.0;attach=7304;image)
(http://www.omnimaga.org/index.php?action=dlattach;topic=7750.0;attach=7309;image)
http://www.omnimaga.org/index.php?action=dlattach;topic=7770.0;attach=7305
A better quality preview (http://www.omnimaga.org/index.php?action=dlattach;topic=7770.0;attach=7305) of it is also available in AVI format. The game can be downloaded here (http://www.omnimaga.org/index.php?action=dlattach;topic=7770.0;attach=7302).
Although this is not Crysis nor nDoom, once Goplat or somebody else will make it possible for other people to develop documents written in this language, it will be possible for them to develop TI-Nspire OS 3.0 games written in Lua, featuring support for interactive key input like we have on Z80 and 68K TI-BASIC languages and as you can see, it doesn't seem very slow like the display commands on the Casio Prizm OS.
UPDATE (15:48): This is how Goplat created the document!
Here's how I made the .tns file:
- Create a blank document
- Create a Problem1.xml file, containing the following (without any line breaks, except in the script itself):
<?xml version="1.0" encoding="UTF-8" ?><prob xmlns="urn:TI.Problem" ver="1.0" pbname=""><sym></sym><card clay="0" h1="10000" h2="10000" w1="10000" w2="10000"><isDummyCard>0</isDummyCard><flag>0</flag><wdgt xmlns:sc="urn:TI.ScriptApp" type="TI.ScriptApp" ver="1.0"><sc:mFlags>0</sc:mFlags><sc:value>-1</sc:value><sc:script>Lua script goes here (with appropriate character entities replacing the four characters < > " ')</sc:script></wdgt></card></prob> - Use 7-zip to create a zip file containing Problem1.xml
- Concatenate the beginning of the blank document, up to the end of Document.xml (at offset 0x170), with the zip file. (OS 3.0 requires Document.xml to be encrypted, but thankfully Problem*.xml can still be unencrypted.)
Source: this post (http://ourl.ca/10347/197585)
-
Getkey command? Yeah!
-
This looks very nice, but I can't get, by reading the article, what language was used to do this, Lua?
-
Yup, it's Lua.
-
Its Ti-Lua !
Does this mean that Ti is adding more programming capabilities to their nSpires?
Wow, never expected that!
Edit:
100st post!
-
I hope that Lua isn't a hard programming language :P
-
I hope that Lua isn't a hard programming language :P
Don't worry, it's a step down from Axe in difficulty ;)
-
Getkey and drawing functions... awesome. O.O
I like Lua, it's very simple to learn.
-
I hope that Lua isn't a hard programming language :P
Don't worry, it's a step down from Axe in difficulty ;)
I like Lua, it's code is sexy, but not as sexy as Python.
When I learnt it a few months ago though, I had no idea that there would ever be a TI-Lua.
-
I'm astounded that TI actually added more programmability to the Nspire line. For me though, it's too little too late. I've given up on the Nspire in light of the Prizm.
-
w00t! finally a getkey on nspire XD
Now all it need is downgrade support
-
Remember that for now, TI don't let officially the public to program in this language. It is for now a private language and we need to hack the *.tns to extract Problem1.xml from it as we can make for OS 1.1.
For now, no one knows if TI will diffuse freely the SDK, will sell it, or keep it for its developpers.
-
If they sell it, i'm sure somebody will probably make a better one for free.
-
WOW!
So seeing as Goplat has to make this "available," will it be easier than hacking the Nspire from the beginning?
-
WOW!
So seeing as Goplat has to make this "available," will it be easier than hacking the Nspire from the beginning?
It seems it's just extracting some file :P So yeah, it looks easier.
I'm afraid TI won't make a SDK, since we have behaved badly, we hacked their new calculator in just a few hours and are already making games (I give critor and all the other guys the merit for this though, while saying 'we').
-
I have intermediate Lua knowledge, so this could be fun. :hyper:
-
I'm afraid TI won't make a SDK, since we have behaved badly, we hacked their new calculator in just a few hours and are already making games (I give critor and all the other guys the merit for this though, while saying 'we').
I'm pretty sure that TI made a SDK before just to make money. They only gave SDKs for free when not many people were using them.
-
Well this is awesome. I'm sure the TI developers bets on how fast we find the stuff they hide on their calcs. :P
-
Boo-Yah! If I ever get an Nspire, I'm definitely going to learn Lua.
-
Well this is awesome. I'm sure the TI developers bets on how fast we find the stuff they hide on their calcs. :P
If they know about Omnimaga (and the other calc sites), I'm pretty sure they do. :P
-
Wow, this looks incredible. Major props to Goplat and all involved; this is amazing. ;D
-
I wouldn't be surprised if eventually TI tried to sell us a Lua SDK. Hopefully the community can either write one or a program to convert txt files to a TI-Nspire lua compatible format.
By the way I added a screenshot on the first post. I captured from the TI-Nspire software, but it's a CX screenshot, not regular TI-Nspire.
-
Here's how I made the .tns file:
- Create a blank document
- Create a Problem1.xml file, containing the following (without any line breaks, except in the script itself):
<?xml version="1.0" encoding="UTF-8" ?><prob xmlns="urn:TI.Problem" ver="1.0" pbname=""><sym></sym><card clay="0" h1="10000" h2="10000" w1="10000" w2="10000"><isDummyCard>0</isDummyCard><flag>0</flag><wdgt xmlns:sc="urn:TI.ScriptApp" type="TI.ScriptApp" ver="1.0"><sc:mFlags>0</sc:mFlags><sc:value>-1</sc:value><sc:script>Lua script goes here (with appropriate character entities replacing the five characters < > " ' &)</sc:script></wdgt></card></prob> - Use 7-zip to create a zip file containing Problem1.xml
- Concatenate the beginning of the blank document, up to the end of Document.xml (at offset 0x170), with the zip file. (OS 3.0 requires Document.xml to be encrypted, but thankfully Problem*.xml can still be unencrypted.)
-
Oh wow nice, could you elaborate on number 4, though? To me it seems kinda like Chinese because I never messed with advanced zipping options before x.x
-
DJ: concatenating the two documents can be done by copying and pasting, using a hex editor such as XVI32 :)
Open the blank TNS document with the hex editor; open the zipped problem1.xml; copy the entire contents of the latter to the clipboard; paste at the end of the former; save the former.
Goplat: thanks for the explanations :)
It's even simpler than I thought.
-
O.O that looks actually pretty easy :)
Thanks for sharing this!
-
Yeah but where do you do the concatenation? Do you just open the empty document file in notepad then paste its content at the end/beginning of the XML file? Or do we absolutely need an hex editor? Maybe it would be nice to have a tutorial describing every step in detail for the average computer-illiterate person, in the forum help section.
It's still nice that it can already be done without having someone write an entire IDE or something, though. Congrats to everyone for having found out about Lua on the Nspire.
EDIT: Nvm my first paragraph, I didn't see your edit.
-
This is real cool!
I hope we will start seeing nice programs in Lua for the nSpire's :)
-
We still gotta find some way to run Ndless though. I doubt it'll be easy to create another nDoom or Gameboy emulator in Lua.
-
Yeah I agree. However Lua opens the Nspire to more programmers. Many people can't stand C and ASM difficulty (probably the reason why there are so few Nspire coders despite the large amount of Nspire users around here)
-
This is amazing. I am starting to learn Lua now. If I can get the hang of It hopefully I will be able to start writing programs(games) for my Nspire.
I second DJ's idea of a having a good tutorial for how to do this. It sounds a little cryptic to me write now.
-
Hey guys, wait an hour or so, I'm about to release a program that takes a Lua script and converts it to a TNS document.
-
Is there any special way we need to write the Lua programs? Is there an API or something for the available libraries?
I'm starting on learning Lua so hopefully soon I can release something interesting
-
Hey guys, wait an hour or so, I'm about to release a program that takes a Lua script and converts it to a TNS document.
Lol, I was starting to make a shell program to do that :)
What language do you plan on using ?
-
Visual Basic. I'll be uploading in less than 10 mins (hopefully)
-
Visual Basic. I'll be uploading in less than 10 mins (hopefully)
Source Code included ?
-
Nice Jkag. You should post it in the downloads section of the site when ready, but make sure it's a zip file and that required dependencies are mentionned.
I think I'll add a Lua sub-forum in the calc help section later.
By the way bienvenue sur le forum Adriweb!
-
Merci :)
Ok so, my shell script is pretty much written but for some unknown reason yet, I don't seem to get a proper zipper version when compressing Problem1.xml....
Is there any specific arguments to the "7za" command ?
EDIT : nevermind, it was a mistake on my side .... I didn't escape the chars in the lua script ... ;)
OK, I'll post my shell script LUAtoTNS tomorrow as it's 2 am for me right now :P
-
Okay... Just doing one more thing and I'mma upload it.
-
Btw, my shell script is finished and is working in Mac OS and Linux and other bash shell, probably
(PS : see my previous' post edit)
-
will there be a windows version?
-
ruler, my version is Windows.
-
OK when is release?
-
Fixing something right now... I guess the format is wrong or something... Looking into it...
-
I wonder if TI makes these changes to the TI-Nspire just to keep us busy...
-
I wonder if TI makes these changes to the TI-Nspire just to keep us busy...
Another thing I am wondering - could TI have added this to keep us satisfied and quiet?
Although this language is powerful for game development, I would think it would be near impossible to write a program such as gbc4nspire/ndoom/RunOS in this language. Might they just be giving up a little in order to prevent disaster for themselves????
-
They have to realize eventually we'll get C on these also. We aren't going to give up without something with that kind of power(At least I hope not).
-
I am also wondering, APCalc, do you have plans on porting your "Block-Dude" game over to System 3.0?
-
I am also wondering, APCalc, do you have plans on porting your "Block-Dude" game over to System 3.0?
I have already started to work on a Lua port of Block Dude! :)
Likewise, as soon as AP Tests are over, I plan on updating all of my projects to make them Ndless 2.0 compatible, releasing nPlayer, working on Chip's Challenge, etc... :)
-
don't forget to make LUA versions of all of them ;)
-
Btw, here's an example of what my shell script can do :)
(http://i27.servimg.com/u/f27/11/67/13/30/lua-to10.jpg)
(I just copied GoPlat's code, for the example ;) )
Download available tomorrow !
-
I am also wondering, APCalc, do you have plans on porting your "Block-Dude" game over to System 3.0?
I have already started to work on a Lua port of Block Dude! :)
Likewise, as soon as AP Tests are over, I plan on updating all of my projects to make them Ndless 2.0 compatible, releasing nPlayer, working on Chip's Challenge, etc... :)
I have a beta of your Chips Challenge program. It looks very promising. I hope you keep up the good work with it.
And for your video player, have you considered using lower-resolution videos that don't take up the whole screen to save on space?
-
How open is Lua to the guts of the system? I know it's a high level language, but I wonder if ndless 3.0 could use the lua method to work, maybe as a header for ndless progs in C/Asm? Lua runs the code, and all you have to do is click run. It would also allow for Lua in the middle of C and Asm :)
-
I don't think Lua has the power to enable C/Asm
Good Idea thoguh. I wonder how far into the system we can go with Lua
-
sorry for the delay... I'm having compression problems... as in the compression seems to be off in the program.
-
Well, it really depends on the system, not the language. Lua might be able to alter some memory elsewhere, so when the system thinks it's running Lua it's running Asm, and being happy with ndless. :D
-
I am also wondering, APCalc, do you have plans on porting your "Block-Dude" game over to System 3.0?
I have already started to work on a Lua port of Block Dude! :)
Likewise, as soon as AP Tests are over, I plan on updating all of my projects to make them Ndless 2.0 compatible, releasing nPlayer, working on Chip's Challenge, etc... :)
I have a beta of your Chips Challenge program. It looks very promising. I hope you keep up the good work with it.
And for your video player, have you considered using lower-resolution videos that don't take up the whole screen to save on space?
That is an excellent idea, indeed! I will look into this... :)
-
I wonder if TI makes these changes to the TI-Nspire just to keep us busy...
Another thing I am wondering - could TI have added this to keep us satisfied and quiet?
Although this language is powerful for game development, I would think it would be near impossible to write a program such as gbc4nspire/ndoom/RunOS in this language. Might they just be giving up a little in order to prevent disaster for themselves????
I bet they are convinced they patched the hole allowing Ndless to be installed and to prevent a disaster or something they added something for programmers so their reputation isn't tarnished as much.
-
It looks quite cool, but I cant download it because im not allowed to acces the section. Could you please attach it to your post?
-
Hmm strange where does the error comes from? O.O
Welcome on the forums by the way.
EDIT: Nevermind. I fixed it now. It was because the game topic was split elsewhere and I forgot to update the link in the first post.
-
Thank you!
Now it works!
-
This doesn't work with > OS 3.0.2 does it?
Fortunately I have managed to get it working ;D.
so edited version by me here: http://ourl.ca/15678.new#new
-
It doesn't work because it's created with an old tool that did not support encryption (unlike Luna).
Edit: he created it manually and his brain could not handle the encryption (at least not yet)
-
It doesn't work because it's created with an old tool that did not support encryption (unlike Luna).
Edit: he created it manually and his brain could not handle the encryption (at least not yet)
Even if his brain could handle encrypting it TI would just upgrade their code to a version his brain could not handle in the next release.
-
Well, not true. They don't mind Luna for some reason.
Basically all my files I send to them are made by Luna (and they know it).
Heck, they even think PCspire is cool :D
Also, maybe the reason why they added encryption was to protect code from proprietary/their own documents?
-
Also, maybe the reason why they added encryption was to protect code from proprietary/their own documents?
Maybe, but said obfuscation protects little, if anything... and wastes CPU cycles and battery power...
-
There was a little xml/html code " < that was in the Problem1.xml
So mostly unencrypted, but doesn't work for > OS 3.0.2 I guess.
But once that's over, Luna makes it much easier.