This is where the BIN Hackers and definition junkies discuss the inner workings of the EEC code and hardware. General tuning questions do not go here. Only technical/hardware-specific/code questions and discussions belong here.

Moderators: EDS50, cgrey8, 2Shaker, Jon 94GT

Post Reply
TripleBlackVert
BIN Hacker
Posts: 802
Joined: Tue Apr 20, 2004 2:50 pm
Location: Bethesda, Maryland

A9L discrepancy

Post by TripleBlackVert » Sun Jun 13, 2010 12:50 am

here is an excerpt from an A9L disassembly I have.

Code: Select all

...
  A1F00018    8762 L84F5 ld    REG_18,#$00F0
  B30120201A  8763       ldb   REG_1A,$2020[Zero]
  A2151C      8764 L84FE ld    REG_1C,[REG_14]+
  C2191C      8765       st    REG_1C,[REG_18]+
  E0E01A      8766       djnz  REG_1A,L84FE
...
FWIW, REG_14 is set to #$2022 just before this code, and address $2020 is 8. essentially, it is copying 8 values from $2022 to $00F0.

so it makes perfect sense that at line 8766, it would decrease REG_1A and jump back to line 8764 if not ZERO (what the DJNZ means). so it would do that 8 times before the DJNZ would not branch, because REG_1A would then be ZERO.

now here is my problem ... in the A9L bin I have though, the location where the above is E0E01A, my binary has E01AF7. the discrepancy is at address $8504 (decimal 34052)

so it becomes

Code: Select all

...
  A1F00018    8762 L84F5 ld    REG_18,#$00F0
  B30120201A  8763       ldb   REG_1A,$2020[Zero]
  A2151C      8764 L84FE ld    REG_1C,[REG_14]+
  C2191C      8765       st    REG_1C,[REG_18]+
  E01AF7      8766       djnz  REG_F7,L8522
...
which makes no sense. this is the first discrepancy i have come across between the disassembly and my actual binary. and my binary appears to be the problem.

any thoughts?
95 GT Vert, TwEECer R/T v1.30A9
1970 block, 410ci, 10.27:1 CR, 42#, LMAF, CBAZA/T4M0, AOD, 2500 Stall, Custom Cam

1967 Fairlane Vert, 390FE, C6, 100% stock

sailorbob
BIN Hacker
Posts: 1779
Joined: Tue Jul 12, 2005 6:10 am

Re: A9L discrepancy

Post by sailorbob » Sun Jun 13, 2010 2:05 am

The first code extract you have is incorrect, the dnjz line should be E01AF7 as per your binary.

You are getting the register and jump offset the wrong way around in the second code extract (also the jump offset is signed).

TripleBlackVert
BIN Hacker
Posts: 802
Joined: Tue Apr 20, 2004 2:50 pm
Location: Bethesda, Maryland

Re: A9L discrepancy

Post by TripleBlackVert » Sun Jun 13, 2010 9:14 am

thanks. i guess the byte dump of the disassembly cannot always be trusted.
95 GT Vert, TwEECer R/T v1.30A9
1970 block, 410ci, 10.27:1 CR, 42#, LMAF, CBAZA/T4M0, AOD, 2500 Stall, Custom Cam

1967 Fairlane Vert, 390FE, C6, 100% stock

decipha

Re: A9L discrepancy

Post by decipha » Sun Jun 13, 2010 10:01 pm

which disassembler are you using?

TripleBlackVert
BIN Hacker
Posts: 802
Joined: Tue Apr 20, 2004 2:50 pm
Location: Bethesda, Maryland

Re: A9L discrepancy

Post by TripleBlackVert » Sun Jun 13, 2010 11:05 pm

i'm not sure as the listing is old. but i have the disassembler from bill lawrence, so i bet it was from that

i would love to get a cleaner, more accurate disassembly
95 GT Vert, TwEECer R/T v1.30A9
1970 block, 410ci, 10.27:1 CR, 42#, LMAF, CBAZA/T4M0, AOD, 2500 Stall, Custom Cam

1967 Fairlane Vert, 390FE, C6, 100% stock

decipha

Re: A9L discrepancy

Post by decipha » Sun Jun 13, 2010 11:10 pm

too bad those disassembler's are ancient. else if you want to step your game into the millennium you can get a Motorola disassembler and do what Adam's doing with the 2010 mustang ecu :shock:

those ecu's are like a mini apple :lol:

with 4 timing tables per camshaft (16 total) you really got some control there, you can tune one of those bastards till your blue in the face :lol:

TripleBlackVert
BIN Hacker
Posts: 802
Joined: Tue Apr 20, 2004 2:50 pm
Location: Bethesda, Maryland

Re: A9L discrepancy

Post by TripleBlackVert » Mon Jun 14, 2010 7:41 am

who is adam and what is he doing?
Last edited by TripleBlackVert on Mon Jun 14, 2010 7:05 pm, edited 1 time in total.
95 GT Vert, TwEECer R/T v1.30A9
1970 block, 410ci, 10.27:1 CR, 42#, LMAF, CBAZA/T4M0, AOD, 2500 Stall, Custom Cam

1967 Fairlane Vert, 390FE, C6, 100% stock

User avatar
cgrey8
Administrator
Posts: 11304
Joined: Fri Jun 24, 2005 5:54 am
Location: Acworth, Ga (Metro Atlanta)
Contact:

Re: A9L discrepancy

Post by cgrey8 » Mon Jun 14, 2010 7:54 am

It seems like dyno time just went up with all the controls that are now available. As you said, 4 tables per cam. That's a lot to tune for. Add to that, you even have separate cylinder controls. So you can optimize the spark advance on a per-cylinder basis. Although I think that's only a single offset adder, but I can't remember. In anycase, the number of things you can change and test for just seems like it is growing out of control.

Now the big question is how Ford is setting the tune up? Obviously while cruising, there's a fuel economy and emissions focus. But I have to believe that at some point, emissions starts to intrude on fuel economy. So is there the chance that an extra MPG can be squeezed out if you accept a slightly higher NOx or HC emission? If there are fuel economy improvements to be made, even if emissions has to take a back seat I think I'd take it in a heartbeat. And on performance, was Ford focused more on getting the engine through the warranty period or is performance pretty much maxed out with very little that can be improved upon without swapping out hardware?
...Always Somethin'

89 Ranger Supercab, 331 w/GT40p heads, ported Explorer lower, Crane Powermax 2020 cam, FMS Explorer (GT40p) headers, aftermarket T5 'Z-Spec', GUFB, Moates QuarterHorse tuned using BE&EA

Member V8-Ranger.com

User avatar
tvrfan
Tuning Addict
Posts: 590
Joined: Sat May 14, 2011 11:41 pm
Location: New Zealand

Re: A9L discrepancy

Post by tvrfan » Sun May 15, 2011 12:18 am

My copy of A9L code looks like this....with extra comments

Code: Select all



84f5: a1,f0,00,18       ldw   R18,f0          R18 = 0xf0;
84f9: b3,01,20,20,1a    ldb   R1a,[2020]      R1a = [2020];
84fe: a2,15,1c          ldw   R1c,[R14++]     R1c = [R14++];
8501: c2,19,1c          stw   R1c,[R18++]     [R18++] = R1c;
8504: e0,1a,f7          djnz  R1a,84fe        R1a--;
                                                         if (R1a != 0) goto 84fe;      # loop back

This actually sets up the registers f0 to f8 as 'base' pointers. these are used all over the
place as 'base+dispacement' addresses

(yeah OK you probably know this already.... just in case !!)

[ oops - why do spaces get messed up in display - help anyone ?) - FIXED !!
A.
Last edited by tvrfan on Sun May 15, 2011 4:46 pm, edited 2 times in total.
TVR, kit cars, classic cars. Ex IT geek, development and databases.
https://github.com/tvrfan/EEC-IV-disassembler

User avatar
cgrey8
Administrator
Posts: 11304
Joined: Fri Jun 24, 2005 5:54 am
Location: Acworth, Ga (Metro Atlanta)
Contact:

Re: A9L discrepancy

Post by cgrey8 » Sun May 15, 2011 7:45 am

Use the code tags to get text to display in fixed-width font.
...Always Somethin'

89 Ranger Supercab, 331 w/GT40p heads, ported Explorer lower, Crane Powermax 2020 cam, FMS Explorer (GT40p) headers, aftermarket T5 'Z-Spec', GUFB, Moates QuarterHorse tuned using BE&EA

Member V8-Ranger.com

User avatar
tvrfan
Tuning Addict
Posts: 590
Joined: Sat May 14, 2011 11:41 pm
Location: New Zealand

Re: A9L discrepancy

Post by tvrfan » Sun May 15, 2011 4:44 pm

Duh.....stupid of me not to see that.... Thanks !!!

Amended above post......
TVR, kit cars, classic cars. Ex IT geek, development and databases.
https://github.com/tvrfan/EEC-IV-disassembler

Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests