Question on Bunnyboy's first Tutorial

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

Post Reply
User avatar
Rid
Posts: 66
Joined: Sun May 10, 2009 4:06 am

Question on Bunnyboy's first Tutorial

Post 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?
UncleSporky
Posts: 388
Joined: Sat Nov 17, 2007 8:44 pm

Post 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.
User avatar
Rid
Posts: 66
Joined: Sun May 10, 2009 4:06 am

Post 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
Post Reply