PCMTec Development Blog

Ford information and tools can be found here
User avatar
Tazzi
Posts: 3429
Joined: Thu May 17, 2012 8:53 pm
cars: VE SS Ute
Location: WA
Contact:

Re: Ford MPC565 Tuning

Post by Tazzi »

Damnn no mucking around here!! :lol:

Is there something we can do to help push on? Amazed at the speed your smashing through the Ford bin.
Your Local Aussie Reverse Engineer
Contact for Software/Hardware development and Reverse Engineering
Site:https://www.envyouscustoms.com
Mob:+61406 140 726
Image
User avatar
rolls
Posts: 407
Joined: Wed Sep 07, 2016 11:22 am
cars: bf xr6t falcon

Re: Ford MPC565 Tuning

Post by rolls »

Tazzi wrote:Damnn no mucking around here!! :lol:

Is there something we can do to help push on? Amazed at the speed your smashing through the Ford bin.
At this stage not a lot, I'm limited by time and tools as I've hit a roadblock until my OpenPort 2.0 turns up (next week). Once I get further along the things that will benefit from the community are the following:

Hardware donations, eg ECUs people are interested in getting supported
Debugging equipment, eg a BDM which is about $1k which is too much money for what is currently a free project
Naming structure for definition files. Eg come up with a list of variable & table names with descriptions that does not infringe on existing products.
A good decompiler for PowerPC, currently I can't get anything running that will generate pseudo C code for PPC asm. This makes the assembly much easier to read, even something as simple as this would be a huge help.

I've found the following decompilers if someone can figure out how to get it running from the command line with my PCM binary that would be a massive help. Attached my binary which can be opened in IDAPro easily.
http://www.backerstreet.com/rec/rec.htm
http://boomerang.sourceforge.net/

edit: I can get the RECStudio to sort of work if I do the following commands

def-cpu PowerPC
def-segment -0 0x0 -a 0x0 -L 0x60000 (length 60000 bytes)

It will process maybe 30% of the file but as a lot of the routines appear to be interrupt service routines they have no actual jump command and hence look like stranded code. If I force it to look at the code it seems to ignore it most of the time or crash in an infinite loop.

Would be great if I could give it my IDA code and it could decompile that. IDA does a great job of disassembling and labelling the code I just want per subroutine pseudo C code to make it easier to read, it seems nothing can easily do this currently.

Retdec https://retdec.com/ used to work but now it incorrectly detects the format as COFF64, the IDAplugin also doesn't work.
Attachments
HACKKGA.bin
(1 MiB) Downloaded 422 times
User avatar
antus
Site Admin
Posts: 8250
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: Ford MPC565 Tuning

Post by antus »

Ive used the USB BDM NT from http://www.usbjtag.com/ on the '0411. I have one you could borrow for a while, otherwise they are $65 USD + post.
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
rolls
Posts: 407
Joined: Wed Sep 07, 2016 11:22 am
cars: bf xr6t falcon

Re: Ford MPC565 Tuning

Post by rolls »

antus wrote:Ive used the USB BDM NT from http://www.usbjtag.com/ on the '0411. I have one you could borrow for a while, otherwise they are $65 USD + post.
Oh wow that is cheap, I guess I didn't look hard enough. I might just buy one when I get to the point I want to do some actual debugging.
User avatar
antus
Site Admin
Posts: 8250
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: Ford MPC565 Tuning

Post by antus »

Do you have software in mind to go with it? I get the feeling that the BDM interface on the processor is one thing and its simple enough but finding good pc side debugging software is another question, and may limit the type of BDM interface you need for pc software compatability. I'd love to know how you go with this and Im keep to help figure it out.

Ive also got a segger jlink for jtag, which I think is more industry standard.

Having said that, being more obscure platforms than x86/x64 the debug software tends to look archaic and be hard to use compared to what pc people are used too. See the attached for an idea of what you might get. Note that C language is shown, not asm. Very clunky and possibly just a time killer. There is also the question about what the embedded hardware does in a pcm when you hold up the cpu. I wouldnt necessarily expect external hardware to hold up too, and that would likely create error conditions as soon as you let the cpu run again.

Static offline analysis is probably but not necessarily more beneficial.
Attachments
debugger_mpc800.pdf
(583.24 KiB) Downloaded 471 times
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
rolls
Posts: 407
Joined: Wed Sep 07, 2016 11:22 am
cars: bf xr6t falcon

Re: Ford MPC565 Tuning

Post by rolls »

Yeah good point, if the engine was running you could possibly destroy it as well due to leaving the injectors jammed on filling the cylinder bore and bending a rod.
User avatar
rolls
Posts: 407
Joined: Wed Sep 07, 2016 11:22 am
cars: bf xr6t falcon

Re: Ford MPC565 Tuning

Post by rolls »

https://github.com/rolandh/J2534DotNet/ ... ionFord.cs

Uploaded my UDS/OBD implementation with a sample GUI project that will attempt to access level 1 security
jay woo
Posts: 51
Joined: Mon Jul 11, 2011 8:42 pm

Re: Ford MPC565 Tuning

Post by jay woo »

What version of IDA are you using? The plugin lists greater than 6.6. Many people use a shared version and that was back in version 5 last time I checked.
User avatar
rolls
Posts: 407
Joined: Wed Sep 07, 2016 11:22 am
cars: bf xr6t falcon

Re: Ford MPC565 Tuning

Post by rolls »

Got my OpenPort 2.0 yesterday and spent today playing with it. Can successfully read the entire flash no problems with it, supports the 18v on pin13 which is great. Not bad for the ~$200 it cost

I can probably flash successfully as well but I want to set up my test bench with my spare PCM before trying that out.
User avatar
antus
Site Admin
Posts: 8250
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: Ford MPC565 Tuning

Post by antus »

Nice work :thumbup:
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
Post Reply