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 Flash Equipment > WifiMe Multiboot Logo Questions

#44817 - Diskun - Sun Jun 05, 2005 7:51 pm

I am setting up a DS Download kiosk using an old PC and a Radlink card. It works flawlessly but I have some questions:

- I would like to use my own logo in the broadcasted demos. How can I change it? The WMB author, FireFly, gives some logos on his site and shows some photos.

- How can I convert BMP to BIN? Found nothing about this.

Thanks in advance and sorry for my English :P

#44885 - Kyoufu Kawa - Mon Jun 06, 2005 3:04 pm

My question exactly.

#45052 - headspin - Tue Jun 07, 2005 10:26 am

Here's what I know about it, the logo is stored at 0xc0 in the header. It is 156 bytes compressed (probably huffman). Uncompressed it is 208 bytes. Now, my guess is it is 104x16x2 pixel image made up of 13 cols by 2 row tiles, 1 bpp (2 color) with no palette.

That's about all I know, and some of it is guessing. Next release to WMBFront I hope to add a header editor including logo & icon changer. If you gather any more info about the logo please place it here.
_________________
Warhawk DS | Manic Miner: The Lost Levels | The Detective Game

#45064 - strager - Tue Jun 07, 2005 1:42 pm

headspin wrote:
Here's what I know about it, the logo is stored at 0xc0 in the header. It is 156 bytes compressed (probably huffman). Uncompressed it is 208 bytes. Now, my guess is it is 104x16x2 pixel image made up of 13 cols by 2 row tiles, 1 bpp (2 color) with no palette.

That's about all I know, and some of it is guessing.


That's not what he's asking about, I don't think. What you wrote, headspin, in info about the Nintendo Logo to confirm that the data is not corrupted (or else the NINTENDO(r) sign on the bottom will be gobbleygoop). Use the NDSTool to add a logo and a title (type ndstool.exe without ant args. to view options).

#45073 - FourScience - Tue Jun 07, 2005 2:27 pm

Yeah, there's two logos we can be concerned with:

1) The DS Download Play icon that shows up in the list of broadcasted apps.
2) The splash logo that is generally seen in an oval, when the app is beginning to run.

As for the Download Play icon, I'm in the process of getting my own to work. I've gathered that it should be 32x32 pixels, 256 colors (8-bit), with a color palette with the first bit used for transparency.

As for the splash logo....
_________________
Work in progress: Dual-Soft.com

#45076 - headspin - Tue Jun 07, 2005 2:36 pm

The icons are 16 color 4x4 tiles, 4 bit mode. Index 0 is used for transparency.
_________________
Warhawk DS | Manic Miner: The Lost Levels | The Detective Game

#45093 - Kyoufu Kawa - Tue Jun 07, 2005 5:42 pm

FourScience wrote:
As for the Download Play icon, I'm in the process of getting my own to work. I've gathered that it should be 32x32 pixels, 256 colors (8-bit), with a color palette with the first bit used for transparency.
BZZT Wrong! It's 16 colors, 4-bit. Palette's close by.

#45113 - FourScience - Tue Jun 07, 2005 7:26 pm

Kyoufu Kawa wrote:
FourScience wrote:
As for the Download Play icon, I'm in the process of getting my own to work. I've gathered that it should be 32x32 pixels, 256 colors (8-bit), with a color palette with the first bit used for transparency.
BZZT Wrong! It's 16 colors, 4-bit. Palette's close by.


Thank you, I don't know why I keep thinking that, it should be 16 colors though.
_________________
Work in progress: Dual-Soft.com

#45147 - darkfader - Wed Jun 08, 2005 2:32 am

The Nintendo logo is bitpacked, diffed and then huffman compressed. I could add it to ndstool if anyone cares :)

#45150 - Diskun - Wed Jun 08, 2005 2:58 am

darkfader wrote:
The Nintendo logo is bitpacked, diffed and then huffman compressed. I could add it to ndstool if anyone cares :)

I DO, 1-zillion thanks. You're the man :P

Greets and keep up the good work

#45157 - headspin - Wed Jun 08, 2005 3:30 am

Yeah, that would be awesome dv!
_________________
Warhawk DS | Manic Miner: The Lost Levels | The Detective Game

#45252 - darkfader - Thu Jun 09, 2005 1:30 am

http://darkfader.net/ds/files/ndstool.exe for ndstool v0.17 (sourcecode @ sf.net)
http://darkfader.net/ds/ for some logo's :)
http://cvs.sourceforge.net/viewcvs.py/*checkout*/devkitpro/tools/nds/ndstool/source/logo.cpp to see how it works. Basically it just uses a fixed huffman table.
Just keep an eye on the costs per 4 pixels :)
Or wait until someone makes a nice pixelize program that shows the compressed size in real-time :)

#45274 - Diskun - Thu Jun 09, 2005 3:44 am

darkfader wrote:
http://darkfader.net/ds/files/ndstool.exe for ndstool v0.17 (sourcecode @ sf.net)
http://darkfader.net/ds/ for some logo's :)
http://cvs.sourceforge.net/viewcvs.py/*checkout*/devkitpro/tools/nds/ndstool/source/logo.cpp to see how it works. Basically it just uses a fixed huffman table.
Just keep an eye on the costs per 4 pixels :)
Or wait until someone makes a nice pixelize program that shows the compressed size in real-time :)

You rule :D

But I have a BIG problem:
Demos hang after logo shows O_o

Here is what I do:
Code:
- extract everything:

ndstool.exe -x rom.nds -d rom.nds.dir
ndstool.exe -x rom.nds -7 rom.nds.dir\arm7.bin
ndstool.exe -x rom.nds -9 rom.nds.dir\arm9.bin
ndstool.exe -x rom.nds -h rom.nds.dir\header.bin
ndstool.exe -x rom.nds -t rom.nds.dir\banner.bnr
ndstool.exe -x rom.nds -o rom.nds.dir\logo.bin

-Rebuild the rom:
ndstool.exe -c rom.nds -7 rom.nds.dir\arm7.bin -9 rom.nds.dir\arm9.bin -h rom.nds.dir\header.bin -t rom.nds.dir\banner.bnr -o logo.bmp

Fix the rom's headers:
do ndstool.exe -f rom.nds
What I get in return:
New .nds files of the same size of the original ones that won't boot up correctly.

Can u help me?

p.s. Logo here: Link (Sorry, png format, but you can figure)

#45302 - darkfader - Thu Jun 09, 2005 12:19 pm

Check the ram address and entry points with -i flag and pass them when creating with -r7/-r9/-e7/-e9 params. No extra fixing step is required.
But please don't go on a taggin' frenzy. But that could be solved by checking the logo CRC from inside the program :)

#45330 - headspin - Thu Jun 09, 2005 5:52 pm

Hey darkfader, you don't happen to have the reverse of the compression functions ie.

LogoUnPackBits()
LogoUnCompress()
LogoUnDiff()

Save me the painful task of reversing your code. I need them to display the logo, not convert a bitmap into one.
_________________
Warhawk DS | Manic Miner: The Lost Levels | The Detective Game

#45339 - darkfader - Thu Jun 09, 2005 8:21 pm

If you want to use BIOS routines, you can try this data: (includes huffman header)
Code:
00000000h: 24 D4 00 00 0F 40 00 00 00 01 81 82 82 83 0F 83 ; $?...@....????.?
00000010h: 0C C3 03 83 01 83 04 C3 08 0E 02 C2 0D C2 07 0B ; .?.?.?.?...?.?..
00000020h: 06 0A 05 09 24 FF AE 51 69 9A A2 21 3D 84 82 0A ; ....$??Qi??!=??.
00000030h: 84 E4 09 AD 11 24 8B 98 C0 81 7F 21 A3 52 BE 19 ; ??.?.$????!?R?.
00000040h: 93 09 CE 20 10 46 4A 4A F8 27 31 EC 58 C7 E8 33 ; ?.? .FJJ?'1?X??3
00000050h: 82 E3 CE BF 85 F4 DF 94 CE 4B 09 C1 94 56 8A C0 ; ???????K.??V??
00000060h: 13 72 A7 FC 9F 84 4D 73 A3 CA 9A 61 58 97 A3 27 ; .r????Ms??aX??'
00000070h: FC 03 98 76 23 1D C7 61 03 04 AE 56 BF 38 84 00 ; ?.?v#.?a..?V?8?.
00000080h: 40 A7 0E FD FF 52 FE 03 6F 95 30 F1 97 FB C0 85 ; @?.??R?.o?0?????
00000090h: 60 D6 80 25 A9 63 BE 03 01 4E 38 E2 F9 A2 34 FF ; `?%?c?..N8???4?
000000a0h: BB 3E 03 44 78 00 90 CB 88 11 3A 94 65 C0 7C 63 ; ?>.Dx.??.:?e?|c
000000b0h: 87 F0 3C AF D6 25 E4 8B 38 0A AC 72 00 00 F8 07 ; ??<??%??8.?r..?.


Just do:
1) Uncompress huffman (4 bits).
2) Undiff (16 bits).
3) Convert tiles to plain bitmap & unpack bits.

These routines should be available somewhere, but reversing my sourcecode shouldn't be too difficult either.

#45352 - Diskun - Thu Jun 09, 2005 10:13 pm

darkfader wrote:
Check the ram address and entry points with -i flag and pass them when creating with -r7/-r9/-e7/-e9 params. No extra fixing step is required.
D'oh! The problem is that I want to do it with about a dozen or more files. You know... batch patching. Here's the code I was using. It's a ".cmd" file (Win2000/XP)
Code:
@echo off
echo NDS Automatic Logo Applier by Diskun
echo Website: www.NDSSpain.com
echo.
echo Extrayendo/Extracting...
for %%i in (*.nds) do ndstool.exe -x %%i -d %%i.dir > null
for %%i in (*.nds) do ndstool.exe -x %%i -7 %%i.dir\arm7.bin > null
for %%i in (*.nds) do ndstool.exe -x %%i -9 %%i.dir\arm9.bin > null
for %%i in (*.nds) do ndstool.exe -x %%i -h %%i.dir\header.bin > null
for %%i in (*.nds) do ndstool.exe -x %%i -t %%i.dir\banner.bnr > null
for %%i in (*.nds) do ndstool.exe -x %%i -o %%i.dir\logo.bin > null
echo OK

echo.
echo Reconstruyendo/Rebuilding...
for %%i in (*.nds) do ndstool.exe -c %%i -7 %%i.dir\arm7.bin -9 %%i.dir\arm9.bin -h %%i.dir\header.bin -o logo.bmp -t %i.dir\banner.bnr > null
echo OK

echo.
echo Parcheando Cabeceras/Fixing Headers...
for %%i in (*.nds) do ndstool.exe -f %%i > null
echo OK
echo.
echo All Operations Completed. Now you can delete the
echo created folders.

It takes every rom, unpacks it and then packs it again with the new logo. But taking the entry points and using them later is not possible with this.
I know that I should learn to code in C++ or something more useful than VB and DOS/NT scripting. I'm learning this summer at an academy, but until that... well. Can someone do something like what I need? It would be useful for others as well. A "Banner Editor" could be nice too.

Thanks in advance and keep up the good work

#45391 - headspin - Fri Jun 10, 2005 4:03 am

darkfader wrote:
If you want to use BIOS routines, you can try this data: (includes huffman header)


Sorry I wasn't clear, I need the reverse functions for a windows program, so you can view/change the logo.

Oh well, a reversin' I will go... O_o
_________________
Warhawk DS | Manic Miner: The Lost Levels | The Detective Game

#45952 - DiemetriX - Fri Jun 17, 2005 1:25 am

If i change the logo. wil the Demos work on an unmodified DS?
_________________
www.home.no/diemetrix/1337.htm

#45965 - Sektor - Fri Jun 17, 2005 9:36 am

No.