Re: Aw: Re: Re: [stella] Climber 5 beta...again???

Subject: Re: Aw: Re: Re: [stella] Climber 5 beta...again???
From: Christopher Tumber <christophertumber@xxxxxxxxxx>
Date: Fri, 27 Jun 2003 13:40:09 -0400
>LDA flashTimer
>AND #%00000010
>BNE skip

Huh? Is flashTimer being incredmented or decrement somewhere? If so, from what/to what? In order to implement, you're also going to need something like:

  DEC flashTimer
  BPL notresetflashTimer
  LDA #%00000011
  STA flashTimer

  LDA flashTimer
  AND #%00000010
  BNE skip

Which is fine if he has a frame counting variable which can serve double duty so he doesn't need to add the extra code, but otherwise it is a big increase in overhead.

Actually, I just re-read Dennis' post and I realised he's actually doing something like this:

  lda girdercolour
  eor #%00000001 ;bit0 is unused by colour registers
  sta girdercolour

  ldy #0
  lda girdercolour
  and #%000000001
  beq nogirder
  ldy girdercolour
  sty COLUP0

My solution would be:

  ldy #0
  lda framevariable
  adc #%01000000 ;or #%0010000 or #%00010000 (&etc)
  sta framevariable
  bmi skip
  ldy girdercolour ;This probably doesn't need to be a variable anymore
  sty COLUP0

Which actually saves a few bytes ROM but at the cost of a byte of RAM (unless we can now eliminate the girdercolour variable, in which case it's break-even). If he does have a general frame counter variable then your solution may be better but if not, I'm sticking with mine.


Archives (includes files) at
Unsub & more at

Current Thread