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.

DS development > png 2 bin

#121901 - peterbub - Thu Mar 15, 2007 4:01 pm

Hallo, i am very new at NDS and have a problem.
the most tutorials use order gfx and data with xxx.bin
now i want use my own pngs. how can i convert png to bin.

i use:
Programmer NotePad2

thx

#121902 - Lick - Thu Mar 15, 2007 4:06 pm

How do you plan to display the 'bin's?
_________________
http://licklick.wordpress.com

#121904 - peterbub - Thu Mar 15, 2007 4:21 pm

i hope i understand your question:

#include "XX_bin.h"

dmaCopy(XX_bin, &SPRITE_GFX[XXGfxID * 16], XX_bin_size);

is it not possible to convert XX.png to XX.bin ???

#121908 - Lick - Thu Mar 15, 2007 4:33 pm

1) Don't use dmaCopy(), but use memcpy(). DMA sometimes fails on hardware, I'm not sure why.

2) You don't need PNG for sprite graphics. Just save the PNG as a BMP and use your converter. If you don't have a converter, I suggest git.
_________________
http://licklick.wordpress.com

#121911 - peterbub - Thu Mar 15, 2007 5:20 pm

after conterting with your git the bin is very very small and i can not use :(

what can i do ???

#121912 - tepples - Thu Mar 15, 2007 5:40 pm

peterbub wrote:
after conterting with your git the bin is very very small and i can not use :(

what can i do ???

What options did you use?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#121933 - HyperHacker - Thu Mar 15, 2007 9:07 pm

Lick wrote:
1) Don't use dmaCopy(), but use memcpy(). DMA sometimes fails on hardware, I'm not sure why.
Are you using 8-bit transfer into VRAM?
_________________
I'm a PSP hacker now, but I still <3 DS.

#121939 - Lick - Thu Mar 15, 2007 9:34 pm

HyperHacker wrote:
Lick wrote:
1) Don't use dmaCopy(), but use memcpy(). DMA sometimes fails on hardware, I'm not sure why.
Are you using 8-bit transfer into VRAM?

Hmm... =/
_________________
http://licklick.wordpress.com