Re: [stella] Collaboration

Subject: Re: [stella] Collaboration
From: Thomas Jentzsch <tjentzsch@xxxxxx>
Date: Sun, 19 Jan 2003 00:11:22 +0100
Glenn wrote:
> You have verified that there is no tearing for all position combinations?

Yup. :-)

> If that's the case then if you add in the simplified ball code I'd consider 
> the main kernel done (save for the score section of course).

Just one single ball with different color that will be enabled once,

Ok, I'll compile some source and post it tomorrow.

> Speaking of which, how different is the driving controller code you
> used for Thrust+ DC and Asteroids+ DC vs. what I employed in the last
> build of DD?  I'm guessing yours is more compact. 

Yes. It's basically quite exactly like the version Eckhard and I had
posted here. But it got a bit more complicated when I had to share a
register with other code (lots of masking operations).

Here is the Asteroids DC code:
  lda lastDir
  and #%11100111
  eor lastDir
  sty lastDir
  lda SWCHA
  and #%11
  ora lastDir
  sta lastDir
  lda SWCHA
  and #%11
  eor NextDCTab,y  ; works like cmp for beq
  beq .leftTurn
  eor #%11
  beq .rightTurn
  bne .noTurn

  dec dir
  .byte $2c        ; BIT_W
  inc dir

  .byte %01, %11, %00, %10

You can see that I'm only using the bits 3 + 4 in lastDir. If you have a
complete register the first part of the code gets *much* easier:
  ldy lastDir
  lda SWCHA
  and #%11
  sta lastDir
  lda SWCHA

> Also, your current kernel is loading the car sprites the same way I
> was doing it before so I can just plug the controller/rotation code
> back in, right? 

Depends on the coordinate system you where using. Mine starts at the
left and top of the screen. For vertical wrapping you should define the
top of the screen to start at CAR_HEIGHT-1.

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

Archives (includes files) at
Unsub & more at

Current Thread