creating a very small basic rom (with no lib stuff)

support for the ARM toolchain
Post Reply
0xc0de
Posts: 3
Joined: Sun Jul 10, 2011 4:12 pm

creating a very small basic rom (with no lib stuff)

Post by 0xc0de » Sun Jul 10, 2011 4:25 pm

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 ?

WinterMute
Site Admin
Posts: 1861
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: creating a very small basic rom (with no lib stuff)

Post by WinterMute » Mon Jul 11, 2011 4:17 pm

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?
Help keep devkitPro toolchains free, Donate today

Personal Blog

0xc0de
Posts: 3
Joined: Sun Jul 10, 2011 4:12 pm

Re: creating a very small basic rom (with no lib stuff)

Post by 0xc0de » Mon Jul 11, 2011 4:28 pm

@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.

elhobbs
Posts: 358
Joined: Thu Jul 02, 2009 1:19 pm

Re: creating a very small basic rom (with no lib stuff)

Post by elhobbs » Mon Jul 11, 2011 5:20 pm

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.

zeromus
Posts: 212
Joined: Wed Mar 31, 2010 6:05 pm

Re: creating a very small basic rom (with no lib stuff)

Post by zeromus » Tue Jul 12, 2011 6:19 pm

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

0xc0de
Posts: 3
Joined: Sun Jul 10, 2011 4:12 pm

Re: creating a very small basic rom (with no lib stuff)

Post by 0xc0de » Wed Jul 13, 2011 2:38 pm

@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.

zeromus
Posts: 212
Joined: Wed Mar 31, 2010 6:05 pm

Re: creating a very small basic rom (with no lib stuff)

Post by zeromus » Fri Jul 15, 2011 6:41 pm

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests