Search the web
Sign In
New User? Sign Up
gbadev
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Animating Sprites   Message List  
Reply | Forward Message #14594 of 15019 |
Re: Animating Sprites

--- In gbadev@yahoogroups.com, Ronald Chenu Abente <ronald_chenu@y...>
wrote:
> This brought many questions about the way the GBA
> renders the screen each frame. As we all know there
> are 228 scanlines per frame, but only 160 of them are
> actually used to render sprites and BGs.
> Is the CPU totally 'free' for other tasks during these
> 'hot' 160 scanlines?

Yes.

> Are there issues with accessing different parts of the
> memory map because, say, the CPU tries to update some
> unused memory of the OBJ VRAM while the LCD hardware
> is rendering sprites?

There might be a couple cycles of "wait states", but you'll
usually get far fewer than one per read or write on average.
More importantly, GBA VRAM contention introduces no
corruption issues like the NES and the 8-bit Game Boy had.
The NES shared an address bus between the PPU's refresh and
the CPU's port to VRAM; the GBC just disconnected the VRAM
from the memory map during draw. The GBA's memory controller
is much smarter than that, and VRAM is the second fastest RAM
in the GBA.

> That's why we've been thinking of using fast memory
> transfers (via DMA or CPU copies), during vblank of
> course, of each frame of a sprite from ROM to OJBVRAM
> (achieving animation of all sprites by streamlining
> frames directly). We know this has already been
> implemented in many games in a limited fashion

At least Kirby: Nightmare in Dream Land and Sonic Advance copy
the hero sprite's cel into RAM every frame. Mario Kart Super
Circuit does it for all driver sprites when running from ROM
(i.e. when not a multiboot slave).

> and where wondering about the reasons for doing it just
> to such extent (since this seems to leave plenty of cpu
> cycles unused).

Read this white paper on the topic:
http://www.pineight.com/gba/managing-sprite-vram.txt

Besides, the more CPU cycles you don't use, the better, as you
can tell the BIOS to turn off the CPU until the next vblank or
until a given scanline and drain the battery less.

--
Damian





Sat Nov 8, 2003 3:10 am

yerricde
Offline Offline
Send Email Send Email

Forward
Message #14594 of 15019 |
Expand Messages Author Sort by Date

Hi GBAList! Experimenting with big composite sprite-based characters, we realized that it was very heavy to render them on the GBA using many rotating parts...
Ronald Chenu Abente
ronald_chenu
Online Now Send Email
Nov 7, 2003
11:08 pm

... Yes. ... There might be a couple cycles of "wait states", but you'll usually get far fewer than one per read or write on average. More importantly, GBA...
Damian Yerrick
yerricde
Offline Send Email
Nov 8, 2003
9:47 am

Hi Ronald I can give you a bit of info on the sprite stuff as I know it. Our engine builds composite sprites all over the place w/o any real slowdown. We...
miked0801
Offline Send Email
Nov 8, 2003
9:47 am

... Either that, or cache decompressed cels in EWRAM. ... The GBA expects sprite coordinates on whole number pixel boundaries. Try overlapping the parts of...
Damian Yerrick
yerricde
Offline Send Email
Nov 8, 2003
3:11 pm

Thanks for the replys. Overlapping by 1 pixel is the method we are considering, but it'd be nice to know exactly how the hardware decides where to put each...
miked0801
Offline Send Email
Nov 9, 2003
2:37 am

... Yeah, we gave a thought about double buffering as a way to avoid the constraint of updating VRAM during vblank only, but (having read Mr. Yerrick's paper)...
ronald_chenu
Online Now Send Email
Nov 9, 2003
2:35 am

... A 32bit RLE system running out of cpumem in arm can be actually be faster than DMA transfer if enough data gets repeated and is generally not any slower....
Kriss
yah_kriss
Offline Send Email
Nov 9, 2003
12:09 pm

... GBA interrupts are IRQ by nature, not FIQ. You can still switch ARM to fast interrupt mode manually using msr, but anyway, real interrupts will never be...
Alexandre BACQUART
fedmahnkassa...
Offline Send Email
Nov 9, 2003
12:08 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help