Interesting things in P01/P59 code

They go by many names, P01, P59, VPW, '0411 etc . Circa 1999 to 2006. All VPW OBD2 PCMs.
User avatar
Posts: 161
Joined: Fri Feb 02, 2018 3:13 pm

Interesting things in P01/P59 code

Postby NSFW » Sun Feb 17, 2019 6:00 am

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 185 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 185 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 questions about tuning or flashing - start a thread instead. Thanks!

User avatar
Posts: 161
Joined: Fri Feb 02, 2018 3:13 pm

reserved

Postby NSFW » Sun Feb 17, 2019 6:16 am

Reserved
Please don't PM me with questions about tuning or flashing - start a thread instead. Thanks!

User avatar
Posts: 161
Joined: Fri Feb 02, 2018 3:13 pm

reserved

Postby NSFW » Sun Feb 17, 2019 6:16 am

Reserved
Please don't PM me with questions about tuning or flashing - start a thread instead. Thanks!

User avatar
Posts: 161
Joined: Fri Feb 02, 2018 3:13 pm

reserved

Postby NSFW » Sun Feb 17, 2019 6:16 am

Reserved
Please don't PM me with questions about tuning or flashing - start a thread instead. Thanks!

User avatar
Posts: 161
Joined: Fri Feb 02, 2018 3:13 pm

reserved

Postby NSFW » Sun Feb 17, 2019 6:17 am

Reserved
Please don't PM me with questions about tuning or flashing - start a thread instead. Thanks!

User avatar
Posts: 161
Joined: Fri Feb 02, 2018 3:13 pm

reserved

Postby NSFW » Sun Feb 17, 2019 6:18 am

Reserved
Please don't PM me with questions about tuning or flashing - start a thread instead. Thanks!

Return to GM LS1 512Kbyte and 1Mbyte

Who is online

Users browsing this forum: ECUtech and 1 guest