P04 Custom Code

For discussion and distribution of custom code and hacks
Tyson
Posts: 53
Joined: Fri Nov 13, 2015 10:52 am
cars: 2000 Pontiac Grand Prix GTP, 1998 Tahoe, 2004 duramax lly, 2008 duramax and meany more I'm a mechanic/tuner

Re: P04 Custom Code

Post by Tyson »

This is The stock File i uploaded into my current 2002 GTP L67
Attachments
2002 Grand Prix L67 - 40th Stock - 12223462.bin
(512 KiB) Downloaded 147 times
Tyson
Posts: 53
Joined: Fri Nov 13, 2015 10:52 am
cars: 2000 Pontiac Grand Prix GTP, 1998 Tahoe, 2004 duramax lly, 2008 duramax and meany more I'm a mechanic/tuner

Re: P04 Custom Code

Post by Tyson »

I will get my 2 spar pcm i have and do some reading and writing with pcmhammer if anything needs to be tested.
Tyson
Posts: 53
Joined: Fri Nov 13, 2015 10:52 am
cars: 2000 Pontiac Grand Prix GTP, 1998 Tahoe, 2004 duramax lly, 2008 duramax and meany more I'm a mechanic/tuner

Re: P04 Custom Code

Post by Tyson »

If there's a spacific bin file anyone would like feel free to ask I may have it have a large collection of bin. Files. And or can probably make one on the bench
ProfessWRX
Posts: 145
Joined: Tue Oct 03, 2023 9:33 am
cars: 04 Monte SSSC
04 Tahoe
92 Trans Am
Location: AZ USA

Re: P04 Custom Code

Post by ProfessWRX »

More Custom work. This one flashes the cruise light when KR is above a threshold. It also flashes off when cruise is engaged.
The best Mod any car can have.

Code: Select all

ROM:0006E378     sCruiseFlashHacks:                      ; CODE XREF: sDashConnectionsMaybe:loc_15052j
ROM:0006E378 018                 btst    #3,(byte_FFFF97C6).w ; Test if in cruise control
ROM:0006E37E 018                 beq.s   loc_6E390       ; Branch if not in cruise control
ROM:0006E380 018                 btst    #3,(byte_FFFF97C7).w ; Test a Bit
ROM:0006E386 018                 beq.s   loc_6E38C       ; Branch Cruise Flashing Error?
ROM:0006E388 018                 moveq   #1,d7           ; Prepare to Turn On Cruise Light
ROM:0006E38A 018                 bra.s   loc_6E38E       ; Branch to check for KR
ROM:0006E38C     ; ---------------------------------------------------------------------------
ROM:0006E38C
ROM:0006E38C     loc_6E38C:                              ; CODE XREF: sDashConnectionsMaybe+5973Cj
ROM:0006E38C 018                 moveq   #2,d7           ; Prepare to Flash cruise light for error?
ROM:0006E38E
ROM:0006E38E     loc_6E38E:                              ; CODE XREF: sDashConnectionsMaybe+59740j
ROM:0006E38E 018                 bra.s   loc_6E3B2       ; Branch Always to check for KR
ROM:0006E390     ; ---------------------------------------------------------------------------
ROM:0006E390
ROM:0006E390     loc_6E390:                              ; CODE XREF: sDashConnectionsMaybe+59734j
ROM:0006E390 018                 jsr     sDLCKnockRetard ; Check for KR
ROM:0006E396 018                 cmpi.b  #3,d0           ; Compare KR to threshold
ROM:0006E39A 018                 bls.s   loc_6E3A8       ; Branch if Low or Same to keep cruise light OFF
ROM:0006E39C 018                 moveq   #1,d7           ; Turn ON cruise light
ROM:0006E39E 018                 move.b  d7,(pCruiseStatusByte).w ; 
ROM:0006E3A2 018                 jmp     loc_15072       ; Exit
ROM:0006E3A8     ; ---------------------------------------------------------------------------
ROM:0006E3A8
ROM:0006E3A8     loc_6E3A8:                              ; CODE XREF: sDashConnectionsMaybe+59750j
ROM:0006E3A8 018                 clr.b   (pCruiseStatusByte).w ; Turn OFF cruise light
ROM:0006E3AC 018                 jmp     loc_15072       ; Exit
ROM:0006E3B2     ; ---------------------------------------------------------------------------
ROM:0006E3B2
ROM:0006E3B2     loc_6E3B2:                              ; CODE XREF: sDashConnectionsMaybe:loc_6E38Ej
ROM:0006E3B2 018                 jsr     sDLCKnockRetard ; Check for KR
ROM:0006E3B8 018                 cmpi.b  #3,d0           ; Compare KR to threshold
ROM:0006E3BC 018                 bls.s   loc_6E3C8       ; Branch if Low or Same to leave cruise light as is (OEM)
ROM:0006E3BE 018                 clr.b   (pCruiseStatusByte).w ; Turn OFF cruise light when KR > and cruise control is active
ROM:0006E3C2 018                 jmp     loc_15072       ; Exit
ROM:0006E3C8     ; ---------------------------------------------------------------------------
ROM:0006E3C8
ROM:0006E3C8     loc_6E3C8:                              ; CODE XREF: sDashConnectionsMaybe+59772j
ROM:0006E3C8 018                 move.b  d7,(pCruiseStatusByte).w ; Leave OEM control of Cruise light function
ROM:0006E3CC 018                 jmp     loc_15072       ; Exit
ROM:0006E3CC     ; END OF FUNCTION CHUNK FOR sDashConnectionsMaybe
ProfessWRX
Posts: 145
Joined: Tue Oct 03, 2023 9:33 am
cars: 04 Monte SSSC
04 Tahoe
92 Trans Am
Location: AZ USA

Re: P04 Custom Code

Post by ProfessWRX »

Another Custom Code routine. This one checks for performance mode, and pulls a different PE Enable by TPS table depending on mode:

Code: Select all

ROM:0006E3D2     sPerformancePETableCheck:               ; CODE XREF: sClosedLoopControl:loc_21BE4j
ROM:0006E3D2 026                 tst.b   (pPerformanceMode).w ; Test Performance Mode
ROM:0006E3D6 026                 beq.s   loc_6E3E6       ; Branch if OFF
ROM:0006E3D8 026                 tblu.w  (tPEenableTPSbyRPM).l,d3 ; Table Lookup Performance mode = Stock table
ROM:0006E3E0 026                 jmp     loc_21BEC       ; Exit
ROM:0006E3E6     ; ---------------------------------------------------------------------------
ROM:0006E3E6
ROM:0006E3E6     loc_6E3E6:                              ; CODE XREF: sClosedLoopControl+4CBE8j
ROM:0006E3E6 026                 tblu.w  (tPEenableTPSbyRPM_NON_PERF_MODE).l,d3 ; Table Lookup New Non Performance Mode Table
ROM:0006E3EE 026                 jmp     loc_21BEC       ; Exit
ROM:0006E3EE     ; END OF FUNCTION CHUNK FOR sClosedLoopControl
ROM:0006E3EE     ; ---------------------------------------------------------------------------
ROM:0006E3F4     tPEenableTPSbyRPM_NON_PERF_MODE:dc.w $1000
ROM:0006E3F4                                             ; DATA XREF: sClosedLoopControl:loc_6E3E6r
ROM:0006E3F6                     dc.w $1000
ROM:0006E3F8                     dc.w $1000
ROM:0006E3FA                     dc.w $1000
ROM:0006E3FC                     dc.w $1000              ; 80% TPS
ROM:0006E3FE                     dc.w $1000
ROM:0006E400                     dc.w $1000
ROM:0006E402                     dc.w $F00
ROM:0006E404                     dc.w $F00               ; 75% TPS
ROM:0006E406                     dc.w $F00
ROM:0006E408                     dc.w $A00
ROM:0006E40A                     dc.w $A00
ROM:0006E40C                     dc.w $A00
ROM:0006E40E                     dc.w $A00               ; 50% TPS
ROM:0006E410                     dc.w $A00
ROM:0006E412                     dc.w $A00
ROM:0006E414                     dc.w $A00
Post Reply