π
<-

Routines 'système' de Ndless

C, C++, ASM...

Re: Routines 'système' de Ndless

Unread postby Noury » 18 Apr 2019, 12:19

Effectivement, j'ai eu au lancement la fenêtre qu'on voit parfois, me disant que le programme allait s'exécuter en mode compatibilité.
Ce serait ça la raison de l'écran noir également ?
Je suis un peu perdu.
User avatar
NouryVIP++
Niveau 11: LV (Légende Vivante)
Niveau 11: LV (Légende Vivante)
Level up: 66.3%
 
Posts: 325
Joined: 07 Sep 2018, 09:19
Location: Sceaux, France 92
Gender: Male
Calculator(s):
MyCalcs profile

Re: Routines 'système' de Ndless

Unread postby Noury » 18 Apr 2019, 20:57

Je ne vois pas ce qui dans ce code provoque le mode de compatibilité.
Est-ce une option d'assemblage ?

L'effacement d'écran semble bien se passer (écran noir)
La boucle d'attente se passe bien aussi
C'est ce qui est au milieu qui semble poser problème. En fait le disp_str n'a pas l'air de se faire. Ou alors il a lieu ailleurs.
C'est très curieux.
User avatar
NouryVIP++
Niveau 11: LV (Légende Vivante)
Niveau 11: LV (Légende Vivante)
Level up: 66.3%
 
Posts: 325
Joined: 07 Sep 2018, 09:19
Location: Sceaux, France 92
Gender: Male
Calculator(s):
MyCalcs profile

Re: Routines 'système' de Ndless

Unread postby Vogtinator » 18 Apr 2019, 21:03

lcd_blit draws into the OS's framebuffer, so won't work in compatibility mode.

The compatibility mode is automatically enabled for all .tns files which do not explicitly support HW-W+.
Instead of adding the PRG header yourself, you should build an ELF as usual and conver it to a .tns with
Code: Select all
genzehn --input input.elf --output output.tns --240x320-support true
.
User avatar
VogtinatorPremium
Niveau 9: IC (Compteur Infatigable)
Niveau 9: IC (Compteur Infatigable)
Level up: 1.6%
 
Posts: 217
Joined: 29 Mar 2014, 15:55
Gender: Male
Calculator(s):
MyCalcs profile

Re: Routines 'système' de Ndless

Unread postby Noury » 18 Apr 2019, 21:40

@Vogtinator thanks, it's better, but not yet correctly running.
I've added "--240x320-support true" to ZEHNFLAGS

At make time, I have the following output:

Code: Select all
nspire-as -c HelloWorld.S -o HelloWorld.o
mkdir -p .
nspire-ld HelloWorld.o -o HelloWorld.elf
genzehn --input HelloWorld.elf --output HelloWorld.tns.zehn --name "HelloWorld" --240x320-support true
Warning: Using neither old (SCREEN_BASE_ADDRESS) nor new (lcd_blit) API!
Assuming '--uses-lcd-blit false'!
make-prg HelloWorld.tns.zehn HelloWorld.tns
rm HelloWorld.tns.zehn


And at run time the screen is "reversed".

Image

I've naively added "--uses-lcd-blit true", but it's the same.

I'm pretty sure we're not far from success.
User avatar
NouryVIP++
Niveau 11: LV (Légende Vivante)
Niveau 11: LV (Légende Vivante)
Level up: 66.3%
 
Posts: 325
Joined: 07 Sep 2018, 09:19
Location: Sceaux, France 92
Gender: Male
Calculator(s):
MyCalcs profile

Re: Routines 'système' de Ndless

Unread postby Noury » 18 Apr 2019, 22:04

In fact I have:
one execution with black screen, one with vertical garbage, one with black screen, one with vertical garbage...
User avatar
NouryVIP++
Niveau 11: LV (Légende Vivante)
Niveau 11: LV (Légende Vivante)
Level up: 66.3%
 
Posts: 325
Joined: 07 Sep 2018, 09:19
Location: Sceaux, France 92
Gender: Male
Calculator(s):
MyCalcs profile

Re: Routines 'système' de Ndless

Unread postby critor » 18 Apr 2019, 22:39

Without the compatibility mode on CX hardware revisions W+, you have to write to the screen buffer in 240x320, not 320x240.
Image
User avatar
critorAdmin
Niveau 19: CU (Créateur Universel)
Niveau 19: CU (Créateur Universel)
Level up: 51.3%
 
Posts: 42240
Images: 16685
Joined: 25 Oct 2008, 00:00
Location: Montpellier
Gender: Male
Calculator(s):
MyCalcs profile
YouTube: critor3000
Twitter: critor2000
GitHub: critor

Re: Routines 'système' de Ndless

Unread postby Noury » 18 Apr 2019, 23:19

Yes, you are right.
I'm writing at coordinates x=8 and y=16. As they are within the authorized values there should be no problem.
x seems ok, but the writing is up down and not left to right.
Maybe some declarations are missing.

One thing is good now, when exiting the program, screen is correctly displayed.

Do you know if some assembly source code is available somewhere, that uses recent Nspire ?
User avatar
NouryVIP++
Niveau 11: LV (Légende Vivante)
Niveau 11: LV (Légende Vivante)
Level up: 66.3%
 
Posts: 325
Joined: 07 Sep 2018, 09:19
Location: Sceaux, France 92
Gender: Male
Calculator(s):
MyCalcs profile

Re: Routines 'système' de Ndless

Unread postby Vogtinator » 19 Apr 2019, 09:42

Hm, that would mean lcd_blit does not support the rotated LCD, at least not if invoked this way.

I suggest to implement text drawing in assembly yourself, that sounds like a nice exercise.
User avatar
VogtinatorPremium
Niveau 9: IC (Compteur Infatigable)
Niveau 9: IC (Compteur Infatigable)
Level up: 1.6%
 
Posts: 217
Joined: 29 Mar 2014, 15:55
Gender: Male
Calculator(s):
MyCalcs profile

Re: Routines 'système' de Ndless

Unread postby Noury » 19 Apr 2019, 10:35

Vogtinator wrote:I suggest to implement text drawing in assembly yourself, that sounds like a nice exercise.

You mean drawing characters in a matrix of let's say horizontal 10 and vertical 16, and then put these matrix in a buffer, and finally copying this one in the frame buffer?
If this is what you mean, yes it could be a nice exercice.
After all, my goal wasn't to use necessarily disp_str.
User avatar
NouryVIP++
Niveau 11: LV (Légende Vivante)
Niveau 11: LV (Légende Vivante)
Level up: 66.3%
 
Posts: 325
Joined: 07 Sep 2018, 09:19
Location: Sceaux, France 92
Gender: Male
Calculator(s):
MyCalcs profile

Re: Routines 'système' de Ndless

Unread postby grosged » 19 Apr 2019, 10:52

Je n'ai pas de TI-nspire modèle W en ma possession, et je me suis toujours demandé : dans ce mode 240x320, d'où démarre le buffer-écran, je veux dire, de quel coin de l'écran ?
J'ai aussi pensé à écrire une routine d'affichage en mode texte, et compatible sur tous les modèles.
Et je pense à un moyen basique de deviner le type d'écran : au moment de lancer un programme, il suffirait de consulter 1 ou 2 octets bien précis de la mémoire-écran (par exemple parmi les tous premiers octets de la jauge d'état de la batterie ;) )

(je vais faire 1 capture-écran de ma TI-nspire CX CAS, puis de ma TI-nspire CAS)
User avatar
grosgedVIP++
Niveau 14: CI (Calculateur de l'Infini)
Niveau 14: CI (Calculateur de l'Infini)
Level up: 30.2%
 
Posts: 770
Images: 75
Joined: 14 Sep 2011, 12:29
Gender: Not specified
Calculator(s):
MyCalcs profile

PreviousNext

Return to Native: Ndless, Linux, ...

Who is online

Users browsing this forum: ClaudeBot [spider] and 6 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.
1200 utilisateurs:
>1161 invités
>32 membres
>7 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)