Hello!
I am pretty new to this Ndless stuff, so sorry, if I ask stupid questions.
First off, is it possible to code with C++? What compiler do I need? Does G++ work, if I change the file name to tns or do "-o example.tns"? What graphics engines can I use? I have only ever used SFML (http://www.sfml-dev.org ; also made by french, if that matters), whic can be installed on Linux and Windows, which I have experience with. But what OS is the TI OS based on? The UI kind of looks like the one by Linux.
I know that 3D is possible, which is pretty mind-blowing for a calculator. I also know it is ossible to run emulators of eraly consoles with Ndless, but what about PC games, like Half-Life or System Shock? I mean Half-Life is bound to Steam, so that might be problematic.
Thanks in advance,
Kim
A few beginner questions about development and emulation
6 posts
• Page 1 of 1
-
kim366
Niveau 3: MH (Membre Habitué)- Posts: 10
- Joined: 11 Mar 2016, 15:26
- Gender:
- Calculator(s):→ MyCalcs profile
Re: A few beginner questions about development and emulation
kim366 wrote:First off, is it possible to code with C++? What compiler do I need?
Yes, C++, along with C, is natively supported by the ndless sdk.
I personally do not recommend C++ though, as the libstdc++ library is huge and takes away resources.
If possible, program in ANSI C instead.
To compile for TI Nspire, you actually need the devkit. (generally a compiler, a binutils, a libc and some other utilities)
On Linux (which i recommend since it is easier and more up-to-date), all you need to do is to clone the ndless repo with git
and then go to Ndless/ndless-sdk/toolchain and then run build_toolchain.sh in a terminal.
You may have to install some dev packages though.
On Windows, http://ndless.me should provide you a SDK on their website.
What graphics engines can I use? I have only ever used SFML (http://www.sfml-dev.org ; also made by french, if that matters), whic can be installed on Linux and Windows, which I have experience with.
SFML is not very portable and not available on nspire.
If you care about having a future as a programmer, do not use it.
On Ti Nspire, you can choose between SDL 1.2 and n2DLib.
I would recommend that you choose first to program your game in SDL so you can do your testing on PC.
if I change the file name to tns or do "-o example.tns"?
No, the SDK will first produce a ELF binary.
As ndless can't read elf binaries, you will have to convert it to a genzehn binary like this :
- Code: Select all
genzehn --input myprogram.elf --output myprogram.tns --compress
The "--compress" will compress the program to gain some space.
I recommend it, as it actually speeds up loading up the game due to the slow NAND.
Additionally, if your ndless installed on your calc is not up to date,
you can convert your binary to a PRG format.
- Code: Select all
make-prg myprogram.tns myprogram.prg.tns
But what OS is the TI OS based on? The UI kind of looks like the one by Linux.
As a programmer, you don't have to care about the OS :
Ndless programs (usually) take full control of the hardware.
But if you still want to know : it's a RTOS based operating system.
(with some nasty bugs, i've got to say)
I know that 3D is possible, which is pretty mind-blowing for a calculator.
The Ti Nspire, does not have 3D acceleration.
However, any platforms (including the nspire) can have 3D graphics through software rendering.
Games in the early 90s were programmed in this fashion as 3D cards were not very popular at the time.
The difference is that a GPU is just more suited for 3D whereas a CPU is designed for complex operations.
but what about PC games, like Half-Life or System Shock?
As you may know already, rwill did a port of Quake for Nspire so technically, it is not entirely impossible.
However, the games you are suggesting are proprietary : they (the devs) don't provide the source code needed for a port.
A small team however reversed-engineered Half-Life as Xash3D and this is how ptitseb was able to port it to the OpenPandora.
However, even though it uses a similar engine, Half-Life eats way more resources than Quake for non-essential operations, because
it is structured differently.
That's why i keep telling people OO programming and frameworks are bad :
it only leads to "retro" games requiring a 4-core CPU and 8GB of RAM...
Hopefully Vogtinator does not get too mad at me reading my post, as he's actually a C++ programmer...
But if he does not agree with me, he can always chime in here.

-
gameblablaProgrammeur
Niveau 10: GR (Guide de Référence)- Posts: 148
- Joined: 10 Oct 2012, 02:33
- Gender:
- Calculator(s):→ MyCalcs profile
Re: A few beginner questions about development and emulation
gameblabla wrote:kim366 wrote:First off, is it possible to code with C++? What compiler do I need?
Yes, C++, along with C, is natively supported by the ndless sdk.
I personally do not recommend C++ though, as the libstdc++ library is huge and takes away resources.
If possible, program in ANSI C instead.
Well, C99 is perfectly fine

gameblabla wrote:To compile for TI Nspire, you actually need the devkit. (generally a compiler, a binutils, a libc and some other utilities)
On Linux (which i recommend since it is easier and more up-to-date), all you need to do is to clone the ndless repo with git
and then go to Ndless/ndless-sdk/toolchain and then run build_toolchain.sh in a terminal.
You may have to install some dev packages though.
On Windows, http://ndless.me should provide you a SDK on their website.
Nah, in all cases, use build_toolchain.sh to get an up-to-date version (needed to support the latest models anyway). Detailed instructions here: https://github.com/ndless-nspire/Ndless ... troduction (follow all the steps, skip the Docker thing)
MyCalcs: Help the community's calculator documentations by filling out your calculators info!
MyCalcs: Aidez la communauté à documenter les calculatrices en donnant des infos sur vos calculatrices !
Inspired-Lua.org: All about TI-Nspire Lua programming (tutorials, wiki/docs...)My calculator programs
Mes programmes pour calculatrices
-
AdriwebAdmin
Niveau 16: CC2 (Commandeur des Calculatrices)- Posts: 14820
- Images: 1131
- Joined: 01 Jun 2007, 00:00
- Location: France
- Gender:
- Calculator(s):→ MyCalcs profile
- Twitter: adriweb
- GitHub: adriweb
Re: A few beginner questions about development and emulation
Awesome! Many thanks t you guys! I will try developing something as soon as I get Linux up and running and they update NDless to work on my calculator.
PS: I know SFML is not the best, but it teached me the basics and I am 15, so I have a long future (Hopefully)
PS: I know SFML is not the best, but it teached me the basics and I am 15, so I have a long future (Hopefully)

-
kim366
Niveau 3: MH (Membre Habitué)- Posts: 10
- Joined: 11 Mar 2016, 15:26
- Gender:
- Calculator(s):→ MyCalcs profile
Re: A few beginner questions about development and emulation
Is your calculator a W, or newer, hardware revision ?
Membre de la TI-Chess Team.
Co-mainteneur de GCC4TI (documentation en ligne de GCC4TI), TIEmu et TILP.
Co-mainteneur de GCC4TI (documentation en ligne de GCC4TI), TIEmu et TILP.
-
Lionel DebrouxSuper Modo
Niveau 14: CI (Calculateur de l'Infini)- Posts: 6869
- Joined: 23 Dec 2009, 00:00
- Location: France
- Gender:
- Calculator(s):→ MyCalcs profile
- Class: -
- GitHub: debrouxl
Re: A few beginner questions about development and emulation
Yeah, it's a W
-
kim366
Niveau 3: MH (Membre Habitué)- Posts: 10
- Joined: 11 Mar 2016, 15:26
- Gender:
- Calculator(s):→ MyCalcs profile
6 posts
• Page 1 of 1
Return to Native: Ndless, Linux, ...
Who is online
Users browsing this forum: ClaudeBot [spider] and 8 guests