Wrong VTC definitions for Z32 address file

Nistune topics related specifically to the 6303 cpu

Moderator: Matt

Post Reply
RomChip200
 

Posts: 426
Joined: Mon May 11, 2009 7:58 pm
Location: FRANCE

Wrong VTC definitions for Z32 address file

Post by RomChip200 »

Matt,

I just checked VTC definitions by chance and seems you reverse 2 fields (min_temp and speed) since the beginning:
File: Z32_VG30_256_E.adr

Code: Select all

#VTC
VTC_RPM_RECOVER,&H79F5,2,1,1,50,VTC Solenoid ON > min RPM
VTC_RPM_CUT,&H79F6,2,1,1,50,VTC Solenoid OFF > max RPM
[b]VTC_SPEED_CUT,&H79F2,1,1,1,1,VTC Solenoid ON > speed
VTC_TEMP_MIN_CUT,&H79F3,1,1,1,1,VTC Solenoid ON > min temp[/b]
VTC_TEMP_MAX_CUT,&H79F4,1,1,1,2,VTC Solenoid OFF > max temp
VTC_TP_CUT,&H79F7,1,1,1,1,VTC Solenoid ON > min TP
&H79F2 is not a speed cut but temperature related (default value = 5)
&H79F3 is compared against speed (default value = 0)
Others fields are corrects.

Code: Select all

CODE:D155 compute_vtc:                                      ; ...
CODE:D155                     tim #%10000000, act_mask2     ; Bit 0: Power balance
CODE:D155                                                   ; Bit 1: Fuel pump relay
CODE:D155                                                   ; Bit 2: PREG solenoid
CODE:D155                                                   ; Bit 3: Self learn control
CODE:D155                                                   ; Bit 4: AAC control
CODE:D155                                                   ; Bit 5: EGR control
CODE:D155                                                   ; Bit 6: AIV control
CODE:D155                                                   ; Bit 7: VTC control
CODE:D158                     beq cv_1
CODE:D158 
CODE:D15A                     tst act_vtc_solenoid          ; Activation code 8F: VTC solenoid
CODE:D15D                     beq cv_10
CODE:D15D 
CODE:D15F                     bra cv_9
CODE:D15F 
CODE:D161 
CODE:D161 cv_1:                                             ; ...
CODE:D161                     tim #%1000, flags3            ; Bit 0: PORT5 bit 4 inverted, if 0 then injection cut
CODE:D161                                                   ; Bit 2: Activated once every 2 IRQ2
CODE:D161                                                   ; Bit 3: Compute main maps
CODE:D161                                                   ; Bit 6: Activated once every 10 IRQ2
CODE:D161                                                   ; Bit 7: IRQ2 interrupt active
CODE:D164                     beq cv_10
CODE:D164 
CODE:D166                     tim #%101, flags6             ; Bit 0: throttle switch (1=idle)
CODE:D166                                                   ; Bit 1: high octane
CODE:D166                                                   ; Bit 2: neutral switch(1=neutral)
CODE:D166                                                   ; Bit 3: power steering switch (1=on)
CODE:D166                                                   ; Bit 4: A/C switch (1=on)
CODE:D166                                                   ; Bit 7: gear engaged and high gear
CODE:D169                     bne cv_10
CODE:D169 
CODE:D16B                     ldaa engine_temp              ; Engine temp+50 (°C)
CODE:D16E                     tim #%100000, actuators_copy  ; Actuators copy in RAM
CODE:D16E                                                   ; Bit 2: Coolant fan low
CODE:D16E                                                   ; Bit 3: Coolant fan high
CODE:D16E                                                   ; Bit 4: PRVR solenoid
CODE:D16E                                                   ; Bit 5: VTC solenoid
CODE:D16E                                                   ; Bit 6: AIV solenoid
CODE:D171                     beq cv_2
CODE:D171 
CODE:D173                     adda #4
CODE:D175 
CODE:D175 cv_2:                                             ; ...
CODE:D175                     cmpa vtc_const1
CODE:D178                     bcs cv_10
CODE:D178 
CODE:D17A                     ldaa engine_temp              ; Engine temp+50 (°C)
CODE:D17D                     tim #%100000, actuators_copy  ; Actuators copy in RAM
CODE:D17D                                                   ; Bit 2: Coolant fan low
CODE:D17D                                                   ; Bit 3: Coolant fan high
CODE:D17D                                                   ; Bit 4: PRVR solenoid
CODE:D17D                                                   ; Bit 5: VTC solenoid
CODE:D17D                                                   ; Bit 6: AIV solenoid
CODE:D180                     beq cv_3
CODE:D180 
CODE:D182                     suba #5
CODE:D184                     bcc cv_3
CODE:D184 
CODE:D186                     clra
CODE:D187 
CODE:D187 cv_3:                                             ; ...
CODE:D187                     cmpa vtc_const2
CODE:D18A                     bcc cv_10
CODE:D18A 
CODE:D18C                     ldaa speed
CODE:D18F                     tim #%100000, actuators_copy  ; Actuators copy in RAM
CODE:D18F                                                   ; Bit 2: Coolant fan low
CODE:D18F                                                   ; Bit 3: Coolant fan high
CODE:D18F                                                   ; Bit 4: PRVR solenoid
CODE:D18F                                                   ; Bit 5: VTC solenoid
CODE:D18F                                                   ; Bit 6: AIV solenoid
CODE:D192                     beq cv_4
CODE:D192 
CODE:D194                     adda #2
CODE:D196 
CODE:D196 cv_4:                                             ; ...
CODE:D196                     cmpa vtc_const3
CODE:D199                     bcs cv_10
CODE:D199 
CODE:D19B                     ldaa rpm_d4_lo                ; rpm_div_4_lo=lo(Engine speed/50)
CODE:D19E                     ldx tp
CODE:D1A1                     tab
CODE:D1A2                     tim #%100000, actuators_copy  ; Actuators copy in RAM
CODE:D1A2                                                   ; Bit 2: Coolant fan low
CODE:D1A2                                                   ; Bit 3: Coolant fan high
CODE:D1A2                                                   ; Bit 4: PRVR solenoid
CODE:D1A2                                                   ; Bit 5: VTC solenoid
CODE:D1A2                                                   ; Bit 6: AIV solenoid
CODE:D1A5                     beq cv_6
CODE:D1A5 
CODE:D1A7                     adda #4
CODE:D1A9                     bcc cv_5
CODE:D1A9 
CODE:D1AB                     ldaa #255
CODE:D1AD 
CODE:D1AD cv_5:                                             ; ...
CODE:D1AD                     subb #4
CODE:D1AF                     bcc cv_6
CODE:D1AF 
CODE:D1B1                     clrb
CODE:D1B2 
CODE:D1B2 cv_6:                                             ; ...
CODE:D1B2                     cmpb vtc_release              ; 98*50=4900 rpm
CODE:D1B5                     bcc cv_10
CODE:D1B5 
CODE:D1B7                     cmpa vtc_const4
CODE:D1BA                     bcs cv_7
CODE:D1BA 
CODE:D1BC                     bra cv_9
CODE:D1BC 
CODE:D1BE 
CODE:D1BE cv_7:                                             ; ...
CODE:D1BE                     xgdx
CODE:D1BF                     tim #%100000, actuators_copy  ; Actuators copy in RAM
CODE:D1BF                                                   ; Bit 2: Coolant fan low
CODE:D1BF                                                   ; Bit 3: Coolant fan high
CODE:D1BF                                                   ; Bit 4: PRVR solenoid
CODE:D1BF                                                   ; Bit 5: VTC solenoid
CODE:D1BF                                                   ; Bit 6: AIV solenoid
CODE:D1C2                     beq cv_8
CODE:D1C2 
CODE:D1C4                     adda #16
CODE:D1C6 
CODE:D1C6 cv_8:                                             ; ...
CODE:D1C6                     cmpa vtc_const5
CODE:D1C9                     bcs cv_10
CODE:D1C9 
CODE:D1CB 
CODE:D1CB cv_9:                                             ; ...
CODE:D1CB                     oim #%100000, actuators_copy  ; Actuators copy in RAM
CODE:D1CB                                                   ; Bit 2: Coolant fan low
CODE:D1CB                                                   ; Bit 3: Coolant fan high
CODE:D1CB                                                   ; Bit 4: PRVR solenoid
CODE:D1CB                                                   ; Bit 5: VTC solenoid
CODE:D1CB                                                   ; Bit 6: AIV solenoid
CODE:D1CE                     bra cv_11
CODE:D1CE 
CODE:D1D0 
CODE:D1D0 cv_10:                                            ; ...
CODE:D1D0                     aim #%11011111, actuators_copy ; Actuators copy in RAM
CODE:D1D0                                                   ; Bit 2: Coolant fan low
CODE:D1D0                                                   ; Bit 3: Coolant fan high
CODE:D1D0                                                   ; Bit 4: PRVR solenoid
CODE:D1D0                                                   ; Bit 5: VTC solenoid
CODE:D1D0                                                   ; Bit 6: AIV solenoid
CODE:D1D3 
CODE:D1D3 cv_11:                                            ; ...
CODE:D1D3                     sei
CODE:D1D4                     ldaa actuators_copy           ; Actuators copy in RAM
CODE:D1D4                                                   ; Bit 2: Coolant fan low
CODE:D1D4                                                   ; Bit 3: Coolant fan high
CODE:D1D4                                                   ; Bit 4: PRVR solenoid
CODE:D1D4                                                   ; Bit 5: VTC solenoid
CODE:D1D4                                                   ; Bit 6: AIV solenoid
CODE:D1D6                     staa ACTUATORS                ; Write:
CODE:D1D6                                                   ;   Bit 2: Coolant fan low
CODE:D1D6                                                   ;   Bit 3: Coolant fan high
CODE:D1D6                                                   ;   Bit 4: PRVR solenoid
CODE:D1D6                                                   ;   Bit 5: VTC solenoid
CODE:D1D6                                                   ;   Bit 6: AIV solenoid
CODE:D1D6                                                   ; Read:
CODE:D1D6                                                   ;   Bit 2: Speed sensor
CODE:D1D6                                                   ;   Bit 3: Power steering switch
CODE:D1D6                                                   ;   Bit 4: Air conditioning switch
CODE:D1D9                     cli
CODE:D1DA                     rts
CODE:D1DA 
CODE:D1DA ; End of function compute_vtc

Code: Select all

DATA:F9F2 vtc_const1:         fcb 5                         ; ...
DATA:F9F3 vtc_const3:         fcb 0                         ; ...
DATA:F9F4 vtc_const2:         fcb 160                       ; ...
DATA:F9F5 vtc_const4:         fcb 122                       ; ...
DATA:F9F6 vtc_release:        fcb 98                        ; ...
DATA:F9F6                                                   ; 98*50=4900 rpm
DATA:F9F7 vtc_const5:         fcb 24                        ; ...

Matt
Site Admin
 

Posts: 8993
Joined: Sun Jan 29, 2006 1:45 am
Location: Adelaide, Australia
Contact:

Re: Wrong VTC definitions for Z32 address file

Post by Matt »

Thanks. I checked my disassembly and I had those two mixed up in there. Updated the file. Need to check the others now
Matt
Site Admin
 

Posts: 8993
Joined: Sun Jan 29, 2006 1:45 am
Location: Adelaide, Australia
Contact:

Re: Wrong VTC definitions for Z32 address file

Post by Matt »

Q45 okay, 16 bit Z32 needed updating
Torque
 

Posts: 639
Joined: Wed Jun 16, 2010 10:08 am

Re: Wrong VTC definitions for Z32 address file

Post by Torque »

Hi there,


Has this been updated in the latest .adr files (rom pack), or do I have to change this manually??


Cheers,
Andrew
Matt
Site Admin
 

Posts: 8993
Joined: Sun Jan 29, 2006 1:45 am
Location: Adelaide, Australia
Contact:

Re: Wrong VTC definitions for Z32 address file

Post by Matt »

Updates to the address files come with the Nistune release. Will be 0.10.7 version coming out this week
Torque
 

Posts: 639
Joined: Wed Jun 16, 2010 10:08 am

Re: Wrong VTC definitions for Z32 address file

Post by Torque »

Hello ..

A new version so soon already?


But could you post the updated address file then?
(I'm not 100% sure of the impact)

I am working on VTC and Z32 at the moment ...

Thanks,

Andrew
Matt
Site Admin
 

Posts: 8993
Joined: Sun Jan 29, 2006 1:45 am
Location: Adelaide, Australia
Contact:

Re: Wrong VTC definitions for Z32 address file

Post by Matt »

I've attached to this message
Attachments
Z32_VG30_256_E.adr
Z32 updated address file
(3.71 KiB) Downloaded 189 times
Torque
 

Posts: 639
Joined: Wed Jun 16, 2010 10:08 am

Re: Wrong VTC definitions for Z32 address file

Post by Torque »

:D :D :D :!:
Post Reply