The Subaru SVX World Network   SVX Network Forums
Live Chat!
SVX or Subaru Links
Old Lockers
Photo Post
How-To Documents
Message Archive
SVX Shop Search
IRC users:
SVXBot

Go Back   The Subaru SVX World Network > SVX Main Forums > Technical Q & A

Reply
 
Thread Tools Display Modes
  #1  
Old 04-27-2007, 02:06 AM
b3lha's Avatar
b3lha b3lha is offline
Phil & Belha
 
Join Date: Aug 2001
Location: Alcyone Limited, Buckinghamshire UK
Posts: 2,670
Memory dump of ECU

I have dumped the memory of my ECU to a file and I'm starting to analyse it. Any other hardcore computer guys want to take a look?

Car: 94 JDM version S40-ii
RomID: 742512

CPU is M37791 (Mitsubishi MELPS7700)

This file is a dump of the whole 16-bit address space.

0000-00FF is IO
1000-14FF is RAM data (14FF downwards is the program stack)
8000-8FFF is ROM data (possible 16x16 tables at 0x8120 and 0x8e20 ?)
9000-FFCF is ROM code
FFD0-FFFF is Interrupt vectors
The rest of the address space appears to be unused.

Attached Files
File Type: zip ECU.zip (49.4 KB, 699 views)
__________________
Subaru ECU and TCU Website
1992 Alcyone SVX Version L
1992 Alcyone SVX Version L
1994 Alcyone SVX S40-II
2004 Subaru Legacy 2.5 SE Sports Tourer
1996 Subaru Legacy 2.2 GX Wagon
1988 Subaru Justy J12 SL-II
Reply With Quote
  #2  
Old 04-27-2007, 03:12 AM
Dessertrunner's Avatar
Dessertrunner Dessertrunner is offline
Registered User
 
Join Date: Jul 2005
Location: Griffith NSW
Posts: 2,149
YEs I am interested how did you dump the data? I tried to open the file and didn't have any luck.
Tony
__________________
1995 - SVX 700,000 K Mine, DMS Struts to lift car 2in. Tyres Wrangler Silent Armor 235/70R16, PBR Radiator. 6 speed with DCCD and R180 rer diff, Heavy duty top strut mounts front and rear. Speedo correction box fitted. New stero (gave up on the old one). Back seat removed and 2 spare tyres fitted for desert driving. ECUTune SC sitting in the box for the next SVX.
1992 - SVX 255 K Wife (Want to stay Married so not allowed to fit SC)
1992 - SVX Pearl with black roof race car roll cauge etc ready to race. Ex Tasman Targa car.
1995 - SVX Green low k mint condiation.
1995 - SVX Rally car, ex Matts car. Now to be used on track.
1992 - SVX red & Black being converted to Mid Engine.
1995 - SVX Red 143,000 bit rough.
Owned 5 others Subaru back to a 1974 1400 GSR.
Reply With Quote
  #3  
Old 04-27-2007, 05:52 AM
JaySVX's Avatar
JaySVX JaySVX is offline
Bad decisions effect everybody
 
Join Date: Mar 2007
Location: Collegeville, PA
Posts: 1,903
Send a message via AIM to JaySVX Send a message via Yahoo to JaySVX
Any way you can export it to raw text? Having issues with the .bin.
__________________
*No SVX at the moment...*
1987 Winnebago Elandan 35'
2001 Yamaha Roadstar 1600
2004 Ford Excursion Eddie Bauer, 6.0litre Power Stroke Diesel - Daily Driver.


Life should NOT be a journey to the grave with the intention of arriving safely in an attractive and well-preserved body, but rather to skid in sideways, scotch in one hand, body thoroughly used up, totally worn out and screaming HOOOOYA !!!!!
Reply With Quote
  #4  
Old 04-27-2007, 07:41 AM
b3lha's Avatar
b3lha b3lha is offline
Phil & Belha
 
Join Date: Aug 2001
Location: Alcyone Limited, Buckinghamshire UK
Posts: 2,670
OK. Here's some raw text files (inside the zip):

Archive: ECU3.zip
Length Date Time Name
-------- ---- ---- ----
331776 04-27-07 14:43 AddressSpace.txt - This is the whole address space from 0000 to FFFF (engine off).
320896 04-27-07 15:32 disassembled-code.txt - This is a disassembly of the program code from 9000 to FEB5.
6240 04-27-07 14:43 RAM-data.txt - This is the RAM data from 1000 to 14FF (engine idling).
19968 04-27-07 14:43 ROM-data.txt - This is the ROM data from 8000 to 8FFF.
-------- -------
678880 4 files


I'm putting together some info on how to do this and will post it later today.

Phil.
Attached Files
File Type: zip ECU3.zip (184.8 KB, 576 views)
__________________
Subaru ECU and TCU Website
1992 Alcyone SVX Version L
1992 Alcyone SVX Version L
1994 Alcyone SVX S40-II
2004 Subaru Legacy 2.5 SE Sports Tourer
1996 Subaru Legacy 2.2 GX Wagon
1988 Subaru Justy J12 SL-II

Last edited by b3lha; 04-27-2007 at 08:35 AM.
Reply With Quote
  #5  
Old 04-27-2007, 07:52 AM
Hocrest's Avatar
Hocrest Hocrest is offline
Freezepop's are Awesome!!!!
Subaru Silver Contributor
 
Join Date: Oct 2003
Location: Pittston, PA
Posts: 5,333
Send a message via AIM to Hocrest
OK, now the real question???

Does subavanagon + Your Memory Dump Info + This and a few things =

__________________
Dave
- 03 Baja - 92 SVX - 86 Brat - 01 OB 3.0
Reply With Quote
  #6  
Old 04-27-2007, 12:22 PM
b3lha's Avatar
b3lha b3lha is offline
Phil & Belha
 
Join Date: Aug 2001
Location: Alcyone Limited, Buckinghamshire UK
Posts: 2,670
Quote:
Originally Posted by Hocrest
OK, now the real question???

Does subavanagon + Your Memory Dump Info + This and a few things =
YES
(once the correct parameter addresses are found)

Please check my website for further details. I have created a HOWTO for building the interface and posted the results of my investigations so far.
http://www.alcyone.org.uk/ssm
I have also written some open-source software to download data from the ECU.

I am making three of these interfaces with the intention of selling two of them. Currently two are complete, tested and working. The third one is almost complete, just waiting on a part that was out of stock at the supplier.
__________________
Subaru ECU and TCU Website
1992 Alcyone SVX Version L
1992 Alcyone SVX Version L
1994 Alcyone SVX S40-II
2004 Subaru Legacy 2.5 SE Sports Tourer
1996 Subaru Legacy 2.2 GX Wagon
1988 Subaru Justy J12 SL-II

Last edited by b3lha; 04-27-2007 at 12:28 PM.
Reply With Quote
  #7  
Old 04-27-2007, 07:46 PM
SVXdc's Avatar
SVXdc SVXdc is offline
Radio wiring harness guru
Subaru Gold Contributor
 
Join Date: Oct 2002
Location: Atlanta, GA
Posts: 609
Significant Technical Input Registered SVX
For folks in the states: the audio harness used to connect to the Subaru diagnostics plug is a Metra 70-1780 or Scosche SU-02 (one of the two pieces in the kit the one with the 8 speaker wires).

If you want to get fancy, you can transplant the Red (+12V) and Black (Ground) wires from the other harness so those pins are the correct colors, plus any other colors you'd like to use for Transmit and Receive.

Attached are pictures of the pair from Crutchfield.com, and a head-on view drawing.
Attached Images
File Type: jpg Metra 70-1780.jpg (36.0 KB, 729 views)
File Type: jpg AUTOLEADS-PC2-29-4.jpg (11.0 KB, 721 views)
__________________
David C.
1996 Laguna Blue Pearl SVX L AWD
See my home page for SVX radio install/removal instructions and wiring harnesses

Last edited by SVXdc; 04-28-2007 at 11:24 AM. Reason: harness manufacturer names were transposed
Reply With Quote
  #8  
Old 04-27-2007, 07:56 PM
LetItSnow's Avatar
LetItSnow LetItSnow is offline
Still Cant' Say the Z-Word
 
Join Date: Mar 2007
Location: Syracuse, NY
Posts: 2,340
Send a message via AIM to LetItSnow
Registered SVX
JSRBBQSAUCE. I haven't played with assembly in a bazillion years!
__________________
Disclaimer: The above post is on the internet.
Reply With Quote
  #9  
Old 04-27-2007, 11:10 PM
SVXdc's Avatar
SVXdc SVXdc is offline
Radio wiring harness guru
Subaru Gold Contributor
 
Join Date: Oct 2002
Location: Atlanta, GA
Posts: 609
Significant Technical Input Registered SVX
That is cool, Phil. I'd like to look through that code disassembly at some point. I'd want to poke around the net and see if there's any kind of tool that can help plug symbols back in, to make it a little more readable.

Quote:
Originally Posted by LetItSnow
JSRBBQSAUCE
__________________
David C.
1996 Laguna Blue Pearl SVX L AWD
See my home page for SVX radio install/removal instructions and wiring harnesses
Reply With Quote
  #10  
Old 04-28-2007, 02:02 AM
b3lha's Avatar
b3lha b3lha is offline
Phil & Belha
 
Join Date: Aug 2001
Location: Alcyone Limited, Buckinghamshire UK
Posts: 2,670
Quote:
Originally Posted by LetItSnow
JSRBBQSAUCE. I haven't played with assembly in a bazillion years!
Well fortunately, this CPU is a bazillion years old!

It was far from cutting-edge even when the car was built 15 years ago. It's a newer variant of the old 6502 chip from the BBC Micro of 1982 and a lot of the instructions are very similar. I spent most of my early teens learning how to program my BBC Micro and somewhere I've got a well-used book on 6502 assembler. I knew it would come in handy one day!
__________________
Subaru ECU and TCU Website
1992 Alcyone SVX Version L
1992 Alcyone SVX Version L
1994 Alcyone SVX S40-II
2004 Subaru Legacy 2.5 SE Sports Tourer
1996 Subaru Legacy 2.2 GX Wagon
1988 Subaru Justy J12 SL-II
Reply With Quote
  #11  
Old 04-28-2007, 03:30 AM
Trevor Trevor is offline
Banned
 
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 5,067
Registered SVX
Phil, you ARE the cutting edge.

We certainly have a range of in depth skills on the network.

Good one, Trevor.
Reply With Quote
  #12  
Old 04-28-2007, 06:29 AM
cdvs cdvs is offline
Registered User
 
Join Date: Mar 2007
Location: Oakham, MA
Posts: 197
Quote:
Originally Posted by Hocrest
By 'a few things' you mean a dropping resistor, voltage divider or other voltage converter to reduce the vehicle's 12V+ to 5V+ for the RS232/TTL converter linked to above or similar premade device?

This seems a quicker and less complicated method to get to the same place as building the interface from scratch.

We could then connect with the audio plug described as follows:

pin 2 (orange/white) transmit (rs232/ttl)
pin 3 (blue/white) receive (rs232/ttl)
pin 5 (red/black) to +12V in (choice of above) to +5v out (rs232/ttl)
pin 9 (green/black) ground (rs232/ttl)

Good show!
Reply With Quote
  #13  
Old 04-28-2007, 01:19 PM
SVXdc's Avatar
SVXdc SVXdc is offline
Radio wiring harness guru
Subaru Gold Contributor
 
Join Date: Oct 2002
Location: Atlanta, GA
Posts: 609
Significant Technical Input Registered SVX
Quote:
Originally Posted by cdvs
By 'a few things' you mean a dropping resistor, voltage divider or other voltage converter to reduce the vehicle's 12V+ to 5V+ for the RS232/TTL converter linked to above or similar premade device?
The MAX232 chip is somewhat susceptible to blowing up when the voltage goes out of range, so a voltage converter is recommended.

The 78L05 is an ideal part The TO-92 version (package that looks like a transistor) is tiny, very inexpensive (less than $1), and provides more than enough current (100mA), where the MAX232 draws at most 10mA. The larger 7805 is rated up to 1A. The wiring is exactly the same.

Quote:
pin 2 (orange/white) transmit (rs232/ttl)
pin 3 (blue/white) receive (rs232/ttl)
pin 5 (red/black) to +12V in (choice of above) to +5v out (rs232/ttl)
pin 9 (green/black) ground (rs232/ttl)
Viewing the pins-side of the connector, oriented as in the drawing in my earlier post, the pin numbers run from 1 at the top left corner, across the top to 4, then resume on the bottom left with 5 across to 9.

The car's factory wire colors are different in my '96, as well as on the '96 wiring diagram:
2 Brown/White
3 Green/Red
4 Red/Blue
5 Brown/Red
9 Black/Red

Pin 4 goes to the Cruise Control module. All other positions are unpopulated.

Quote:
Originally Posted by b3lha
[the CPU is] a newer variant of the old 6502
I thought some of those instructions and opcodes looked really familiar. I played with the Apple ][ way back when.

Quote:
somewhere I've got a well-used book on 6502 assembler. I knew it would come in handy one day!
It'll only come in handy if you can find it . Fortunately, there's always the Internet.
__________________
David C.
1996 Laguna Blue Pearl SVX L AWD
See my home page for SVX radio install/removal instructions and wiring harnesses

Last edited by SVXdc; 04-28-2007 at 03:54 PM. Reason: edited to say I'm referring to factory wire colors
Reply With Quote
  #14  
Old 04-28-2007, 03:46 PM
b3lha's Avatar
b3lha b3lha is offline
Phil & Belha
 
Join Date: Aug 2001
Location: Alcyone Limited, Buckinghamshire UK
Posts: 2,670
Quote:
Originally Posted by SVXdc
The colors are different in my '96, as well as on the '96 wiring diagram:
I'm talking about the colours on the radio harness connector, not the car.
__________________
Subaru ECU and TCU Website
1992 Alcyone SVX Version L
1992 Alcyone SVX Version L
1994 Alcyone SVX S40-II
2004 Subaru Legacy 2.5 SE Sports Tourer
1996 Subaru Legacy 2.2 GX Wagon
1988 Subaru Justy J12 SL-II
Reply With Quote
  #15  
Old 04-28-2007, 03:48 PM
SVXdc's Avatar
SVXdc SVXdc is offline
Radio wiring harness guru
Subaru Gold Contributor
 
Join Date: Oct 2002
Location: Atlanta, GA
Posts: 609
Significant Technical Input Registered SVX
Quote:
Originally Posted by b3lha
I'm talking about the colours on the radio harness connector, not the car.
I knew that. I was replying to cdvs' post, which appeared to be referring to the car's wiring.
__________________
David C.
1996 Laguna Blue Pearl SVX L AWD
See my home page for SVX radio install/removal instructions and wiring harnesses
Reply With Quote
Reply

Thread Tools
Display Modes

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

Forum Jump


All times are GMT -6. The time now is 11:15 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
2001-2015 SVX World Network
(208)-906-1122