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.

Beginners > Using bin files

#71610 - psycorpse - Mon Feb 13, 2006 7:10 pm

Hello everyone and thanks for taking the time to look at this post. I have searched the forums to see if this had already been posted and I couldn't find anything. Prove me wrong and post a link. I will be happy with that.

I am attempting to learn the use of DMA. I think that I have the correct syntax for DMA3COPY(); however, I am not sure how to transfer the data from a .bin and .pal file. Is this something that the makefile is supposed to take care of?

I have converted my image file with sgstair's image converter (GBABMP). This produced:
testing.bin and testing.pal

I have put these files in a folder labeled data and have added that to the make file.

Here is my skeleton code.
Code:

#include "gba_video.h"
#include "gba_dma.h"

int main()
{
    DMA3COPY(????(void*)testing????, (void*)BG_COLORS, 256*256| DMA_IMMEDIATE| DMA16);

    while(1)
    {

    }
    return 0;
}



Am I doing this right? Please help.

Thanks,
Mike

#71644 - tepples - Mon Feb 13, 2006 9:30 pm

It's in the FAQ under Q: How do I load assets such as audio and graphics from my program?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.