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 > Problem with oamAllocateGfx() [solved]

#168284 - RyanFox - Sun Apr 19, 2009 7:52 am

Hey guys,
I'm using oamAllocateGfx() to allocate VRAM for my sprites, but I have a problem: It's always returning the same memory location. It's not too difficult to figure out the next address to use to offset from that location, but it seems like the function should take care of itself.

I noticed that the allocation test example uses this function without resorting to adding an offset, so I'm rather confused about this. I'm doing the same sort of video setup...

Does anyone have any ideas?
Thanks.


Last edited by RyanFox on Sun Apr 19, 2009 7:58 am; edited 1 time in total

#168285 - RyanFox - Sun Apr 19, 2009 7:58 am

I just noticed that oamInit() was being called after call to oamAllocateGfx(). When I put it before, my problem went away. What a silly mistake...