π
<-

[removed]

C, C++, ASM...

Re: Patching 4.4.0.532 CAS to run on Non-CAS

Unread postby parrotgeek1 » 05 Feb 2017, 04:08

.
Last edited by parrotgeek1 on 05 Jan 2021, 19:59, edited 1 time in total.
User avatar
parrotgeek1Programmeur
Niveau 11: LV (Légende Vivante)
Niveau 11: LV (Légende Vivante)
Level up: 88.2%
 
Posts: 748
Joined: 29 Mar 2016, 01:22
Location: This account is no longer used.
Gender: Not specified
Calculator(s):
MyCalcs profile

Re: Patching 4.4.0.532 CAS to run on Non-CAS

Unread postby critor » 06 Feb 2017, 19:25

Here is your patch ported for each CX Boot2 version :
Code: Select all
   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
User avatar
critorAdmin
Niveau 19: CU (Créateur Universel)
Niveau 19: CU (Créateur Universel)
Level up: 48%
 
Posts: 41981
Images: 15887
Joined: 25 Oct 2008, 00:00
Location: Montpellier
Gender: Male
Calculator(s):
MyCalcs profile
YouTube: critor3000
Twitter: critor2000
GitHub: critor

Re: Patching 4.4.0.532 CAS to run on Non-CAS

Unread postby parrotgeek1 » 06 Feb 2017, 20:34

.
Last edited by parrotgeek1 on 05 Jan 2021, 19:59, edited 1 time in total.
User avatar
parrotgeek1Programmeur
Niveau 11: LV (Légende Vivante)
Niveau 11: LV (Légende Vivante)
Level up: 88.2%
 
Posts: 748
Joined: 29 Mar 2016, 01:22
Location: This account is no longer used.
Gender: Not specified
Calculator(s):
MyCalcs profile

Re: Patching 4.4.0.532 CAS to run on Non-CAS

Unread postby critor » 06 Feb 2017, 20:51

parrotgeek1 wrote: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
User avatar
critorAdmin
Niveau 19: CU (Créateur Universel)
Niveau 19: CU (Créateur Universel)
Level up: 48%
 
Posts: 41981
Images: 15887
Joined: 25 Oct 2008, 00:00
Location: Montpellier
Gender: Male
Calculator(s):
MyCalcs profile
YouTube: critor3000
Twitter: critor2000
GitHub: critor

Re: Patching 4.4.0.532 CAS to run on Non-CAS

Unread postby parrotgeek1 » 06 Feb 2017, 21:52

.
Last edited by parrotgeek1 on 05 Jan 2021, 19:59, edited 1 time in total.
User avatar
parrotgeek1Programmeur
Niveau 11: LV (Légende Vivante)
Niveau 11: LV (Légende Vivante)
Level up: 88.2%
 
Posts: 748
Joined: 29 Mar 2016, 01:22
Location: This account is no longer used.
Gender: Not specified
Calculator(s):
MyCalcs profile

Re: Patching 4.4.0.532 CAS to run on Non-CAS

Unread postby critor » 07 Feb 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
User avatar
critorAdmin
Niveau 19: CU (Créateur Universel)
Niveau 19: CU (Créateur Universel)
Level up: 48%
 
Posts: 41981
Images: 15887
Joined: 25 Oct 2008, 00:00
Location: Montpellier
Gender: Male
Calculator(s):
MyCalcs profile
YouTube: critor3000
Twitter: critor2000
GitHub: critor

Re: Patching 4.4.0.532 CAS to run on Non-CAS

Unread postby parrotgeek1 » 07 Feb 2017, 03:45

.
Last edited by parrotgeek1 on 05 Jan 2021, 19:59, edited 1 time in total.
User avatar
parrotgeek1Programmeur
Niveau 11: LV (Légende Vivante)
Niveau 11: LV (Légende Vivante)
Level up: 88.2%
 
Posts: 748
Joined: 29 Mar 2016, 01:22
Location: This account is no longer used.
Gender: Not specified
Calculator(s):
MyCalcs profile

Re: Patching 4.4.0.532 CAS to run on Non-CAS

Unread postby parrotgeek1 » 07 Feb 2017, 18:13

.
Last edited by parrotgeek1 on 05 Jan 2021, 19:59, edited 2 times in total.
User avatar
parrotgeek1Programmeur
Niveau 11: LV (Légende Vivante)
Niveau 11: LV (Légende Vivante)
Level up: 88.2%
 
Posts: 748
Joined: 29 Mar 2016, 01:22
Location: This account is no longer used.
Gender: Not specified
Calculator(s):
MyCalcs profile

Re: Patching 4.4.0.532 CAS to run on Non-CAS

Unread postby parrotgeek1 » 07 Feb 2017, 22:48

.
Last edited by parrotgeek1 on 05 Jan 2021, 19:59, edited 1 time in total.
User avatar
parrotgeek1Programmeur
Niveau 11: LV (Légende Vivante)
Niveau 11: LV (Légende Vivante)
Level up: 88.2%
 
Posts: 748
Joined: 29 Mar 2016, 01:22
Location: This account is no longer used.
Gender: Not specified
Calculator(s):
MyCalcs profile

Re: Patching 4.4.0.532 CAS to run on Non-CAS

Unread postby critor » 07 Feb 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
User avatar
critorAdmin
Niveau 19: CU (Créateur Universel)
Niveau 19: CU (Créateur Universel)
Level up: 48%
 
Posts: 41981
Images: 15887
Joined: 25 Oct 2008, 00:00
Location: Montpellier
Gender: Male
Calculator(s):
MyCalcs profile
YouTube: critor3000
Twitter: critor2000
GitHub: critor

PreviousNext

Return to Native: Ndless, Linux, ...

Who is online

Users browsing this forum: ClaudeBot [spider] and 3 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.
778 utilisateurs:
>764 invités
>6 membres
>8 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)