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: cgrey8, EDS50, Jon 94GT, 2Shaker

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

Re: SAD disassembler progress

Post by tvrfan » Sat Dec 14, 2019 5:49 pm

motorhead1991 wrote: Sat Dec 14, 2019 4:06 pm
tvrfan wrote: Sat Dec 14, 2019 3:26 pm POSTED version 4.0.1 to github.

I did try out the full A9L directives file, but WITHOUT any SUB commands, as they won't work any more
(did args and lookups in totally different way). The struct commands still work..........but no guarantees.

Try version 4 out with NO .DIR file first, and see how it does....

Enjoy !! (I hope)
There you go, changing the way we all know how to do this :lol: .

I'll give it a shot on m0m2 when I get home.
Yeah, I know.

But I was also aware that it's been FAR too long to make people wait for a new version, and I wanted to get the variable args out there, as it really is a big step forwards. Most commands will work just the same, but SUB analysis is TOTALLY different....

So I'm hoping you will all be impressed by NOT having to have much apart from a SYMbols list....(some data structure decodes are still to come....).

That's my excuse, and I'm sticking with it !!!

(OK, I'll go check what happens with a SUB command now.....)
TVR, kit cars, classic cars. Ex IT geek, development and databases.
https://github.com/tvrfan/EEC-IV-disassembler

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

Re: SAD disassembler progress

Post by jsa » Sat Dec 14, 2019 6:06 pm

From the msg output of a 4.01 cold turkey run on CARD

Code: Select all

# ------------ Subroutine list (special funcs only)
sub  8263c  "UTabLU1"  
sub  82652  "UTabLU2"  
sub  82654  "UTabLU3"  
sub  82680  "STabLU1"  
sub  87768  "SUBFunLU1"  
sub  8776d  "SSBFunLU1"  
sub  87770  "USBFunLU1"  
sub  87773  "UUBFunLU1"  
sub  877db  "SUWFunLU1"  
sub  877e0  "SSWFunLU1"  
sub  877e3  "USWFunLU1"  
sub  877e6  "UUWFunLU1"  
sub  8789e  "STabLU2"  
sub  878a1  "UTabLU4"  
sub  878ad  "STabLU3"  
sub  878b0  "UTabLU5"  
sub  89ff3  "UTabLU6"  
Cheers

John

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

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

Re: SAD disassembler progress

Post by tvrfan » Sat Dec 14, 2019 6:12 pm

OK - I give in. You are right.

A sub command will now IGNORE any additional commands, but will still process the name...
Just pushed this out as a quick fix to Github, still as 4.01

e.g.
SUB 3456 "Filter" : S Y: S Y:W

will get processed as
SUB 3456 "Filter"

which is exactly the same as
SYM 3456 "Filter"

to save having to do mass edits to your DIR file......................
TVR, kit cars, classic cars. Ex IT geek, development and databases.
https://github.com/tvrfan/EEC-IV-disassembler

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

Re: SAD disassembler progress

Post by tvrfan » Sat Dec 14, 2019 6:14 pm

jsa wrote: Sat Dec 14, 2019 6:06 pm From the msg output of a 4.01 cold turkey run on CARD

Code: Select all

# ------------ Subroutine list (special funcs only)
sub  8263c  "UTabLU1"  
sub  82652  "UTabLU2"  
sub  82654  "UTabLU3"  
sub  82680  "STabLU1"  
sub  87768  "SUBFunLU1"  
sub  8776d  "SSBFunLU1"  
sub  87770  "USBFunLU1"  
sub  87773  "UUBFunLU1"  
sub  877db  "SUWFunLU1"  
sub  877e0  "SSWFunLU1"  
sub  877e3  "USWFunLU1"  
sub  877e6  "UUWFunLU1"  
sub  8789e  "STabLU2"  
sub  878a1  "UTabLU4"  
sub  878ad  "STabLU3"  
sub  878b0  "UTabLU5"  
sub  89ff3  "UTabLU6"  

Yeah , I did leave that in, to check SAD was getting right names - feeding this output back in will work now.

I'm hoping you are impressed with not having to mess around with arguments any more ?
TVR, kit cars, classic cars. Ex IT geek, development and databases.
https://github.com/tvrfan/EEC-IV-disassembler

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

Re: SAD disassembler progress

Post by jsa » Sat Dec 14, 2019 7:36 pm

tvrfan wrote: Sat Dec 14, 2019 6:14 pm
Yeah , I did leave that in, to check SAD was getting right names - feeding this output back in will work now.

I'm hoping you are impressed with not having to mess around with arguments any more ?
Very very impressed. SAD 4.01 has done a [near] perfect job of resolving arg counts.

tvrfan wrote: Sat Dec 14, 2019 6:12 pm to save having to do mass edits to your DIR file......................
Excellent, thanks.


4.01 cold turkey on CARD

Code: Select all

3a59: ef,fa,09            call  4456             Sub70(54,daf1,3101);
3a5c: 54,f1,da,01,31      #args  
3a61: 2c,1f               scall 3682             Sub43();

3680: 8b,76,21,42         cmpw  R42,[R76+21]     
3684: d1,06               jleu  368c             if (R42 <= [R76+21]) goto 368c;
I have it as 4 bytes of args consistent with all other occurrences of call 4456.
scall 3682 fails sanity check by landing in the middle of an opcode.

R34=4510
Push (R34)
Is it worth crosschecking immediate values / reg / and push to do a SCAN?

Do you have any BIN's that take 1W & 2Y args for the BFunLU's?
Straight up I want to CMD SAD to take 2 named Word size Args for all BFunLU's.
On a small sample size it seems to me the default for these special FunLU subs should be word arguments.
Cheers

John

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

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

Re: SAD disassembler progress

Post by tvrfan » Sat Dec 14, 2019 8:10 pm

John,

Hey, that's really weird - If I run CARD on linux with no DIR file it gives -

Code: Select all


3a57: df,11               je    3a6a             if ([R76-67] = 0) goto 3a6a;
3a59: ef,fa,09            call  4456             Sub69(f154,da,1);
3a5c: 54,f1,da,01         #args  
3a60: 31,2c,1f            jnb   B1,R2c,3a82      if (B1_R2c = 0) goto 3a82;
3a63: ef,92,06            call  40f8             Sub51(43c);
3a66: 3c,04               #args  
3a68: 20,3b               sjmp  3aa5             goto 3aa5;

which looks right..........

But running the SAME C code on WIn32 (an old XP virtual Machine) with no dir gives -

Code: Select all


3a59: ef,fa,09            call  4456             Sub69(54,daf1,3101);
3a5c: 54,f1,da,01,31      #args  
3a61: 2c,1f               scall 3682             Sub43();
3a63: ef,92,06            call  40f8             Sub51(43c);
3a66: 3c,04               #args  

which is WRONG !!

Hmmm, I'll have to dig in and find out why this WIn32 compile differs from Linux64.
Code is identical (only file access modes and signal catches differ, none of the analysis code)
Could be an unsigned or overflow or something, but int sizes are the same on both platforms..

I think this is the first time I've had a cross-platform issue like this...........interesting.

Errr.....No clue how long this will take. Great that you found this quickly.
TVR, kit cars, classic cars. Ex IT geek, development and databases.
https://github.com/tvrfan/EEC-IV-disassembler

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

Re: SAD disassembler progress

Post by jsa » Sat Dec 14, 2019 8:48 pm

Tvrfan,

Owwkaay.

Are you still compiling with codeblocks? Version?

I will compile the source on codeblocks this evening, see if it differs.
Cheers

John

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

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

Re: SAD disassembler progress

Post by tvrfan » Sat Dec 14, 2019 9:53 pm

John,

May have the answer. I have a 'long' parameter in 'set_psw' subroutine (to allow for overflows and divides etc)

In Linux, long is 64 bits, int is 32 bits
In win32, long is 32 bits , int is 32 bits.

and in emulate, the psw determines when djnz and other conditional jumps actually jump or not.........

It may be I just need to change the Windows code to 'double' instead of long, but I want to check a bit more first.....

(Yes codeblocks for Win32, but use CodeLite in Linux)

Hey - does anyone still have 32 bit windows out there ?
Do I need to change to Mingw64 instead of Mingw32 and go 64 bit windows??
TVR, kit cars, classic cars. Ex IT geek, development and databases.
https://github.com/tvrfan/EEC-IV-disassembler

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

Re: SAD disassembler progress

Post by tvrfan » Sat Dec 14, 2019 10:38 pm

OK have pushed update of SAD401 for WIn32 with a 'double' in place of the 'long'.
This seems to fix the problem for now....

That was a platform problem................Yes, 8061 is a 16 bit CPU, but its multiply and divide are 32 bit.
I used a 64 bit 'long' to capture any overflow in a neat way, but that won't work in Win32, where it needs a 'double' to work.
This affected the set_psw subroutine, which is used for all conditional jumps.
TVR, kit cars, classic cars. Ex IT geek, development and databases.
https://github.com/tvrfan/EEC-IV-disassembler

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

Re: SAD disassembler progress

Post by jsa » Sun Dec 15, 2019 5:14 am

tvrfan wrote: Sat Dec 14, 2019 9:53 pm
Hey - does anyone still have 32 bit windows out there ?
Do I need to change to Mingw64 instead of Mingw32 and go 64 bit windows??
Only Virtual XP these days for some old 16bit stuff.

I suppose the day will come when 64bit is necessary, but care factor is pretty low for apps that don't need huge gobs of ram.
tvrfan wrote: Sat Dec 14, 2019 10:38 pm OK have pushed update of SAD401 for WIn32 with a 'double' in place of the 'long'.
This seems to fix the problem for now....
Quick fix, thanks. Looks good here. Thanks for the explanation.
I get a debug file with this 4.01.3 build.

Moving on and adding my 3.08 dir, SAD crashes, no content in msg or lst.
I shall have to build a dir piece by piece to isolate the cause.
May take a few days as time permits this week.
Cheers

John

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

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

Re: SAD disassembler progress

Post by tvrfan » Sun Dec 15, 2019 12:16 pm

Thanks John.

I didn't do any real testing on Windows as my PC is all Linux (64 bit). I didn't expect anything, but now I'll look out for 64/32 issues.

Debug - Damn, I forgot to switch off the debug macro. Will do that now.

I have downloaded MinGW64 but it seems to require a full build, so that may take a while to sort.

I have also got FLTK lib to compile on Win32 so I can have exactly the same code for SADWIN Graphical file picker/wrapper for Linux and Win.

Athough that change seems to fix CARD, I'm not convinced I've found the true cause yet. More searching to do.

Please send me your card.dir file and I'll look for the crash, as SAD shouldn't crash EVER.... so I want to find that...

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

motorhead1991
Regular
Posts: 238
Joined: Tue Nov 21, 2017 2:32 am

Re: SAD disassembler progress

Post by motorhead1991 » Sun Dec 15, 2019 8:22 pm

bank command results in crashing of the binary run for my single bank bin, just IME.

Also, I use 32bit, I always have.

I see that you're also getting better with GIT. Good job, man :grin:. I'll have to show you how pull requests work so we can start using these pull requests. Mine and dantobs should make things easier for later.
1990 Ford Ranger FLH2 conversion. Ford forged/dished pistons, Total Seal file-fit rings, Clevite rod and main bearings, Clevite cam bearings, IHI turbo, Siemens Deka 60lb/hr injectors, Ford slot MAF in custom 3" housing. Moates Quarterhorse with Binary Editor, using the PAAD6 database.

OpenEEC Telegram Chat:
Telegram

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

Re: SAD disassembler progress

Post by jsa » Sun Dec 15, 2019 10:17 pm

As per Motorhead, bank statement in dir causes crash.

From a cold start disassembly, I renamed the msg as dir, commented out a couple of lines at the top and run SAD. Instant crash until bank statement is deleted.

Also getting a couple Illegal Options in the subsequent msg.

Code: Select all

opts   :C F G N P S 

          ^ Illegal Option
timer   8ba73 8bba6: W X N 

                       ^ Illegal Option
Cheers

John

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

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

Re: SAD disassembler progress 4.0.1

Post by tvrfan » Sun Dec 15, 2019 10:28 pm

Does SAD work when just the bank command commented out ? (do this with a '#' at the front)

GIT.
Yeah, got my local and remote git repository to sync so that I can pull and push, and the push even deleted old versions to match the local
repository. Nice. I spent a while reading the howtos and had a frustrating experience getting it set up, but now it works.

I also like that when I copy the whole local directory tree (with git at the root of it) to another PC, it is able to sync up easily.

So I've got the basics down now, enough to work and update.

I'll stick with 32 bit builds for now, but will probably try to get a working Mingw64 on XP (I have 32 and 64 bit versions in VMs)

SAD.
I'll go look at bank command.. thanks again for that.

I think that bug for CARD (jsa) isn't a 32/64 problem after all. I now reckon the faulty PSW changed the order stuff was scanned/emulated and that revealed/concealed a bug. Have some clues to work on - more to look at.

Probably need to add some more safety checks too, as the code does get 4 args on both Linux and Win32 in the emulation phase, but adds an extra one in the Win build when processing the sizes (somehow....)

so 4.0.2 is probably soon.
TVR, kit cars, classic cars. Ex IT geek, development and databases.
https://github.com/tvrfan/EEC-IV-disassembler

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

Re: SAD disassembler progress 4.0.1

Post by tvrfan » Sun Dec 15, 2019 10:29 pm

jsa wrote: Sun Dec 15, 2019 10:17 pm As per Motorhead, bank statement in dir causes crash.

From a cold start disassembly, I renamed the msg as dir, commented out a couple of lines at the top and run SAD. Instant crash until bank statement is deleted.

Also getting a couple Illegal Options in the subsequent msg.

Code: Select all

opts   :C F G N P S 

          ^ Illegal Option
timer   8ba73 8bba6: W X N 

                       ^ Illegal Option
Thanks John, will investigate. Our posts crossed there...................
TVR, kit cars, classic cars. Ex IT geek, development and databases.
https://github.com/tvrfan/EEC-IV-disassembler

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

Re: SAD disassembler progress

Post by jsa » Sun Dec 15, 2019 11:17 pm

Another crash cause

One or the other is ok, but both in the DIR will crash SAD.
PEBKAC really, must of been trying something and failed to get rid of the incorrect cmd.
3.07 & 3.08 ignored me graciously though.

Code: Select all

STR 5442 54F1 :R N: Y O 3 : Y D 260 N: Y O 2 : W P 1: W | R N: Y O 3 : Y D 260 N: Y O 2 : W P 1

vect 54E8 54E9
Cheers

John

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

ironmanisanemic
Regular
Posts: 198
Joined: Tue May 24, 2011 8:33 pm
Location: Toutle WA

Re: SAD disassembler progress

Post by ironmanisanemic » Sun Dec 15, 2019 11:41 pm

I am experiencing an error where an address is not being resolved properly. I am completely green in this, but in other versions this worked properly.

looking for the MAF curve i can find the address in the following code. This is for GCM2 Cal, i have attached the bin.

Code: Select all

   Sub578:
874d1: f2                 pushp                  push(PSW);
874d2: af,f0,02,3a        ldzbw R3a,[Rf0+2]      wR3a = [2062];
874d6: 08,01,3a           shrw  R3a,1            R3a >>= 1;                        #[ R3a /= 2] 
874d9: b1,01,38           ldb   R38,1            R38 = 1;
874dc: c4,39,38           stb   R38,R39          R39 = R38;
874df: 93,3b,3d,9a,38     orb   R38,[R3a+9a3d]   R38 |= [R3a+9a3d];
874e4: ef,4c,b2           call  82733            Sub415();
874e7: b1,03,42           ldb   R42,3            R42 = 3;
874ea: e0,42,fd           djnz  R42,874ea        R42--;
                                                 if (R42 != 0) goto 874ea;
874ed: b0,15,36           ldb   R36,R15          R36 = LSSI_A;
874f0: 73,3b,3f,9a,36     an2b  R36,[R3a+9a3f]   R36 &= [R3a+9a3f];
874f5: 9b,3b,41,9a,36     cmpb  R36,[R3a+9a41]   
874fa: df,f1              je    874ed            if (R36 = [R3a+9a41]) goto 874ed;
874fc: fa                 di                     disable ints;
874fd: b0,19,47           ldb   R47,R19          R47 = LSSI_C;
87500: b0,17,46           ldb   R46,R17          R46 = LSSI_B;
87503: b0,15,36           ldb   R36,R15          R36 = LSSI_A;
87506: fb                 ei                     enable ints;
87507: 93,3b,43,9a,39     orb   R39,[R3a+9a43]   R39 |= [R3a+9a43];
8750c: 98,39,36           cmpb  R36,R39          
8750f: d7,c8              jne   874d9            if (R36 != R39) goto 874d9;
87511: c3,68,32,46        stw   R46,[R68+32]     [R68+32] = R46;
87515: a1,62,22,36        ldw   R36,2262         R36 = 2262;
87519: a0,46,38           ldw   R38,R46          R38 = R46;
8751c: ef,24,b4           call  82943            Sub424();
8751f: c0,29,3c           stw   R3c,R29          R29 = R3c;
87522: f3                 popp                   PSW = pop();
87523: f0                 ret                    return;
At 87515 the MAF curve is located at bank 1 address 2262. In previous versions, this was relabeled to func_MAF_Transfer when i added the following line to the dir file. But now it just stays listed as 2262 with no relabeling or resolving or whatever you want to call it.

Code: Select all

func 12262 122d9 "func_MAF_Transfer" :W V +12800 :W V +1024 

Code: Select all

8 74ed: b0,15,36          ldb   R36,R15        tmp2l = LSSI_A;
8 74f0: 73,3b,3f,9a,36    an2b  R36,[R3a+9a3f] tmp2l &= [tmp4l+9a3f];
8 74f5: 9b,3b,41,9a,36    cmpb  R36,[R3a+9a41] 
8 74fa: df,f1             je    74ed           if (tmp2l == [tmp4l+9a41]) goto 74ed;
8 74fc: fa                di                   disable ints;
8 74fd: b0,19,47          ldb   R47,R19        tmp0h = LSSI_C;
8 7500: b0,17,46          ldb   R46,R17        tmp0l = LSSI_B;
8 7503: b0,15,36          ldb   R36,R15        tmp2l = LSSI_A;
8 7506: fb                ei                   enable ints;
8 7507: 93,3b,43,9a,39    orb   R39,[R3a+9a43] tmp3h |= [tmp4l+9a43];
8 750c: 98,39,36          cmpb  R36,R39        
8 750f: d7,c8             jne   74d9           if (tmp2l != tmp3h) goto 74d9;
8 7511: c3,68,32,46       stw   R46,[R68+32]   [R68+32] = tmp0l;
8 7515: a1,62,22,36       ldw   R36,2262       tmp2l = func_MAF_Transfer;     // MAF Transfer Function
8 7519: a0,46,38          ldw   R38,R46        tmp3l = tmp0l;
8 751c: ef,24,b4          call  2943           Sub211();
8 751f: c0,29,3c          stw   R3c,R29        temp2h = tmp5l;
8 7522: f3                popp                 pop(PSW);
8 7523: f0                ret                  return;
I dont see a specific bank swap before the ldw unless the following sub424 knows to swap to bank 1 before loading R36.

I have done hardly any dissasembly and breakout of the code, as most of it doesnt make sense yet, but i am still learning.
Attachments
GCM2.bin
BXAN9 - 2000 Ford Taurus
(224 KiB) Downloaded 578 times
1989 Ford Bronco:
-393W, Edelbrock Performer RPM heads, ProComp Upper and lower intake, Custom Comp Hyd Roller cam, 10:1 compression,FRPP LU34 34lb injectors, 75mm TB, Pro-M 80mm MAF, equal length short tube headers, 2.5 inch y pipe merged into single 3 inch with hooker aerochamber muffler and no cat, QH w/ BE and EA running U4P0, 4R70W

1995 Ford Mustang GT
-Bone stock minus the QH. 5 Speed. T4M0

Ford 8061/8065 processor, assembly/dissasembly, strategy development information on my GDrive Share

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

Re: SAD disassembler progress

Post by jsa » Mon Dec 16, 2019 12:12 am

This does NOT crash

2000 in lieu of 0

Code: Select all

bank 8   2000   dfff
Cheers

John

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

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

Re: SAD disassembler progress

Post by jsa » Mon Dec 16, 2019 12:30 am

3.08 on left, 4.01 on right of image attached

This in dir, wondering why the ???

Code: Select all

SYM 200a "S.ROM_TO-Checksum"
.
.
.
word 200a 200b
Attachments
3.08 on left, 4.01 on right
3.08 on left, 4.01 on right
word and sym.png (25.62 KiB) Viewed 36249 times
Cheers

John

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

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

Re: SAD disassembler progress

Post by jsa » Mon Dec 16, 2019 12:48 am

3.08 on left, 4.01 on right of image attached

This in DIR results in null in lst
Commenting out resolves.

Code: Select all

WORD  BF36 BF39
3.08 on left, 4.01 on right
3.08 on left, 4.01 on right
word bf36.png (18.06 KiB) Viewed 36247 times
Cheers

John

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

motorhead1991
Regular
Posts: 238
Joined: Tue Nov 21, 2017 2:32 am

Re: SAD disassembler progress

Post by motorhead1991 » Mon Dec 16, 2019 12:53 am

jsa wrote: Mon Dec 16, 2019 12:12 am This does NOT crash

2000 in lieu of 0

Code: Select all

bank 8   2000   dfff
Glad that's been resolved. When I tried this in the past it would complain about something nonsensical. I figured since I only work on single banks currently, I'd just remove the bank call :grin:
1990 Ford Ranger FLH2 conversion. Ford forged/dished pistons, Total Seal file-fit rings, Clevite rod and main bearings, Clevite cam bearings, IHI turbo, Siemens Deka 60lb/hr injectors, Ford slot MAF in custom 3" housing. Moates Quarterhorse with Binary Editor, using the PAAD6 database.

OpenEEC Telegram Chat:
Telegram

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

Re: SAD disassembler progress

Post by tvrfan » Mon Dec 16, 2019 1:15 am

Thanks heaps to you all for these, and the workarounds - useful clues for me.

I think I found the incorrect argument cause in CARD.

I can't get the linux version to crash with feeding CARD msg file back as a dir (yet). Will try in my Win Build.
No too surprised on this as I had to mess around quite a bit with bank detection after finding a bug.

IronMan - in multibanks, the 'data bank' is normally set to 1, so any references without a bank prefix/instruction should get
resolved to '1xxxx'. Actually this didn't always work right in 3.08 either (on my bug list !). Some of the subroutine lists (= vect)
actually point to a different bank because if you do a push([R34+x]); RET; for example, it gets the data from bank 1 but will call a subroutine
in the same bank.... SAD *should* get this right.........

For jumps and subr calls, the default is the current bank, unless there is a bank prefix/instruction.
Last edited by tvrfan on Mon Dec 16, 2019 1:20 am, edited 1 time in total.
TVR, kit cars, classic cars. Ex IT geek, development and databases.
https://github.com/tvrfan/EEC-IV-disassembler

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

Re: SAD disassembler progress

Post by tvrfan » Mon Dec 16, 2019 1:16 am

motorhead1991 wrote: Mon Dec 16, 2019 12:53 am
jsa wrote: Mon Dec 16, 2019 12:12 am This does NOT crash

2000 in lieu of 0

Code: Select all

bank 8   2000   dfff
Glad that's been resolved. When I tried this in the past it would complain about something nonsensical. I figured since I only work on single banks currently, I'd just remove the bank call :grin:
Yeah, for a single bank, it's overkill !!
Perhaps I'll drop it out unless it's a multibank...
TVR, kit cars, classic cars. Ex IT geek, development and databases.
https://github.com/tvrfan/EEC-IV-disassembler

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

Re: SAD disassembler progress

Post by jsa » Mon Dec 16, 2019 1:48 am

Seeing widespread naming gremlins

Consider this in DIR

Code: Select all

rbase f4 c79e
.
.
SYM   62 "Incorrect"                 #W # 
.
.
SYM C800 "Correct"
4.01 applies the name of the offset, when it should be the base+offset result.
Should be R42=Correct
Output in lst.

Code: Select all

2097: a3,f4,62,42         ldw   R42,[Rf4+62]     R42 = Incorrect;
Cheers

John

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

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

Re: SAD disassembler progress

Post by jsa » Mon Dec 16, 2019 2:19 am

3.08 dir entry

Code: Select all

Sub 7773 "Sub7773_UUByteLU"   : E 4 f0 N : W N #: F 1 32 Y U U
I have tried combinations of Sub, Sym and Arg to get the equivalent in 4.01.
The 4.01 list has no names assigned, persists with 1 word and 2 bytes, or misses the args all together.

Suggestions?
Cheers

John

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

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

Re: SAD disassembler progress

Post by tvrfan » Mon Dec 16, 2019 4:11 am

I did say that many directives may not work !! This build was about the variable args.

I found that restoring A9L directives file causes the wierd address fault, but having no dirs at all and they work just fine.

OK - I'm going to finish the arg problem first,
then temp drop the bank line altogether,
and then try to work out why a directive messes up the syms and addresses....
TVR, kit cars, classic cars. Ex IT geek, development and databases.
https://github.com/tvrfan/EEC-IV-disassembler

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

Re: SAD disassembler progress

Post by jsa » Mon Dec 16, 2019 4:51 am

Yes, you did say.
tvrfan wrote: Mon Dec 16, 2019 4:11 am I did say that many directives may not work !! This build was about the variable args.
No worries. I see only the one bug as far as arg count goes.

Where do you expect to be for Word VS Byte?
I found that restoring A9L directives file causes the wierd address fault, but having no dirs at all and they work just fine.
Indeed.
OK - I'm going to finish the arg problem first,
then temp drop the bank line altogether,
and then try to work out why a directive messes up the syms and addresses....
Looking forward to 4.02.
Cheers

John

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

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

SAD 4.0.2 Posted

Post by tvrfan » Mon Dec 16, 2019 2:34 pm

Posted 4.0.2 with following fixes

1. TEMP - sub command will ignore any extra parameters (symbol name should work)
2. TEMP - removed and ignore bank commands - not normally required anyway

3. Fixed problem with incorrect number of arguments (CARD and others)
4. Fixed problem with listing displaying incorrect number/symbol in indexed opcodes
5. Fixed 'NULL' symbol with word commands
6. Added more code to correctly size arguments. (was missing check when argument used as an address -> should fix CARD issue)
7. Fixed crash when commands overlap or fail - now gives error message instead
8. Fixed Windows path bug. Found when debuggung for the others.... causes processing to stop.

Also now prints a special func number for lookups - this will be basis of a new command setup (sorry JSA!)

The variable argument changes meant BIG changes to subroutines, and honestly I haven't worked out how to allow user commands
along with the variable detect. This obviously needs to be done at some point.

Also I want to change the commands to make sizes simpler. instead of :S Y: Y: (or : SW : SW) layouts, I want your opinion on -

:Z n : where Z is siZe. n = 1 unsigned byte, 2 unsigned word, 3 unsigned long, 5 signed byte, 6 signed word, 7 signed long.
(this is actually what the code uses inside the program.)
TVR, kit cars, classic cars. Ex IT geek, development and databases.
https://github.com/tvrfan/EEC-IV-disassembler

ironmanisanemic
Regular
Posts: 198
Joined: Tue May 24, 2011 8:33 pm
Location: Toutle WA

Re: SAD disassembler progress

Post by ironmanisanemic » Tue Dec 17, 2019 12:23 am

tvrfan wrote: Mon Dec 16, 2019 1:15 am Thanks heaps to you all for these, and the workarounds - useful clues for me.

I think I found the incorrect argument cause in CARD.

I can't get the linux version to crash with feeding CARD msg file back as a dir (yet). Will try in my Win Build.
No too surprised on this as I had to mess around quite a bit with bank detection after finding a bug.

IronMan - in multibanks, the 'data bank' is normally set to 1, so any references without a bank prefix/instruction should get
resolved to '1xxxx'. Actually this didn't always work right in 3.08 either (on my bug list !). Some of the subroutine lists (= vect)
actually point to a different bank because if you do a push([R34+x]); RET; for example, it gets the data from bank 1 but will call a subroutine
in the same bank.... SAD *should* get this right.........

For jumps and subr calls, the default is the current bank, unless there is a bank prefix/instruction.
That makes sense. I just tried it with 3.08 making no other changes, and the address resolves correctly, doing it again on 4.01, it doesnt.
1989 Ford Bronco:
-393W, Edelbrock Performer RPM heads, ProComp Upper and lower intake, Custom Comp Hyd Roller cam, 10:1 compression,FRPP LU34 34lb injectors, 75mm TB, Pro-M 80mm MAF, equal length short tube headers, 2.5 inch y pipe merged into single 3 inch with hooker aerochamber muffler and no cat, QH w/ BE and EA running U4P0, 4R70W

1995 Ford Mustang GT
-Bone stock minus the QH. 5 Speed. T4M0

Ford 8061/8065 processor, assembly/dissasembly, strategy development information on my GDrive Share

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

Re: SAD 4.0.2 updated

Post by tvrfan » Tue Dec 17, 2019 1:34 pm

Updated 4.0.2 to fix problem with sym names in multibanks (-> ironman)

Also taken opportunity whilst fixing to add bank number in indirect [xxxx] or indexed [Rn + xxxx] psuedo code where code is sure that the address is an absolute one. (i.e. greater than 0x2000 and less than 0xffff). Those indexed addresses can be negative offsets, so have to add extra checks.

I think it's right though..............
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 8 guests