LS1 Boost OS - Development

For discussion and distribution of custom code and hacks
bubba2533
Posts: 498
Joined: Wed Apr 11, 2018 8:50 am
cars: 03 Chevy S10 Turbo V6

Re: LS1 Boost OS - Development

Post by bubba2533 »

Upload your tune file.
LS1 Boost OS V3 Here. For feature suggestions post in here Development Thread. Support future development ->Patreon.
bubba2533
Posts: 498
Joined: Wed Apr 11, 2018 8:50 am
cars: 03 Chevy S10 Turbo V6

Re: LS1 Boost OS - Development

Post by bubba2533 »

Ok, so I did some looking at the EQ ratio blending code and I believe I found a fairly simple way to modify it to allow leaner mixtures for E80 (Alcohol) fuel.

Here is the factory code (7603 OS) along with my comments:

Code: Select all

ROM:00032198 sub.w   a1, d3                                          ; Determine EQ ratio delta (E0_EQ_Ratio - E80_EQ_Ratio)
ROM:0003219A bcc.s   loc_3219E                                     ; Branch to 3219E if result is not negative
ROM:0003219C clr.w   d3                                                 ; Clear delta if result is negative
ROM:0003219E mulu.w  (word_FF9FC6).w, d3                  ; Multiply EQ ratio delta by EQ blend factor
ROM:000321A2 lsr.l   #8, d3                                            ; Logical shifts to bring the value back to a normal EQ value
ROM:000321A4 lsr.l   #4, d3                                            ; 
ROM:000321A6 add.w   a1, d3                                         ; Add E0_EQ_ratio to the blended E80_EQ_Ratio
Here is my proposed code:

Code: Select all

ROM:00032198 sub.w   a1, d3                                          ; Determine EQ ratio delta (E0_EQ_Ratio - E80_EQ_Ratio)
ROM:0003219A bra.s   loc_3219E                                     ; Branch to 3219E no matter the result
ROM:0003219C clr.w   d3                                                 ; Not needed (could replace with NOP)
ROM:0003219E muls.w  (word_FF9FC6).w, d3                  ; Multiply EQ ratio delta by EQ blend factor (Changed to signed multiply)
ROM:000321A2 asr.l   #8, d3                                            ; Logical shifts to bring the value back to a normal EQ value (Changed to Arithmetic Shift)
ROM:000321A4 asr.l   #4, d3                                            ; 
ROM:000321A6 add.w   a1, d3                                         ; Add E0_EQ_ratio to the blended E80_EQ_Ratio
This is my first time doing this type of modification so I'm not positive it will work, but it seems like it will just looking at it. I'll do some testing on the bench to verify before releasing anything.
Last edited by bubba2533 on Fri Nov 19, 2021 1:44 pm, edited 1 time in total.
LS1 Boost OS V3 Here. For feature suggestions post in here Development Thread. Support future development ->Patreon.
bubba2533
Posts: 498
Joined: Wed Apr 11, 2018 8:50 am
cars: 03 Chevy S10 Turbo V6

Re: LS1 Boost OS - Development

Post by bubba2533 »

Ok, so I'm starting to work on the Wideband Closed Loop Control and I'm wondering if I should allow the Long Term Trims to be active under WOT?

The way the current code is when the Desired EQ Ratio is NOT equal to 1 then the LTFT's are not updated. I'm thinking of changing this to update the LTFT's no matter the Desired EQ Ratio.
LS1 Boost OS V3 Here. For feature suggestions post in here Development Thread. Support future development ->Patreon.
bubba2533
Posts: 498
Joined: Wed Apr 11, 2018 8:50 am
cars: 03 Chevy S10 Turbo V6

Re: LS1 Boost OS - Development

Post by bubba2533 »

More changes:

I'm planning on making one VE table instead of 2. The main reason why I was doing two was for the P01 PCM because there isn't much unused space for new tables. For the P59 I can put all the parameters in unused address space (0x8A83E and up).

Not sure if I'll want to continue to mess around with the P01 since it's that much more difficult to find free space.
LS1 Boost OS V3 Here. For feature suggestions post in here Development Thread. Support future development ->Patreon.
User avatar
NSFW
Posts: 679
Joined: Fri Feb 02, 2018 3:13 pm

Re: LS1 Boost OS - Development

Post by NSFW »

The code change looks good. Why the change from lsr.l to asr.l? (I'm not even sure what the difference is between the two.)

I've been meaning to switch my car from a P01 to P59 soon, before it goes in for a motor swap and retune, just on theory that the extra unused flash memory in the P59 would make it easier to modify the code.
Please don't PM me with technical questions - start a thread instead, and send me a link to it. That way I can answer in public, and help other people who have the same question. Thanks!
bubba2533
Posts: 498
Joined: Wed Apr 11, 2018 8:50 am
cars: 03 Chevy S10 Turbo V6

Re: LS1 Boost OS - Development

Post by bubba2533 »

NSFW wrote:The code change looks good. Why the change from lsr.l to asr.l? (I'm not even sure what the difference is between the two.)

I've been meaning to switch my car from a P01 to P59 soon, before it goes in for a motor swap and retune, just on theory that the extra unused flash memory in the P59 would make it easier to modify the code.
It’s for signed values. It duplicates the highest bit instead of appending zeros which is what lsr.l does.

Yeah the extra space is really nice.
LS1 Boost OS V3 Here. For feature suggestions post in here Development Thread. Support future development ->Patreon.
In-Tech
Posts: 774
Joined: Mon Mar 09, 2020 4:35 pm
Location: California

Re: LS1 Boost OS - Development

Post by In-Tech »

I was looking at that too, does it affect the stack? I'm not sure if these GM one's do, but plenty have a "protected" stack
bubba2533
Posts: 498
Joined: Wed Apr 11, 2018 8:50 am
cars: 03 Chevy S10 Turbo V6

Re: LS1 Boost OS - Development

Post by bubba2533 »

Does what affect the stack? The extra space?

No, the extra space is in the ROM section which can be used for code and parameters. The stack is in the RAM section, which is another problem if you need to save intermediate values for new code that was added. I was able to create 90 bytes of free RAM space by disabling the EGR code, so that's one way of doing it.

As for a protected stack I don't know, but I'm doing what I can to avoid interfering with it.
LS1 Boost OS V3 Here. For feature suggestions post in here Development Thread. Support future development ->Patreon.
Highlander
Posts: 81
Joined: Sun May 11, 2014 6:36 pm
cars: Z06

Re: LS1 Boost OS - Development

Post by Highlander »

bubba2533 wrote:More changes:

I'm planning on making one VE table instead of 2. The main reason why I was doing two was for the P01 PCM because there isn't much unused space for new tables. For the P59 I can put all the parameters in unused address space (0x8A83E and up).

Not sure if I'll want to continue to mess around with the P01 since it's that much more difficult to find free space.
P01 is also slower.
bubba2533
Posts: 498
Joined: Wed Apr 11, 2018 8:50 am
cars: 03 Chevy S10 Turbo V6

Re: LS1 Boost OS - Development

Post by bubba2533 »

Highlander wrote: P01 is also slower.
How do you know that?
LS1 Boost OS V3 Here. For feature suggestions post in here Development Thread. Support future development ->Patreon.
Post Reply