delco code related books

Disassembly, Reassembly, Tools and devleopment. Going deep with Hardware and Software.
sprattzvx
Posts: 200
Joined: Tue Jul 05, 2011 11:29 pm
cars: Vxl67
Ke30 2door

delco code related books

Post by sprattzvx »

Keen to get a basic understanding of the code used in delco management.
Read a lot of posts talking of address of bytes and fffs aaa etc etc and wish i had basic knowledge. Can anyone recommend some good literature or website that describes the code used by delco in some detail?
Thanks.
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: delco code related books

Post by antus »

Its a compilcated topic... you need to know about motorola HC11 cpu architecure and programming. What do you want to know how to do? Can probbaly point you to something more specific.

See also this thread:
https://pcmhacking.net/forums/viewtopi ... =26&t=1573

And check out some of the disassemlys in the dissassembly area, some are just machine generated with no comment (not so good) but one of the better ones is this one delcowizid posted. Its for an american turbo regal which is delco, and would share a lot of code with the local computers. This is what you need to be able to understand (or at least understand enough).

https://pcmhacking.net/forums/viewtopic.php?f=26&t=437
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
The1
Posts: 4694
Joined: Mon Jan 04, 2010 10:23 am

Re: delco code related books

Post by The1 »

sprattzvx
Posts: 200
Joined: Tue Jul 05, 2011 11:29 pm
cars: Vxl67
Ke30 2door

Re: delco code related books

Post by sprattzvx »

Thats pretty much the info i was after antus. So the entire delco management is based around motorola hc11 architecture/programming. Just be interested in understanding some of the raw code that the delco uses, and where on the chip different instructions are stored/how they are accessed. Like when you open hex editor. Massive amounts of nemerical and alpha code combinations at different addresses which im gathering is where a code head could pick different data streams and other information.
Example 0001fff0 6b c3 6f d7 6b c0 6b b2 6b b8 6b bc 6b a8
So whats the information contained here, whats the significance of the recurring 6b and is 0001fff0 the last address in the xdf/bin? And so on and so forth :think:
User avatar
The1
Posts: 4694
Joined: Mon Jan 04, 2010 10:23 am

Re: delco code related books

Post by The1 »

you need to dissasemble it to see what's going on if that's what you want to do, something like ida pro can give you a graphical view.
sprattzvx
Posts: 200
Joined: Tue Jul 05, 2011 11:29 pm
cars: Vxl67
Ke30 2door

Re: delco code related books

Post by sprattzvx »

The1 and antus, awesome links there should keep me amused for a while.
Thanks for that, very intresting stuff.edit: Ida pro? Ill google it.
User avatar
The1
Posts: 4694
Joined: Mon Jan 04, 2010 10:23 am

Re: delco code related books

Post by The1 »

plenty of stuff to browse through in here to.

https://pcmhacking.net/forums/viewforum.php?f=26
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: delco code related books

Post by antus »

for the HC11, there are vectors at the end (addresses) and the last 2 bytes are the reset vector, its the address of the first instruction from power on. Thats how the ecu knows where to start, and that is a motorola hc11 thing. In the delphi 32bit ecus, the vector table is at the start. But the hc11 only has an address range of 0->FFFF, so when you see 1FFFF its outside the chips range. This is why it gets complicated on > 64kb bins. The code implements bank switching where at run time it flicks the high bit to address the higher memory and when its done with it, then it flicks that address bit off again. Thus you have overlap -2 chip areas that appear in the same addresses at different times. Works, but makes it a mental headf**k.... :thumbdown:

On the > 64kb delcos they tend to keep the bottom 32kb constant and have the ram and calibration mapped there (ram overlays the start of the chip, so thats why when you read the chip its blank there, but when you read it via aldl you see data), as well as common library code (eg code that averages between table cells and such), and there are 2 lots of 32kb upper banks, one of which is engine code and one is transmission code. The code in the common bank automates flicking to each one in turn and running what is needed from there.
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
sprattzvx
Posts: 200
Joined: Tue Jul 05, 2011 11:29 pm
cars: Vxl67
Ke30 2door

Re: delco code related books

Post by sprattzvx »

are you saying with the hc11, instead of having a dedicated 2 bytes at the end that gives the reference address for the ecu to look for its first instruction, it double uses a bank with a high and a low bit. so when you power on, it automatically switches to the high bit looking for its first address/instruction, then switches the bank to low and carries on?
so when you see an address thats outside the chips range ie 1ffff, if ffff is the last address available on hc11, then you know the 1ffff is the high bit of ffff that has been switched?
User avatar
charlay86
Posts: 584
Joined: Thu Sep 17, 2009 2:00 pm
cars: VT S1 SS (L67)
Location: Perth, WA

Re: delco code related books

Post by charlay86 »

no, the vector table is located at the end of both high banks, so if you look in a bin file the data at 0xFFFF and 0x1FFFF is the same.
to change between banks the HC11 switches one of the pins in Port G (it is bit 6, ie mask 0x40) which is connected to the extra address line.
The memory banks are divided like this in the binary file:
0x00000 - 0x07FFF : Common low bank, can always be seen by the MCU. (contains calibration data and common subroutines)
0x08000 - 0x0FFFF : High Bank A (Contains mainly Engine related Code)
0x10000 - 0x17FFF : Unused, cannot be seen by the MCU
0x18000 - 0x1FFFF : High Bank B (Contains mainly tranny related Code)

the HC11 doesn't really know which of the two high banks it is addressing, the actual software keeps track of it.
so when it accesses memory location 0xE170 for instance, the data that it gets will be dependant upon the state of the bit in Port G, which determines whether it is reading 0x0E170 or 0x1E170
Post Reply