#12724 - zdean - Mon Nov 24, 2003 5:44 pm
Hello, I recently tried using the DMA_Copy function from the Pern project website to copy sprite data, but the sprite data is never loaded? It seems to be working fine for the background data and palette and the sprite palette is also copied in, but the sprite data is not. Does anyone know why this might happen? I have been using the following. Thanks
REG_BG0CNT = BG_COLOR256 | TEXTBG_SIZE_256x256 | (31 << SCREEN_SHIFT) | WRAPAROUND;
SetMode(MODE_0 | BG0_ENABLE | OBJ_ENABLE | OBJ_MAP_1D);
DMA_Copy(3,(void*)level1Map.pal,(void* BGPaletteMem,256,DMA_16NOW);
DMA_Copy(3,(void*)level1Map.tiledata,(void*)CharBaseBlock(0),level1Map.tileDataSize/4,DMA_32NOW);
DMA_Copy(3,(void*)spritemyPalette,(void*)OBJPaletteMem,256,DMA_16NOW);
DMA_Copy(3,(void*)spritemyData,(void*)OAMData,128,DMA_16NOW);
OAMData is defined as ((u16*)0x6010000)
REG_BG0CNT = BG_COLOR256 | TEXTBG_SIZE_256x256 | (31 << SCREEN_SHIFT) | WRAPAROUND;
SetMode(MODE_0 | BG0_ENABLE | OBJ_ENABLE | OBJ_MAP_1D);
DMA_Copy(3,(void*)level1Map.pal,(void* BGPaletteMem,256,DMA_16NOW);
DMA_Copy(3,(void*)level1Map.tiledata,(void*)CharBaseBlock(0),level1Map.tileDataSize/4,DMA_32NOW);
DMA_Copy(3,(void*)spritemyPalette,(void*)OBJPaletteMem,256,DMA_16NOW);
DMA_Copy(3,(void*)spritemyData,(void*)OAMData,128,DMA_16NOW);
OAMData is defined as ((u16*)0x6010000)