#37715 - edwdig - Tue Mar 15, 2005 7:47 am
What I'm trying to do is allocate an unitialized array of structures within EWRAM. I'm using DevKitARM_R11, and this is what I'm doing:
static Sprite Sprites[MAX_SPRITES] __attribute__ ((section (".ewram")));
If I do this, everything works fine. The downside to this approach being that space for the array is allocated within the ROM image. So I figured I'd change ewram to sbss, which theoretically should have the same result, only with a smaller ROM size.
When I try to run the game with that change made, the game just doesn't work right. Sprites behavior simply becomes unpredictable. I'm assuming there is some kind of memory usage conflict. No where else in my code do I explicitly use EWRAM. Could it be a stack conflict? I'm also using Krawall - could the conflict be there?
static Sprite Sprites[MAX_SPRITES] __attribute__ ((section (".ewram")));
If I do this, everything works fine. The downside to this approach being that space for the array is allocated within the ROM image. So I figured I'd change ewram to sbss, which theoretically should have the same result, only with a smaller ROM size.
When I try to run the game with that change made, the game just doesn't work right. Sprites behavior simply becomes unpredictable. I'm assuming there is some kind of memory usage conflict. No where else in my code do I explicitly use EWRAM. Could it be a stack conflict? I'm also using Krawall - could the conflict be there?