π
<-

A few beginner questions about development and emulation

C, C++, ASM...

A few beginner questions about development and emulation

Unread postby 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
User avatar
kim366
Niveau 3: MH (Membre Habitué)
Niveau 3: MH (Membre Habitué)
Level up: 4%
 
Posts: 10
Joined: 11 Mar 2016, 15:26
Gender: Not specified
Calculator(s):
MyCalcs profile

Re: A few beginner questions about development and emulation

Unread postby gameblabla » 31 Mar 2016, 16:20

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. :p
User avatar
gameblablaProgrammeur
Niveau 10: GR (Guide de Référence)
Niveau 10: GR (Guide de Référence)
Level up: 36.5%
 
Posts: 148
Joined: 10 Oct 2012, 02:33
Gender: Not specified
Calculator(s):
MyCalcs profile

Re: A few beginner questions about development and emulation

Unread postby Adriweb » 31 Mar 2016, 21:46

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
User avatar
AdriwebAdmin
Niveau 16: CC2 (Commandeur des Calculatrices)
Niveau 16: CC2 (Commandeur des Calculatrices)
Level up: 79.7%
 
Posts: 14820
Images: 1131
Joined: 01 Jun 2007, 00:00
Location: France
Gender: Male
Calculator(s):
MyCalcs profile
Twitter: adriweb
GitHub: adriweb

Re: A few beginner questions about development and emulation

Unread postby kim366 » 01 Apr 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) ;)
User avatar
kim366
Niveau 3: MH (Membre Habitué)
Niveau 3: MH (Membre Habitué)
Level up: 4%
 
Posts: 10
Joined: 11 Mar 2016, 15:26
Gender: Not specified
Calculator(s):
MyCalcs profile

Re: A few beginner questions about development and emulation

Unread postby Lionel Debroux » 01 Apr 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.
User avatar
Lionel DebrouxSuper Modo
Niveau 14: CI (Calculateur de l'Infini)
Niveau 14: CI (Calculateur de l'Infini)
Level up: 11.3%
 
Posts: 6869
Joined: 23 Dec 2009, 00:00
Location: France
Gender: Male
Calculator(s):
MyCalcs profile
Class: -
GitHub: debrouxl

Re: A few beginner questions about development and emulation

Unread postby kim366 » 01 Apr 2016, 21:02

Yeah, it's a W
User avatar
kim366
Niveau 3: MH (Membre Habitué)
Niveau 3: MH (Membre Habitué)
Level up: 4%
 
Posts: 10
Joined: 11 Mar 2016, 15:26
Gender: Not specified
Calculator(s):
MyCalcs profile


Return to Native: Ndless, Linux, ...

Who is online

Users browsing this forum: ClaudeBot [spider] and 8 guests

-
Search
-
Social TI-Planet
-
Featured topics
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
-
Donations / Premium
For more contests, prizes, reviews, helping us pay the server and domains...
Donate
Discover the the advantages of a donor account !
JoinRejoignez the donors and/or premium!les donateurs et/ou premium !


Partner and ad
Notre partenaire Jarrety Calculatrices à acheter chez Calcuso
-
Stats.
1536 utilisateurs:
>1522 invités
>8 membres
>6 robots
Record simultané (sur 6 mois):
6892 utilisateurs (le 07/06/2017)
-
Other interesting websites
Texas Instruments Education
Global | France
 (English / Français)
Banque de programmes TI
ticalc.org
 (English)
La communauté TI-82
tout82.free.fr
 (Français)