Go Back   Third Generation F-Body Message Boards > Tech Boards > DIY PROM
Sign in using an external account
Register Forgot Password?

DIY PROM Do It Yourself PROM chip burning help. No PROM begging. No PROMs for sale. No commercial exchange. Not a referral service.

Welcome to ThirdGen.org!
Welcome to ThirdGen.org.

You are currently viewing our forum as a guest, which gives you limited access to view most discussions and access our other features. By joining our community, at no cost, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is free, fast and simple, join the ThirdGen.org community today!


Reply
 
Thread Tools Search this Thread
Old 05-11-2004, 04:40 PM   #1
Member
 
Join Date: Feb 2003
Location: ohio
Posts: 174

Classifieds Rating: (0)
Send a message via AIM to clippjr8
Commenting a disassembled binary file

Anyone want to join in on a learning session on how to comment a disassembled binary file? Im trying to learn how to do it on my own and need some help and thought that everyone on the board could learn how also if they wanted to. What i have is a partially done file form a 94 cavalier, 2.2L, 16191947 ecm.

Any of the source code guys want to lend a hand on this? I think this could be a good start on more people learning how to read code and make changes to there files as needed.
Any takers? I cant upload the file here so i can email it to anyone that can so we can get it posted for others to download and follow along. thanks in advance!
__________________
keepin up is not an option
clippjr8 is offline vBGarage Page   Reply With Quote
Old 05-11-2004, 06:21 PM   #2
Senior Member
 
Join Date: Jun 2000
Location: In reality
Posts: 7,554
Car: An Ol Buick
Engine: Vsick
Transmission: Janis Tranny Yank Converter

Classifieds Rating: (0)
While not a pro at it. This is how I've tackled it so far.

Read as many hacs that have the calibration end of it commented.
read the Source Code that I've posted.

If you have a disassemblied .bin.
then the next thing to do is getting it so that it assemblies. Once you get it to assemble, compare it to the original .bin to make sure that it assemblies correctly.

Not all disassemblies and assembliers are friendly with each other. So sometimes it takes alot of work to get them to play nice together. If you can get more then one assemblier, and have it assemble the .asm, like the other so much the better.

Find the ALDL datastream, as it identifies a few of the RAM locations. Once you get this far then you can start identifing some of the larger tables, and then cross referencing the tables in the calibration area to where they're mentioned in the code area.

NEVER USE a .TXT, or .DOC file type as good ole winders adds some header info that fubars the document, use .asm and maybe TextPad instead of WordPad.

At he end of the code are the vectors, that tell you where the code actually starts to get read.

Get real familiar with using *find*, and all the other shortcuts you can.

Hope you have a Motorola Pink Book, if not visit their site and get one.

Once you begin to fill things in some of gets more apparent.

There are somethings that just are difficult to figure out.

Be prepared to put alot of time into this.
More then you can imagine, unless your wel versed in assembly to begin with.

And it's exposure, you gotta spend at least some time on it every day. And yet, when you hit a wall know when to take a break, and just walk away.
Grumpy is offline vBGarage Page   Reply With Quote
Old 05-11-2004, 07:37 PM   #3
Member
 
Join Date: Feb 2003
Location: ohio
Posts: 174

Classifieds Rating: (0)
Send a message via AIM to clippjr8
Thank you so much for the reply on this. Ill get the pink book asap! Ok, on the the assembler. Ive got the asm11 assembler and i use the cats disassembler. whenever i try and assemble it with the asm11, it gives me a wookie document. is this correct? i have the aldl datastream for it and will check some of the locations for it. example: if the datastream says spk adv rel to top dead center at location 4005. is that were the spark adv table is located? next, what do you mean by calibration end, the beginning or end? thanks grumpy.
clippjr8 is offline vBGarage Page   Reply With Quote
Old 05-11-2004, 10:51 PM   #4
Senior Member
 
Join Date: Jun 2000
Location: In reality
Posts: 7,554
Car: An Ol Buick
Engine: Vsick
Transmission: Janis Tranny Yank Converter

Classifieds Rating: (0)
Dunno, wookie.
All the calibration data is at the beginning of the .bin file.

The data stream point to where the data for say the final spark computation is, not the table itself.

The 3D tables all have a header, then the table.

You do a serach here for Programming 101, and read thru that. Or at DIY-EFI.org, I forget where it's located there.
Grumpy is offline vBGarage Page   Reply With Quote
Old 05-12-2004, 02:24 AM   #5
Moderator
 
Join Date: Jan 2002
Location: Moorestown, NJ
Posts: 9,657
Car: 88 Camaro SC
Engine: SFI'd 350
Transmission: TKO 500
Axle/Gears: 9-bolt w/ 2.77's

Classifieds Rating: (1)
Send a message via AIM to dimented24x7
Wookie is a HC11 simulation program. Managed to slip onto my computer as well. Must have put it on awhile ago and forgotten. The files are assembled into motorolla .S19 format. TC has a utility that will convert it over to a bin file. From there, use a good hex editor like Hexworkshop or the like to compare the two and fix all the errors untill the compiled one is identical to the binary you used as the source.
dimented24x7 is offline vBGarage Page   Reply With Quote
Old 05-12-2004, 04:13 PM   #6
Member
 
Join Date: Feb 2003
Location: ohio
Posts: 174

Classifieds Rating: (0)
Send a message via AIM to clippjr8
Let me make sure i got this straight:

-download the bin from the prom and save as a binary file.

-Use a disassembler to create a wookie file

-Use a utility from TC to convert the wookie file to a bin file

-Use a program like hexworkshop to correct the mistakes on the bin to match the source bin i started with.

Is this correct? Is there anyway around the wookie file? im not sure why it keeps popping up.

Ill read up on programming 101 again and see what else i can get from it.

Anything im missing or doing wrong? I have a file started, ive downloaded it using the disassembler from TC and have tried to assemble it but all i keep getting is the wookie file. Is there a setting or something on the asm11 i need to change? thanks again!
clippjr8 is offline vBGarage Page   Reply With Quote
Old 05-12-2004, 04:28 PM   #7
Member
 
Join Date: Feb 2003
Location: ohio
Posts: 174

Classifieds Rating: (0)
Send a message via AIM to clippjr8
OK, ive brushed up on programming 101 and im glad i did. ill compare the locations to the bin i have and go from there. thanks grumpy.

also, what utility is it from TC that i need? S2BIN, or another? thanks
clippjr8 is offline vBGarage Page   Reply With Quote
Old 05-12-2004, 06:11 PM   #8
Moderator
 
Join Date: Jan 2002
Location: Moorestown, NJ
Posts: 9,657
Car: 88 Camaro SC
Engine: SFI'd 350
Transmission: TKO 500
Axle/Gears: 9-bolt w/ 2.77's

Classifieds Rating: (1)
Send a message via AIM to dimented24x7
The wookie thing is jsut an association. The file is in standard motorola .S19 I think some burning software will allow you to burn directly to a prom using S19 format but to compare files its necessary to make it a binary.
dimented24x7 is offline vBGarage Page   Reply With Quote
Old 05-12-2004, 07:02 PM   #9
Member
 
Join Date: Feb 2003
Location: ohio
Posts: 174

Classifieds Rating: (0)
Send a message via AIM to clippjr8
ok, here is what im trying to accomplish:

1- I want to create an ecu file for the bin file i have. to do that, what all do i need to do?

2- I want to learn how to insert the human language into the file so i have the info to create the ecu file. What do i need to do to do that?

3-My main goal is to be able to alter my bin file and make the car respond how i want it to.

Ive been doing all the things suggested and im making progress, but i need a little more info on this. anybody up for my first suggestion on having a tutorial here? i could post the bin and then we could disassemble it and reassemble it and maybe do a comment or two together to learn how all this is done. are you interested grumpy or anyone else here? thanks for all your help.
clippjr8 is offline vBGarage Page   Reply With Quote
Old 05-12-2004, 08:33 PM   #10
Moderator
 
Join Date: Mar 2002
Location: Chasing Electrons
Posts: 11,391
Car: check
Engine: check
Transmission: check

Classifieds Rating: (1)
The first thing to do is to disassemble the bin. You should have a file that looks something like this:
Code:
LDEC5:	LDAB	L000D
	BITB	#$10	
	BEQ	LDED7	
			
	LDAA	L000E	
	BITA	#$40	
	BNE	LDF18	
			
	LDAA	L00A4	
	BPL	LDF18

	BRA	LDEBD
That will be source code. And probably several thousand lines in length. The next thing to do is to figure out what is what in the code and comment it. So it looks like this:

Code:
LDEC5:	LDAB	L000D		; STATUS WD
	BITB	#$10		; b4
	BEQ	LDED7		; BR IF NOT b4
				; 
	LDAA	L000E		; A/F MODE Word Flag
	BITA	#$40		; b6, RICH
	BNE	LDF18		; BR IF b6
				; 
	LDAA	L00A4		; INTEGRATOR, BIN
	BPL	LDF18           ; BRA if INT removing fuel
	BRA	LDEBD
From that you can put together an ECU file from the calibration area. And, be able to change the source into a format that an assembler can assemble.

RBob.
RBob is offline vBGarage Page   Reply With Quote
Old 05-12-2004, 08:46 PM   #11
Senior Member
 
Join Date: Jun 2000
Location: In reality
Posts: 7,554
Car: An Ol Buick
Engine: Vsick
Transmission: Janis Tranny Yank Converter

Classifieds Rating: (0)
Just to back up a little.

!) you need to be totally familiar with what scanned info. looks like under all conditions.

2) Have as many data logs from as many conditions as possible, from crank to WOT.

3) Be able to fire up the ecm bench, and know what to look for under all conditions and be able to do a sanity check with data logs.

4) The above three items are absolutes. Violating ANY of the above with leave you scratching your head for hours, and could pose a potentically dangerous driving situation.

5) This is very serious stuff when you fire up several thousands pounds of iron, and run it down the road at normal road speeds. You don't have to be going fast to have a serious situation develope. It can happen in reverse just pulling out of the garage.

6) THERE IS NOTHING SWEETER THEN THE FIRST TEST DRIVE WITH YOUR OWN SOURCE CODE.
Grumpy is offline vBGarage Page   Reply With Quote
Old 05-12-2004, 09:43 PM   #12
Member
 
Join Date: Feb 2003
Location: ohio
Posts: 174

Classifieds Rating: (0)
Send a message via AIM to clippjr8
thanks rbob and grumpy, that is what i was looking for in an answer. rbob, i only get one line for each location when i do my disassembly and it does not look quite like yours. it is only like 3 digits long. am i doing the disassembly wrong maybe?

can you use my file and give an example here if i email it to you? form an example i can go from there with a good understanding.
clippjr8 is offline vBGarage Page   Reply With Quote
Old 05-12-2004, 11:31 PM   #13
Senior Member
 
Join Date: Jun 2000
Location: In reality
Posts: 7,554
Car: An Ol Buick
Engine: Vsick
Transmission: Janis Tranny Yank Converter

Classifieds Rating: (0)
Quote:
Originally posted by clippjr8
thanks rbob and grumpy, that is what i was looking for in an answer. rbob, i only get one line for each location when i do my disassembly and it does not look quite like yours. it is only like 3 digits long. am i doing the disassembly wrong maybe?

can you use my file and give an example here if i email it to you? form an example i can go from there with a good understanding.
Might snag a copy of the 58 source code at moates site, and read thru it some. That'll get you somewhat more familiar with how things get laid out.
Grumpy is offline vBGarage Page   Reply With Quote
Old 05-13-2004, 07:59 AM   #14
Moderator
 
Join Date: Mar 2002
Location: Chasing Electrons
Posts: 11,391
Car: check
Engine: check
Transmission: check

Classifieds Rating: (1)
Quote:
Originally posted by clippjr8
. . .rbob, i only get one line for each location when i do my disassembly and it does not look quite like yours. it is only like 3 digits long. am i doing the disassembly wrong maybe? . . .
I've never used the cats disassembler so I can't say what and how to use it.

Can you post a couple of lines of what you have?

When I do an disassembly I do a decimal dump on the calibration data area. For 3d tables I'll use PromEdit and manually format the tables with the rows/columns commands then cut and paste the table into the source. Less editing that way.

I use the interrupt vector table at the end of the bin to find the code start location. I'll use that for the end address of the cal data and the beginning address of where to start to disassemble.

RBob.
RBob is offline vBGarage Page   Reply With Quote
Old 05-13-2004, 03:46 PM   #15
Member
 
Join Date: Feb 2003
Location: ohio
Posts: 174

Classifieds Rating: (0)
Send a message via AIM to clippjr8
here is a few lines of what i have so far.

;-----------------------------------------------------------
; Table vs RPM vs MAP
;
; If RPM >= 4800 RPM use table @ $4153
;
; 13 x 17
;-----------------------------------------------------------
4073: FCB 000
4074: FCB 000
4075: FCB 013
; 400 RPM
4076: FCB 097 ;
4077: FCB 097 ;
4078: FCB 097 ;
4079: FCB 097 ;
407A: FCB 097 ;
407B: FCB 092 ;
407C: FCB 088 ;
407D: FCB 087 ;
407E: FCB 085 ;
407F: FCB 085 ;
4080: FCB 080 ;
4081: FCB 077 ;
4082: FCB 074

this is the spark table i presume. how does it look? now what?
clippjr8 is offline vBGarage Page   Reply With Quote
Old 05-13-2004, 05:26 PM   #16
Moderator
 
Join Date: Mar 2002
Location: Chasing Electrons
Posts: 11,391
Car: check
Engine: check
Transmission: check

Classifieds Rating: (1)
Now what? If the CATS disassembler gives that much info you are ahead of the game already. I would search the code for the 4073 address (start of the table) and comment it as the main SA table.

Look at other hac's and you will see a pattern. Most of this vintage GM code is similar.

Then you'll be able to see other things such as bias values, inital values, and so on.

Another tip is to find the ALDL transmit list and match it up to the ALDL values. Then you'll be able to label each of those through out the code. It is a process of building on top on building what you already have.

Just from the above table the code area will have the MAP & RPM, and possibly the TPS% RAM locations.

RBob.
RBob is offline vBGarage Page   Reply With Quote
Old 05-13-2004, 07:59 PM   #17
Member
 
Join Date: Feb 2003
Location: ohio
Posts: 174

Classifieds Rating: (0)
Send a message via AIM to clippjr8
hey rbob, i actually had alot of help with that part of it with TC. the disassembler does not give you that much info. im still not sure how to get the rest of it either. here is a table from the bin i disassembled:

4072: 30 FCB $30
4073: 00 FCB $00
4074: 00 FCB $00
4075: 0D FCB $0D
4076: 61 FCB $61
4077: 61 FCB $61
4078: 61 FCB $61
4079: 61 FCB $61
407A: 61 FCB $61
407B: 5C FCB $5C
407C: 58 FCB $58
407D: 57 FCB $57
407E: 55 FCB $55
407F: 55 FCB $55
4080: 50 FCB $50
4081: 4D FCB $4D
4082: 4A FCB $4A

now how do i get the info to comment this part. as you can see it is the same location of the same bin file so i want to know how to go from this to the other section that i listed previously.
clippjr8 is offline vBGarage Page   Reply With Quote
Old 05-13-2004, 08:33 PM   #18
Moderator
 
Join Date: Mar 2002
Location: Chasing Electrons
Posts: 11,391
Car: check
Engine: check
Transmission: check

Classifieds Rating: (1)
Learn to read the code, and become familiar with currently available GM hacs.

RBob.

P.S. also having the ALDL list is beneficial.
RBob is offline vBGarage Page   Reply With Quote
Old 05-13-2004, 08:36 PM   #19
Member
 
Join Date: Feb 2003
Location: ohio
Posts: 174

Classifieds Rating: (0)
Send a message via AIM to clippjr8
ok, will do and i do have the aldl info handy. To learn to read code, will i need more than a few hacks and the pink book from motorola? Ill keep looking at other hacks and see what i can do. any more advice you can give me for how to learn to read the code?
clippjr8 is offline vBGarage Page   Reply With Quote
Old 05-13-2004, 08:36 PM
ThirdGen
1992 Camaro




Paid Advertisement


Reply

Go Back   Third Generation F-Body Message Boards > Tech Boards > DIY PROM

Tags
4005, asm11, assembler, binary, book, ecm, memcal, motorolla, pink, project, thirdgen, use, wookie
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

 


1982 Camaro '82 || 1983 Camaro '83 || 1984 Camaro '84 || 1985 Camaro '85 || 1986 Camaro '86 || 1987 Camaro '87 || 1988 Camaro '88 || 1989 Camaro '89 || 1990 Camaro '90 || 1991 Camaro '91 || 1992 Camaro '92


All times are GMT -5. The time now is 07:34 PM.


Powered by vBulletin® Version 3.7.5
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.5.2
All content copyright © 1997 - 2012 ThirdGen.org. All rights reserved. No part of this website may be reproduced without the expressed, documented, and written consent of ThirdGen.org's Administrators.

Emails & Contact Details