π
<-
Chat plein-écran
[^]

[removed]

C, C++, ASM...

Re: Patching 4.4.0.532 CAS to run on Non-CAS

Message non lude parrotgeek1 » 05 Fév 2017, 04:08

.
Dernière édition par parrotgeek1 le 05 Jan 2021, 19:59, édité 1 fois.
Avatar de l’utilisateur
parrotgeek1Programmeur
Niveau 11: LV (Légende Vivante)
Niveau 11: LV (Légende Vivante)
Prochain niv.: 88%
 
Messages: 745
Inscription: 29 Mar 2016, 01:22
Localisation: This account is no longer used.
Genre: Non spécifié
Calculatrice(s):
MyCalcs profile

Re: Patching 4.4.0.532 CAS to run on Non-CAS

Message non lude critor » 06 Fév 2017, 19:25

Here is your patch ported for each CX Boot2 version :
Code: Tout sélectionner
   uint32_t id = *((uint32_t*)(0x11800020));
      if(   (modelid==0x0F && asicflags!=1) ||
      (modelid==0x10 && asicflags) ||
      (modelid==0x11 && asicflags!=3) ||
      (modelid==0x12 && asicflags!=2)) {
      uint32_t fakeasic1=0; // CX
      uint32_t fakeasic2=0xE3A04000; // CX
      switch(modelid) {
         case 0x0F: // CX CAS
            fakeasic1=0x00010105;
            fakeasic2=0xE3A04341;
            break;
         case 0x11: // CM CAS
            fakeasic1=0x00000002;
            fakeasic2=0xE3A04323;
            break;
         case 0x12: // CM
            fakeasic1=0x00010107;
            fakeasic2=0xE3A04362;
      }
      if(id==CXB440_8) {
         PATCH_SETB(0x118B8A1D,0x54);
         PATCH_SETW(0x118B8A34,fakeasic2);
         PATCH_SETW(0x118B8A38,NOP);
         PATCH_SETW(0x118B8EA8,fakeasic1);
      }
      else if(id==CXB430_X) {//4.3.0.5
         if(*((volatile uint32_t *)(0x118F18D8)) != 0x6F68702F) { // 4.3.0.5
            PATCH_SETB(0x118B89FD,0x54);
            PATCH_SETW(0x118B8A14,fakeasic2);
            PATCH_SETW(0x118B8A18,NOP);
            PATCH_SETW(0x118B8E88,fakeasic1);
         }
         else {//4.3.0.3
            PATCH_SETB(0x118B8A05,0x54);
            PATCH_SETW(0x118B8A1C,fakeasic2);
            PATCH_SETW(0x118B8A20,NOP);
            PATCH_SETW(0x118B8E90,fakeasic1);
         }
      }
      else if(id==CXB403_49) {
         PATCH_SETB(0x118B8915,0x54);
         PATCH_SETW(0x118B892C,fakeasic2);
         PATCH_SETW(0x118B8930,NOP);
         PATCH_SETW(0x118B8DA0,fakeasic1);
      }
      else if(id==CXB402_47) {
         PATCH_SETB(0x118B8855,0x54);
         PATCH_SETW(0x118B886C,fakeasic2);
         PATCH_SETW(0x118B8870,NOP);
         PATCH_SETW(0x118B8CE0,fakeasic1);
      }
      else if(id==CXB391_34) {
         PATCH_SETB(0x118B8F09,0x54);
         PATCH_SETW(0x118B8F20,fakeasic2);
         PATCH_SETW(0x118B8F24,NOP);
         PATCH_SETW(0x118B9394,fakeasic1);
      }
      else if(id==CXB324_7) {
         PATCH_SETB(0x118B8CC9,0x54);
         PATCH_SETW(0x118B8CE0,fakeasic2);
         PATCH_SETW(0x118B8CE4,NOP);
         PATCH_SETW(0x118B9154,fakeasic1);
      }
/*      else if(id==CXB310_16) { // bad patch
         PATCH_SETB(0x118B7CF9,0x54);
         PATCH_SETW(0x118B7D0C,fakeasic2);
         PATCH_SETW(0x118B7D10,NOP);
         PATCH_SETW(0x118B8178,fakeasic1);
      }*/
      else if(id==CXB302_141) {
         PATCH_SETB(0x118B7EED,0x54);
         PATCH_SETW(0x118B7F04,fakeasic2);
         PATCH_SETW(0x118B7F08,NOP);
         PATCH_SETW(0x118B8378,fakeasic1);
      }
      else if(id==CXB301_131) {
         PATCH_SETB(0x118B7D9D,0x54);
         PATCH_SETW(0x118B7DB4,fakeasic2);
         PATCH_SETW(0x118B7DB8,NOP);
         PATCH_SETW(0x118B8228,fakeasic1);
      }
      else if(id==CXB300_0) {
         PATCH_SETB(0x118BBC91,0x54);
         PATCH_SETW(0x118BBCA8,fakeasic2);
         PATCH_SETW(0x118BBCAC,NOP);
         PATCH_SETW(0x118BC11C,fakeasic1);
      }
   }

Assuming you patch your Manuf model ID, it is supposed to let you install/run any OS up to 3.6.

All patches seem to work except the Boot2 3.1.0.16 one.
Depending upon the context, I can get the following errors :
  • IMAGE: missing ASIC User Flags
  • Error (00000044): LDRD/STRD with odd-numbered data register
  • Error (1187d1bc): Couldn't get PC for fault

I couldn't manage to find similar code to patch in CM Boot2 3.1 images, so the CM Boot2 patches are missing.

The CX Boot2 images don't work with a CM / CM CAS OS.
The precheck seems to be ok : the received file content starts being extracted.
But a postcheck seems to fail, with the IMAGE: isImageBodyValid = false error.

Of course, running a CM OS on a CX is useless - but if nBoot works on CM calculators someday, being able to upgrade those unsupported/discontinued? models with a CX OS will be useful.
Image
Avatar de l’utilisateur
critorAdmin
Niveau 19: CU (Créateur Universel)
Niveau 19: CU (Créateur Universel)
Prochain niv.: 41.4%
 
Messages: 41455
Images: 14353
Inscription: 25 Oct 2008, 00:00
Localisation: Montpellier
Genre: Homme
Calculatrice(s):
MyCalcs profile
YouTube: critor3000
Twitter/X: critor2000
GitHub: critor

Re: Patching 4.4.0.532 CAS to run on Non-CAS

Message non lude parrotgeek1 » 06 Fév 2017, 20:34

.
Dernière édition par parrotgeek1 le 05 Jan 2021, 19:59, édité 1 fois.
Avatar de l’utilisateur
parrotgeek1Programmeur
Niveau 11: LV (Légende Vivante)
Niveau 11: LV (Légende Vivante)
Prochain niv.: 88%
 
Messages: 745
Inscription: 29 Mar 2016, 01:22
Localisation: This account is no longer used.
Genre: Non spécifié
Calculatrice(s):
MyCalcs profile

Re: Patching 4.4.0.532 CAS to run on Non-CAS

Message non lude critor » 06 Fév 2017, 20:51

parrotgeek1 a écrit:The 4.4 patch is almost done. I am using a new approach. NlaunchX applies the minimum number of patches needed for the operating system to work.

Then, in order to get calculations to work, you place a separate second stage patcher in the ndless startup folder.


That's a very smart workaround.

Be sure to take some CAS calculation picture once it works. ;)
Image
Avatar de l’utilisateur
critorAdmin
Niveau 19: CU (Créateur Universel)
Niveau 19: CU (Créateur Universel)
Prochain niv.: 41.4%
 
Messages: 41455
Images: 14353
Inscription: 25 Oct 2008, 00:00
Localisation: Montpellier
Genre: Homme
Calculatrice(s):
MyCalcs profile
YouTube: critor3000
Twitter/X: critor2000
GitHub: critor

Re: Patching 4.4.0.532 CAS to run on Non-CAS

Message non lude parrotgeek1 » 06 Fév 2017, 21:52

.
Dernière édition par parrotgeek1 le 05 Jan 2021, 19:59, édité 1 fois.
Avatar de l’utilisateur
parrotgeek1Programmeur
Niveau 11: LV (Légende Vivante)
Niveau 11: LV (Légende Vivante)
Prochain niv.: 88%
 
Messages: 745
Inscription: 29 Mar 2016, 01:22
Localisation: This account is no longer used.
Genre: Non spécifié
Calculatrice(s):
MyCalcs profile

Re: Patching 4.4.0.532 CAS to run on Non-CAS

Message non lude critor » 07 Fév 2017, 01:22

A little preview of ControlX 4.4.1.

New options to change some Manuf fields.

You can now change the model zone, between all 15 supported geographic zones :
Image
^ Here is a model zoned for France, and by pressing :ns8: I can switch it to the next zone : Italy.
This controls the default language selected on the 1st reboot after an OS installation, and some features availability (like the english/chinese dictionnary).



You can also switch the model type by pressing :nsa: : either CAS or numeric.
Image
^ Here is a TI-Nspire CX numeric, which has been switched to a TI-Nspire CX CAS. Can be rolled back easily by pressing :nsa:

Switching your TI-Nspire CX CAS to a TI-Nspire CX numeric will let you install CX numeric OS older than 3.6.
Switching your TI-Nspire CX numeric to a TI-Nspire CX CAS will let you install CX CAS OS older than 3.6.
So, same possibilities as Nlaunchy. :)

parrotgeek1's CAS/numeric patches for OS 3.6 are included.
So unlike Nlaunchy, you'll also be able to install :
- the 3.6 CX numeric OS on your TI-Nspire CX CAS
- the 3.6 CX CAS OS on your TI-Nspire CX numeric

parrotgeek1's CAS/numeric patches for OSes 3.9-4.4 are not included and won't be included in their current form, as they're much too big for the current payload size limit.
So you won't be able to install 3.9-4.4 OSes which don't match your model.



Because of the ControlX payload size limit, only 6 OSes are supported via Boot2 4.0.3 :
- 4.4 numeric + CAS
- 3.6 numeric + CAS
- 3.1 numeric + CAS
If you would prefer a different default support, please share your opinion now.
For OSes non supported by default, you'll either have to decrypt them and flash them to the ExtnD partition, or to rebuild ControlX.



Note that the new CAS/numeric switching feature is very dangerous, thus the red warning during the ControlX boot that, as usual, people aren't going to read :
Image
If you ever remove/erase/loose nBoot+ControlX some way or another, then your calculator is bricked and is going to uninstall the current OS on the next boot, and reject every subsequent OS installation, whether it is CAS or numeric.

The current ControlX "Uninstall nBoot" menu option is going to reset the model type.
The current BtMg/nsNandMgr won't.
But anyway, you just need to hold :nsdo: :nsen: :nsmo: during a reset to erase ControlX - this is a Boot1 official feature I cannot disable.

If you just erased ControlX without resetting the model type, you'll be able to unbrick your calculator by reinstallating ControlX through an USB/TTL interface.

If you erased nBoot without resetting the model type, you can directly junk the calculator...


Seeing how easy it is to brick your calculator, and over years how people wanting CAS don't read/understand red warnings, I might not release this and keep it for myself.
A better solution might be to wait for parrotgeek1 to complete his patches by addressing the 2nd part of the problem : the Manuf model ID.
Image
Avatar de l’utilisateur
critorAdmin
Niveau 19: CU (Créateur Universel)
Niveau 19: CU (Créateur Universel)
Prochain niv.: 41.4%
 
Messages: 41455
Images: 14353
Inscription: 25 Oct 2008, 00:00
Localisation: Montpellier
Genre: Homme
Calculatrice(s):
MyCalcs profile
YouTube: critor3000
Twitter/X: critor2000
GitHub: critor

Re: Patching 4.4.0.532 CAS to run on Non-CAS

Message non lude parrotgeek1 » 07 Fév 2017, 03:45

.
Dernière édition par parrotgeek1 le 05 Jan 2021, 19:59, édité 1 fois.
Avatar de l’utilisateur
parrotgeek1Programmeur
Niveau 11: LV (Légende Vivante)
Niveau 11: LV (Légende Vivante)
Prochain niv.: 88%
 
Messages: 745
Inscription: 29 Mar 2016, 01:22
Localisation: This account is no longer used.
Genre: Non spécifié
Calculatrice(s):
MyCalcs profile

Re: Patching 4.4.0.532 CAS to run on Non-CAS

Message non lude parrotgeek1 » 07 Fév 2017, 18:13

.
Dernière édition par parrotgeek1 le 05 Jan 2021, 19:59, édité 2 fois.
Avatar de l’utilisateur
parrotgeek1Programmeur
Niveau 11: LV (Légende Vivante)
Niveau 11: LV (Légende Vivante)
Prochain niv.: 88%
 
Messages: 745
Inscription: 29 Mar 2016, 01:22
Localisation: This account is no longer used.
Genre: Non spécifié
Calculatrice(s):
MyCalcs profile

Re: Patching 4.4.0.532 CAS to run on Non-CAS

Message non lude parrotgeek1 » 07 Fév 2017, 22:48

.
Dernière édition par parrotgeek1 le 05 Jan 2021, 19:59, édité 1 fois.
Avatar de l’utilisateur
parrotgeek1Programmeur
Niveau 11: LV (Légende Vivante)
Niveau 11: LV (Légende Vivante)
Prochain niv.: 88%
 
Messages: 745
Inscription: 29 Mar 2016, 01:22
Localisation: This account is no longer used.
Genre: Non spécifié
Calculatrice(s):
MyCalcs profile

Re: Patching 4.4.0.532 CAS to run on Non-CAS

Message non lude critor » 07 Fév 2017, 23:08

I'd prefer keeping the current header format.

I already have to deal with images using both the official TI-Certificate format (Boot2, Boot1.5, Diags...), and 2 different "hacks" of this format for runnable nBoot images (ControlX, Linux... I would have done things differently).

Adding a 4th version of the header is a bad thing, for evident safety reasons.

Also, in some situations, ControlX is requiring several informations (like the version and/or type of the image and also the targetted hardware). Starting to use a lighter header will only make us run into problems later.

What's the problem anyway ? Because there is nothing more complicated that the size you're already mentioning in the current format.

You just need to copy a Boot2/Diags header and change 2 sizes :
- the 0x8070 field size (which is exactly your raw OS size)
- the 0x8000 field size (from byte #6 to the end of the file)

And we can always make some little tool auto-generating this.
Image
Avatar de l’utilisateur
critorAdmin
Niveau 19: CU (Créateur Universel)
Niveau 19: CU (Créateur Universel)
Prochain niv.: 41.4%
 
Messages: 41455
Images: 14353
Inscription: 25 Oct 2008, 00:00
Localisation: Montpellier
Genre: Homme
Calculatrice(s):
MyCalcs profile
YouTube: critor3000
Twitter/X: critor2000
GitHub: critor

PrécédenteSuivante

Retourner vers Native: Ndless, Linux, ...

Qui est en ligne

Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 5 invités

-
Rechercher
-
Social TI-Planet
-
Sujets à la une
Comparaisons des meilleurs prix pour acheter sa calculatrice !
Aidez la communauté à documenter les révisions matérielles en listant vos calculatrices graphiques !
Phi NumWorks jailbreak
123
-
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.
871 utilisateurs:
>844 invités
>22 membres
>5 robots
Record simultané (sur 6 mois):
6892 utilisateurs (le 07/06/2017)
-
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)