Re: [SNES developer noob] Help me understand how sprites wor
Posted: Sun Sep 17, 2017 11:41 am
Yeah you're right.
I got a second sprite to display by changing Spritebuff2 (aka $0600) from #$54 to #$50. So instead of it being equal to #%01010100, it's now #%01010000. I guess I forgot how binary worked for a minute which is why I couldn't figure out what exactly was going on with this part. I expected that changing it to %#00010100 would work for some reason.
Following what HihiDanni just said sort of bumped me in the right direction causing me to realize this, and now I have a second sprite on the screen without glitches. I only needed that one DMA transfer section for it to work just like being told.
Now it's the same sprite as my first, not the different one that I'm trying to get to display, but I'll probably figure it out within the next day or so. It has to do with telling it somewhere the correct VRAM address which I likely overlooked and did wrong, so time to study some more snes code on the wiki.
EDIT: Yeah I don't know. Can someone point me in the right direction as to change what displays as the second sprite? Right now It's only showing my first one for both sprites. I am trying to get my second sprite at VRAM $9000, $0800 to show instead.
I'm just using that LoadBlockToVRAM code. Not sure why it's not linked to my 2nd sprite already the same way the DMA transfer code did it but I haven't been able to find out how to change it. I could get it so that some of that ONE working sprite's 16 tiles are used for another sprite and then tell it to use for example the 4th tile row only for sprite 2 using the 3rd byte of the low table but then I'm reducing the possible usable tiles for that 1st sprite just because there's no possible way to just load another different file for my 2nd sprite. I just don't see why using a different image file for a different sprite which is at a different VRAM address, allowing more versatile graphics, has to be such a nearly impossible task.
I got a second sprite to display by changing Spritebuff2 (aka $0600) from #$54 to #$50. So instead of it being equal to #%01010100, it's now #%01010000. I guess I forgot how binary worked for a minute which is why I couldn't figure out what exactly was going on with this part. I expected that changing it to %#00010100 would work for some reason.
Following what HihiDanni just said sort of bumped me in the right direction causing me to realize this, and now I have a second sprite on the screen without glitches. I only needed that one DMA transfer section for it to work just like being told.
Now it's the same sprite as my first, not the different one that I'm trying to get to display, but I'll probably figure it out within the next day or so. It has to do with telling it somewhere the correct VRAM address which I likely overlooked and did wrong, so time to study some more snes code on the wiki.
EDIT: Yeah I don't know. Can someone point me in the right direction as to change what displays as the second sprite? Right now It's only showing my first one for both sprites. I am trying to get my second sprite at VRAM $9000, $0800 to show instead.
I'm just using that LoadBlockToVRAM code. Not sure why it's not linked to my 2nd sprite already the same way the DMA transfer code did it but I haven't been able to find out how to change it. I could get it so that some of that ONE working sprite's 16 tiles are used for another sprite and then tell it to use for example the 4th tile row only for sprite 2 using the 3rd byte of the low table but then I'm reducing the possible usable tiles for that 1st sprite just because there's no possible way to just load another different file for my 2nd sprite. I just don't see why using a different image file for a different sprite which is at a different VRAM address, allowing more versatile graphics, has to be such a nearly impossible task.