Go Back  
Reply
 
Thread Tools
Old 01-24-2013   #61
digiprog
Member
 
digiprog's Avatar
 
Join Date: Nov 2012
Location: tripoli, lebanon
Posts: 208
Likes: 59
Liked 33 Times in 27 Posts
Mentioned: 8 Post(s)
Tagged: 0 Thread(s)
it would be beautiful to implement it with WxWigets wish i knew how
__________________
NOR Downgrade service in Tripoli, Lebanon: Here
My facebook account: Here
digiprog is offline   Reply With Quote
Old 01-24-2013   #62
GregoryRasputin
 
GregoryRasputin's Avatar
 
Join Date: Jan 2008
Posts: 14,444
Likes: 8,177
Liked 14,535 Times in 5,570 Posts
Mentioned: 1314 Post(s)
Tagged: 3 Thread(s)
[Released] Simple Code To Help Checking NOR Dumps

PS3HaX Memberanariahas compiled a code to help... [Read More]
GregoryRasputin is online now   Reply With Quote
Likes: (3)
Old 01-24-2013   #63
anaria
Homebrew Developer
 
anaria's Avatar
 
Join Date: Feb 2009
Posts: 80
Likes: 34
Liked 93 Times in 27 Posts
Mentioned: 16 Post(s)
Tagged: 0 Thread(s)
Big days ahead!
I'll work more on the reliability and robustness of for a time.
For now I'm adding some more checking in revocation and ros areas for unique bytes, I'll rework the warning messages a bit as well.
And regarding binaries, I'll check more about MinGW32 about static options, I'm not sure what I did yesterday but I have different behaviour between the Mac and Windows version... But again all of you are welcome to fork it, port it to another language make a GUI, whatever you want, but please keep it open to ensure everyone can fully benefit of your experience, it's for me very frustrating to have a tool doing things on my files without knowing what is under the hood.
See you then, and thanks again to all of you who are testing/reporting/giving advices ...
anaria is offline   Reply With Quote
Likes: (5)
Old 01-24-2013   #64
anaria
Homebrew Developer
 
anaria's Avatar
 
Join Date: Feb 2009
Posts: 80
Likes: 34
Liked 93 Times in 27 Posts
Mentioned: 16 Post(s)
Tagged: 0 Thread(s)
Originally Posted by Sarah1331 View Post
any chance of if it failes at any part to go to a YOUR DUMP HAS FAILED

as when testing deadeeef rather than deadbeef it shows error but at end it says

seems good but evedu............................


or with option to repair generic
Then again if generic is bad who knows..
You seem to be the one to torture me :P

No really I'm grateful for your tests and feedback, appreciate that a lot.

I'll need you to give me more detail, you may PM me part of the output and what you would expect to see ( I sware I will not give your secrets to others :D)

I've used the RSOD dump from ps3devwiki and changed the FACE0FF DEADBEEF see what it says to me:
******************************
* NOR Dump Tool *
******************************

Version 0.9.6

Open source project aimed to help to validate PS3 NOR dumps
At the moment (January 2013) the code is probably able
to give you a validation status of roughly 95%!?
It's anyway better to do additional checking by your own,
unless the code of this tool is fully validated by experts!!!

******************************
* Statistics *
******************************
Bytes '00' found 4414254 times, 26.31% Good
Bytes 'FF' found 1766242 times, 10.53% Too High
Other bytes found 44455 times maximum, 0.26% Good
******************************
* Generic Data *
******************************
Section: Flash Magic Number : read 000000000FACE0FF00000000DEADDEEF ! mismatch pattern '000000000FACE0FF00000000DEADBEEF' !
Some checking were not successful.
You may need to check further your dump.
But fortunately for the Generic section of the NOR it may be fixed.
******************************
* Per Console Data *
******************************
Section: mtldr size and rev : read 00000E8943B6EF4AE20F7400C8809E53
Section: mtldr size and pcn : read 00000E89Censored :P
Section: EID0 - IDPS : read Censored :P
Section: EID0 static : read 0012000B
Section: EID0 pcn : read Censored :P
Section: EID3 - ckp_mgt_id : read Censored :P
Section: EID3 static : read 000100D0
Section: EID3 pcn : read Censored :P
Section: EID5 - IDPS : read Censored :P
Section: EID5 static : read 00120730
Section: EID5 pcn : read Censored :P
Section: PS3 MAC Address : read Censored :P
Section: cISD1 - CID : read Censored :P
Section: cISD1 - eCID : read Censored :P
Section: cISD1 - board_id : read Censored :P
Section: cISD1 - kiban_id : read Censored :P
Section: cISD1 -0x3F0A4 Data: read 007900790106
Section: cISD1 -0x3F0B0 Data: read 0002001100020012
Section: cISD1 - ckp_mgt_id : read Censored :P
Section: cvtrm - pck/puk : read Censored :P
Section: HDD information : read TOSHIBA Censored :P
Section: PS3 Serial Number : read Censored :P
Section: Bootldr hdr and rev: read 00002EB392AC2C2157A577C84DDFECDB
Section: Bootldr hdr and pcn: read 00002EBCensored :P
Section: cvtrm hdr bis : read FFFFFFFF ! mismatch pattern '5654524D' !
PS3 SKU : CECHLxx(VER-001) minimum FW : 2.45 (item 29 in list)
Some checking were not successful.
You may need to check further your dump.
Be cautious, flashing this one may lead to a brick of your PS3.
******************************
* Area filled with 00 or FF *
******************************
debug: trvk_pkg0Size:'0x000002E0' trvk_pkg0FilledSize:'0x00000D00'
debug: ros0Size:'0x0053CC88' ros0FilledSize:'0x001C3378'
Succesfully checked 'flashformat' From '0x00000210' size: '0x000001F0' full of '0xFF'
Succesfully checked 'asecure_loader' From '0x0000F110' size: '0x0001FEF0' full of '0x00'
Succesfully checked 'eEID' From '0x00030DD0' size: '0x0000E230' full of '0xFF'
Succesfully checked 'cISD' From '0x0003F270' size: '0x00000590' full of '0xFF'
Succesfully checked 'cCSD' From '0x0003F850' size: '0x000007B0' full of '0xFF'
Succesfully checked 'trvk_prg0' From '0x00040FF0' size: '0x0001F010' full of '0xFF'
Succesfully checked 'trvk_prg1' From '0x00060FF0' size: '0x0001F010' full of '0xFF'
Succesfully checked 'trvk_pkg0' From '0x00080FF0' size: '0x0001F010' full of '0xFF'
Succesfully checked 'trvk_pkg1' From '0x000A0FF0' size: '0x0001F010' full of '0xFF'
Succesfully checked 'CELL_EXTNOR_AREA' From '0x00F20040' size: '0x000001C0' full of '0x00'
Succesfully checked 'CELL_EXTNOR_AREA' From '0x00F20240' size: '0x0001FDC0' full of '0x00'
Succesfully checked 'CELL_EXTNOR_AREA' From '0x00F40030' size: '0x0001FFD0' full of '0x00'
Succesfully checked 'CELL_EXTNOR_AREA' From '0x00F60060' size: '0x000093A0' full of '0x00'
Succesfully checked 'CELL_EXTNOR_AREA' From '0x00F69530' size: '0x000006D0' full of '0x00'
Succesfully checked 'CELL_EXTNOR_AREA' From '0x00F69C00' size: '0x00015400' full of '0xFF'
Succesfully checked 'CELL_EXTNOR_AREA' From '0x00F80030' size: '0x0001FFD0' full of '0x00'
Succesfully checked 'CELL_EXTNOR_AREA' From '0x00FA0060' size: '0x000093A0' full of '0x00'
Succesfully checked 'CELL_EXTNOR_AREA' From '0x00FA9530' size: '0x000006D0' full of '0x00'
Succesfully checked 'CELL_EXTNOR_AREA' From '0x00FA9C00' size: '0x00015400' full of '0xFF'
Succesfully checked 'bootldr' From '0x00FEEB70' size: '0x00011490' full of '0xFF'
Seems good, but you'd eventually like to be carefull!

I've chosen to display such message "Some checking were not successful.
You may need to check further your dump.
But fortunately for the Generic section of the NOR it may be fixed." for any error in the generic part, because it can be fixed wihtout the need to decrypt/encrypt anything as in opposition of the per console area and as they are generic they can be replaced by existing information, of course if you know what you are doing it's better.

At the end what I understand, is that you'd like to see in the final report one and unique message giving a global PASS/FAIL to this, no?
anaria is offline   Reply With Quote
Likes: (1)
Old 01-25-2013   #65
defyboy
Member
 
Join Date: Jan 2011
Posts: 161
Likes: 4
Liked 260 Times in 93 Posts
Mentioned: 52 Post(s)
Tagged: 0 Thread(s)
Thank you for this most useful tool, I'm glad my painstaking reverse engineering and documentation came in handy for someone.

I would like to upload this to the wiki's download section if you don't mind.

Also, just a comment on checking the 0x00 and 0xFF areas, I have a few samples where areas that usually are 0xFF are indeed 0x00. I am not sure what conditions cause this but I assume it's from different boundaries from previous firmwares.

Basically, areas that are 0xFF will be so because NOR flash memory in it's "erased" state contains all 1's, a write operation is able to change a 1 to a 0 however a block erase operation is required to revert 0's to 1's. Areas that are 0x00 are simply where blank data has been written over an erased block, usually to fill up a boundary.

As for a final report, it would be nice to give a pass or warnings on what specific parts of flash are incorrect.
__________________
I am not a developer. That doesn't mean I don't know what i'm talking about.

Last edited by defyboy; 01-25-2013 at 12:53 AM.
defyboy is offline   Reply With Quote
Likes: (1)
Old 01-25-2013   #66
Sarah1331
Senior Member
 
Sarah1331's Avatar
 
Join Date: Oct 2012
Posts: 1,694
Likes: 357
Liked 402 Times in 318 Posts
Mentioned: 319 Post(s)
Tagged: 0 Thread(s)
I understand the generic section can be fixed am just not too sure how good of an idea it is as your dump should have no errors if you have an error anywhere I'd trash it

I use a 25xx dump and create errors to test your checker i feel if an error has occurred it should halt and "Your dump is bad" at any point even if it could be repaired

As most users won't read anything except seems good but you would eventually want to check

As let's be fair if they have a error in generic data something in the wiring / clip is wrong


Maybe for a passed dump
Your dump is valid

You may still want to do more tests

But for any fail even the smallest id flag it as junk


Sent from my iPhone 5 using Tapatalk
Sarah1331 is offline   Reply With Quote
Old 01-25-2013   #67
Dolnor
Apprentice
null
 
Dolnor's Avatar
 
Join Date: Dec 2011
Posts: 25
Likes: 3
Liked 5 Times in 4 Posts
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Thank you, compiled for Mac and finally checked my dump.
Appears to be ok as per this utility:

******************************
* Generic Data *
******************************
Seems good, but you'd eventually like to be carefull!
Dolnor is offline   Reply With Quote
Old 01-25-2013   #68
Arcidodo
Apprentice
 
Join Date: Jan 2011
Posts: 9
Likes: 0
Liked 2 Times in 1 Post
Mentioned: 1 Post(s)
Tagged: 0 Thread(s)
C:\Users\administrator\Desktop\anaria_norvalidator 0.9.5>NORDumpTool.exe bkpps3.bin
******************************
* NOR Dump Tool *
******************************

Version 0.9.5

Open source project aimed to help to validate PS3 NOR dumps
At the moment (January 2013) the code is probably able
to give you a validation status of roughly 90%!?
It's anyway better to do additional checking by your own,
unless the code of this tool is fully validated by experts!!!

******************************
* Statistics *
******************************
Bytes '00' found 3367078 times, 20.07% Good
Bytes 'FF' found 1754725 times, 10.46% Good
Other bytes found 48187 times maximum, 0.29% Good
Not treating byte reversed dump at the moment.

C:\Users\administrator\Desktop\anaria_norvalidator 0.9.5>

and with a broken one i get a lot more information. is this correct?
Arcidodo is offline   Reply With Quote
Old 01-25-2013   #69
nzie
Member
 
nzie's Avatar
 
Join Date: Oct 2011
Posts: 428
Likes: 1,246
Liked 42 Times in 38 Posts
Mentioned: 22 Post(s)
Tagged: 0 Thread(s)
Originally Posted by Arcidodo View Post
C:\Users\administrator\Desktop\anaria_norvalidator 0.9.5>NORDumpTool.exe bkpps3.bin
******************************
* NOR Dump Tool *
******************************

Version 0.9.5

Open source project aimed to help to validate PS3 NOR dumps
At the moment (January 2013) the code is probably able
to give you a validation status of roughly 90%!?
It's anyway better to do additional checking by your own,
unless the code of this tool is fully validated by experts!!!

******************************
* Statistics *
******************************
Bytes '00' found 3367078 times, 20.07% Good
Bytes 'FF' found 1754725 times, 10.46% Good
Other bytes found 48187 times maximum, 0.29% Good
Not treating byte reversed dump at the moment.

C:\Users\administrator\Desktop\anaria_norvalidator 0.9.5>

and with a broken one i get a lot more information. is this correct?
byte reversed ur dump 1st
nzie is offline   Reply With Quote
Old 01-25-2013   #70
anaria
Homebrew Developer
 
anaria's Avatar
 
Join Date: Feb 2009
Posts: 80
Likes: 34
Liked 93 Times in 27 Posts
Mentioned: 16 Post(s)
Tagged: 0 Thread(s)
Originally Posted by defyboy View Post
Thank you for this most useful tool, I'm glad my painstaking reverse engineering and documentation came in handy for someone.

I would like to upload this to the wiki's download section if you don't mind.

Also, just a comment on checking the 0x00 and 0xFF areas, I have a few samples where areas that usually are 0xFF are indeed 0x00. I am not sure what conditions cause this but I assume it's from different boundaries from previous firmwares.

Basically, areas that are 0xFF will be so because NOR flash memory in it's "erased" state contains all 1's, a write operation is able to change a 1 to a 0 however a block erase operation is required to revert 0's to 1's. Areas that are 0x00 are simply where blank data has been written over an erased block, usually to fill up a boundary.

As for a final report, it would be nice to give a pass or warnings on what specific parts of flash are incorrect.
You're most welcome. But You are the one who deserves the thanks

Of course, please do upload it it's my pleasure, if this is confirmed to definitely be useful I hope it can profit to all of us.

You exactly confirm what I was scared of, this seems to be the problem in ros/revocation ...
This means that I'll have to find a routine to check these areas for both cases, in which case I should check if we have only 00 or only FF but never other value.

I worked on below draft but it cannot be valid in all cases.
Code:
uint8_t CheckFilledData (FILE *FileToRead, uint32_t *PercentCheck){
	int Cursor=0;
	int Cursor2=0;
	uint32_t SizedCheck=0;
	uint8_t Status=EXIT_SUCCESS;
	uint8_t Status2=EXIT_SUCCESS;
	uint32_t bootldrSize;
	uint32_t bootldrFilledSize;
	uint32_t metldrSize;
	uint32_t metldrFilledSize;
	uint32_t trvk_prg0Size;
	uint32_t trvk_prg0FilledSize;
    uint32_t trvk_prg1Size;
	uint32_t trvk_prg1FilledSize;
    uint32_t trvk_pkg0Size;
	uint32_t trvk_pkg0FilledSize;
    uint32_t trvk_pkg1Size;
	uint32_t trvk_pkg1FilledSize;
    uint32_t ros0Size;
	uint32_t ros0FilledSize;
    uint32_t ros1Size;
	uint32_t ros1FilledSize;

    uint32_t LastFileTOC;
    uint32_t LastFileOffset;
    uint32_t LastFileSize;

    char *DataRead;

	char *metldrOffset0;
	char *bootldrOffset0;
	char *trvk_prg0Offset0;
    char *trvk_prg1Offset0;
    char *trvk_pkg0Offset0;
    char *trvk_pkg1Offset0;
	//    char *ros0Offset0;
	//    char *ros1Offset0;
    //uint32_t ros0Offset0;
    //uint32_t ros1Offset0;

	DataRead = malloc(0x10);

	metldrOffset0  = malloc(5);
	bootldrOffset0  = malloc(5);
	trvk_prg0Offset0 = malloc(5);
    trvk_prg1Offset0 = malloc(5);
    trvk_pkg0Offset0 = malloc(5);
    trvk_pkg1Offset0 = malloc(5);
	//    ros0Offset0 = malloc(5);
	//    ros1Offset0 = malloc(5);

	printf("******************************\n");
	printf("* Area filled with 00 or FF  *\n");
	printf("******************************\n");

	GetSection(FileToRead, SectionTOC[asecure_loader].Offset+0x42, 0x02, HexaType, metldrOffset0);	
	metldrSize = (strtol(metldrOffset0,NULL,16))*0x10+0x40;
	metldrFilledSize = 0x2F000 - metldrSize - SectionTOC[asecure_loader].Offset - 0x40;

	GetSection(FileToRead, SectionTOC[bootldr].Offset+0x02, 0x02, HexaType, bootldrOffset0);	
	bootldrSize = (strtol(bootldrOffset0,NULL,16))*0x10+0x40;
	bootldrFilledSize = 0x1000000 - bootldrSize - SectionTOC[bootldr].Offset;

	GetSection(FileToRead, SectionTOC[trvk_prg0].Offset+0x0E, 0x02, HexaType, trvk_prg0Offset0);
	trvk_prg0Size = strtol(trvk_prg0Offset0,NULL,16);
	trvk_prg0FilledSize = 0x040FF0 - trvk_prg0Size - SectionTOC[trvk_prg0].Offset - 0x10;
    printf("debug: trvk_prg0Size:'0x%08X' trvk_prg0FilledSize:'0x%08X' \n",trvk_prg0Size,trvk_prg0FilledSize);
	
	GetSection(FileToRead, SectionTOC[trvk_prg1].Offset+0x0E, 0x02, HexaType, trvk_prg1Offset0);
	trvk_prg1Size = strtol(trvk_prg1Offset0,NULL,16);
	trvk_prg1FilledSize = 0x060FF0 - trvk_prg1Size - SectionTOC[trvk_prg1].Offset - 0x10;
    printf("debug: trvk_prg1Size:'0x%08X' trvk_prg1FilledSize:'0x%08X' \n",trvk_prg1Size,trvk_prg1FilledSize);
	
	GetSection(FileToRead, SectionTOC[trvk_pkg0].Offset+0x0E, 0x02, HexaType, trvk_pkg0Offset0);
	trvk_pkg0Size = strtol(trvk_pkg0Offset0,NULL,16);
	trvk_pkg0FilledSize = 0x080FF0 - trvk_pkg0Size - SectionTOC[trvk_pkg0].Offset - 0x10;
    printf("debug: trvk_pkg0Size:'0x%08X' trvk_pkg0FilledSize:'0x%08X' \n",trvk_pkg0Size,trvk_pkg0FilledSize);
	
	GetSection(FileToRead, SectionTOC[trvk_pkg1].Offset+0x0E, 0x02, HexaType, trvk_pkg1Offset0);
	trvk_pkg1Size = strtol(trvk_pkg1Offset0,NULL,16);
	trvk_pkg1FilledSize = 0x0A0FF0 - trvk_pkg1Size - SectionTOC[trvk_pkg1].Offset - 0x10;
    printf("debug: trvk_pkg1Size:'0x%08X' trvk_pkg1FilledSize:'0x%08X' \n",trvk_pkg1Size,trvk_pkg1FilledSize);
	//at ros0 offset + 0x14: nb of files, (nb of files) * 0x30 = size of TOC
    GetSection(FileToRead, SectionTOC[ros0].Offset+0x14, 0x04, HexaType, DataRead);
	LastFileTOC = (strtol(DataRead,NULL,16))*0x30-0x10;
	//last file position found at (ros0 offset) + (size of TOC) - 0x10
    GetSection(FileToRead, SectionTOC[ros0].Offset+LastFileTOC, 0x08, HexaType, DataRead);
    LastFileOffset = strtol(DataRead,NULL,16);
	//+ 0x8 for its size.
    GetSection(FileToRead, SectionTOC[ros0].Offset+LastFileTOC+0x08, 0x08, HexaType, DataRead);
    LastFileSize = strtol(DataRead,NULL,16);
    ros0Size = 0x10 + LastFileOffset + LastFileSize;
	//From end of last file pos + size to next section - 0x10 : full of 00
    //last 0x10 bytes are full of FF !!??
    ros0FilledSize = SectionTOC[ros1].Offset - SectionTOC[ros0].Offset - ros0Size -0x10;
    //printf("debug: ros0Size:'0x%08X' ros0FilledSize:'0x%08X' \n",ros0Size,ros0FilledSize);

	//at ros1 offset + 0x14: nb of files, (nb of files) * 0x30 = size of TOC
    GetSection(FileToRead, SectionTOC[ros1].Offset+0x14, 0x04, HexaType, DataRead);
	LastFileTOC = (strtol(DataRead,NULL,16))*0x30-0x10;
	//last file position found at (ros1 offset) + (size of TOC) - 0x10
    GetSection(FileToRead, SectionTOC[ros1].Offset+LastFileTOC, 0x08, HexaType, DataRead);
    LastFileOffset = strtol(DataRead,NULL,16);
	//+ 0x8 for its size.
    GetSection(FileToRead, SectionTOC[ros1].Offset+LastFileTOC+0x08, 0x08, HexaType, DataRead);
    LastFileSize = strtol(DataRead,NULL,16);
    ros1Size = 0x10 + LastFileOffset + LastFileSize;
	//From end of last file pos + size to next section - 0x10 : full of 00
    //last 0x10 bytes are full of FF !!??
    ros1FilledSize = SectionTOC[cvtrm].Offset - SectionTOC[ros1].Offset - ros1Size -0x10;
    //printf("debug: ros1Size:'0x%08X' ros1FilledSize:'0x%08X' \n",ros1Size,ros1FilledSize);

	struct Sections SectionFilled[] = {
		{"flashformat", 0x000210, 0x01F0, HexaType+DisplayFailOnly, 1, "FF"},
		{"asecure_loader", SectionTOC[asecure_loader].Offset+0x40+metldrSize, metldrFilledSize, HexaType+DisplayFailOnly, 1, "00"},
		{"eEID", 0x030DD0, 0xE230, HexaType+DisplayFailOnly, 1, "FF"},
		{"cISD", 0x03F270, 0x0590, HexaType+DisplayFailOnly, 1, "FF"},
		{"cCSD", 0x03F850, 0x07B0, HexaType+DisplayFailOnly, 1, "FF"},

		// need to investigate size at trvk_prg0 offset + 0x0E
		// until 40FF0 : 00
		// from 40FF0 to next section : FF

		{"trvk_prg0", SectionTOC[trvk_prg0].Offset+0x10+trvk_prg0Size, trvk_prg0FilledSize, HexaType+DisplayFailOnly, 1, "00"},
		{"trvk_prg0", 0x040FF0, 0x01F010, HexaType+DisplayFailOnly, 1, "FF"},
        {"trvk_prg1", SectionTOC[trvk_prg1].Offset+0x10+trvk_prg1Size, trvk_prg1FilledSize, HexaType+DisplayFailOnly, 1, "00"},
        {"trvk_prg1", 0x060FF0, 0x01F010, HexaType+DisplayFailOnly, 1, "FF"},
		{"trvk_pkg0", SectionTOC[trvk_pkg0].Offset+0x10+trvk_pkg0Size, trvk_pkg0FilledSize, HexaType+DisplayFailOnly, 1, "00"},
        {"trvk_pkg0", 0x080FF0, 0x01F010, HexaType+DisplayFailOnly, 1, "FF"},
		{"trvk_pkg1", SectionTOC[trvk_pkg1].Offset+0x10+trvk_pkg1Size, trvk_pkg1FilledSize, HexaType+DisplayFailOnly, 1, "00"},
        {"trvk_pkg1", 0x0A0FF0, 0x01F010, HexaType+DisplayFailOnly, 1, "FF"},

		{"ros0", SectionTOC[ros0].Offset + ros0Size, ros0FilledSize, HexaType+DisplayFailOnly, 1, "00"},  // need to investigate
		{"ros0", SectionTOC[ros0].Offset + ros0Size + ros0FilledSize, 0x10, HexaType+DisplayFailOnly, 1, "FF"},  // need to investigate
		{"ros1", SectionTOC[ros1].Offset + ros1Size, ros1FilledSize, HexaType+DisplayFailOnly, 1, "00"},  // need to investigate
		{"ros1", SectionTOC[ros1].Offset + ros1Size + ros1FilledSize, 0x10, HexaType+DisplayFailOnly, 1, "FF"},  // need to investigate
		//{"cvtrm", 0xECxxxx, 0x0xxxxx, HexaType+DisplayFailOnly, 1, "00"},  // need to investigate
		{"CELL_EXTNOR_AREA", 0xF20040, 0x01C0, HexaType+DisplayFailOnly, 1, "00"},
		{"CELL_EXTNOR_AREA", 0xF20240, 0x01FDC0, HexaType+DisplayFailOnly, 1, "00"},
		{"CELL_EXTNOR_AREA", 0xF40030, 0x01FFD0, HexaType+DisplayFailOnly, 1, "00"},
		{"CELL_EXTNOR_AREA", 0xF60060, 0x93A0, HexaType+DisplayFailOnly, 1, "00"}, // need to calculate the correct start, size seems to be found at 0xF60000E on 2 bytes ?
		{"CELL_EXTNOR_AREA", 0xF69530, 0x06D0, HexaType+DisplayFailOnly, 1, "00"},
		{"CELL_EXTNOR_AREA", 0xF69C00, 0x015400, HexaType+DisplayFailOnly, 1, "FF"},
		{"CELL_EXTNOR_AREA", 0xF80030, 0x01FFD0, HexaType+DisplayFailOnly, 1, "00"},
		{"CELL_EXTNOR_AREA", 0xFA0060, 0x93A0, HexaType+DisplayFailOnly, 1, "00"}, // need to calculate the correct start, size seems to be found at 0xFA0000E on 2 bytes ?
		{"CELL_EXTNOR_AREA", 0xFA9530, 0x06D0, HexaType+DisplayFailOnly, 1, "00"},
		{"CELL_EXTNOR_AREA", 0xFA9C00, 0x015400, HexaType+DisplayFailOnly, 1, "FF"},
		{"bootldr", SectionTOC[bootldr].Offset+bootldrSize, bootldrFilledSize, HexaType+DisplayFailOnly, 1, "FF"},
		{NULL, 0, 0, 0, 0, NULL}
	};

	while (SectionFilled[Cursor].name!=NULL) {
		for (Cursor2=0;Cursor2<SectionFilled[Cursor].Size;Cursor2++) {
			if ((Status2 = ReadSection(SectionFilled[Cursor].name
				, FileToRead
				, SectionFilled[Cursor].Offset+Cursor2
				, 1
				, SectionFilled[Cursor].DisplayType
				, SectionFilled[Cursor].Check
				, SectionFilled[Cursor].Pattern))) {
					printf ("Error at '0x%08X\n",SectionFilled[Cursor].Offset+Cursor2);
			}
			
		}
		if (!Status2) {
			printf ("Succesfully checked '%s' From '0x%08X' size: '0x%08X' full of '0x%s'\n",SectionFilled[Cursor].name,SectionFilled[Cursor].Offset, SectionFilled[Cursor].Size, SectionFilled[Cursor].Pattern);
		}
		else {
			printf ("Some error occured when checking '%s'\n",SectionFilled[Cursor].name);
		}
		Cursor++;
		Status = Status | Status2;
		Status2 = EXIT_SUCCESS;
		SizedCheck = SizedCheck + SectionFilled[Cursor].Size;
	}
	//printf("debug: SectionTOC[trvk_prg0].Offset:'0x%08X' SectionTOC[trvk_prg0].Offset+0x10+trvk_prg0Size:'0x%08X' trvk_pkg0FilledSize:'0x%08X'\n",SectionTOC[trvk_prg0].Offset,SectionTOC[trvk_prg0].Offset+0x10+trvk_prg0Size,trvk_pkg0FilledSize);

	*PercentCheck = SizedCheck;

    free(DataRead);
	free(metldrOffset0);
	free(bootldrOffset0);
    free(trvk_prg0Offset0);
    free(trvk_prg1Offset0);
    free(trvk_pkg0Offset0);
    free(trvk_pkg1Offset0);
    //free(ros0Offset0);
    //free(ros1Offset0);

	return Status;
}
@Sarah1331 I've started to include a global status which should raise a FAIL or PASS after tests are completed.
At the same time I may include a percentage indicating on how much exactly of the NOR has been analyzed.
BTW it is for now exactly checking 30.56% of the NOR's bytes.

@Arcidodo & @nzie , Yep I was too lazy to treat both cases, also I was thinking that reversing is done fast and easily with good tools.

As I mentioned before, I'll do the improvement as far as I can go then document it in accordence to the wiki.
And then I'll have to do 2 things:
- port it for NAND
- evolve it for both bytes order

and I don't know what else...

Last edited by anaria; 01-25-2013 at 05:00 AM. Reason: Typo
anaria is offline   Reply With Quote
Likes: (4)
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



PS3Hax.net is Copyright © 2010-2013.
Use of this site is governed by our Terms of Use and Privacy Policy. All Trademarks and images are owned by their respected owners.
Posts and links are subject to each author on this forum and are no way affiliated with the operations and/or opinions of ps3hax.net
All times are GMT -5. The time now is 09:32 PM.