View Single Post
  #9  
Old 08-21-2007, 01:56 PM
Calum Calum is offline
Registered User
 
Join Date: Aug 2007
Location: Lubbock, TX, USA
Posts: 43
Hello from Nissan land

Hi,

Just by random luck and insomnia I wandered across this thread. I don't own an SVX or even a Subaru, but do happen to do quite a bit of work with early 90s Nissan ECUs (I make a product called the 'Realtime' daughterboard, it does memory emulation that allows seamless changes to the rom while the car is running, and also bundles the Nissan CONSULT -somewhat like the Subaru diagnostic stuff- over a single USB connection, fun stuff). Anywho, it looks like the ecus have quite a few similarities on the hardware level (they're based on 77xx mcus too), and I thought this might help you guys out. If this is just duplicate stuff you already know, nevermind me.

First off, the 7791 looks pretty much identical to the 7790. I'm judging that by the matching interrupt vector tables. I bet they're pretty much the same processor, maybe a different package? If you look in this directory:

http://www.calumsult.com/calumsu/disassembler/

Under docs I've posted the short datasheet for the 7790. Also posted is a longer datasheet for a 7700 that is useful for reference. The newer 77xx chips had different peripherals (the ADC changed, etc) than the older ones, and the 7700 is in the same era as the 7790 so its peripheral documentation is useful. It has a different combination of peripherals than the 7790 though (no biggie). Combine its datasheet with the short 7790 datasheet and you've got a pretty decent 7790 datasheet.

Also listed is the software manual, but without the stupid 'EOL' splashed in the middle of every page.

Anywho, how we've got a different disassemble put together than what your using. Rather than just starting blindly at 8000, ours walks Kaele's dasm77 through the bin, using the interrupt vector table as the starting points. As it disassembles it keeps track of the M and X flag, and sets them correctly. This is a bit more complicated than it sounds, because its doing this for every single branch, and they tend to get quite nested. It takes the disassembler a while to fully run, but the end result is I think a bit more readable. I went ahead and put together a version for the SVX bin that b3lha had posted, check out the SVX directory. The disassembler will also autocomment known memory variables, and you can add to the list in a file called memory.txt. I put the locations b3lha had listed in when I ran the disassembler. The big txt file in the SVX folder is the result.

I went ahead and posted the SVX version of the disassembler exe and source code (its in C++, and compiles under the free MS Visual C++ 2005 Express compiler). Its a console app, and you need to have it in the same directory as DASM77. Also, I didn't compile it for use on machines that don't have C++ Express installed (I'll do that later), sorry!

If you want to add to your current disassembler the code above has the memory locations for the peripherals, and correct order and contents of the interrupt vector table.

Btw, on your interface problem, I'd guess that the ecu RX signal isn't exactly CMOS compatible (i.e. truly 0-5V logic). The Nissan CONSULT had a similar issue. A quick look with a 'scope would verify this (want to ship me an ecu and wiring harness, lol?). Just stick a comparator in front of the max232. I'd be happy to whip out a schematic if you need help. Also, if your wanting to use that for real datalogging I'd look into speeding up the transmission speed, the Subaru speed is just slow. Nissan has CONSULT set to 9600 baud and thats just barely fast enough for datalogging. Changing the UART speed on the 77xx is a bit of a pain in the butt, its a bit more than just changing the code, stupid old processor.

Last edited by Calum; 08-21-2007 at 01:59 PM.
Reply With Quote