Page 1 of 1

Question on Bunnyboy's first Tutorial

Posted: Fri Oct 16, 2009 3:07 pm
by Rid
I'm planning to translate in french, the first bunnyboy's tutorial.

I have to say that this doc is really interesting and very clear.

However, I think there may be a mistake within the Multiple Sprites part. First of all, he defines sprites data this way :

Code: Select all

sprites:
     ;vert tile attr horiz
  .db $80, $32, $00, $80 ;sprite 0
  .db $80, $33, $00, $88 ;sprite 1
  .db $88, $34, $00, $80 ;sprite 2
  .db $88, $35, $00, $88 ;sprite 3
Then, he gives a sample that create a loop to copy that data into memory :

Code: Select all

LoadSprites:
  LDX #$00 ; start at 0
LoadSpritesLoop:
  LDA sprites, x ; load data from address (sprites + x)
  STA $0200, x ; store into RAM address ($0200 + x)
  INX ; X = X + 1
  CPX #$20 ; Compare X to hex $20, decimal 32
  BNE LoadSpritesLoop ; Branch to LoadSpritesLoop if compare was Not Equal to zero
; if compare was equal to 32, keep going down
I think that the value #$20 is wrong with the sprite data given. Indeed, 4 sprites data have been set, so there are 4*4 bytes of data.
So I think he should write CPX #$10 instead of CPX #$20.
Am I right?

Posted: Fri Oct 16, 2009 4:58 pm
by UncleSporky
Are you translating the Nerdy Nights series, as found here? I thought bunnyboy had made earlier tutorials that were less accurate/complete - Nerdy Nights is the most recent.

In the Multiple Sprites section in Week 5 he does indeed do a CPX #$10.

Posted: Fri Oct 16, 2009 11:35 pm
by Rid
I have discovered Nerdy Nights tutorials after Nes Asm Tutorial. That's the reason why I'm not working on them yet.

Anyway, I've planned to translate those tutorials too.

Thanks you for the response