Interesting things in P01/P59 code

They go by many names, P01, P59, VPW, '0411 etc. Also covering E38 and newer here.
Post Reply
User avatar
NSFW
Posts: 679
Joined: Fri Feb 02, 2018 3:13 pm

Interesting things in P01/P59 code

Post by NSFW »

We'll start with the segment table. I'm using GM's definition of "segment" (engine, transmission, etc) not IDA's definition (RAM, ROM, etc).

At address 0x500, in both P01 and P59 files, you'll find a table like this:
SegmentTable.JPG
SegmentTable.JPG (108.91 KiB) Viewed 3487 times
That example is from a P59 (1mb) 2004 Corvette operating system, but there's also one in my P01 (512kb) 2002 Corvette's bin file. Most of the values are shown in hex, except for the operating system ID, which is in decimal. The operating system uses this table to validate checksums of each of the segments, presumably to guard against defects in the flash chip or errors in the reflash process.

At the start of each segment you'll find a header - this is the engine calibration segment from the same 2004 Corvette file:
EngineCalibrationSegmentHeader.JPG
EngineCalibrationSegmentHeader.JPG (38.5 KiB) Viewed 3487 times
All values are in hex except the calibration ID, which is shown in decimal and which is also present in the file as a null-terminated ASCII string.

If you're working on software that uses .bin files, you can use this information to find calibation IDs and to calculate or verify checksums. The first few versions of PCM Hammer had hard-coded segment addresses, which caused it to wrongly accuse some valid files of having bad checksums. The checksum code was rewritten to take advantage of this table in the bin file instead. Now that app itself doesn't know where the segments begin and end - but it doesn't need to, because it knows how to find that information inside the file itself.
Please don't PM me with technical questions - start a thread instead, and send me a link to it. That way I can answer in public, and help other people who have the same question. Thanks!
User avatar
NSFW
Posts: 679
Joined: Fri Feb 02, 2018 3:13 pm

reserved

Post by NSFW »

Reserved
Please don't PM me with technical questions - start a thread instead, and send me a link to it. That way I can answer in public, and help other people who have the same question. Thanks!
User avatar
NSFW
Posts: 679
Joined: Fri Feb 02, 2018 3:13 pm

reserved

Post by NSFW »

Reserved
Please don't PM me with technical questions - start a thread instead, and send me a link to it. That way I can answer in public, and help other people who have the same question. Thanks!
User avatar
NSFW
Posts: 679
Joined: Fri Feb 02, 2018 3:13 pm

reserved

Post by NSFW »

Reserved
Please don't PM me with technical questions - start a thread instead, and send me a link to it. That way I can answer in public, and help other people who have the same question. Thanks!
User avatar
NSFW
Posts: 679
Joined: Fri Feb 02, 2018 3:13 pm

reserved

Post by NSFW »

Reserved
Please don't PM me with technical questions - start a thread instead, and send me a link to it. That way I can answer in public, and help other people who have the same question. Thanks!
User avatar
NSFW
Posts: 679
Joined: Fri Feb 02, 2018 3:13 pm

reserved

Post by NSFW »

Reserved
Please don't PM me with technical questions - start a thread instead, and send me a link to it. That way I can answer in public, and help other people who have the same question. Thanks!
Post Reply