Omnimaga

Calculator Community => Other Calculators => Topic started by: critor on December 23, 2010, 04:18:25 pm

Title: TI-Nspire SD card
Post by: critor on December 23, 2010, 04:18:25 pm
Hi,


Does anybody know anything about the TI-Nspire SD card ?

All TI-Nspire diagnostic softwares 1.1 to 2.0 have an option to test for a SD card (which fails).

HackSpire is also mentionning SD I/O ports at 0xAC000000.
http://hackspire.unsads.com/wiki/index.php/Memory-mapped_I/O_ports#AC000000_-_SD_Host_Controller


Of course,like you I can't see any SD card reader on my TI-Nspire.

So what's all this about?


* Unused code which was not removed from Nucleus?
* Used while exchanging data though the dock connector with the Docking Station, or the wireless craddle?
* Used to interface through usb or through the dock connector with an external SD card reader which has not been released yet (or is only used in factories to program the Flash during production, or to diagnose returned TI-Nspire) ?
* something else?...


Thank you.



(http://i33.servimg.com/u/f33/13/23/13/53/diags029.jpg)
Title: Re: TI-Nspire SD card
Post by: jnesselr on December 23, 2010, 04:26:47 pm
I would think it's probably something along the lines of a test feature. Not sure, though. I would think it would write diagnostics to the sd card for later reading or something. Maybe there is a spare connector port or they have a usb adaptor or something.
Title: Re: TI-Nspire SD card
Post by: qazz42 on December 24, 2010, 01:02:14 pm
The nspire has a SD card? Holy crap, never knew that... and to add to this unconstructive post, no I sadly no nothing :(
Title: Re: TI-Nspire SD card
Post by: jnesselr on December 24, 2010, 01:51:21 pm
The nspire has a SD card? Holy crap, never knew that... and to add to this unconstructive post, no I sadly no nothing :(
I don't think it has an SD card. It possibly has the software to support it, just not the hardware.  We would have to see what the code does when run to see if it actually does anything useful or otherwise.
Title: Re: TI-Nspire SD card
Post by: fb39ca4 on December 24, 2010, 05:08:17 pm
Could possibly go Through the dock connector.
Probably another unimplemented feature, like how there's a 24bit mode in the LCD controller.
Title: Re: TI-Nspire SD card
Post by: TIfanx1999 on December 26, 2010, 01:20:53 pm
It's possible it was a (hardware)feature that was initially planned and then scrapped. However, no one bothered to remove the code for it.
Title: Re: TI-Nspire SD card
Post by: Goplat on December 26, 2010, 01:29:27 pm
* Used to interface through usb or through the dock connector with an external SD card reader which has not been released yet (or is only used in factories to program the Flash during production, or to diagnose returned TI-Nspire) ?

I think this is it. See some of the strings in DIAGS:

Code: [Select]
Test SD MMC Manu
Iris Nspire Diag Menu
 Pass   
No test
Pass - Press UP Arrow Key
Fail - Press DOWN Arrow Key
TI  Build Mode
Read MBR....
Read PBS....
Read DEF....
SDCard Update NorFlash Code
Please don't power off the device...
Search P3....
Search  Nor.Chk....
NOR     
Search  Nor.raw....
Copy Nor.raw to RAM....
                                   
       
Erasing the Norflash....
Copy RAM to Norflash ....
P3     
NAND   
Cann't Detect Sled !!
Don't power off the device!!
Insert Sled and Update code again...
Press ESC To Exit
Finished  percents ...
Finshed and Reset your device
SD Card Read Error
SDCard Update NandFlash Code
Search  Nand.Bin....
Erasing the Nand....
badblk
M OK! 
Copy Nand.bin to NandFlash ....
SetFile DEF ....
OK ....
Copy Nand  Data To SD Card
Verify SDCard Update NandFlash Code
Verify SDCard Update NorFlash Code
Comparing  Nor.raw with Norflash ....
Search  Nand.Chk....
Copy Nand.bin to RAM....
Skip Erase
         
M OK!           
Copy RAM to NandFlash ....
16M OK! 
SDCard Update Diagnostics
Search  Diag.chk....
DIAG   
Search  Diag.img....
Copy Diag.img to RAM....
Erasing old image....
OK!           
Updating image....
SDCard Run Test Program
Search  Test.chk....
TEST   
Search  Test.img....
Copy Test.img to RAM....
Launching Test Program....
Finished and Reset your device
Title: Re: TI-Nspire SD card
Post by: critor on December 26, 2010, 01:39:48 pm
Wonderfull Goplat!

I'm dreaming of seeing a photo of the TI-Nspire external SD card reader.


Do you think it is possible for us to build one?
I guess the data is being exchanged through the bottom connector, as there is no usb support at boot1 level (diagnostic software).
Title: Re: TI-Nspire SD card
Post by: jnesselr on December 26, 2010, 04:52:27 pm
what is the bottom connecter? Do we have an data about that?  It seems to me that it will want some special code to be present, unless TI didn't think we'd find this in the first place. How did we find the diagnostics menu again?
Title: Re: TI-Nspire SD card
Post by: critor on December 26, 2010, 04:57:03 pm
what is the bottom connecter? Do we have an data about that?  It seems to me that it will want some special code to be present, unless TI didn't think we'd find this in the first place. How did we find the diagnostics menu again?

Incomplete data is available on HackSpire.

The diagnostic software includes code to read/write the SD card, and to flash the NOR ROM.
We just have to check that.

To get the diagnostic menu, it's Esc+Menu+G (ClickPad) during boot1.

There is a diagnostic dumper somewhere on this forum.
Title: Re: TI-Nspire SD card
Post by: DJ Omnimaga on December 26, 2010, 05:00:52 pm
If only the Nspire had a SD card slot, it would be so much easier to transfer stuff and we would have much more space.

Also nice find Goplat. I kinda got worried personally that it was unused Nucleus code that TI didn't remove. I am sure there's plenty of that in the OS, though, just by seeing its file size...
Title: Re: TI-Nspire SD card
Post by: critor on December 26, 2010, 05:05:20 pm
I kinda got worried personally that it was unused Nucleus code that TI didn't remove.

The presence of flashing code in the diagnostic software (which is specific to the Nspire hardware) seems to prove the contrary. That flashing code was not forgotten but added.
Title: Re: TI-Nspire SD card
Post by: jnesselr on December 26, 2010, 05:48:16 pm
I kinda got worried personally that it was unused Nucleus code that TI didn't remove.

The presence of flashing code in the diagnostic software (which is specific to the Nspire hardware) seems to prove the contrary. That flashing code was not forgotten but added.
The question is then, why does TI need the flashing code?
Title: Re: TI-Nspire SD card
Post by: critor on December 26, 2010, 06:00:01 pm
I kinda got worried personally that it was unused Nucleus code that TI didn't remove.

The presence of flashing code in the diagnostic software (which is specific to the Nspire hardware) seems to prove the contrary. That flashing code was not forgotten but added.
The question is then, why does TI need the flashing code?

To flash?...

The answer has been mentionned severall times in the previous posts.
To write the OS code and/or the boot2 code from the external SD card into the NOR ROM.

I'm also remembering of some string which could mean it could even update the boot1 code in the NAND ROM with the one of the external SD card.
Title: Re: TI-Nspire SD card
Post by: jnesselr on December 26, 2010, 06:09:31 pm
I kinda got worried personally that it was unused Nucleus code that TI didn't remove.

The presence of flashing code in the diagnostic software (which is specific to the Nspire hardware) seems to prove the contrary. That flashing code was not forgotten but added.
The question is then, why does TI need the flashing code?

To flash?...

The answer has been mentionned severall times in the previous posts.
To write the OS code and/or the boot2 code from the external SD card into the NOR ROM.

I'm also remembering of some string which could mean it could even update the boot1 code in the NAND ROM with the one of the external SD card.
Oh okay, my bad.
Title: Re: TI-Nspire SD card
Post by: critor on December 26, 2010, 06:34:41 pm
Not a problem.


Here's an animated GIF I've posted here in july when we discovered all this.
You can see all SD/Flash related menus and screens.

Of course, everything is failing...

(http://i33.servimg.com/u/f33/13/23/13/53/nsmupd11.gif)


Seems the diagnostic software can even update itself, by looking for its replacement code on the external SD card...

So it can flash everything:
- NAND ROM (boot1)
- NOR ROM (boot2 + diagnostic + OS)


- NOR ROM (boot1)
- NAND ROM (boot2 + diagnostic + OS)
Title: Re: TI-Nspire SD card
Post by: calc84maniac on December 26, 2010, 06:48:25 pm
- NAND ROM (boot1)
- NOR ROM (boot2 + diagnostic + OS)
I think it's the other way around.
Title: Re: TI-Nspire SD card
Post by: critor on December 26, 2010, 06:53:24 pm
- NAND ROM (boot1)
- NOR ROM (boot2 + diagnostic + OS)
I think it's the other way around.

Edited. Thank you calc84maniac. :)
Title: Re: TI-Nspire SD card
Post by: jnesselr on December 26, 2010, 09:07:07 pm
okay, thank you. I get it a little better now. Why is there two boots, though?
Title: Re: TI-Nspire SD card
Post by: fb39ca4 on December 26, 2010, 09:10:59 pm
Boot1 immediately runs when the calc turns on, however, the nor rom cannot be very big, so boot2 handles decrypting the os.
Title: Re: TI-Nspire SD card
Post by: jnesselr on December 26, 2010, 09:23:44 pm
Boot1 immediately runs when the calc turns on, however, the nor rom cannot be very big, so boot2 handles decrypting the os.
It actually decrypts it each time? Wow, that's insane.  And the boot1 rom can't be erased, or can it?
Title: Re: TI-Nspire SD card
Post by: critor on December 26, 2010, 09:30:19 pm
And the boot1 rom can't be erased, or can it?

According to some diagnostic strings quoted above, it seems that it is possible for the diagnostic software to reprogram the boot1.
Title: Re: TI-Nspire SD card
Post by: jnesselr on December 26, 2010, 09:32:17 pm
And the boot1 rom can't be erased, or can it?

According to some diagnostic strings quoted above, it seems that it is possible for the diagnostic software to reprogram the boot1.
Excellent! Is boot1 checked at all for encryption or signatures?
Title: Re: TI-Nspire SD card
Post by: critor on December 26, 2010, 09:45:04 pm
And the boot1 rom can't be erased, or can it?

According to some diagnostic strings quoted above, it seems that it is possible for the diagnostic software to reprogram the boot1.
Excellent! Is boot1 checked at all for encryption or signatures?

I said it *seems*.
The diagnostic sofware is doing something with the NOR ROM (boot1).

I don't think that boot1 is being checked, but this would be a very dangerous way.
With a faulty boot1, your Nspire won't boot anymore... And this cannot be fixed.


We're currently not even able to correctly write a diagnostic software. Along with his "diagsdumper", ExtendeD made me beta-test a "diagswriter".
Tried on 2 calculators, success rate is 50%.
It worked perfectly on one calculator...
On the other one, whatever I did, the diagnostic software was not written correctly. The 2nd half of the written code was correct, but the 1st half was just crap.

There may be some kind of protection. Some memory pages might be write-protected, although it's strange it's worked once (and on a TouchPad - not an old calculator).

But writing a new diagnostic software is not dangerous. The Nspire can still boot without a diagnostic software.
Until we understand why, and find a way to make it work in all cases, I wouldn't try to write boot1/boot2 if I were you.
Title: Re: TI-Nspire SD card
Post by: jnesselr on December 26, 2010, 09:47:43 pm
I don't have an Nspire. I planned on getting one, but with this prizm now, I don't know.

But yeah, thanks.
Title: Re: TI-Nspire SD card
Post by: bsl on December 26, 2010, 10:47:46 pm
I was thinking of a boot2writer - so you can change boot2 1.4 to 1.1
I can test this on the emulator with the /1=boot1.raw , to see
if boot1 complains about a corrupted boot2.
Am I on the right path if I use the write_nand_page call?
Title: Re: TI-Nspire SD card
Post by: ExtendeD on December 27, 2010, 05:34:38 am
Here is a diags writer I wrote a while ago for Ndess v1.0 (OS 1.1): http://pastebin.com/iEgspQaB
After several tests we made with critor, it appears the write fails randomly for unknown reasons (garbage is written).