Page 1 of 1
creating a very small basic rom (with no lib stuff)
Posted: Sun Jul 10, 2011 4:25 pm
by 0xc0de
Dear readers,
I'm working on a picture2rom program, which will work for multiple
systems (gba,ds,etc). Everything is working right now, but I'm annoyed
by the big roms devkitARM outputs.
for my program I need to store compiled rom data (as hex)
for example, my GBA program looks like this :
Code: Select all
unsigned short RawBitmap[] = {0xC0,0xDE,0xC0,0xDE};
int main(void)
{
int x, y;
DISP_CNT = 0x400 | 0x3;
for(i = 0; i < 160*240) (unsigned short*)0x06000000[i] = RawBitmap[i];
}
the end result is just a few lines of hex data, easy to include.
Is there an easy way to not use any libs and produce a small DS rom like this ?
Re: creating a very small basic rom (with no lib stuff)
Posted: Mon Jul 11, 2011 4:17 pm
by WinterMute
Probably, but I'm not entirely sure I get the point of this. Wouldn't an application that reads pictures from storage and displays them as a slideshow be more worthwhile?
Re: creating a very small basic rom (with no lib stuff)
Posted: Mon Jul 11, 2011 4:28 pm
by 0xc0de
@WinterMute
I don't think so, because then I have to write a fileloader that can
handle many different image files. While in win32 this is much easier
because of the standard API's supplied with .NET
I know some fileloaders exists already for the DS, but my program
also supports Gameboy Color and Gameboy Advance. And I want
to add support for even more handhelds.
Re: creating a very small basic rom (with no lib stuff)
Posted: Mon Jul 11, 2011 5:20 pm
by elhobbs
keep in mind that a ds rom will contain both an arm9 and an arm7 binary. if your project does not include arm7 code then you are using the default libnds arm7 binary which includes wifi, maxmod, and other assorted libnds goodness.
Re: creating a very small basic rom (with no lib stuff)
Posted: Tue Jul 12, 2011 6:19 pm
by zeromus
0xc0de wrote:@WinterMute
I don't think so, because then I have to write a fileloader that can
handle many different image files.
Or use one of the several libraries out there which have already been written that can do this
Re: creating a very small basic rom (with no lib stuff)
Posted: Wed Jul 13, 2011 2:38 pm
by 0xc0de
@zeromus
did you read my complete post, or just that bit ?
because as far as I'm aware of there aren't any libs that have support for
BMP (monochrome,16-color,256-color,16/24 bit), JPEG, TIFF and PNG
that work on GameBoy Classic/Color, Gameboy Advance and Nintendo DS.
please correct me if I'm wrong.
Re: creating a very small basic rom (with no lib stuff)
Posted: Fri Jul 15, 2011 6:41 pm
by zeromus
yes, i read your whole post. i thought you were creating a rom from a PC, and so it wouldnt matter what image loading library you used because any of them could be compiled on PC.