In the event of trying to do a simple DMA for uploading an 8x8 ball graphic, I had thought of something: At what times would you choose not to DMA to vram and when would not? It had occurred to me that updating a tilemap horizontally should be faster than vertically, because you're just DMAing a single line of data, where vertically, you're doing 4 bytes, then not doing anything for 128 bytes, 4 more bytes, skipping an additional 128 bytes, so on. That is, unless there's somehow a way to write 4 (or 1 or 2 bytes, just use multiple DMA channels) bytes and then skip 128 via DMA. I also thought of how updating a BG for a score counter or something like that would be slower trying to use DMA.
Now, it's time for me to freeload off you guys. Do you see something wrong with this, because, as I said, I'm trying to upload 1 4bpp tile to the very beginning. I haven't had much experience with DMA due to Macros that took care of it, but I'm trying to stay away from those now. I didn't comment on anything, I used old code I didn't make that had these comments, but I arranged everything according to it. A is 8 bit, while X and Y are 16 bit.
Just so you know, I looked at a manual detailing what each register does before asking for help.
Now, it's time for me to freeload off you guys. Do you see something wrong with this, because, as I said, I'm trying to upload 1 4bpp tile to the very beginning. I haven't had much experience with DMA due to Macros that took care of it, but I'm trying to stay away from those now. I didn't comment on anything, I used old code I didn't make that had these comments, but I arranged everything according to it. A is 8 bit, while X and Y are 16 bit.
Code:
lda #$F0 ;Increment VRAM address by 1 after write to $2119
sta $2115
ldx #$0000
stx $2116 ;$2116: Word address for accessing VRAM
ldx #.LOWORD(BallTile)
stx $4302 ;Store Data offset into DMA source offset
lda #.BANKBYTE(BallTile)
sta $4304 ;Store data Bank into DMA source bank
ldx #$20
stx $4305 ;Store size of data block
lda #$01
sta $4300 ;Set DMA mode (word, normal increment)
lda #$18 ;Set the destination register (VRAM write register)
sta $4301
lda #$01 ;Initiate DMA transfer (channel 1)
sta $420B
sta $2115
ldx #$0000
stx $2116 ;$2116: Word address for accessing VRAM
ldx #.LOWORD(BallTile)
stx $4302 ;Store Data offset into DMA source offset
lda #.BANKBYTE(BallTile)
sta $4304 ;Store data Bank into DMA source bank
ldx #$20
stx $4305 ;Store size of data block
lda #$01
sta $4300 ;Set DMA mode (word, normal increment)
lda #$18 ;Set the destination register (VRAM write register)
sta $4301
lda #$01 ;Initiate DMA transfer (channel 1)
sta $420B
Just so you know, I looked at a manual detailing what each register does before asking for help.