gauauu: look, we all paid $10K at some point in our lives for the privilege of hanging out with Kevin
gauauu: look, we all paid $10K at some point in our lives for the privilege of hanging out with Kevin
LDA #$00
STA $2003 ; set the low byte (00) of the RAM address
LDA #$02
STA $4014 ; set the high byte (02) of the RAM address, start the transfer
Why don't we do
LDA #$00In other words what happens when you do "STA $4014" ?
STA $2003
LDA #$02
STA $2003
STA $4014
LDA #$00In other words what happens when you do "STA $4014" ?
STA $2003 ; set the low byte (00) of the RAM address
LDA #$02
STA $4014 ; set the high byte (02) of the RAM address, start the transfer
gauauu: look, we all paid $10K at some point in our lives for the privilege of hanging out with Kevin
gauauu: look, we all paid $10K at some point in our lives for the privilege of hanging out with Kevin
^^ Beat me to it.
Originally posted by: thebmxeur
After reading it a few time I'm still a little confuse.
So to be sure :
in console ram ($0000 - $0800) at $0200 we've got our sprites datas ( y, tile, flags, x) (that's OAM, right?). OR any place you specify, but yes.
The ppu has a separate memory (separate from pattern table, name table, ...) of 256 bytes called SPR-Ram in which we have to copy our sprites datas.
To do that we do :
LDA #$00
STA $2003 - I had it backwards. You can move this out of the loop. The $4014 needs to be in NMI.
to set the destination address ($0000) in the SPR-Ram
LDA #$02
STA $4014
to set the high byte of the source address, and start transferring 256 bytes to the SPR-Ram. Start the transfer from $0200. If you used
LDA #$03
STA $4014
it would start the transfer from $0300, etc.
If the above is correct, destination should always be $00 ? Because if it's anything else there is no room for 256 bytes ?
I don't really understand what you mean by
"You could set it to anything $00-7F and shift your sprites, but that will mess up sprite rendering in "weird" ways."
-I don't know specifically, but I'd imagine it would run out of space or once it got to the end, it would loop around and finish from "$00".
Does it mean that source should be between $00 and $07 (to be in console ram $0000 to $0800) ?
-$0000 is your zero space, don't put it here
-$0100 is the stack, don't put it here.
-$02-$07 would be where they go. You just need to make sure that you actually put the sprite variables here and not at $0200 if you're not using $02.
This is my shiny thing, and if you try to take it off me, I may have to eat you.
Check out my dev blog.