1

(je sais pas trop où poster ça... ça serait éventuellement de l'info PC, mais orienté complètement TI, donc ....)

Bref, voici ce que dit la doc de PreOS au niveau des pack-archive :
        4 file names are special for a Pack Archive : 
                + 'comment' : It is a String File which is the comment of the Pack Archive. 
                + 'icon' : It is a Bitmap File which is the icon of the Pack Archive. 
                + 'author' : It is a String File which is the author name of the Pack Archive. 
                + 'version' : It is a String File which is the version of the Pack Archive. The format is 'MM.mm.dd.cc'.


J'aurais aimé savoir comment générer un fichier STR de manière souple :
- une solution pour moi est d'écrire "mon commentaire" sur la calc, de transférer le fichier via TiEmu, puis de créer le pack avec le .??s obtenu.
- une autre solution consiste à avoir dans un fichier source : "Mon commentaire", puis de créer le fichier au format .??s en conséquence

La seconde solution est évidemment 100 fois plus propre et largement préférable, mais je ne sais pas créer un tel fichier. Comment faire ? Je suis sous Linux, si au pire il faut un script pour faire ça, ça ira. Comment est foutu le fichier ? Un header statique + donnée + checksum ? C'est alors le checksum qui va poser problème ? Je crois que Bob avait fait un outil pour calculer un checksum.

Bref, j'attends vos idées. smile

2

On va voir de ce côté là, apparemment ya les sources, ça pourrait être recompilable au pire.

edit : oublié le lien : http://www.ticalc.org/archives/files/fileinfo/353/35304.html

3

Sous Linux, tu n'es pas concerné par l'incapacité de transférer des STR contenant des 0x00 dont font preuve certaines versions de TI-Connect - mais les utilisateurs de ton programme, sous Windows, risquent de l'être. C'est pour ça qu'à une époque, nombre de programmes ont dû changer leur format de stockage de STR vers un autre format (0xF8 OTH_TAG).

Génération de checksums: ttchecksum ?
avatar
Membre de la TI-Chess Team.
Co-mainteneur de GCC4TI (documentation en ligne de GCC4TI), TIEmu et TILP.
Co-admin de TI-Planet.

4

Bon, si quelqu'un veut bien m'aider dans la recompilation de ce simple fichier .cpp. J'ai fait "gcc truc.cpp" et ça marche pas. Ayant épuisé mes compétences en programmation PC, je sèche, et j'ai besoin de votre aide grin #trinul#

5

Lionel -> merci, je viens de faier un tour sur TICTHQ et j'ai d/l les softs tt*, mais j'ai pas encore fouillé dans le pack. merci en tout cas.

Ceci dit, le soft de ./2 me conviendrait super bien (il transfert tout ce qui est plain-text, donc on peut convertir un source assembleur ou C love), et la simple recomiplation du .cpp me suffirait . smile

6

Ah merde, ça génère un 89t, pas un 89s. Ya beaucoup de différence entre les formats ? grin (il existe un 89tformat.txt, mais pas de 89s...)

7

STRING variables



If a0 is the variable adress, then you have:



(a0).w = size of the variable - 2

2(a0).b = a null char (#0)

from 3(a0).b to the end = your string, it ends with a null char (#0)
At the end of a STRING variable, you have a #$2D char, it tells you that it is a STRING variable

TEXT variables



Suppose you have a TEXT variable handle in d0.

With tios :: DEREF d0,a0 you get in a0 the variable adress



From then you have the following format:



(a0).w = size of the variable - 2

2(a0).w = position of the cursor in the TIOS editor or in XeTal

from 4(a0).w to the end = your text.

Text has the following format:

#13 = nextline

#20 = beginning of a line. It is always after a #13 char or a the very beginning of the text

#0 = end of the text
At the end of a TEXT variable, you have a #$E0 char, it tells you that it is a TEXT variable



[EDIT: suppression de smiley intempestif dans la ligne comprenant TIOS : : Deref]
avatar
Membre de la TI-Chess Team.
Co-mainteneur de GCC4TI (documentation en ligne de GCC4TI), TIEmu et TILP.
Co-admin de TI-Planet.

8

Merci Lionel, mais c'est le format PC que je cherche grin (.??s)

9

http://www.ticalc.org/archives/files/fileinfo/127/12774.html

(sinon mon truc pr calculer le checksum je vois pas trop le rapport ? il est ici (Ti Tool) au besoin, peut-être que je pourrai retrouver les sources sur un vieux backup, mais je sais pas si c'est très utile ?)
avatar
All right. Keep doing whatever it is you think you're doing.
------------------------------------------
Besoin d'aide sur le site ? Essayez par ici :)

10

Ben pour éventuellement reconstruire le fichier .??s à la main, non ? Concaténation (Header+Chaine+Checksum) > truc.??s Ca doit être une truc comme ça, non ?

11

Ah, c'est cool Zephyr ton lien ! smile

Voilà le format :
I) Normal files such as Program file (*.92?)
--------------------------------------------

  The following is a table of the bytes that make up the header of a *.92?
file:

  Adress				What It Contains
  ---------------------------------------------------------------
  0x00-0x07	0-7			**TI92** or **TI92P*
  0x08-0x09	8-9			0x01 0x00
  0x0A-0x11	10-17			folder name (8 chars)
  0x12-0x39	18-57			comment (40 chars)
  0x3A-0x3B	58-59			0x01 0x00 (number of vars: 1)
  0x3C-0x3F	60-63			0x52 0x00 0x00 0x00 (1)
  0x40-0x47	64-71			varname (8 chars)
  0x48-0x49	72-73			vartype 0x00
  0x4A-0x4B	74-75			0x00 0x00
  0x4C-0x4F	76-79			(2)
  0x50-0x51	80-81			0xA5 0x5A
  0x52-0x..	82-(n-1)		data (raw data part)
  0x..-0x..	n-(n+1)			checksum (raw data part)

The checkum is the sum of all data bytes.
(1): contains the address of the first byte of data (address)
(2): contains the address of the byte after the checksum (address)

Reste à savoir :
- C'est quoi le "comment" ??

Comment faire pour construire ça en script shell ?
- Qu'a-t-on comme instruction de concaténation de chaines ?
- Comment faire pour échapper une valeur comme "0" (pour remplir le commentaire avec que des bytes de valeur 0 par exemple) ?
- comment accéder aux octets d'un fichier pour faire la somme des données ? (en basic, ça ferait ord("t")+ord("e")+ord("x")+ord("t")+ord("e"))

12

ttbin2oth, ttbin2str ?
avatar
Membre de la TI-Chess Team.
Co-mainteneur de GCC4TI (documentation en ligne de GCC4TI), TIEmu et TILP.
Co-admin de TI-Planet.

13

Bon, voyons voir grin

14

merci bien pour ces outils, j'ai reparcouru la doc, c'est puissant top

15

Bon, j'ai refait les binaires pour Linux conformément au readme, mais voici ce que j'obtiens quand je veux passer ttbin2str sur un fichier nommé "abc" contenant "abcdef" :
[Martial@mars ttbin2str]$ ./ttbin2str -s89 ./abc def

TTBin2Str v1.07 - TIGCC Tools Suite v1.31
(c) thomas.nussbaumer@gmx.net Oct  4 2008 16:19:43

*** glibc detected *** ./ttbin2str: double free or corruption (!prev): 0x09c71008 ***
======= Backtrace: =========
/lib/libc.so.6[0xc89ac1]
/lib/libc.so.6(cfree+0x90)[0xc8d0f0]
/lib/libc.so.6(fclose+0x136)[0xc783b6]
./ttbin2str[0x8048e5b]
/lib/libc.so.6(__libc_start_main+0xe0)[0xc36390]
./ttbin2str[0x8048621]
======= Memory map: ========
00110000-00111000 r-xp 00110000 00:00 0          [vdso]
00bfd000-00c18000 r-xp 00000000 08:04 35909      /lib/ld-2.7.so
00c18000-00c19000 r--p 0001a000 08:04 35909      /lib/ld-2.7.so
00c19000-00c1a000 rw-p 0001b000 08:04 35909      /lib/ld-2.7.so
00c20000-00d73000 r-xp 00000000 08:04 35910      /lib/libc-2.7.so
00d73000-00d75000 r--p 00153000 08:04 35910      /lib/libc-2.7.so
00d75000-00d76000 rw-p 00155000 08:04 35910      /lib/libc-2.7.so
00d76000-00d79000 rw-p 00d76000 00:00 0
00de5000-00df0000 r-xp 00000000 08:04 35916      /lib/libgcc_s-4.1.2-20070925.so.1
00df0000-00df1000 rw-p 0000a000 08:04 35916      /lib/libgcc_s-4.1.2-20070925.so.1
08048000-0804a000 r-xp 00000000 08:02 24920563   /mnt/Data/Programmation/Programmes/as/ttbin2str/ttbin2str
0804a000-0804b000 rw-p 00001000 08:02 24920563   /mnt/Data/Programmation/Programmes/as/ttbin2str/ttbin2str
09c71000-09c92000 rw-p 09c71000 00:00 0          [heap]
b7e00000-b7e21000 rw-p b7e00000 00:00 0
b7e21000-b7f00000 ---p b7e21000 00:00 0
b7f44000-b7f46000 rw-p b7f44000 00:00 0
b7f5b000-b7f5d000 rw-p b7f5b000 00:00 0
bfc47000-bfc5c000 rw-p bffeb000 00:00 0          [stack]
Aborted
[Martial@mars ttbin2str]$

Que faire ?

16

Ooooh.
Tu utilises la version à http://members.chello.at/gerhard.kofler/kevin/tts140/ ? C'est une des plus récentes disponibles.

Tu n'as pas compilé les exécutables avec -g3, ce qui donnerait plus d'infos sur la ligne qui plante smile
avatar
Membre de la TI-Chess Team.
Co-mainteneur de GCC4TI (documentation en ligne de GCC4TI), TIEmu et TILP.
Co-admin de TI-Planet.

17

Oups, on va essayer ça, mais c'est clairement plus à jour (rpm pour FC6...)

18

Même erreurs avec les outils de ce lien : http://members.chello.at/gerhard.kofler/kevin/tts140/tt14020060628.tar.bz2

J'essaye en modifiant makelinux.sh pour rajouter -g3 .

19

Voici déjà le résumé de la compilation :
[Martial@mars tt]$ ./makelinux.sh
====== generating linuxbin directory ============
directory linuxbin does already exists
====== generating linuxsrc directory tree =======
directory linuxsrc does already exists
directory linuxsrc/calctools does already exists
directory linuxsrc/CVS does already exists
directory linuxsrc/experimental does already exists
directory linuxsrc/pctools does already exists
====== converting source files ==================
------ processing directory src/calctools -------
converting src/calctools/ebook.c ...
converting src/calctools/ttarchive.h ...
converting src/calctools/ttbatt.c ...
converting src/calctools/tthdex.c ...
converting src/calctools/tthedit.c ...
converting src/calctools/tthw.c ...
converting src/calctools/ttmem.c ...
converting src/calctools/ttrow.c ...
converting src/calctools/ttstart.c ...
converting src/calctools/ttunpack.h ...
------ processing directory src/CVS -------
------ processing directory src/experimental -------
converting src/experimental/findstr.c ...
converting src/experimental/ttbmp2bin.c ...
converting src/experimental/ttpack.c ...
------ processing directory src/pctools -------
converting src/pctools/bin2oth.c ...
converting src/pctools/packhead.h ...
converting src/pctools/revtools.h ...
converting src/pctools/strhead.h ...
converting src/pctools/ttarchive.c ...
converting src/pctools/ttarchive.h ...
converting src/pctools/ttbin2bin.c ...
converting src/pctools/ttbin2hex.c ...
converting src/pctools/ttbin2oth.c ...
converting src/pctools/ttbin2str.c ...
converting src/pctools/ttchecksum.c ...
converting src/pctools/ttdasm.c ...
converting src/pctools/ttdos2ebk.c ...
converting src/pctools/ttebkgen.c ...
converting src/pctools/ttebkmeta.h ...
converting src/pctools/ttextract.c ...
converting src/pctools/tt.h ...
converting src/pctools/tthelp.c ...
converting src/pctools/tthex2bin.c ...
converting src/pctools/ttinfo.c ...
converting src/pctools/ttpack.c ...
converting src/pctools/ttppggen.c ...
converting src/pctools/ttproto.c ...
converting src/pctools/ttsplit.c ...
converting src/pctools/ttstrip.c ...
converting src/pctools/tttiler.c ...
converting src/pctools/ttunarchive.c ...
converting src/pctools/ttunebk.c ...
converting src/pctools/ttunpack.c ...
converting src/pctools/ttunpack.h ...
converting src/pctools/ttversion.h ...
converting src/pctools/unpack.c ...
====== generating linux binaries ==================
building ttarchive.c ...
In file included from ttarchive.c:103:
ttpack.c:2215:3: warning: no newline at end of file
building ttbin2bin.c ...
building ttbin2hex.c ...
building ttbin2oth.c ...
building ttbin2str.c ...
building ttchecksum.c ...
building ttdasm.c ...
ttdasm.c: In function ‘AddLabel’:
ttdasm.c:351: warning: initialization from incompatible pointer type
ttdasm.c:356: warning: assignment from incompatible pointer type
ttdasm.c:2806:5: warning: no newline at end of file
building ttdos2ebk.c ...
ttdos2ebk.c:557:3: warning: no newline at end of file
building ttebkgen.c ...
In file included from ttebkgen.c:37:
ttdos2ebk.c:557:3: warning: no newline at end of file
In file included from ttarchive.c:106,
                 from ttebkgen.c:40:
ttpack.c:2215:3: warning: no newline at end of file
building ttextract.c ...
building tthelp.c ...
building tthex2bin.c ...
building ttinfo.c ...
building ttpack.c ...
ttpack.c:2215:3: warning: no newline at end of file
building ttppggen.c ...
In file included from ttppggen.c:37:
ttpack.c:2215:3: warning: no newline at end of file
ttppggen.c:303:3: warning: no newline at end of file
building ttproto.c ...
building ttsplit.c ...
building ttstrip.c ...
building tttiler.c ...
building ttunarchive.c ...
building ttunebk.c ...
building ttunpack.c ...
[Martial@mars tt]$    

20

Et le résultat de l'exécution de ttbin2str :
[Martial@mars ttbin2str]$ ./ttbin2str -s89 ./abc def

TTBin2Str v1.07 - TIGCC Tools Suite v1.31
(c) thomas.nussbaumer@gmx.net Oct  4 2008 17:12:33

*** glibc detected *** ./ttbin2str: double free or corruption (!prev): 0x0890a008 ***
======= Backtrace: =========
/lib/libc.so.6[0xc89ac1]
/lib/libc.so.6(cfree+0x90)[0xc8d0f0]
/lib/libc.so.6(fclose+0x136)[0xc783b6]
./ttbin2str[0x8048e5b]
/lib/libc.so.6(__libc_start_main+0xe0)[0xc36390]
./ttbin2str[0x8048621]
======= Memory map: ========
00110000-00111000 r-xp 00110000 00:00 0          [vdso]
00bfd000-00c18000 r-xp 00000000 08:04 35909      /lib/ld-2.7.so
00c18000-00c19000 r--p 0001a000 08:04 35909      /lib/ld-2.7.so
00c19000-00c1a000 rw-p 0001b000 08:04 35909      /lib/ld-2.7.so
00c20000-00d73000 r-xp 00000000 08:04 35910      /lib/libc-2.7.so
00d73000-00d75000 r--p 00153000 08:04 35910      /lib/libc-2.7.so
00d75000-00d76000 rw-p 00155000 08:04 35910      /lib/libc-2.7.so
00d76000-00d79000 rw-p 00d76000 00:00 0
00de5000-00df0000 r-xp 00000000 08:04 35916      /lib/libgcc_s-4.1.2-20070925.so.1
00df0000-00df1000 rw-p 0000a000 08:04 35916      /lib/libgcc_s-4.1.2-20070925.so.1
08048000-0804a000 r-xp 00000000 08:02 24920563   /mnt/Data/Programmation/Programmes/as/ttbin2str/ttbin2str
0804a000-0804b000 rw-p 00001000 08:02 24920563   /mnt/Data/Programmation/Programmes/as/ttbin2str/ttbin2str
0890a000-0892b000 rw-p 0890a000 00:00 0          [heap]
b7e00000-b7e21000 rw-p b7e00000 00:00 0
b7e21000-b7f00000 ---p b7e21000 00:00 0
b7fe3000-b7fe5000 rw-p b7fe3000 00:00 0
b7ffa000-b7ffc000 rw-p b7ffa000 00:00 0
bfbe7000-bfbfc000 rw-p bffeb000 00:00 0          [stack]
Aborted
[Martial@mars ttbin2str]$    

Quid ? sad

21

Shit. Ca ne fonctionne pas chez moi non plus.
ttbin2str est hors de mon répertoire de travail sur tt, je l'ai supprimé de la TIGCC Tools Suite justement parce que ce foutu TI-Connect s'est mis un jour à ne plus correctement gérer les STR contenant des 0x00.

Le backtrace dit que c'est sous fclose que ça plante, donc ça veut dire qu'on passe n'importe quoi à fclose...


Ouais, forcément: double fclose(ifp); à la ligne 210...
avatar
Membre de la TI-Chess Team.
Co-mainteneur de GCC4TI (documentation en ligne de GCC4TI), TIEmu et TILP.
Co-admin de TI-Planet.

22

Ah, c'est génial si tu t'occupes de ça Lionel ! grin

Promis t'auras un mars si ça sort avant ce soir #triloveoui#

Et sinon, laisse ttbin2str dans la TTSuite, ça me sert à faire des strings pour les pack-archives, donc Ti-Connect y voir que du faïeure. smile

23

Au fait, les outils tt* sont sous quelles license ? On peut les redistribuer avec la source (idéalement sous GPL) ? Il serait par exemple bien de pouvoir inclure le source et le binaire de ttbin2str dans un projet qu'on distribue sous GPL. Comment faire ?

24

Ce n'était pas la peine de recompiler la TIGCC Tools Suite, il y a un paquetage tigcc-tools-suite dans calcforge-non-free.

Mais ttbin2str était bogué (cf. ./20, et quand on le compile avec _FORTIFY_SOURCE, ce qui est le cas des paquetages sur CalcForge, ça plante encore plus vite) et a été supprimé parce que mettre des données binaires dans un STR est une mauvaise idée (cf. ./3).
avatar
Mes news pour calculatrices TI: Ti-Gen
Mes projets PC pour calculatrices TI: TIGCC, CalcForge (CalcForgeLP, Emu-TIGCC)
Mes chans IRC: #tigcc et #inspired sur irc.freequest.net (UTF-8)

Liberté, Égalité, Fraternité

25

Ok, merci pour l'info, j'installerai le paquetage quand il aura été corrigé. Au passage, les données que je veux mettre dedans sont bien des chaines de caractères, pas des données binaires.

26

Folco (./25) :
Ok, merci pour l'info, j'installerai le paquetage quand il aura été corrigé.

Mais justement je n'ai pas envie de corriger ttbin2str. hehe Actuellement, il est objet d'un rm -f. gni
Au passage, les données que je veux mettre dedans sont bien des chaines de caractères, pas des données binaires.

Et si je le corrige, mais scanne la chaîne pour un \0 et affiche un warning ou une erreur ("Invalid string") s'il y en a un? Ça devrait te convenir et en même temps éviter les problèmes de transfert.
avatar
Mes news pour calculatrices TI: Ti-Gen
Mes projets PC pour calculatrices TI: TIGCC, CalcForge (CalcForgeLP, Emu-TIGCC)
Mes chans IRC: #tigcc et #inspired sur irc.freequest.net (UTF-8)

Liberté, Égalité, Fraternité

27

Oui, ça me convient tout à fait. Je veux l'utiliser pour ce que je décris en ./1 : créer des chaines de caractères tout ce qu'il y a de plus string pour le TIOS hehe

De plus, à cause des problèmes de TI-Connect, il n'est pas inconcevable du tout de limiter la création de chaines, c'est tout à fait compréhensible (tu vois, pour une fois que je suis d'accord avec une de tes limitations cheeky).

28

        4 file names are special for a Pack Archive :
                   + 'comment' : It is a String File which is the comment of the Pack Archive.
                   + 'icon' : It is a Bitmap File which is the icon of the Pack Archive.
                   + 'author' : It is a String File which is the author name of the Pack Archive.
                   + 'version' : It is a String File which is the version of the Pack Archive. The format is 'MM.mm.dd.cc'.

Question annexe : Il y a un format préconnisé pour l'icone ?

29

16x16

30

B&W ? Ok.