Re: [stella] Fast Missile code

Subject: Re: [stella] Fast Missile code
From: "Thomas Jentzsch" <tjentzsch@xxxxxx>
Date: Fri, 16 Jan 2004 12:48:54 +0100
Manuel wrote:
> I'd be interested to see if someone has an idea for 
> drawing 4 scannline tall missiles even faster than this:
>     LDX #$1F
>     TXS
>     LAX scannline
>     SBC torpedoyPos     ; Torpedo 1
>     AND #$FC
>     PHP
>     TXA
>     SBC torpedoyPos+1   ; Torpedo 2
>     AND #$FC
>     PHP
>     DEC scannline
> This should be 30 cycles.

If you don't care for the carry this looks good. If you use the
same PHP trick more than once in a kernel, you can reuse the 
TXS value directly after the last push (though the LAX/TXA 
code doesn't work then anymore). 

Anyway, how about this one:
  lda #4                 
  dcp torpedoyPos 
  adc #1
  sta ENAM1          
  lda #4                 
  dcp torpedoyPos+1
  adc #1
  sta ENAM0

24 cycles! :-)


Erdbeben im Iran: Zehntausende Kinder brauchen Hilfe. UNICEF hilft den
Kindern - helfen Sie mit!

Archives (includes files) at
Unsub & more at

Current Thread