Errors, Crashes, and Bugs, Oh My! This is where issues specific to tuning software goes. General questions about software features & capabilities are also welcome here.

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

jsa
Tuning Addict
Posts: 1114
Joined: Sat Nov 23, 2013 7:28 pm
Location: 'straya

Re: Data offsetting in BE

Post by jsa » Tue May 23, 2023 2:56 am

jamie from oz wrote: Sun May 21, 2023 5:51 am
jamie from oz wrote: Sun May 21, 2023 4:32 am Sub_A0BE please.
Think i found it :E2 F0 seems to be actual addresses
Quick look so far. It is what I would describe as exploding args, one byte gives multiple addresses.

More later.
Cheers

John

95 Escort RS Cosworth - CARD QUIK COSY ANTI / GHAJ0
Moates QH & BE
ForDiag

jsa
Tuning Addict
Posts: 1114
Joined: Sat Nov 23, 2013 7:28 pm
Location: 'straya

Re: Data offsetting in BE

Post by jsa » Fri May 26, 2023 9:36 am

jamie from oz wrote: Sun May 21, 2023 4:32 am John,

6DBD.
Can you help with encoded addresses in Sub_A0BE please.

LST.

Code: Select all

9fab: ef,10,01            call  a0be             Sub_a0be_ (
9fae: 15,80                     #arg 1              8015 );

DIR.
Sub  A0BE "Sub_A0BE_" :E1 E0                                #2/4/23 jm to get arg display correct.
Jamie,

SAD is not able to deal with the "exploding args" in all their glory. TVRfan has been toiling away on a concept called cells so that a subroutine can have options for the different decodes. For the time being leave AOBE with 2 args as bytes.

In the mean time a spreadsheet will allow you to make progress.
Arg decode SubA0BE 6DBX.xlsx
(20.01 KiB) Downloaded 40 times
The green cells in the Pic can have the data changed to suit the specific AOBE args you wish to decode.
Edit Green Cells Only.PNG
Edit Green Cells Only.PNG (11.56 KiB) Viewed 1004 times
These two calls of AOBE have the four combinations of bit conditions.
Each combination will result in different addresses being calculated, some repeat so a bit messy in that regard.
You can see the state of B6_R80 can be either way depending on the state of other flags.
Arg2 is the other switch, >=0x80 VS <=0x7F.

Code: Select all

9f8e: 91,40,80            orb   R80,40           B6_R80 = 1;
9f91: 3a,81,09            jb    B2,R81,9f9d      if (B2_R81 = 0)  {
9f94: 3d,86,06            jb    B5,R86,9f9d      if (B5_R86 = 0)  {
9f97: 3d,88,03            jb    B5,R88,9f9d      if (B5_R88 = 0)  {
9f9a: 71,bf,80            an2b  R80,bf           B6_R80 = 0; } } }
9f9d: ef,1e,01            call  a0be             Sub_a0be (
9fa0: 0f                        #arg 1              f,                             # [04B7] ?04B7?
                                                                                   # [EC0B] ?EC0B?
                                                                                   # [EC29] ?EC29?
                                                                                   # [089F] ?089F?
                                                                                   # [08B6] ?08B6?
9fa1: 0d                        #arg 2              d );                           # [04DB] ?04DB?
9fa2: 91,40,80            orb   R80,40           B6_R80 = 1;
9fa5: 3f,8f,03            jb    B7,R8f,9fab      if (B7_R8f = 0)  {
9fa8: 71,bf,80            an2b  R80,bf           B6_R80 = 0; }
9fab: ef,10,01            call  a0be             Sub_a0be (
9fae: 15                        #arg 1              15,                            # [04BD] ?04BD?
                                                                                   # [EC11] ?EC11?
                                                                                   # [EC2F] ?EC2F?
                                                                                   # [08A0] ?08A0?
                                                                                   # [08BC] ?08BC?
9faf: 80                        #arg 2              80 );
The spreadsheet generates the comments for the addresses to go next to the args.
Copy and paste to your CMT file.
Some tweaking for duplicates and \n will be needed.
Copy blue cells to _CMT.PNG
Copy blue cells to _CMT.PNG (14.71 KiB) Viewed 1004 times

You can now go to each call of AOBE, plug the hex into the spreadsheet and get the addresses out.

Any with 8### don't decode and i have tried xF0 and xE0 but i was getting lost/confused in how to decode them.
From our previous decoding encoded addresses my understanding is 8015 would be decoded as 80 refers to F0 that = C000 and add 15 that would be address combined to be C000+15=C015 ??
It's not possible to just apply one subroutines solution to all others.
It is necessary to understand what the binary code is doing, and read through it's logic to uncover how it works.
Cheers

John

95 Escort RS Cosworth - CARD QUIK COSY ANTI / GHAJ0
Moates QH & BE
ForDiag

jamie from oz
Regular
Posts: 115
Joined: Wed Oct 06, 2021 5:10 am

Re: Data offsetting in BE

Post by jamie from oz » Fri May 26, 2023 11:43 pm

Thank you very much John.
I will try that out tonight .
Falcon XH xr6 i6 4.0L ute1995.
Falcon XH v8 5.0L ute 1996 / NVMG84 and 6DGD.bin using sailor bob Def/cry ( ho engine185kw)
Falcon AU2 v8 5.0L ute 2000 / NGVB5 and Y3EE / WALG (factory GT40P heads and intake 200kw )
Falcon EL v8 5.0L with 6cyl SD EEC-V HWAD and 6dbd ETV-513 (JSA'S help with 6dbd_56k_x bin and 6dbd_56k_x Xls)

jsa
Tuning Addict
Posts: 1114
Joined: Sat Nov 23, 2013 7:28 pm
Location: 'straya

Re: Data offsetting in BE

Post by jsa » Sun May 28, 2023 5:08 am

jamie from oz wrote: Sun May 21, 2023 7:15 am John,

my next encoded address problem.

Code: Select all

a00a: 29,a2               scall a1ae             Sub_a1ae_ (
a00c: 03,00                     #arg 1              LIO_Port,
a00e: 80,98                     #arg 2              cbf4 );
edit. have tried :UW N : E4 F0 N and appears to be valid addresses but not sure if this is correct ?

Code: Select all

SUB A1AE "Sub_a1ae_" :UW N : E1 E0 N
Thanks,
Jamie
No it's not correct.
It is 4 individual bytes for some bit manipulation.

Code: Select all

   Sub_a1ae:
a1ae: cc,26               pop   R26              R26scr = pop();      # A00C
a1b0: b2,27,28            ldb   R28,[R26++]      R28 = [R26scr];      # Y 03
a1b3: ae,27,2a            ldzbw R2a,[R26++]      R2Ascr = [R26scr];   # Y 0000
a1b6: b2,27,29            ldb   R29,[R26++]      R29 = [R26scr];      # Y 80
a1b9: ae,27,24            ldzbw R24,[R26++]      R24scr = [R26scr];   # Y 98
a1bc: c8,26               push  R26              push(R26scr);        # A010
a1be: 73,2b,da,04,28      an2b  R28,[R2a+4da]    R28 &= [R2Ascr+4da]; # 03 & [0000+4DA]
a1c3: df,05               je    a1ca             if (R28 != 0)  {
a1c5: 92,24,29            orb   R29,[R24]        R29 |= [R24scr];     # 80 |= R98
a1c8: 20,05               sjmp  a1cf             goto a1cf; }

a1ca: 12,29               cplb  R29              R29 = ~R29;
a1cc: 72,24,29            an2b  R29,[R24]        R29 &= [R24scr];

a1cf: c6,24,29            stb   R29,[R24]        [R24scr] = R29;    R98 = (80 |= R98)
a1d2: f0                  ret                    return;

Code: Select all

SUB A1AE "Sub_a1ae_" :Y :Y :Y :Y
Cheers

John

95 Escort RS Cosworth - CARD QUIK COSY ANTI / GHAJ0
Moates QH & BE
ForDiag

jamie from oz
Regular
Posts: 115
Joined: Wed Oct 06, 2021 5:10 am

Re: Data offsetting in BE

Post by jamie from oz » Sun May 28, 2023 7:55 am

ok i see the ldb reference.

Thanks John,
Falcon XH xr6 i6 4.0L ute1995.
Falcon XH v8 5.0L ute 1996 / NVMG84 and 6DGD.bin using sailor bob Def/cry ( ho engine185kw)
Falcon AU2 v8 5.0L ute 2000 / NGVB5 and Y3EE / WALG (factory GT40P heads and intake 200kw )
Falcon EL v8 5.0L with 6cyl SD EEC-V HWAD and 6dbd ETV-513 (JSA'S help with 6dbd_56k_x bin and 6dbd_56k_x Xls)

jsa
Tuning Addict
Posts: 1114
Joined: Sat Nov 23, 2013 7:28 pm
Location: 'straya

Re: Data offsetting in BE

Post by jsa » Sun May 28, 2023 9:22 pm

Jamie,

Two ldb can be used as a word.
They would be two adjacent bytes.

Its a case of seeing how the bytes are used.
Cheers

John

95 Escort RS Cosworth - CARD QUIK COSY ANTI / GHAJ0
Moates QH & BE
ForDiag

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests

cron