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.

Coding > Do we really need a copy of the OAM?

#22379 - mr_schmoe - Sat Jun 19, 2004 7:36 pm

I was messing around with my game engine for a little bit when I came across this revelation. All my sprite data updates are done in the vblank anyways, so I really don't need a copy of the OAM, I can just edit the real thing. Now, I now it's locked during the vdraw and if you do edit the OAM during the vdraw you can get undesired effects. But if you code is quick enough you can get everything done during the vblank. I haven't had the chance to implement such a practice, but I thought I still post the idea to see what ya'll think. I'll give an example of what I mean in a bit, but let me hear your thoughts first.
_________________
How many boards could the Mongols hoard, if the Mongol Hored got bored

#22384 - Lord Graga - Sat Jun 19, 2004 8:36 pm

No, you do not need it. I just do this:
[code]#define sprites ((OAMEntry*) 0x07000000)[code]

It would probably be better (?) with a pointer.

#22386 - sajiimori - Sat Jun 19, 2004 9:05 pm

Oh, do you expect the OAM to move? =)

#22390 - dagamer34 - Sun Jun 20, 2004 12:22 am

sajiimori wrote:
Oh, do you expect the OAM to move? =)


It moves?!?! :)
_________________
Little kids and Playstation 2's don't mix. :(