Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Sgt Fox
Dec 21, 2004

It's the buzzer I love the most. Makes me feel alive. Makes the V8's dead.
Hopefully this will be one of the more useful posts in this project thread. It took me a lot of digging and translating from Russian to figure this out.

As you know by now, Mazda used the K series engines in North America, specifically the 1.8L K8 and the 2.5L KL-DE. Interestingly enough, they used the same ecu wiring harness plugs for these engines as the KL-ZE used (KL36 specifically). This allows me to use an MX-3 engine harness, the 323 body harness and any K series ECU with the KLZE engine. Also, oddly, any K series ECU will run any K series engine. (I suspect that the injectors on the 1.8L flow less than the 2.5L to compensate for the displacement difference.)

This means that people will swap a KL-ZE into their MX-3 and then just run the stock K801 ecu. Apparently it runs fine, but does not have the correct VRIS variable intake soleniod opening points, a lower RPM and will run on the rich side. Alternatively, people will pull a KL48 or KL55, or a KL07 ecu from a 626 or MX-6. These were the 2.5L ecus, which meant they would have run a KL-DE, which had the same fuel injectors as the KL-ZE, but was tuned for a different intake and VRIS, as well as a lower compression ratio and cam profile. Better, but still not perfect.

JDM ecus are hard to find for some reason. Instead, the long dead online forums are filled with guys selling KL-ZE SuperJDM!11!Weeaboo EPROMS, or some version called the Probinator. (The Ford Probe also came with the KL-DE motor, and a KL55 ecu). There are lots of suggestions to get a K801 ecu and put in a KL31 tuned EPROM. The suggestions state you need a specific version of the K801 ecu, one with the stock EPROM having a label containing -20XX instead of the -16XX versions. I figured that someone must have figured out how to tune this specific firmware version, and not the -16 version. Since the K801 ecu I had was a -16XX, and the KL-ZE tuned K801 ecu which was orignally in the car from the field was lost, I started looking around for options.

Jumping forward a bit, after finding a few other ECUs (three K801 of different firmware and a KL55 out of a probe), I actually got my hands on a famed KL-ZE tuned K801 ecu. Curiosity won, and I dumped the EPROM file. The file was a 1:1 match to the stock KL31.bin file from a stock KL-ZE KL31 ecu. The message boards which played this up as such an improvement and a miracle were wrong. All someone did was luck out that the KL31 EPROM data ran well enough on a specific rev of the K801 ecu. It really is impressive this worked at all, as we will learn later, because the K801 ecu only supports one timing map and uses different table offsets in the EPROM. There are also many reports online that this method of ecu modification does not work well across the entire range; the engine runs pig rich at idle and leans out randomly across the table. I suspect the only reason it works at all is the ecu is smart enough in closed loop mode to ignore the bad tables. I confirmed this operation as well with a wideband. Its a poor tune.

So, I continued reading and digging. I came across a Russian Mazda owners forum, which seemed to have made significant progress in decoding the different ECU types. Google translate saved the day and I was able to glean some good information. The information was mixed in with a healthy helping of mockery of decadent American pigs and their stupidity trying to just swap entire EPROMs. I knew I was on the right track, as I had come to the same conclusion.

They had some good information about VRIS:
(There are three tables in the ECU for VRIS, which set the state of the two VRIS solenoids for different RPMs, based on throttle position of slightly open, half open or fully open.)


KF engine, KF11 ECU Europe (direct collector intake):

Throttle slightly open / half open / fully open:
0-4312 all closed
4312-6406 VRIS1 open
4812-6406 all open
6406-7500 all closed
------------------------

KL engine, KL01 ECU europe (short collector intake):

Throttle slightly open / half open:
0-7500 VRIS1 open
0-7500 VRIS2 closed

Throttle fully open:
0-3250 all closed
3250-6250 VRIS1 opened
4250-6250 all open
6250-7500 all closed
------------------------

K8 engine, K801 ECU (curved collector intake):

Throttle slightly open:
0-3875 all closed
3875-6312 VRIS1 opened
4656-6312 all open
6312-7500 all closed

Throttle half open:
0-1875 all closed
1875-2688 all open
2688-3875 all closed
3875-6312 VRIS1 opened
4656-6312 all open
6312-7500 all closed

Throttle fully open:
0-3875 all closed
3875-6312 VRIS1 opened
4656-6312 all open
6312-7500 all closed
------------------------

KL-ZE engine, KL31 / KL36 ECU (straight collector - straight neck intake)

Throttle slightly open / half open / fully open:
0-4062 all are closed
4062-6812 VRIS1 opened
4781-6812 all open
6812-7500 all closed
------------------------

KL-ZE engine, KL62 ECU (curved neck intake)

Throttle slightly open / half open / fully open:
0-1906 all closed
1906-2594 all open
2594-3906 all closed
3906-6312 VRIS1 opened
4688-6312 all open
6312-7500 all closed
------------------------

Interesting and useful information for sure. VRIS is dependant on the intake geometry, which makes sense. You want to select VRIS points which match whatever intake you are running, not so much which engine.

I also learned that the true JDM intakes number their VRIS solenoids opposite from the North American intakes. This means, if you are using a NA wiring harness on a JDM intake, you need to swap the VRIS lines, either on the harness, or via the ECU firmware. I have never seen this information on any English forum before.

Adbot
ADBOT LOVES YOU

Kia Soul Enthusias
May 9, 2004

zoom-zoom
Toilet Rascal
That's awesome! Wow, thank you for that work.

420 SWAGLORD
Apr 20, 2014

saban bajramovic
This is by far the most A.I. guide to waterpump replacement I have ever read.

Terrible Robot
Jul 2, 2010

FRIED CHICKEN
Slippery Tilde
God I love super informative posts like that, and finding them is such a chore. I'm sure somewhere in the future a dude is thanking you profusely for figuring all of this out as well.

slothrop
Dec 7, 2006

Santa Alpha, Fox One... Gifts Incoming ~~~>===|>

Soiled Meat
Such a treasure trove of information! This thread got me reading up on fun 90’s Mazda engines. Also made me very nostalgic for my B5D powered Astina. That car was such a hoot and while it was probably down on power compared to my 10 years younger Corolla it sure felt faster and was far more enjoyable to throw around corners.

Also, pop up headlights and 90’s JDM stereo equipment!

Suburban Dad
Jan 10, 2007


Well what's attached to a leash that it made itself?
The punchline is the way that you've been fuckin' yourself




While I was reading that post all I could think of is "megasquirt." :v:

Early fuel injected stuff is pretty easy to do in MS.

wesleywillis
Dec 30, 2016

SUCK A MALE CAMEL'S DICK WITH MIRACLE WHIP!!

Sgt Fox posted:

. I came across a Russian Mazda owners forum, which seemed to have made significant progress in decoding the different ECU types. Google translate saved the day and I was able to glean some good information. The information was mixed in with a healthy helping of mockery of decadent American pigs and their stupidity trying to just swap entire EPROMs.




Excellent post. I learned some poo poo.

Also, can you post some of that poo poo?

DJ Commie
Feb 29, 2004

Stupid drivers always breaking car, Gronk fix car...

Larrymer posted:

While I was reading that post all I could think of is "megasquirt." :v:

Early fuel injected stuff is pretty easy to do in MS.

I don't know much about the V6 stuff but the SOHC engines were at best bank fire, even earlier was batch.

Sgt Fox
Dec 21, 2004

It's the buzzer I love the most. Makes me feel alive. Makes the V8's dead.
Now, these crafty Russians had another trick up their sleves. They had not only figured out where the tables were in the EPROMs, but one guy had also written a tool to edit them! I downloaded it from Russia, got put on some watch list and opened it up.


Well poo poo. This was after installing the cyrillic char set. Before it was even worse, all ??? for each character.

I figured I would try to see if I could fix the VB exe. After using PE Explorer to unpack the exe (the EXE was compressed and the resouces were not able to be edited directly) I was able to open it up with Resouce Hacker.


Awesome, now I can see the captions and text for each button. This was decimal unicode, so #1056#1077#1076#1072#1082#1090#1086#1088 can be converted into Редактор, which can then be google translated into Editor. This value can now be written back into Resource Hacker.

After a long and tedious process, I was left with this:


Woo, it can edit VRIS, Fuel, Timing and more!

Now, how do we use this program? Let's look at one of the files floating around the internet, K801.bin. Let's open the file in a hex editor:


All firmware files have an ascii header section. Here we can see this file is called K801. We can load it in the firmware editor, but the editor needs to know what offsets to use in the file. There are a few options for K801, K801_A, K801_2 etc. We need to select the correct one. We will know we have the correct one when the VRIS table is correct, along with the fuel tables. After a while you can get a pretty good idea of what the tables should look like. For a beginner, lets refer to the VRIS tables from before. A K801 should have:
K8 engine, K801 ECU (curved collector intake):

Throttle slightly open:
0-3875 all closed
3875-6312 VRIS1 opened
4656-6312 all open
6312-7500 all closed

Throttle half open:
0-1875 all closed
1875-2688 all open
2688-3875 all closed
3875-6312 VRIS1 opened
4656-6312 all open
6312-7500 all closed

Throttle fully open:
0-3875 all closed
3875-6312 VRIS1 opened
4656-6312 all open
6312-7500 all closed

Selecting K801 in the pulldown matches this table. RPM limiters of 5500 for faulty temp and 7500 overall also line up. Fuel and timings look correct as well. Now that we have the offsets correct, let's dig deeper.



This tab shows the VRIS table, as well as some information about the firmware file. We can see a calculated CRC of AA55. This is very important. The ECU will not load any eprom files which do not have this CRC. There are some other options, which we will discuss later.


Next is the fuel map. We can import and export just the map, as long as the overall size is the same (more on this later). We also have two handy ways to visualize the map.


A 3D view.


A coloured table. Looking at the map, there is a progressive increase in fuel for high load, high rpm. There also is a huge dump of fuel across the RPM range, for higher load. Interesting, remember this for later.

Moving on, we have a High Octane timing map:



The program also supports Low Octane timing maps. I assume the ECU has a fallback if it detects knocks.



Uh oh, that doesn't look right. Normally, I would suggest we chose the incorrect offset values for this particular firmware file. I know though that the K801 ECUs do not support two timing maps. This means there is only one timing map for the 1.8L K8 engines. This was my first indication that just replacing the EPROM in a K801 ecu with one from a KL31 ecu was not correct.


There is also a multiplier table. I am not sure how this works, or what it does.


Finally, the last tab, the limiters.

So, that is the K8's ecu in a nutshell. Now, let's take a look at the JDM KL31.

Opening up KL31_C.bin shows a header of KL31_C. This is the most popular file online. The correct offset values are KL31_D.


Here we see the VRIS table for a long/straight neck KL-ZE intake manifold. Also notice the CRC is AA55.

Onto the fuel map:


Very interesting. Here we see more fuel being added earlier, for the progression to high RPM high load. What we don't see is the huge dump of fuel across low RPMs. All the Japanese tunes omit this heavy fueling. It seems to only be present in USDM models. Perhaps this is emmisions related? Japanese models do not have EGR.

Also, notice the number of rows. K801 was 15x13. KL31 is 14x13. This means you can't just import the fuel maps from each ecu. This also holds true of the timing maps, unfortunately.


High timing map.


Low timing map.

The 2.5L ECUs all seem to support both timing maps.


Multiplier table. Again, I do not know what it does.


Limiters. Notice the JDM one doesn't care if your engine has no temp sensor. Go ahead, ruin it. We don't need a limp mode.

So now, where does that leave us? We have a K8 ecu, which has different sized maps for fuel and timing, not to mention only one timing map. The USDM 2.5L ECUs do support two timing maps and have the same table size for fuel and timing as the JDM. The best results should be able to be obtained with one of these.

jammyozzy
Dec 7, 2006

Is that a challenge?

Holy poo poo dude, that is some commitment. :catstare:

Seat Safety Switch
May 27, 2008

MY RELIGION IS THE SMALL BLOCK V8 AND COMMANDMENTS ONE THROUGH TEN ARE NEVER LIFT.

Pillbug
Love that reverse-engineering. This is the best thread.

Sgt Fox
Dec 21, 2004

It's the buzzer I love the most. Makes me feel alive. Makes the V8's dead.
Another thing I should probably post. Here is a list of what ECU came in which cars.

US Probe GT:
OBD-I:
* KL07 (93, ATX)
* KL07 (93, MTX, Non-California)
* KL07 18 881C (93, MTX, California)
* KL09 (93, rare?)
* KL48A (94, ATX, Non-California)
* KL48B (94, MTX, Non-California)
* KL50 (94, MTX, California)
* KL89 (95, MTX, Non-California)
* KL90 (95, MTX, California)
OBD-II:
* KLC9 (96, MTX, OBD2)
* KLD1 (96, ATX, OBD2)
* KLD1A (96, ATX, OBD2)
* KLD1B (96, MTX, OBD2)
* KLG2 (97, MTX, OBD2)
* KLG3 (97, ATX, OBD2)
* KLY2 (97, MTX, OBD2, California)

Other cars:
* K801 (MX3, 93-95)
* K834 (MX3, 94-95)
* KF15 (Xedos 6, 93, ?)
* KF35 (Latins R, ?, ?)
* KL01 (MX6/626, 93, MTX)
* KL03 (MX6/626, 93, ?, California)
* KL05 (MX6, 93, ?, UK)
* KL31 (KLZE, MTX)
* KL36 (KLZE, ATX)
* KL55 (MX6/626, 94, MTX)
* KL57 (MX6/626, 94, MTX, California)
* KL62 (Eunos 800, ?, ?, KL47 MAF)
* KL69 (?, ?, ?)
* KL85 (MX6, 95, ATX/MTX)
* KL86 (MX6, 95, ATX/MTX, California)
* KLG2 (MX6, 97, ATX)
* KLG8 (Millenia, KL, ATX, MAF?)

There are a lot of different ECU numbers, but some run the same firmware files. For example, KL48 ecus run KL55 firmware.

Sgt Fox fucked around with this message at 02:48 on May 18, 2018

Bajaha
Apr 1, 2011

BajaHAHAHA.



Awe yes, that's the stuff. Love the ingenuity and perseverance. Add another to fawning over this truly AI water pump replacement.

Now that you have access to it all and the majority of it makes sense, how about we get a little crazier and do your own fine tuning of the motor.

builds character
Jan 16, 2008

Keep at it.
Goddamn, this is great.

Voltage
Sep 4, 2004

MALT LIQUOR!
This is just unreal. - really interesting stuff. Makes me want to get a megasquirt for my miata!

Let me know if you need anything translated, my wife speaks russian.

Sgt Fox
Dec 21, 2004

It's the buzzer I love the most. Makes me feel alive. Makes the V8's dead.
I'd really like opinions on what the multiplier table could be used for. It's the one thing I have no clue about.

McTinkerson
Jul 5, 2007

Dreaming of Shock Diamonds


Sgt Fox posted:

I'd really like opinions on what the multiplier table could be used for. It's the one thing I have no clue about.

Could it be cold start fuel enrichment?

Fermented Tinal
Aug 25, 2005

by Pragmatica
That translation work, just wow.

Suburban Dad
Jan 10, 2007


Well what's attached to a leash that it made itself?
The punchline is the way that you've been fuckin' yourself




Sgt Fox posted:

I'd really like opinions on what the multiplier table could be used for. It's the one thing I have no clue about.

Can you get any translation of what it says? Translating the axis of the tables would help significantly.

Sgt Fox
Dec 21, 2004

It's the buzzer I love the most. Makes me feel alive. Makes the V8's dead.

Larrymer posted:

Can you get any translation of what it says? Translating the axis of the tables would help significantly.

From talking to the Russians, they also do not know exactly what the multiplier tables do. I was told that they noticed that when putting a kl31 fuel map on a k801, that the car ran rich. Copying the modifier table over as well resulted in a better mixture, but it still wasn't perfect.

angryrobots
Mar 31, 2005

It's been a few years since I read a book on EFI tuning... But I remember something about a multiplier table that modifies fueling based on TPS input. Possibly it defines a multiplier value for the regular fueling table to pull from?

Also your work on this is amazing.

Seat Safety Switch
May 27, 2008

MY RELIGION IS THE SMALL BLOCK V8 AND COMMANDMENTS ONE THROUGH TEN ARE NEVER LIFT.

Pillbug

McTinkerson posted:

Could it be cold start fuel enrichment?

This would be my guess. Modern ECUs have a huge pile of tables just for cold start enrichment (atmospheric pressure, cat pre-warming, etc.) but something KLZE-aged would likely only have a scalar table.

Seat Safety Switch fucked around with this message at 15:49 on Apr 28, 2018

Applebees Appetizer
Jan 23, 2006

This is really bizarre, I had no clue there were so many different ECUs for basically the same car/engine, like who was doing the tuning/code for each individual ECU?

Great investigative work man, I really want to buy this car from you whenever you get bored of it :)

Suburban Dad
Jan 10, 2007


Well what's attached to a leash that it made itself?
The punchline is the way that you've been fuckin' yourself




Applebees Appetizer posted:

This is really bizarre, I had no clue there were so many different ECUs for basically the same car/engine, like who was doing the tuning/code for each individual ECU?

This is fairly normal. There's different requirements for different regions of the world regulation wise, differing fuel qualities, octane, etc. When I did it, I got lucky and only had to release for 3 regions and the changes were fairly minor. But there's still a billion factors that drive up proliferation like transmission and other engine features.

It's never as easy as it looks. :shepface:

Sgt Fox
Dec 21, 2004

It's the buzzer I love the most. Makes me feel alive. Makes the V8's dead.

angryrobots posted:

It's been a few years since I read a book on EFI tuning.

Does anyone have any recommendations for a good book to read?

Sgt Fox
Dec 21, 2004

It's the buzzer I love the most. Makes me feel alive. Makes the V8's dead.
I decided that my best option would be to use the 2.5L KL48 ECU from a 1994 Ford Probe GT. Let's walk through how to put the KL31 maps into it.

Something I forgot to mention earlier. There are two types of VAF or vane air flow meters used on the K series engines. The K8 and the KL-ZE use a JE50 VAF, whereas the rest use a KL02. Guys online are always trading and scrambling to find the right one for each ECU. Generally the rule is you must use the VAF type which the ECU was originally designed for. What if I told you there was another way? There is always another way.

In each firmware, there is a scaling/calibration table which tells the ECU what voltage scale to position to use with the VAF input.

For the JE50:
code:
A3 D7 9E D6 9A 10 95 7F 91 22 8C F5 88 F5 85 20 81 74 7D EE 7A 8D 77 4E 74 30 71 30 6E 4E 6B 87 68 DC 66 49 63 CE 61 6A 5F 1C 5C E2 5A BD 58 AA 56 A9 54 B9 52 DA 51 0A 4F 4A 4D 97 4B F3 4A 5C 48 D1 47 53 45 E0 44 79 43 1C 41 C9 40 81 3F 42 3E 0C 3C DF 3B BA 3A 9E 39 89 38 7C 37 76 36 78 35 80 34 8E 33 A3 32 BE 31 DF 31 06 30 32 2F 64 2E 9A 2D D6 2D 17 2C 5C 2B A5 2A F3 2A 45 29 9C 28 F6
KL02:
code:
F5 C3 EE 41 E7 18 E0 3F D9 B3 D3 70 CD 70 C7 B0 C2 2E BC E5 B7 D4 B2 F5 AE 48 A9 C8 A5 75 A1 4B 9D 4A 99 6E 95 B5 92 1F 8E AA 8B 53 88 1C 84 FF 81 FE 7F 16 7C 47 79 8F 76 EF 74 63 71 ED 6F 8A 6D 3A 6A FD 68 D0 66 B6 64 AA 62 AE 60 C2 5E E3 5D 12 5B 4F 59 97 57 ED 56 4E 54 BA 53 31 51 B4 50 40 4E D5 4D 75 4C 1D 4A CF 49 89 48 4B 47 16 45 E7 44 C1 43 A3 42 8A 41 78 40 6D 3F 68 3E 6A 3D 71
So what does this mean? You can search for the sequential hex values in the firmware bin file and replace it with the other. So if you had a K801 ECU which would have used a JE50 VAF, search for the JE50 hex and replace it with the KL02 hex. Awesome. I have never seen this posted online anywhere ever.

Now, remember we talked about CRC checksums earlier? After replacing the VAF table, you will need to recompute and adjust the CRC. Luckily, the firmware tool can do this for you. You should replace the VAF table first, manually with a hex editor. Additionally, you can also change the header in the hex editor, so you can keep track of your file versions.

For example:


Now, you will notice it says KL55. The KL48 ecu actually contains KL55 firmware. Interesting, the Ford ECU was built by Nippon Denso in Texas. Unlike the Japanese ECUs, the circuit boards were conformally coated. Conformal coating is a spray coating applied to circuit boards after assembly, typically a silicone based spray. One of the main benefits is moisture and corrosion resistance, by creating an environmental barrier. This is a good idea for electronics in harsh locations.

To rework the board, I needed to use a specialized solvent to remove the conformal coating. I've seen videos of guys removing the coating with a wire brush. Do NOT do this, unless you are a ham fisted moron. After I removed the coating, I used a solder vacuum to desolder the factory chip. For those without an expensive rework iron, I would suggest using a very small pair of cutters and cutting the leads off the chip. Then you can use an iron and tweezers to remove each lead from the board individually. A bit of solder wick later and you can have clean pads and holes. Remeber when cutting the leads to leave a stub on the chip. You can solder headers to these, allowing you to still dump the data off the EPROM.


All desoldered. You can see the edges of the conformal coat.

Next, toss in a socket and resolder. A quick spray of the reworked area with conformal coating completes this mod. Make sure you mask off the socket when you spray.


Can you see where I monkeyed with it? No? Good.

Flip it over, toss in the chip I made and we are good. The sockets I used have provision for a zip tie, to make sure the EPROM doesn't vibrate loose.


Now, back to making the files for the chip.

Open the KL31_C.bin in the firmware editor. Make note of the VRIS table and RPMs. We will need to manually add these to our KL55 firmware we dumped off the chip we removed from the ECU.

Extract the fuel table, timing tables from the KL31 firmware. The modifiers table is of a different size and can't be transfered over.

KL31 Fuel:
code:
20 20 20 20 20 20 20 20 20 20 22 25 2A 30 20 20 20 20 20 20 20 20 20 20 2B 2E 31 33 20 20 20 20 20 20 20 20 20 20 2C 30 33 37 20 20 20 20 20 20 20 20 20 29 2F 34 35 3A 20 20 20 20 20 20 20 20 22 2B 2F 37 36 3D 20 20 20 20 20 20 20 21 28 2F 35 3B 3D 43 20 20 20 20 20 20 20 26 2C 34 36 3E 40 47 20 20 20 20 20 20 20 29 30 35 39 40 47 4A 20 20 20 20 20 20 26 2D 32 36 3A 42 4B 4B 20 20 20 20 20 20 2F 33 34 3A 3D 45 4C 4C 20 20 20 20 20 20 30 35 36 3C 42 46 4C 4C 20 20 20 20 20 20 30 35 36 3F 43 46 4C 4C 20 20 20 20 20 20 30 35 36 3F 43 46 4C 4C
KL31 High Timing:
code:
78 96 AF C0 CD D0 C9 C7 BC C4 C7 D2 D3 D5 78 96 AF C0 CD D0 C9 C7 BC C4 C7 D2 D3 D5 74 96 AB B6 C7 CF C5 C4 B7 C2 C5 D0 D2 D3 6B 7D 9B A3 B8 C9 BC BC AA BF BF CD CE CD 5A 78 91 9A A6 BD B3 B3 A0 B6 B2 C7 C8 C4 52 73 8A 92 9F B3 AD AA 9A A9 AA C1 C1 BB 4C 70 87 8F 9B AC A7 A4 95 A0 A3 BA BB B2 48 6D 83 8C 99 A7 A5 A4 95 99 9E B2 B6 B0 43 6A 7F 8A 95 A2 A2 A2 94 97 9B AC B3 AF 3E 68 7C 87 92 9E 9D 9D 93 96 9A A9 B1 AE 2B 5E 78 82 8F 99 98 96 90 95 99 A6 AE AC 2B 5E 62 74 7D 96 8F 92 8C 93 98 A5 AA A9 2B 5E 62 74 7D 7D 81 8B 87 91 95 A4 A2 A7 2B 5E 62 74 7D 7D 81 8B 84 8F 93 A2 A0 A7 2B 5E 62 74 7D 7D 81 8B 84 8E 93 A2 A0 A7
KL31 Low Timing:
code:
78 96 AF C0 CD D0 C9 C7 BC C4 C7 D2 D3 D5 78 96 AF C0 CD D0 C9 C7 BC C4 C7 D2 D3 D5 74 96 AB B6 C7 CF C5 C4 B7 C2 C5 D0 D2 D3 67 7D 9B A3 B8 C9 BC BC AA BF BF CD CE CD 49 73 91 9A A6 BD B3 B3 A0 B6 B2 C7 C8 C4 3D 72 83 8F 9C B2 AB AA 9A A9 AA C0 C1 BB 32 71 82 8C 9B A6 A1 A0 92 A0 A3 B6 B9 B4 31 6B 7E 8A 99 A4 A0 9F 90 99 9D AF B2 AE 2F 61 75 87 95 A3 9E 9E 8E 95 98 AB AE AA 23 4C 6A 83 91 9E 97 98 8C 93 97 A7 A9 A7 23 3F 57 76 8B 98 8F 8F 88 91 95 A1 A6 A4 23 3D 49 68 7D 8F 7F 86 81 8B 93 A1 A1 9D 23 3D 49 68 7D 83 78 79 73 83 8E 9E 97 9C 23 3D 49 68 7D 83 78 77 69 7D 85 89 85 9C 23 3D 49 68 7D 83 78 77 69 78 85 89 85 9C
Now, open your KL55 bin file which you edited the header for. You can then go through and import the fuel and timing maps. Edit the VRIS RPMs and change their values to match the values for whatever intake manifold you are using. Remember I told you the KL31 straight neck intake numbered the VRIS reversed from USDM? Well instead of rewiring the harness, I just switched VRIS1 and VRIS2 in firmware.



Now that we have made our changes, we have to correct the CRC.

There is a slight trick with the program. You will notice the checkbox "write to beginning". To adjust the CRC, the program will change some unused portion of the firmware to some different values, so the entire CRC checksum matches. Some firmware versions have blank or non data at address 0x7FBE or 0x7FBF. If you determine your firmware only has checksums or empty data around these locations, you can let the program edit those memory addresses. Some firmware has program data in this location. Adding CRC correction values there would cause unintended operation of the ECU, or anger the magic pixies. In these cases, we can write to the beginning, or header area without harm. I suspect we can probably always write to the beginning for any firmware.

So, with that said here are the steps to correct the CRC.
1. Click "Calculate".
2. Check the "write to beginning" box.
3. Click "Adjust".
4. Click "Save".

If you did this properly, the calculated CRC box should show AA55.

Now, break out your 1980's UV EPROMs, burner and UV eraser.

Applebees Appetizer
Jan 23, 2006

Just wondering, but if you happened to make an error like transposing some numbers completely loving up the tune will it be easy to find or a nightmare? Seems like an awful lot of opportunity to make a mistake in there :ohdear:

The level of detail is awesome, too bad there wasn't more info around like this 15 years ago when these cars were still around, I might have attempted something similar.

Pomp and Circumcized
Dec 23, 2006

If there's one thing I love more than GruntKilla420, it's the Queen! Also bacon.

Applebees Appetizer posted:

Just wondering, but if you happened to make an error like transposing some numbers completely loving up the tune will it be easy to find or a nightmare? Seems like an awful lot of opportunity to make a mistake in there :ohdear:

Yeah, I would be saving and making copies after every change if it were me :p

Awesome work on this. It's a huge amount of reverse engineering and learning for a comparatively small change overall (I imagine you've spent as much time on this, as on the mechanical part of the swap!)

What I've learnt from this is....if I ever buy another 323, I'll make sure the water pump has been changed recently :p

Sgt Fox
Dec 21, 2004

It's the buzzer I love the most. Makes me feel alive. Makes the V8's dead.
It's not too bad to edit the files. You have the ability to graphically check the maps over, so its hard to mess that part up. As for the VAF stuff and everything else, I am pretty comfortable working in hex files. Worst case, do a difference compare and see what you changed by mistake.

Thanks for the compliments on this stuff. I was really happy when my hunches started proving true.

sharkytm
Oct 9, 2003

Ba

By

Sharkytm doot doo do doot do doo


Fallen Rib
This is a really interesting technical ECU discussion, please keep posting.

Turbo Fondant
Oct 25, 2010

Yeah, furthest I ever got into a '90s Mazda ECU was 'Swap PCBs between BP and B3 modules so I can return my stock ECU as the B8 one and get a credit at the junkyard' so this poo poo is fascinating.

DJ Commie
Feb 29, 2004

Stupid drivers always breaking car, Gronk fix car...
I wonder if that software is what the guy who makes the BF/Capri chips uses, RocketChips is his username on the various BF board remanants.

Sgt Fox
Dec 21, 2004

It's the buzzer I love the most. Makes me feel alive. Makes the V8's dead.
Let's put the ecu madness aside for a bit and catch up on the mechanical stuff. We left off with an assembled engine and an empty engine bay. The subframe had been swapped over, along with the MX-3 GS brake booster and master, proportioning valves and brake lines.







Up on the hook. I was bad about taking pictures of a lot of this. Installed the new clutch and pressure plate.





It looks really big with the transmission back on it. It really is going to fill the engine bay.



It took some wiggling and prying, but eventually the beast slotted into place. The straight, long neck intake is the best for performance, but it really barely fits in place. The intake manifold was touching the brake master cylinder.

Someone had already ground the progressive throttle bell crank on the KLZE intake to increase clearance, but the outside rolled metal part that holds the tit on the end of the throttle cable still did not clear. I welded a piece of metal to the inside to support the holder and then ground off the outer radius. It just cleared.










Radiator hoses were next. The KLZE coolant filler neck does not have provision for an overflow line. On the MX-3, this is done on the radiator. The Dodge Neon radiator was just a plain input and output. To deal with this, I did some rockauto browsing and settled on a filler neck from a 2008-2018 Toyota Yaris (part# DORMAN 902680). Unfortunately, the Yaris uses a higher pressure rad cap, which is also a different size. The 1995-1997 Geo Metro uses the same pressure as the KLZE, but fits on the Yaris filler (part# STANT 10241). Great!

Hoses were a bit of a pain. I made some templates and headed to the local parts store. After digging through their hoses for an hour, I had something which would work. Top hose was from a 2004-2010 Chevy Aveo (the lower hose) (part# ACDELCO 24524L)




Lower hose was a bit more trouble. I used the upper hose from a 1987-1992 Jeep Comanche (part# ACDELCO 26138X). I had to cut the hose and use a coupler to change the angle. It worked pretty well.





Voltage
Sep 4, 2004

MALT LIQUOR!
Wow great work, and the valve covers look mint!

At the end you should make a list of all the different cars you used parts from.

Applebees Appetizer
Jan 23, 2006

Voltage posted:

At the end you should make a list of all the different cars you used parts from.

Yeah I'm gonna need that when I buy it from you eventually :v:

Suburban Dad
Jan 10, 2007


Well what's attached to a leash that it made itself?
The punchline is the way that you've been fuckin' yourself




haha holy poo poo I hope you have solid engine/trans mounts so it isn't able to move at all.

Sgt Fox
Dec 21, 2004

It's the buzzer I love the most. Makes me feel alive. Makes the V8's dead.

Applebees Appetizer posted:

Yeah I'm gonna need that when I buy it from you eventually :v:

Hah, I'm not done yet... still more insanity to occur.


Larrymer posted:

haha holy poo poo I hope you have solid engine/trans mounts so it isn't able to move at all.

There are four engine mounts to support this thing in all four directions. I also used Urethane mounts so its in there with little movement. Plus, the easy solution for the throttle bell crank is to just have it at WOT all the time ;)

Looking back over the pictures, that really was a lot of motor to cram into a small space.

Sgt Fox
Dec 21, 2004

It's the buzzer I love the most. Makes me feel alive. Makes the V8's dead.
Now that I had a cooling system, I really started getting excited about hearing this thing run, or at least wondering if it actually would. Naturally, the logical solution was to start tossing the bare minimum on to get it to kick over. I filled up the fluids, tossed on the VAF sensor and connected up a battery.

Here is the first crank, open headers etc. The HLA are ticky since they have not primed.
https://www.youtube.com/watch?v=a69lTZlSgtE

It runs. I don't think I've ever had an engine start up that smoothly, though normally I am dealing with freshly rebuilt rotaries. Not too bad, but holy jesus it was loud.

Which leads me to the next task, exhaust.

The engine had come with an ebay special header kit. It was pretty crusty and as I learned later, was made for a 626. This meant the O2 sensor bungs were in the wrong place and would hit the steering rack. Someone had welded new bungs in, but they were even worse, they would hit the carrier bearing for the intermediate shaft of the trans. Time to get the hole saw out.



Interestingly, the perfect location for the sensor would be exactly in the middle of the two other bungs. I used the next size up of hole saw to cut out some patches, and then welded them in. Not sure why the welds look so terrible, but I was trying to fill some large gaps. You can see the pilot hole for the correct bung location.



Bung welded and the entire piece painted with ceramic paint.



Now, onto the collector. The ebay collector looked good, but the pipe sizes were a bit odd. The runners were 1 7/8" which collected into a 2" pipe, into a 2.5" flex and out to a 2.5" pipe, to match the cat inlet. I had decided on 2 1/4" exhaust, so it didn't make sense to choke it off to 2" at the collector. Out came the hacksaw and I was shocked at what I found.



It is a bit hard to see, from the soot, but they didn't trim the ends of the pipes at all inside the collector. I measured the opening, a tiny 1 1/4" opening. Out came the rotary file and I smoothed up the mating of the runners. I also welded on a new 2.5" pipe into the flex section.



I also took the opportunity to weld in a bung for the wideband sensor I had borrowed. I only plan to run the wideband while tuning the ecu.



I laid the MX-3 exhaust out beside the 323 to get an idea of length and shape. The 323 is the black pipe. The 323 is 1 7/8" while the MX3 is 2"



You can see they are very similar, the portion from the cat back is exactly the same. The difference is in the cat itself and the pipe ahead of that. The 323 has a longer outlet on the cat, whereas the MX-3 takes up this length in the collector. Given that I had a 626 collector, I would have to make something custom anyway.



I got a universal 2.25" resonator and muffler and started trying to figure out routing.



Honestly, I wasn't a fan of the muffler. It didn't fit as well as I would have liked, so I sent it back. A coworker had a spare WRX muffler laying around, which looked like it would work well, was 2.25" and stainless. Besides, it fit the theme of using parts from other cars.



I installed the collector and cat to start the mock-up. I really like how the collector fits in, coiling into the oil pan.



There is a local muffler shop which still bends up pipe (Island Muffler in Victoria). I welded up a template using the old pipe and took that in to have bent in 2.25". When I went in, there was a line of people dropping off their cars for the day. When it was my turn, they asked what I wanted, to which I smiled, held up my rusty pipe template and said "I want this, but bigger". I was probably the most unusual job that day. They did a good job, and were cheap, but missed a dimention slightly. No worries, cut and weld.





Some paint and welding later and I had this:











The exhaust was definitely one of the most time consuming parts of the build. I am quite happy with how it turned out. It sounds very very quiet, with a low rumble. Its quiet enough that if you were not paying attention, you would just ignore it, but as you accelerate through the gears it sounds deep, mute and rumbley, and lets you know something isn't quite normal.

Applebees Appetizer
Jan 23, 2006

Great work man, the engine sounds smooth as hell. Can't wait to see some driving videos!

Are you gonna do any suspension work to it at all? Also I can't tell from the pics but did you swap in the MX3 rear end for the disc brakes too?

Adbot
ADBOT LOVES YOU

Sgt Fox
Dec 21, 2004

It's the buzzer I love the most. Makes me feel alive. Makes the V8's dead.
Yes, the entire front and rear subframes from the MX-3 swapped over. Someone had recently put KYB GR2 shocks on the rear of the MX-3 and some Monroe shocks on the front. They seemed so new, it was a shame to waste them, so I will see how they ride. The MX-3 springs are stiffer and lower than the 323 ones as well, so that was also an upgrade. Not to mention I got swaybars front and rear with the swap. I had none before.

If I end up needing springs, Canuck Motorsports has a dirt cheap set: http://www.canuckmotorsports.com/cat_car_import.html#Mazda $150. I might just buy them to put away.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply