#7022 - einhaender - Fri Jun 06, 2003 11:35 am
Hi, i trying to set up codewaves for my project and have a little difficulties.
Below I pasted a code snipped, when I try it like this, the module wont start. However if I remove the "place sprites outside" for loop, it works.
Has it something to do with sprites (oam memory) and the mod file affect each other, or is it rather a timing problem because my loops take too long?
Thanks in advance
// palette
for(loop = 0 ; loop < 256 ; loop ++) {
OBJPaletteMem[loop] = spritePalette[loop];
}
// place sprites outside
for(loop = 0 ; loop < 128 ; loop++) {
sprites[loop].attribute0 = 160;
sprites[loop].attribute1 = 240;
}
// Set ROM speed
*((volatile WORD *)0x04000204) |= 0x0014;
// Init module player
MP_InitArm(MIXFREQ_22656);
while(1) { ....
Below I pasted a code snipped, when I try it like this, the module wont start. However if I remove the "place sprites outside" for loop, it works.
Has it something to do with sprites (oam memory) and the mod file affect each other, or is it rather a timing problem because my loops take too long?
Thanks in advance
// palette
for(loop = 0 ; loop < 256 ; loop ++) {
OBJPaletteMem[loop] = spritePalette[loop];
}
// place sprites outside
for(loop = 0 ; loop < 128 ; loop++) {
sprites[loop].attribute0 = 160;
sprites[loop].attribute1 = 240;
}
// Set ROM speed
*((volatile WORD *)0x04000204) |= 0x0014;
// Init module player
MP_InitArm(MIXFREQ_22656);
while(1) { ....