Re: [stella] TFXM V1.0

Subject: Re: [stella] TFXM V1.0
From: Thomas Jentzsch <tjentzsch@xxxxxx>
Date: Sun, 13 Jul 2003 21:53:03 +0200
Manuel wrote:
> The first implemented feature is that the code
> automatically detects the *least-busy-channel*

That idea remembers me at my Thrust sound code: :-)

StartSound SUBROUTINE
  ldx     AudIdx1             ; 3         determine sound-channel
  cpx     AudIdx0             ; 3          with lowest prioroty
  ldx     #0                  ; 2
  bcs     .channel0           ; 2³
  inx                         ; 2
.channel0:
  cmp     AudIdx0,x           ; 4         new priority higher than current lowest?
  bcc     .noSound            ; 2³         no, skip new sound
  sta     AudIdx0,x           ; 4          yes, replace old sound with new one
  lda     #0                  ; 2           and
  sta     AudTim0,x           ; 4           start new sequence
.noSound:
  rts                         ; 6 = 24/25/33/34

By definition, my "least-busy channel" is determined by the priority
of the FX which is identical to the offset into the sound data table.
  
Have fun!
Thomas                            
_______________________________________________________
Thomas Jentzsch         | *** Every bit is sacred ! ***
tjentzsch at web dot de |

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


Current Thread