π
<-

A few beginner questions about development and emulation

C, C++, ASM...

A few beginner questions about development and emulation

Message non lude kim366 » 31 Mar 2016, 12:25

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
Avatar de l’utilisateur
kim366
Niveau 3: MH (Membre Habitué)
Niveau 3: MH (Membre Habitué)
Prochain niv.: 4%
 
Messages: 10
Inscription: 11 Mar 2016, 15:26
Genre: Non spécifié
Calculatrice(s):
MyCalcs profile

Re: A few beginner questions about development and emulation

Message non lude gameblabla » 31 Mar 2016, 16:20

kim366 a écrit: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: Tout sélectionner
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: Tout sélectionner
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. :p
Avatar de l’utilisateur
gameblablaProgrammeur
Niveau 10: GR (Guide de Référence)
Niveau 10: GR (Guide de Référence)
Prochain niv.: 36.5%
 
Messages: 148
Inscription: 10 Oct 2012, 02:33
Genre: Non spécifié
Calculatrice(s):
MyCalcs profile

Re: A few beginner questions about development and emulation

Message non lude Adriweb » 31 Mar 2016, 21:46

gameblabla a écrit:
kim366 a écrit: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 a écrit: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
Avatar de l’utilisateur
AdriwebAdmin
Niveau 16: CC2 (Commandeur des Calculatrices)
Niveau 16: CC2 (Commandeur des Calculatrices)
Prochain niv.: 80%
 
Messages: 14845
Images: 1133
Inscription: 01 Juin 2007, 00:00
Localisation: France
Genre: Homme
Calculatrice(s):
MyCalcs profile
Twitter/X: adriweb
GitHub: adriweb

Re: A few beginner questions about development and emulation

Message non lude kim366 » 01 Avr 2016, 14:51

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) ;)
Avatar de l’utilisateur
kim366
Niveau 3: MH (Membre Habitué)
Niveau 3: MH (Membre Habitué)
Prochain niv.: 4%
 
Messages: 10
Inscription: 11 Mar 2016, 15:26
Genre: Non spécifié
Calculatrice(s):
MyCalcs profile

Re: A few beginner questions about development and emulation

Message non lude Lionel Debroux » 01 Avr 2016, 15:13

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.
Avatar de l’utilisateur
Lionel DebrouxSuper Modo
Niveau 14: CI (Calculateur de l'Infini)
Niveau 14: CI (Calculateur de l'Infini)
Prochain niv.: 11.4%
 
Messages: 6873
Inscription: 23 Déc 2009, 00:00
Localisation: France
Genre: Homme
Calculatrice(s):
MyCalcs profile
Classe: -
GitHub: debrouxl

Re: A few beginner questions about development and emulation

Message non lude kim366 » 01 Avr 2016, 21:02

Yeah, it's a W
Avatar de l’utilisateur
kim366
Niveau 3: MH (Membre Habitué)
Niveau 3: MH (Membre Habitué)
Prochain niv.: 4%
 
Messages: 10
Inscription: 11 Mar 2016, 15:26
Genre: Non spécifié
Calculatrice(s):
MyCalcs profile


Retourner vers Native: Ndless, Linux, ...

Qui est en ligne

Utilisateurs parcourant ce forum: ClaudeBot [spider] et 2 invités

-
Rechercher
-
Social TI-Planet
-
Sujets à la une
Comparaisons des meilleurs prix pour acheter sa calculatrice !
"1 calculatrice pour tous", le programme solidaire de Texas Instruments. Reçois gratuitement et sans aucune obligation d'achat, 5 calculatrices couleur programmables en Python à donner aux élèves les plus nécessiteux de ton lycée. Tu peux recevoir au choix 5 TI-82 Advanced Edition Python ou bien 5 TI-83 Premium CE Edition Python.
Enseignant(e), reçois gratuitement 1 exemplaire de test de la TI-82 Advanced Edition Python. À demander d'ici le 31 décembre 2024.
Aidez la communauté à documenter les révisions matérielles en listant vos calculatrices graphiques !
1234
-
Faire un don / Premium
Pour plus de concours, de lots, de tests, nous aider à payer le serveur et les domaines...
Faire un don
Découvrez les avantages d'un compte donateur !
JoinRejoignez the donors and/or premium!les donateurs et/ou premium !


Partenaires et pub
Notre partenaire Jarrety Calculatrices à acheter chez Calcuso
-
Stats.
2553 utilisateurs:
>2537 invités
>7 membres
>9 robots
Record simultané (sur 6 mois):
29271 utilisateurs (le 11/07/2025)
-
Autres sites intéressants
Texas Instruments Education
Global | France
 (English / Français)
Banque de programmes TI
ticalc.org
 (English)
La communauté TI-82
tout82.free.fr
 (Français)