PCM Hammer P01 and P59 flash tool v015

They go by many names, P01, P59, VPW, '0411 etc. Also covering E38 and newer here.
User avatar
antus
Site Admin
Posts: 8237
Joined: Sat Feb 28, 2009 8:34 pm
cars: TX Gemini 2L Twincam
TX Gemini SR20 18psi
Datsun 1200 Ute
Subaru Blitzen '06 EZ30 4th gen, 3.0R Spec B
Contact:

Re: PCM Hammer - new ls1 flash tool

Post by antus »

Nice one! By far the best release yet!
Have you read the FAQ? For lots of information and links to significant threads see here: http://pcmhacking.net/forums/viewtopic.php?f=7&t=1396
User avatar
Gampy
Posts: 2330
Joined: Sat Dec 15, 2018 7:38 am

Re: PCM Hammer - new ls1 flash tool

Post by Gampy »

I agree Antus!

Thank you NSFW!
Intelligence is in the details!

It is easier not to learn bad habits, then it is to break them!

If I was here to win a popularity contest, their would be no point, so I wouldn't be here!
User avatar
Gampy
Posts: 2330
Joined: Sat Dec 15, 2018 7:38 am

Re: PCM Hammer - new ls1 flash tool

Post by Gampy »

[edit] See here: PCM Hammer Suite Development thread

I cannot comment on Github, so here it is ...

PR #151
It is of my opinion there is a misunderstanding here ... It's looking for a 'PortName' that starts with 'COM' and does not have '(LPT' in it.
That is always going to be true ... else I believe it would violate MS PortName naming convention.

It doesn't stop the,
Unable to get port number for 'ECP Printer Port (LPT1)' / 'ACPI\PNP0401\4&3157C303&0' with port name 'LPT1'
I get if that is the purpose.

If I'm understanding correctly, what is trying to be accomplished would be like so,

Code: Select all

            if (!string.IsNullOrEmpty(this.PortName) &&
                this.PortName.StartsWith("COM") && 
                this.PortName.Length > 3)
            {
                int number;
                int.TryParse(this.PortName.Substring(3), out number);
                this.PortNumber = number;
            }
            else
            {
+                if(!this.PortName.StartsWith("LPT"))
+                {
                    logger.AddDebugMessage(
                        string.Format(
                            "Unable to get port number for '{0}' / '{1}' with port name '{2}'",
                            this.Name,
                            this.DeviceID,
                            this.PortName));
+                }
            }
That would silence the LPT debug messages.
However, I do have some other thoughts on this issue involving 'PortDiscovery.GetPorts(...)', I have not yet sussed out, will do so later tonight or first thing AM.
Or, maybe I'm just misunderstanding ... Please help me to understand!


PR #153
Definitely have to write the Boot segment with Os on the P01/P59 for sure, else things go bad, learned that the hard way, not so with newer Pcms as I understand it.

OsPlusCalibration and Boot is for future use, I have been watching Tazzi and daniel2345 threads.

As for the 'Os' addition, it completes the Segments and I was hoping to encourage someone to make the enum OR'able to handle multiple segments, thus the ability to remove the 'Plus' types ... I was not confident on (the math) how to do it.
Thus we could do the following for example.
currentWriteType = WriteType.Os | WriteType.Calibration | WriteType.Boot
I will remove them.
Last edited by Gampy on Mon Mar 09, 2020 10:15 pm, edited 6 times in total.
Intelligence is in the details!

It is easier not to learn bad habits, then it is to break them!

If I was here to win a popularity contest, their would be no point, so I wouldn't be here!
User avatar
Gampy
Posts: 2330
Joined: Sat Dec 15, 2018 7:38 am

Re: PCM Hammer - new ls1 flash tool

Post by Gampy »

Speaking of BlockType ... Wouldn't that enum be better in FlashChip.cs??
Seems a bit out of place in Vehicle.TestKernel.cs.

I dunno know ... :oops:
Intelligence is in the details!

It is easier not to learn bad habits, then it is to break them!

If I was here to win a popularity contest, their would be no point, so I wouldn't be here!
User avatar
antus
Site Admin
Posts: 8237
Joined: Sat Feb 28, 2009 8:34 pm
cars: TX Gemini 2L Twincam
TX Gemini SR20 18psi
Datsun 1200 Ute
Subaru Blitzen '06 EZ30 4th gen, 3.0R Spec B
Contact:

Re: PCM Hammer - new ls1 flash tool

Post by antus »

Orable enums is easy, just on my phone so untested but use the bitshift operator to avoid collisions, something like:

Code: Select all

writetype.boot = 1<<0;
writetype.os = 1<<1;
writetype.calibration = 1<<2;
writetype.paramater = 1<<3;
Then set similar to:

Code: Select all

if (fullflash) writetype = writetype.boot || writetype.os || writetype.calibration || writetype.parameter;
Then test something like:

Code: Select all

if (writetype && writetype.boot) {
  .....
}
The actual operators and syntax might be different, ill update the post once ive had a play on a pc. But the above should be a pointer in the right direction.
Have you read the FAQ? For lots of information and links to significant threads see here: http://pcmhacking.net/forums/viewtopic.php?f=7&t=1396
User avatar
Gampy
Posts: 2330
Joined: Sat Dec 15, 2018 7:38 am

Re: PCM Hammer - new ls1 flash tool

Post by Gampy »

Whoo Hoo, Thanks Antus ... :thumbup:

Most definitely a pointer in the right direction ...
antus wrote: Then set similar to:

Code: Select all

if (fullflash) writetype = writetype.boot || writetype.os || writetype.calibration || writetype.parameter;
Then test something like:

Code: Select all

if (writetype && writetype.boot) {
  .....
}
Are the operators correct :?:
Or would they be like,

Code: Select all

if (fullflash)
  writetype = writetype.boot | writetype.os | writetype.calibration | writetype.parameter;
Then test something like:

Code: Select all

if (writetype & writetype.boot) {
  .....
}
Like I first said ... Thank you!

With your simple example I shall tinker to understanding!
(meaning do it over and over until a through understanding is gained)
Intelligence is in the details!

It is easier not to learn bad habits, then it is to break them!

If I was here to win a popularity contest, their would be no point, so I wouldn't be here!
RoninDusette
Posts: 23
Joined: Thu Oct 25, 2018 8:06 am
cars: 2015 Chevy Cruze LT (Trifecta, CAI, lowered)
1991 Honda CRX Si (gutted, waiting for love)
2004 Ford Focus SE
2015 Chevy Malibu
2002 Saturn SL

Re: PCM Hammer - new ls1 flash tool

Post by RoninDusette »

THEFERMANATOR wrote:I haven't flashed it yet with my tech 2, only went into the sps to get the data(my tech2 clone won't do pass through I've found, but will accept a tune to flash in on it's own). I don't have the numbers off the PCM in front of me, but it was out of an 01 S10 and wasn't supposed to have been locked according to the guy I bought it from. I got it, full flashed it from an 01 S10 to an 02 express van for my l31 tahoe. I've double checked in efilive and there is no security changes in it. I'm going to try full flashing it with my tech 2 to a virgin 02 express file, then see if I can read it out with pcmhammer and my SX cable. It will be a few days before I can do so unfortunately.

I was pretty good at diesel tuning, but getting into this project is all new territory for me. Here recently I've had request's for 0411 tuning, but the $125 vin license fee is quite the deterrent when you're dealing with nearly 20 year old cars.
Sorry if I am late to the party. I have never found an answer to this; willl a tech2 or similar OEM tool (clone or otherwise) read/write tune files made with other software (like hpt, ctz, tun files)? I bought a kess v2 clone and it does read the calibration from my e78 flashed with HP Tuners, so that is some progress (it's the only hardware I have been able to successfully pull my calibration from my ecu when flash with Trifecta Performance's or HP Tuner's platform.). Though it seems like it's not pulling the whole thing.

One thing I was able to do is flash with HP Tuners, pull the bin with the kess, and then bring it into EFI Live, which I can then export the maps into a csv file. Just haven't found a way to get it into TunerPro to actually modify the data, and I am scared shitless of flashing it onto my car after modifying (though I do have a spare e78 ECM to play with). I could either hook it up to my car and mess around and still have my working ECU (it cost 25 bucks on ebay). I would prefer to bench flash it for research, but cannot find any info on how/what pins to connect to a standard OBD to serial cable, then hook that up to one of my many device (usb2can, arduino with canbus shield, obdlink sx, obdlink mx, obdlink lx, mvpi2, trifecta ez flash (obdlink sx with custom settings), kess v2 clone and assorted cables, raspberry pi 2 and 4).

Using the hardware I have, any tips would be greatly appreciated.

Also, I have seen people upload their bin files; how can you tell from a hexdump what program generated the file? Like, how can you look at a bin file and tell it was made by hp tuners or efi live?
kur4o
Posts: 948
Joined: Sun Apr 10, 2016 9:20 pm

Re: PCM Hammer - new ls1 flash tool

Post by kur4o »

Do you have a copy of the stock e78 bin. I would like to see it and possible figure out the checksums so you can flash it without issues.
User avatar
antus
Site Admin
Posts: 8237
Joined: Sat Feb 28, 2009 8:34 pm
cars: TX Gemini 2L Twincam
TX Gemini SR20 18psi
Datsun 1200 Ute
Subaru Blitzen '06 EZ30 4th gen, 3.0R Spec B
Contact:

Re: PCM Hammer - new ls1 flash tool

Post by antus »

@RoninDusette no, most of the commercial tool files are encrypted so that the same tool is required to do anything with the file. bin format usually means its a raw uncompressed image of the flash. It cant be flashed with sps. Sps needs seperate files for the segments, and a script file and the flash kernel from gm, and if you have all that it doesnt provide a way to flash user provided files. Because a bin is just a plain flash image, you cant see what created it.
Have you read the FAQ? For lots of information and links to significant threads see here: http://pcmhacking.net/forums/viewtopic.php?f=7&t=1396
User avatar
Gampy
Posts: 2330
Joined: Sat Dec 15, 2018 7:38 am

Re: PCM Hammer - new ls1 flash tool

Post by Gampy »

I have created a PCM Hammer Suite Development thread so as to quit cluttering this thread with my development babble.
Intelligence is in the details!

It is easier not to learn bad habits, then it is to break them!

If I was here to win a popularity contest, their would be no point, so I wouldn't be here!
Post Reply