gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > 42 64x64 8-bit sprites possible?

#150950 - SiW - Fri Feb 15, 2008 7:58 pm

Can someone confirm my thinking on the sprite limitations? I want to be able to show 42 64x64 8-bit color components on one screen, and seeing as they're movable I thought I'd let the hardware do it and use sprites.

I quickly discovered the addressing issues when I hit my ninth sprite, and from my reading I *think* that if I set DISPLAY_SPR_1D_SIZE_256 and use two VRAM banks I can get away with it, yes?

FWIW, I'm asking in advance rather than just doing it because I have to do some laborious manual positioning work for each component and it's slow going, I've only done 9 so far :P

#150951 - Noda - Fri Feb 15, 2008 8:10 pm

Just take your head and some do some easy maths:

1 sprite 64x64x8bit = 4096 bytes

- 1 bank = 128K => 128/4 = 32 sprites
- 2 banks = 256K => 64 sprites

yes that's possible if your use 2 vram banks.

#150955 - SiW - Fri Feb 15, 2008 11:16 pm

Yeah, the memory allocation wasn't what I was unsure about, it was whether the addressing would work properly so I could get under 1024 tile locations - the only relevant post I could find seemed to indicate the smallest amount I could increase my tileIdx by was 32. But no, I can use 16 and everything is working fine now.

I'm loving this hardware.