#166530 - Emmanuel - Mon Feb 09, 2009 1:06 pm
I added this to the EFS example:
The idea is to load title_back.img.bin from EFS. I know this is messy, but this is my first attempt to load a resource from a FAT or something similar... what's wrong? I get a black screen without even the text when I have the dmaCopy uncommented...
I added it before the text that tells to press A
Last edited by Emmanuel on Tue Feb 10, 2009 3:12 pm; edited 1 time in total
Code: |
FILE* gfx;
gfx = fopen("title_back.img.bin", "rb"); size = ftell(gfx); i = 0; while(i < size) { fread(&buffer[i], 1, 1, gfx); i++; } int bg3 = bgInit(3, BgType_Bmp8, BgSize_B8_256x256, 0,0); static const int DMA_CHANNEL = 3; dmaCopyHalfWords(DMA_CHANNEL, buffer, /* This variable is generated for us by * grit. */ (uint8 *)BG_BMP_RAM(0), /* Our address for main /* background 3 */ size); /* This length (in bytes) is generated /* from grit. */ |
The idea is to load title_back.img.bin from EFS. I know this is messy, but this is my first attempt to load a resource from a FAT or something similar... what's wrong? I get a black screen without even the text when I have the dmaCopy uncommented...
I added it before the text that tells to press A
Last edited by Emmanuel on Tue Feb 10, 2009 3:12 pm; edited 1 time in total