[stella] Oh Ya!

Subject: [stella] Oh Ya!
From: Christopher Tumber <christophertumber@xxxxxxxxxx>
Date: Tue, 08 Jul 2003 20:07:31 -0400
Ouch that was close, 1 waste cycle (no sta WSYNC) and everything placed exactly right (No WAY should I have been able to time that second PF2 write exactly mid-screen!)

G'wan, load it up - You know you want to!

BTW Thomas, this should look familiar:

      txa                   ;2  X=Scanline
      sbc drawnball0y       ;3  Vertical position of ball
      cmp drawnball0size    ;3  Vertical height of ball (may be constant in some apps)
      lda #1                ;2
      adc #0                ;2 
      sta ENAM0             ;3 

It's a refinement of your suggestion from a while ago that went:

      lda Scanline                 ;3 Cycles 2 Bytes
      sbc DrawnShot_Pos_Y          ;3 Cycles 2 Bytes
      cmp #4                       ;2 Cycles 2 Bytes
      lda #3                       ;2 Cycles 2 Bytes
      adc #0                       ;2 Cycles 2 Bytes
      sta ENABL                    ;3 Cycles 2 Bytes

(the code above produces an inverted display - Sprite is on for scanlines it should be off and off for scanlines it should be on)


IMHO anyone using the missiles or ball, should really consider this routine. If your missile/ball is of constant height you can be turning it on/off in 14 cycles:

      txa                   ;2  X=Scanline
      sbc missileY       ;3  Vertical position of missile
      cmp #2     ;2  Vertical height of missle
      lda #1                ;2
      adc #0                ;2 
      sta ENAM0             ;3 

Doesn't get much better than that....

Chris...

Attachment: BUMPER.BIN
Description: Binary data

Current Thread