30

Si tu comprends rien au TSR, n'essaie pas de patcher la ROM. Ca vaut mieux.

31

ca y'est g tou compris au tsr !!!!! top merci flanker et Greg Dietsche
enfin non pas tou, y'a un truc qui me derange, quand je dois choper le code hexa de mon tsr qui sera ds le ghost, je dois recopier le code hexa a partir du debut du fichier ? ou bien a partir du debut du code du prgm ...

mais g toujours un probleme, puisque je ne peux pas modifier le menu apps ,je dois en recreer un similaire en ajoutant ce que je veux mais ca parait chô : comment je peux faire une commande "current" pour les menu des prgm, textes et matrices ??
NTW !!!!!

32

ah non ca y'est g pigé pour le code hexa ...

mais je sé pas quoi faire pour les "current" , qq peut-il m'aider ?
NTW !!!!!

33

tu veux changer le menu APPS via un TSR ? tu veux changer quoi exactement ?
et avant de faire des trucs compliqués, je te conseille de faire un tsr "vide" qui ne fait rien (ou peut-être une boîte de dialogue qui s'affiche quand t'appuies sur X ou un truc tout con du même genre)
avatar
<<< Kernel Extremis©®™ >>> et Inventeur de la différence administratif/judiciaire ! (©Yoshi Noir)

<Vertyos> un poil plus mais elle suce bien quand même la mienne ^^
<Sabrina`> tinkiete flan c juste qu'ils sont jaloux que je te trouve aussi appétissant

34

ba en fait je ve rajouter des trucs ds le menu APPS donc j'ai recrée un menu APPS et j'ai remis Y=editor,windows editor graph table,numeric solver et home mais je vois pas comment faire pour lancer la routine qui permet de creer ou d'ouvrir un texte une matrice ou un prgm aisi que la routine qui reouvre le dernier texte,matrice ou prgm
NTW !!!!!

35

EV_StartApp, nan ?
avatar
<<< Kernel Extremis©®™ >>> et Inventeur de la différence administratif/judiciaire ! (©Yoshi Noir)

<Vertyos> un poil plus mais elle suce bien quand même la mienne ^^
<Sabrina`> tinkiete flan c juste qu'ils sont jaloux que je te trouve aussi appétissant

36

a oué t'a raison !! merci beaucouuuup !!
je vé tester tou ca merci infiniment les gars top
NTW !!!!!

37

moui bon maitenant g un probleme
quand g codé mon hook.tpr je fais comment pour pouvoir le compiler vu qu'il n'ya pas de _main : ?
// C Source File
// Created 2/9/01; 10:52:07 AM
//Sample TSR by Greg Dietsche - Last Modification: 10/22/2002
#define TSR_NAME "SampTSR "
#define OPTIMIZE_ROM_CALLS
#define NO_CALC_DETECT
#define USE_TI89
#include <tigcclib.h>	
void Install_TSR(void);
void EventHandler(EVENT *ev);
void AFunction(void);
asm(".ascii \"evHk" TSR_NAME "\"");asm(".globl	gpOldHandler");asm("gpOldHandler:");asm(".long 0");asm("__jmp__Event_Hook__:");asm("jmp Install_TSR:l");
#ifndef NO_CALC_DETECT
asm(".global __calculator");asm("__calculator:");asm(".word 0");
#endif
//Final offset: 22 bytes
extern EVENT_HANDLER gpOldHandler; 		//a pointer to a pointer to the old handler
//Install Function -  this function will be executed ONCE, and ONLY ONCE
void Install_TSR(void)
{
extern char __jmp__Event_Hook__;
char *ptr=&__jmp__Event_Hook__;
*(unsigned long*)&ptr[2]=(unsigned long)EventHandler;
#ifndef NO_CALC_DETECT
asm volatile("move.l 0xC8,%%a0
/* Calculator Detection */
moveq #1,%%d0
move.l %%a0,%%d1
and.l #0x400000,%%d1
jbne __calc_in_d0__
clr.w %%d0
move.l (%%a0,0x2F*4),%%a1 /* ScrRect */
cmp.b #200,2(%%a1)
jbcs __calc_in_d0__
moveq #3,%%d0
_calc_in_d0__:
lea __calculator(%%pc),%%a1
move.w %%d0,(%%a1)
/* End Of Calculator Detection Code -- From TIGCC Sources */"
:
:
: "a0", "a1", "d1");
#endif
		
}

void EventHandler(EVENT *ev)
{
EVENT_HANDLER OldHook;
#ifdef OPTIMIZE_ROM_CALLS
 void *__saved_a5__;//a variable to save the register a5 so it can be restored later
asm("/*START: Support for OPTIMIZE_ROM_CALLS*/");asm("move.l %%a5,%0":"=p"(__saved_a5__));asm("move.l 0xC8,%a5");asm("/*END: Support for OPTIMIZE_ROM_CALLS*/");
#endif
if(ev->Type==CM_KEYPRESS)	
{	
if(ev->extra.Key.Code==256)
{
AFunction();
}
}
 OldHook=gpOldHandler;
  if(OldHook)
  {asm("move.l %0,%%a2			/*TEOS expects the parameter to be in a2*/
  	move.l %%a2,-(%%sp)	/*other event hooks expect it on the stack*/
  	move.l %1,%%a0			/*Get the address to call*/
  	jsr (%%a0)					/*Call the next event hook*/
  	addq.l #4,%%sp			/*restore the stack*/
  	"::"p"(ev),"g"(OldHook):"a0","a2");
  }
#ifdef OPTIMIZE_ROM_CALLS
asm("/*START: Support for OPTIMIZE_ROM_CALLS*/");	asm("move.l %0, %%a5	/*support for OPTIMIZE_ROM_CALLS*/"::"p"(__saved_a5__));asm("/*END: Support for OPTIMIZE_ROM_CALLS*/");
#endif
}
void AFunction(void)
{
ST_helpMsg("vous avez pressé APPS");
}


quand je fais ceci
tigcc -03 -W -Wall -outpubin hook.c ici ca bug , unresolved reference to _main
c:\tt\bin\ttbin2hex -a tsr -ss 2 -se 1 hook.bin hookbin.h
NTW !!!!!

38

tu pourrais me dire ou tu as trouvé cette source stp ?
euh...

39

NTW !!!!!

40

matthieu
: enfin non pas tou, y'a un truc qui me derange, quand je dois choper le code hexa de mon tsr qui sera ds le ghost

Attention, plus de ghost sur Titanium, programmez compatible dès maintenant : http://p080.ezboard.com/ftichessteamhqfrm10.showMessage?topicID=142.topic

41

TSR kernel no powa !

42

confus
avatar
<<< Kernel Extremis©®™ >>> et Inventeur de la différence administratif/judiciaire ! (©Yoshi Noir)

<Vertyos> un poil plus mais elle suce bien quand même la mienne ^^
<Sabrina`> tinkiete flan c juste qu'ils sont jaloux que je te trouve aussi appétissant

43

ExtendeD
:
matthieu
: enfin non pas tou, y'a un truc qui me derange, quand je dois choper le code hexa de mon tsr qui sera ds le ghost

Attention, plus de ghost sur Titanium, programmez compatible dès maintenant : http://p080.ezboard.com/ftichessteamhqfrm10.showMessage?topicID=142.topic

arf je l'avais deja, mais le probleme maintenant c'est que : comment je fais pour l'avoir ce code hexa sachant que je ne peux PAS compiler le hook qui ne contient PAS de _main????
NTW !!!!!

44

Toutes les commandes de compilation pour SampleTSR sont dans Make.bat.
Et SampleTSR doit être légèrement modifié pour pouvoir être compilé avec TIGCC 0.95 : http://p080.ezboard.com/ftichessteamhqfrm5.showMessage?topicID=2480.topic

45

Toutes les commandes de compilation pour SampleTSR sont dans Make.bat.

je l'avais compris
Et SampleTSR doit être légèrement modifié pour pouvoir être compilé avec TIGCC 0.95 : http://p080.ezboard.com/ftichessteamhqfrm5.showMessage?topicID=2480.topic


ca marche pas non plus : le probleme c que ds hook.c il n'y a pas de MAIn !!!!!!
NTW !!!!!

46

la veritable question est : Comment compiler une source C qui ne contient pas de _main ???????????
y'a pas un option tigcc a mettre, car ds make.bat il y a ca :
tigcc -03 -W -Wall -outpubin hook.c
mais c'est pass assez!!
NTW !!!!!

47

je dirais que tu fait un fonction main et tu include le fichier qui contient le code du tsr.
avatar
Membre fondateur de la Ligue Anti-MacIntoc
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Un expert est quelqu'un qui en sait de plus en plus sur de moins en moins
de choses, jusqu'à ce qu'il connaisse absolument tout à propos de rien.

48

mwé mais il ne doit pas avoir de _main ds le code du hook pour que le tsr marche .......
NTW !!!!!

49

je comprend pas , personne ne l'a essayé le tsr de greg dietche?????
NTW !!!!!

50

lequel ?
avatar
Que cache le pays des Dieux ? - Forum Ghibli - Forum Littéraire

La fin d'un monde souillé est venue. L'oiseau blanc plane dans le ciel annonçant le début d'une longue ère de purification. Détachons-nous à jamais de notre vie dans ce monde de souffrance. Ô toi l'oiseau blanc, l'être vêtu de bleu, guide nous vers ce monde de pureté. - Sutra originel dork.

51

ba le Sample TSR by Greg Dietsche disponible ici http://calc.gregd.org/ : Sample TSR
NTW !!!!!

52

matthieu
: je comprend pas , personne ne l'a essayé le tsr de greg dietche?????

En effet, il y a un problème à la compilation, je crois que ça marchait avec les anciennes versions de TIGCC.
Je n'arrive pas à contacter Kevin par mail.

53

Il était absent pour la semaine, il vient de se reconnecter sur IRC là
avatar
Que cache le pays des Dieux ? - Forum Ghibli - Forum Littéraire

La fin d'un monde souillé est venue. L'oiseau blanc plane dans le ciel annonçant le début d'une longue ère de purification. Détachons-nous à jamais de notre vie dans ce monde de souffrance. Ô toi l'oiseau blanc, l'être vêtu de bleu, guide nous vers ce monde de pureté. - Sutra originel dork.

54

Ah oui, en effet smile

matthieu : il n'y a pas de problème de compilation avec "#define _NO_INCLUDE_PATCH" (dans tous les .c sauf l'installeur, comme indiqué sur le topic du TICT msg board plus haut).

55

je suis desolé j'avais pas fait attention a cette commande... dsl dsl mais
mourn mourn mourn mourn mourn mourn mourn mourn
ca marche toujours pas ... enfin , la compilation marche mais tigcc refuse categoriquement de sortir un fichier .bin :

si je compile avec les options normales et tous et tous, TOUt va bien, j'ai mon fichier ti et tou va bien

mais si je mets
tigcc -O3 -W -Wall -outputbin c:\hook2\hook.c
dans une fenetre ms-dos, il ne se passe rien, tigcc ne sort que mon fichier ti mais sans fichier bin

si j'ouvre hook.tpr et que dans les options du projet dans la rubrique compilations, dans la case gcc switches je met ceci,-03 -W -Wall -outputbin
voila les erreurs que me donne tigcc :
error: unrecognized option `-strip'
error: output filename specified twice


pourtant , je n'est rien ajouté rien fait du tout (enfin si j'ai mis ce qu'avait dis kevin) !! jpense que ca marchera jamais avec moi... pMsg("April Fools!"); } voila le source de hook.c // C Source File // Created 2/9/01; 10:52:07 AM //Sample TSR by Greg Dietsche - Last Modification: 10/22/2002 //TODO: Set Your Event Hook's Name //Hook Name: Must Be 8 non-zero characters! Use Spaces if necessary to fill this requirement //You should edit this to reflect the name of your event hook... //When uninstalling your event hook, the uninstall program will use this name in its list of //installed TSR Event Hooks       #define _NO_INCLUDE_PATCH       #define TSR_NAME "SampTSR "   //Usually this results in smaller code, OPTIMIZE_ROM_CALLS also makes calling rom functions faster //than they would be normally           #define OPTIMIZE_ROM_CALLS       //TODO: Do you need to have TIGCC detect the calc type? //For Sample TSR, defining NO_CALC_DETECT will result in smaller code //You should comment this out to see if smaller code is produced in your own projects... //Often times, undefining (commenting out) NO_CALC_DETECT will result in //smaller code if you use the so-called psuedo constants such as KEY_UP in compat.h      #define NO_CALC_DETECT //TODO: Select the calculators that you are compiling for...      #define USE_TI89    //Necessary Header Files      #include <tigcclib.h>      //TODO: Add your own header files, and other information that needs a global scope      void Install_TSR(void);      void EventHandler(EVENT *ev);      void AFunction(void); //This Code needs TIGCC 0.94 beta 19 at the very least to function properly       /////////////////////// // EV_hook Header          // ///////////////////// //The Total Length of this header is 22 bytes //The Offset to jmp Install_TSR:l is 16 bytes //The Offset to gpOldHandler is 12 bytes asm(".section _stl1 | First library startup section. This is what the executable starts with. .ascii \"EvHk" TSR_NAME "\" .globl        gpOldHandler gpOldHandler: .long 0 __jmp__Event_Hook__: jmp Install_TSR:l .global __calculator __calculator: .word 0");      //Final offset: 22 bytes /////////////////////////////// // End of EV_hook Header          // /////////////////////////////       //Global Variables Go Here extern EVENT_HANDLER gpOldHandler;           //a pointer to a pointer to the old handler //Install Function -  this function will be executed ONCE, and ONLY ONCE void Install_TSR(void) {           extern char __jmp__Event_Hook__;           char *ptr=&__jmp__Event_Hook__;                 //Set EventHandler as the default entry point from now on      //instead of Install_TSR (this function)           *(unsigned long*)&ptr[2]=(unsigned long)EventHandler;                 #ifndef NO_CALC_DETECT           asm volatile("           /* Start Of Calculator Detection Code -- From TIGCC Sources */                     move.l 0xC8,%%a0                     /* Calculator Detection */                     moveq #1,%%d0                     move.l %%a0,%%d1                     and.l #0x400000,%%d1                     jbne __calc_in_d0__                     clr.w %%d0                     move.l (%%a0,0x2F*4),%%a1 /* ScrRect */                     cmp.b #200,2(%%a1)                     jbcs __calc_in_d0__                     moveq #3,%%d0                __calc_in_d0__:                     lea __calculator(%%pc),%%a1                     move.w %%d0,(%%a1)           /* End Of Calculator Detection Code -- From TIGCC Sources */"           :           :           : "a0", "a1", "d1");      #endif                      //TODO: Add any one time initialization code here           //Warning, what ever you write here must be absolutely           //crash/error proof!! } void EventHandler(EVENT *ev) { ////////////////////////////////////////////// //Prepatory Setup for the Event Handler    // //////////////////////////////////////////// // a special variable: pointer to a function      EVENT_HANDLER OldHook;      #ifdef OPTIMIZE_ROM_CALLS           void *__saved_a5__;//a variable to save the register a5 so it can be restored later           asm("/*START: Support for OPTIMIZE_ROM_CALLS*/");           asm("move.l %%a5,%0":"=p"(__saved_a5__));           asm("move.l 0xC8,%a5");           asm("/*END: Support for OPTIMIZE_ROM_CALLS*/");      #endif ///////////////////////////////////////////////////////////////// ////////////////////////////////////////// //Your Event Handler Code Starts Here  // //////////////////////////////////////// //TODO: write your very own event hook code      if(ev->Type==CM_KEYPRESS)           {                //this is a lame example (good april fools joke though)                if(ev->extra.Key.Code=='a')                {                          ev->extra.Key.Code='A';     //now, the user cannot type a lowercase 'a'                     //proof that you can call functions using this method                          AFunction();                }      } /////////////////////////////// //End of Your Event Handler // ///////////////////////////// /////////////////////////////////////// //Call the Old hook if there was one// ///////////////////////////////////// //get the address of the next TSR in line to be executed NULL if there is none   OldHook=gpOldHandler;    //Call the old hook if there is one to be called     if(OldHook)   {        asm("                                        /*This inline asm takes the place of OldHook(ev);                                                               the difference is that a2 will also contain ev                                                               as a parameter to support TEOS. Without this code,                                                               you would need to use the switch -ffixed a2 when                                                               compiling this example.*/        move.l %0,%%a2               /*TEOS expects the parameter to be in a2*/        move.l %%a2,-(%%sp)     /*other event hooks expect it on the stack*/        move.l %1,%%a0               /*Get the address to call*/        jsr (%%a0)                         /*Call the next event hook*/        addq.l #4,%%sp               /*restore the stack*/        "::"p"(ev),"g"(OldHook):"a0","a2");   }//end if(OldHook)      #ifdef OPTIMIZE_ROM_CALLS           asm("/*START: Support for OPTIMIZE_ROM_CALLS*/");           asm("move.l %0, %%a5     /*support for OPTIMIZE_ROM_CALLS*/"::"p"(__saved_a5__));           asm("/*END: Support for OPTIMIZE_ROM_CALLS*/");      #endif } /////////////////////////////////////////////////////////////////////////// //A Small function to prove that it is possible to call other functions // ///////////////////////////////////////////////////////////////////////// void AFunction(void) {      ST_hel
NTW !!!!!

56

Les fichiers bin s'appellent z89, z9x et zv2 maintenant, selon le modèle (ils seront identiques si tu n'as pas activé OPTIMIZE_CALC_CONSTS). Tu remarqueras que c'est z89 et pas 89z. smile
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é

57

.... eek mur mur mur gol
... jl'avais pas capté ca


Merci kevin !!!!!!!
NTW !!!!!