Pages: 1 2 [3]
Author Topic: Custom C167 Boost PID  (Read 72922 times)
fknbrkn
Hero Member
*****

Karma: +224/-24
Offline Offline

Posts: 1564


mk4 1.8T AUM


« Reply #30 on: March 15, 2025, 10:31:02 AM »

There will be no easy hint
Reverse example file and fix offsets to yours in code
Or use this file as a base
Logged
Yur1i123rus
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 18


« Reply #31 on: March 15, 2025, 11:51:15 AM »

I will try to figure it out, but so far I can't understand the shifts in the maps that I wrote about above.
I hope I can figure it out.
Logged
Yur1i123rus
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 18


« Reply #32 on: March 16, 2025, 01:36:31 AM »

I realized that I need to go study assembler. After which I can return to this point
« Last Edit: March 16, 2025, 10:02:56 AM by Yur1i123rus » Logged
BlackT
Hero Member
*****

Karma: +82/-42
Offline Offline

Posts: 1530



« Reply #33 on: March 17, 2025, 03:01:12 PM »

Just my 2c:

022906032DR file equipped with DSG

we had misfires at cyl1 and constant pwm even after shutoff after transfering routine from example file, all variables was fine, mono lambda patch also here, there is no load limit in this file

- all ram variables redefined to 387* instead of 384* this eliminate misfires, even if IDA shows empty space here, probably some ram-mirroring was there, ive faced this before so just swap it with 387xxx*

- changed turbo routine instead of feeding pwm it manages new ldtvm_w to be able to log wgdc and move pwm to its raster
- new code (below) with port writing hooks up with other pwm operations, i believe its 1ms raster, correctly operating pwm even with !b_kl

exts   #38h, #1
mov      r4, ldtvm_w
movbz   r5, rl4
shl     r5, #8
mov     r4, PP3
mulu    r5, r4
mov     PW3, MDH
mov     r2, MDH


DPUPVDK calculates pvdkds_w based on ml_w in stock its subtracted map values from pu_w and i replaced it with addition due to map is not signed, this gives positive pvdkds_w and msdk_w now looking nice but i still thinking to replace it with native map sensor

RLVMXN/RLVSMXN maxed out to eliminate IOP limit and gives adequate misol_w, now its misol > miist, no torque intervention and car runs smoothly, ps_w, msdk_w, pvdks_w finally sorted out

asm patch for b_mdee (redsol) when shifting, basically some kind of 'jb b_zwget, loc_enable' so it gets selective fuel cut at shifts but unfortunately without noticeable sound

this knowledge costs me 2 days so enjoy it for free  Smiley


probably i want to emulate KFVPDKDS / KFPLGU stuff but im not sure for now // any hints?


What is r2 here?
Logged
Yur1i123rus
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 18


« Reply #34 on: March 25, 2025, 07:53:53 AM »

You don't need a pressure sensor. If you are using a MAF just calibrate it correctly and use ps_w, it works perfectly fine.

I think I managed to add this patch, I just need to test it. But I still have doubts. I'm not sure I understood the replacement of 822F86 calls 88C57E with 82030A
after in sub 82030A calls 88C57E
82030E calls subroutine 8A2D6A (our procedure)
Am I right that this is just for calling our procedure and nothing more? 88C57E just had to be replaced to create an extra call?
Logged
fknbrkn
Hero Member
*****

Karma: +224/-24
Offline Offline

Posts: 1564


mk4 1.8T AUM


« Reply #35 on: March 25, 2025, 10:18:15 AM »

What is r2 here?

duty cycle output  Roll Eyes

idk, stock routine also uses that so im just leave it there in case of magic

I think I managed to add this patch, I just need to test it. But I still have doubts. I'm not sure I understood the replacement of 822F86 calls 88C57E with 82030A
after in sub 82030A calls 88C57E
82030E calls subroutine 8A2D6A (our procedure)
Am I right that this is just for calling our procedure and nothing more? 88C57E just had to be replaced to create an extra call?

this method used when you haveno space to insert a new call so instead of direct call to stock procedure, you call the temporary list of calls with stock one and yours

Logged
FDVD21
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 18



« Reply #36 on: March 17, 2026, 10:12:30 AM »

Hi.
Can someone provide me some info about sub_88C57E? What's the logic behind this and how to find it in another binary? (I can't find it by byte pattern or opcode pattern).
My file is 066906032AG, I got some vars from a2l imported.
Logged
fknbrkn
Hero Member
*****

Karma: +224/-24
Offline Offline

Posts: 1564


mk4 1.8T AUM


« Reply #37 on: March 17, 2026, 07:45:08 PM »

Hi.
Can someone provide me some info about sub_88C57E? What's the logic behind this and how to find it in another binary? (I can't find it by byte pattern or opcode pattern).
My file is 066906032AG, I got some vars from a2l imported.


you didnt even try to paste code here
nope
« Last Edit: March 17, 2026, 07:46:47 PM by fknbrkn » Logged
FDVD21
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 18



« Reply #38 on: March 18, 2026, 07:38:31 AM »

you didnt even try to paste code here
nope
The code is the same as in example.asm.Just changed vars.
Code:
; Functions
READ_2D_MAP equ 059DEh
READ_3D_MAP equ 073DEh
; Variables
nmot_w equ 0F886h
rlsol_w equ 0218Ah + 0x8000
gangi equ 0906h + 0x8000
ps_w EQU 0F9A2h
PW1  DEFR  0FE32H
pssol_w equ 0213Ah + 0x8000
...
; Maps, correct
fixdcmap EQU 0339Ah
map_seg EQU 0205h
fixdcflag EQU 033CCh
pilotmap EQU 073CEh
dcmax EQU 03502h
dcmin EQU 03504h
piden EQU 03506h
imaxthres EQU 03508h
pidpmap EQU 0350Ah
pidimap EQU 0353Ch
piddmap EQU 0756Eh
ldrxn EQU 075CAh
Call - Flash:82030A, our routine - Flash:8A2FB4.New rlsol_w at Flash:864664. RAM variables at the same location.Write to PW7_1 done, hard cap done.
« Last Edit: March 21, 2026, 02:10:02 PM by FDVD21 » Logged
Pages: 1 2 [3]
  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Page created in 0.013 seconds with 15 queries. (Pretty URLs adds 0s, 0q)