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! :-)

Have?fun!
Thomas
_______________________________________________________
Thomas?Jentzsch?????????|?***?Every?bit?is?sacred?!?***
tjentzsch?at?web?dot?de?|



























______________________________________________________________________________
Erdbeben im Iran: Zehntausende Kinder brauchen Hilfe. UNICEF hilft den
Kindern - helfen Sie mit! https://www.unicef.de/spe/spe_03.php

----------------------------------------------------------------------------------------------
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/


Current Thread