#85988 - Dwedit - Sat Jun 03, 2006 6:38 pm
Does the GBA have sprite limitations per scanline, and is there any way to intentionally trigger this?
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."
#86006 - DiscoStew - Sat Jun 03, 2006 8:02 pm
You've got a limit of 128 sprites altogether (due to the hardware only allowing that much), but that is on a per scanline basis. You can get more sprites on the screen, but not all on the same scanline, where the limit will always be 128. You can allow changes to the sprites during each H-Blank by setting bit 5 on the Display Controller at address 0x04000000, or DISPCNT if you are using the usual gba.h file in your project.
For other things you might need, like learning about other sprite information, I suggest looking through the GBATek documentation at
http://www.work.de/nocash/gbatek.htm
_________________
DS - It's all about DiscoStew
#86026 - tepples - Sat Jun 03, 2006 11:29 pm
If you have more than about 950 sprite pixels per scanline, it'll start dropping the rearmost sprites (like the NES). A rot/scale sprite pixel is worth 3.25 regular sprite pixels.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#86029 - Dwedit - Sat Jun 03, 2006 11:46 pm
Any more precise numbers? I'd like to somehow turn the sprite limit into an 8 sprite limit. (yeah, it's for PocketNES...)
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."
#86030 - poslundc - Sat Jun 03, 2006 11:50 pm
#86037 - Dwedit - Sun Jun 04, 2006 12:40 am
Alright, thanks for the link. What's the way to acomplish a 64 pixel limit each scanline with the fewest sprites?
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."
#86042 - tepples - Sun Jun 04, 2006 12:58 am
You can probably use HDMA to overwrite the first eight sprites in OAM after each scanline. This will also give you "perfect" flicker-scaling for sprites.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#86069 - Dwedit - Sun Jun 04, 2006 5:06 am
tepples wrote: |
You can probably use HDMA to overwrite the first eight sprites in OAM after each scanline. This will also give you "perfect" flicker-scaling for sprites. |
Yowza! That would take a ton of CPU time to do something like that.
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."
#86113 - tepples - Sun Jun 04, 2006 3:04 pm
If you want PocketNintendulator instead of PocketNesticle, you're going to have to pay the CPU cycle cost of making PocketNintendulator. This mod may be more suitable for nesDS.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#88043 - Dwedit - Sat Jun 17, 2006 5:26 am
I just tested out the effects of overloading the GBA rendering hardware with many large scaled sprites. It did manage to do a sprite limit to any additional sprites, but the effect was very bad. Things flickered a lot, and the effect was not consistent each scanline. I tried to make it so that the number of remaining clock cycles was exactly enough to render 8 more sprites, but it still worked poorly.
Also, the scaled sprites can not be placed offscreen.
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."