VATS disable on BCC ANHT

Marc Randolph mrand at pobox.com
Tue May 11 19:10:38 GMT 1999


On Tue, May 11, 1999 at 01:44:47PM -0400, jsg at donet.com wrote:
> 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 
[...]
> LB381:  BSET    L0003,#$20              ; SET VATS BIT OK
>         CLR     L00D1                   ; ERR 46, \(VATS FAIL TMR\)
>         ;--------------------------------------------------
[...]
> 
> 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.


I would expect that as well.  Perhaps there is just an error in the 
listing on the web site? 

Here is a dump from a '91 YZ car:

B532 B6 8016        LDAA  $8016     (      )  % Load option enable byte
B535 85 10          BITA  #$10      (      )  % Test the VATS bit
B537 27 1D          BEQ   $1D       (B556 ) % Branch if VATS enable bit is NOT set
B539 FC 3FC4        LDD   $3FC4     (      ) 
B53C 0A             CLV             (      ) 
B53D B3 01AA        SUBD  $01AA     (      ) 
B540 27 1A          BEQ   $1A       (B55C )
B542 FE 3FC4        LDX   $3FC4     (      )
B545 FF 01AA        STX   $01AA     (      )
B548 37             PSHB            (      )
B549 36             PSHA            (      ) 
B54A B3 800F        SUBD  $800F     (      )  % Subtract the lower VATS frequency (20 Hz)
B54D 32             PULA            (      )
B54E 33             PULB            (      ) 
B54F 22 0B          BHI   $0B       (B55C ) 
B551 B3 8011        SUBD  $8011     (      )  % Subtract the upper VATS frequency (40 Hz)
B554 25 06          BCS   $06       (B55C ) 
B556 14 0220        BSET  $02,$20   (      )  % Set Flag indicating VATS passed
B559 7F 0197        CLR   $0197     (      )  


BTW, the VAT's frequencies listed in the comments on the
.pdf from the hacks web site off.  3277d = 20 Hz and 1638 = 40 Hz


   Marc

-- 
  Marc Randolph     -    mrand at pobox.com    -     PGP keyID: 0x4C95994D
   "During my service in the U.S. Congress, I took the initiative in
    creating the Internet."   - US vice Pres. Al Gore in an Mar 9, 1999
              interview on CNN somehow claiming he created the Internet
      



More information about the Gmecm mailing list