VATS disable on BCC ANHT

jsg at donet.com jsg at donet.com
Tue May 11 17:44:47 GMT 1999


I've been looking at the code from BCC ANHT (727 '90 Y-body) that is
disassembled on
http://www.geocities.com/MotorCity/Shop/9938/hacks.html. I see the
VATS enable bit at 0x8016 (bit 4), but while looking through the code,
it's not clear to me how this would work.

the relevant code is:

LB352:  BRCLR   L0036,#$10,LB359        ; BR IF IGN ON
                                        ; ... else
        BCLR    L0038,#$04              ; RESET DRP THIS 6.25 ms PERIOD INDICATOR
        ;--------------------------------------------------
        ; CK VATS
        ; ECM 1227730 TYPE $8D
        ;--------------------------------------------------
LB359:  BRSET   L0003,#20,LB387         ; DON'T CK VATS IF ALREADY PASSED
                                        ; ... else
        ;
        ; CK AFR OPTION WD 1 0001 0100 
        ;    b4, 1 = ENABLE VATS
        ;                           
        LDAA    $8016                   ; AFR OPTION WD 1, 0001 0100
        BITA    #$10                    ; b4
        BEQ     LB352                   ; Br IF NOT b4
                                        ; ... else
        LDD     L3FF8                   ; PA1 TMR
        CLV                             ; 
        SUBD    $0135                   ; OLD VATS VAL
        BEQ     LB387                   ; BR IF NO PULSE 
                                        ; ... else
                                    
        LDX     L3FF8                   ; PA1 TMR
        STX     $0135                   ; OLD VATS VAL
        PSHB                            ;
        PSHA                            ;
        SUBD    L800E                   ; 3277d, VATS HI FREQ, 66 HZ
        PULA    
        PULB    
        BHI     LB387                   ; BR IF DELTA CNTS > 
                                        ; ... else
        SUBD    L8010                   ; 1638d, VATS LO FREQ, 33 HZ
        BCS     LB352                   ; Br IF DELTA CNTS <
                                        ; ... else
                                    
LB381:  BSET    L0003,#$20              ; SET VATS BIT OK
        CLR     L00D1                   ; ERR 46, \(VATS FAIL TMR\)
        ;--------------------------------------------------
        
        
LB387:  LDX     L3FC0                   ; LAST DRP PERIOD
        STX     L00B3                   ; CURRENT MNR LOOP DRP PERIOD
....


if bit 4 of 0x8016 is zero, it branches to LB352. Looks like an
infinite loop. Seems to me that it should be branching to LB381.


john



More information about the Gmecm mailing list