delco code related books

Posts: 200
Joined: Tue Jul 05, 2011 11:29 pm

delco code related books

Postby sprattzvx » Sun Nov 27, 2011 11:39 am

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.

Site Admin
User avatar
Posts: 6396
Joined: Sat Feb 28, 2009 8:34 pm

Re: delco code related books

Postby antus » Sun Nov 27, 2011 11:45 am

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:
viewtopic.php?f=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).

viewtopic.php?f=26&t=437
Have you read the FAQ? For lots of information and links to significant threads see here: viewtopic.php?f=7&t=1396


Posts: 200
Joined: Tue Jul 05, 2011 11:29 pm

Re: delco code related books

Postby sprattzvx » Sun Nov 27, 2011 12:07 pm

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
Posts: 4327
Joined: Mon Jan 04, 2010 10:23 am

Re: delco code related books

Postby The1 » Sun Nov 27, 2011 12:15 pm

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.

Posts: 200
Joined: Tue Jul 05, 2011 11:29 pm

Re: delco code related books

Postby sprattzvx » Sun Nov 27, 2011 12:18 pm

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
Posts: 4327
Joined: Mon Jan 04, 2010 10:23 am

Re: delco code related books

Postby The1 » Sun Nov 27, 2011 12:22 pm

plenty of stuff to browse through in here to.

viewforum.php?f=26

Site Admin
User avatar
Posts: 6396
Joined: Sat Feb 28, 2009 8:34 pm

Re: delco code related books

Postby antus » Mon Nov 28, 2011 3:16 pm

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: viewtopic.php?f=7&t=1396

Posts: 200
Joined: Tue Jul 05, 2011 11:29 pm

Re: delco code related books

Postby sprattzvx » Mon Nov 28, 2011 3:37 pm

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
Posts: 495
Joined: Thu Sep 17, 2009 2:00 pm
Location: Perth, WA

Re: delco code related books

Postby charlay86 » Mon Nov 28, 2011 3:54 pm

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

Next

Return to Disassembly and Reassembly

Who is online

Users browsing this forum: No registered users and 1 guest