https://dsibrew.org/w/api.php?action=feedcontributions&user=Ludo6431&feedformat=atomDSiBrew - User contributions [en]2024-03-29T13:24:15ZUser contributionsMediaWiki 1.35.8https://dsibrew.org/w/index.php?title=Icon.bin&diff=3555Icon.bin2011-02-13T17:41:52Z<p>Ludo6431: /* The Palettes */</p>
<hr />
<div>These are the banners you'll see in various places in the [[System Menu]]. They have the dimension 32x32 pixels.<br />
<br />
[[Image:icon_1.gif]]<br />
[[Image:icon_2.gif]]<br />
[[Image:icon_3.gif]]<br />
[[Image:icon_4.gif]]<br />
[[Image:icon_5.gif]]<br />
<br />
These are converted by a tool blasty wrote. Icon files were supplied by loopy.<br />
<br />
== Basic File Structure ==<br />
{| class="wikitable"<br />
|- style="background-color: #ddd;"<br />
! Start<br />
! Length<br />
! Description<br />
|-<br />
| 0x0000<br />
| 1<br />
| Number of titles (5+N)<br />
|-<br />
| 0x0001<br />
| 1<br />
| Animated (1=contains animated icon at 0x1240)<br />
|-<br />
| 0x0002<br />
| 2*4<br />
| 4 CRC checksums (polynomial 0xA001)<br />
|-<br />
| 0x000A<br />
| 22<br />
| Padding (00's)<br />
|-<br />
| 0x0020<br />
| 512<br />
| Default Bitmap<br />
|-<br />
| 0x0220<br />
| 32<br />
| Palette for above<br />
|-<br />
| 0x0240<br />
| 256*16<br />
| Application Titles, wide chars<br />
|-<br />
| 0x1240<br />
| 512*8<br />
| 8 Bitmaps (for animation)<br />
|-<br />
| 0x2240<br />
| 32*8<br />
| 8 Palettes<br />
|-<br />
| 0x2340<br />
| 128<br />
| Animation Sequence<br />
|}<br />
Languages (in correct order) are: Japanese, English, French, German, Italian, Spanish, ?Chinese?, Korean.<br />
<br />
== Animation Sequence ==<br />
The sequence is represented by 2-byte tokens, in the following format (we're now talking bits, from left to right):<br />
{| class="wikitable"<br />
|- style="background-color: #ddd;"<br />
! Length<br />
! Description<br />
! Mask<br />
|-<br />
| 1<br />
| Flip Vertically<br />
| 0x8000<br />
|-<br />
| 1<br />
| Flip Horizontally<br />
| 0x4000<br />
|-<br />
| 3<br />
| Palette Index<br />
| 0x3800<br />
|-<br />
| 3<br />
| Bitmap Index<br />
| 0x0700<br />
|-<br />
| 8<br />
| Frame Duration (in frames (one frame = 1/60sec))<br />
| 0x00FF<br />
|}<br />
Both bytes being zero indicates the end of the sequence. If the first token is zero, the non-animated default image is shown.<br />
<br />
== Bitmap Format ==<br />
The bitmap is tiled 8x8 pixels (Nintendo tends to do this). Each pixel contain 4 bits of data, being the index into the palette specified by the current sequence-token.<br />
<br />
== The Palettes == <br />
Each color in the palette is in the standard 2-byte RGB5551 format (used since GBA).<br />
<br />
The conversion to RGB888 is made like this (C):<br />
<source lang="c"><br />
u8 r = ((color ) & 0x1f)<<3;<br />
u8 g = ((color >> 5) & 0x1f)<<3;<br />
u8 b = ((color >> 10) & 0x1f)<<3;<br />
</source><br />
<br />
== Checksums ==<br />
The CRC-output is not bitwise inverted after the calculation, but it is byte-swapped to big-endian. Polynomial used is: 0xA001, same for all.<br />
<br />
{| class="wikitable"<br />
|- style="background-color: #ddd;"<br />
! Number<br />
! Range<br />
|-<br />
| 0<br />
| 020-83F<br />
|-<br />
| 1<br />
| 020-93F<br />
|-<br />
| 2<br />
| 020-A3F<br />
|-<br />
| 3<br />
| 1240-23C0<br />
|}</div>Ludo6431https://dsibrew.org/w/index.php?title=FAQ&diff=3476FAQ2011-02-07T09:38:40Z<p>Ludo6431: </p>
<hr />
<div>'''Frequently asked questions are here.'''<br />
<br />
'''Q:''' What is the purpose of this project?<br />
<br />
'''A:''' Getting unsigned "homebrew" code running on the Nintendo DSi in native DSi mode.<br />
<br />
<br />
'''Q:''' Any progress?<br />
<br />
'''A:''' The DSi Common key was found ages ago by hackers, but was released/leaked to the public in January 2011. Now we can decrypt DSi specific code, but only system software and '''free''' DSiWare only. And [[Team Twiizers]] has managed to execute some form of unsigned code by directing the save file area of a DSi-mode game to an Arudino chip. This will lead to further - and easier to replicate - exploits, such as [[Sudokuhax]].<br />
<br />
<br />
'''Q:''' What is the purpose of running "homebrew" code on the Nintendo DSi?<br />
<br />
'''A:''' The Nintendo DSi is a decently powerful system that has a SD slot, 2 cameras on it and a touch screen all in a portable system great for homebrew.<br />
<br />
<br />
'''Q:''' Why not just rely on already available flash carts for homebrew?<br />
<br />
'''A:''' The goal here is to run our own code via a software exploit, not a hardware one. Also, some flash carts have a bad reputation. Finally, current flash carts only allow you to run DS-native homebrew, with no DSi features (such as the cameras) or increased processing power being available. Also, SD Cards for the DSi are cheaper than flash carts.<br />
<br />
<br />
'''Q:''' How can we know DSiware title code?<br />
<br />
'''A:''' If you mean title IDs, see the title list. If you want to download DSiWare from NUS, you can't without the ticket which isn't available on NUS.<br />
<br />
<br />
'''Q:''' What is FATFS? /PXI<br />
<br />
'''A:''' PXI is the TWL SDK inter-processor communication system over the FIFO. FATFS is the TWL SDK Arm7 FAT interface for NAND, SD, etc.<br />
<br />
<br />
'''Q:''' How does Team Twiizers dump dsiware?<br />
<br />
'''A:''' Magic.<br />
<br />
<br />
'''Q:''' If DSi mode hybrid games have exploit, you are able to boot from sd card, aren't you?<br />
<br />
'''A:''' Hybrid card games do not have SD card MMC bus access. We would've used those exploits to boot from SD card ages ago if those had access.</div>Ludo6431https://dsibrew.org/w/index.php?title=I2C_Bus&diff=3437I2C Bus2011-02-02T20:28:57Z<p>Ludo6431: /* I2C devices */</p>
<hr />
<div>== Registers ==<br />
{| class="wikitable" border="1"<br />
! NAME<br />
! ADDRESS<br />
! WIDTH<br />
|-<br />
| REG_I2CDATA<br />
| 0x04004500<br />
| 1<br />
|-<br />
| REG_I2CCNT<br />
| 0x04004501<br />
| 1<br />
|}<br />
<br />
== REG_I2CCNT ==<br />
{| class="wikitable" border="1"<br />
! BIT<br />
! DESCRIPTION<br />
|-<br />
| 0<br />
| R/W, clear for write, set for read<br />
|-<br />
| 1<br />
| Start/device select bit?<br />
|-<br />
| 2<br />
| Restart/device reselect bit?<br />
|-<br />
| 3<br />
| ?<br />
|-<br />
| 4<br />
| SCL hold. When clear SCL is being held low, set when SCL is high. This bit must always be set(by reading CNT again) after writing REG_I2CCNT. This bit must be set when writing blocks of data(more than 1 byte) with bit0 clear.<br />
|-<br />
| 5<br />
| SCL, toggle this for each loop iteration(in the loop execute the I2C WR code) with max 8 iterations where the loop exits successfully when bit 4 is set. This bit must be set when writing blocks of data(more than 1 byte) with bit0 clear.<br />
|-<br />
| 6<br />
| Unknown, always set when writing to CNT?<br />
|-<br />
| 7<br />
| Enable/busy, wait for this bit to clear after writing to I2CCNT.<br />
|}<br />
<br />
== REG_I2CDATA ==<br />
<br />
When selecting a register, the register byte address is written here. When reading or writing data to the I2C device, it's read/written from here.<br />
When selecting a device, the device byte address is written here. Bit0 is unknown, when reading from certain devices, the device is first selected and then the register, following that the device is reselected with device byte address bit0 set.<br />
<br />
== Protocol ==<br />
<br />
Wait for the busy bit to clear. Write the device address to REG_I2CDATA, then write 0xc2(busy/enable, bit 6, and start bit 1 set) to REG_I2CCNT. Execute swiWaitByLoop for a device-specific duration, then write the register address to REG_I2CDATA, and write 0xc0 to REG_I2CCNT.(busy/enable and bit 6 set) Wait with swiWaitByLoop device duration, then write the data to REG_I2CDATA when writing. When reading, write the device address to REG_I2CDATA and write 0xc2 to REG_I2CCNT. When the delay value is zero, write 0xc1 | i<<5 to REG_I2CCNT, otherwise write 0xc0 | i<<5 to REG_I2CCNT, wait for busy to clear, delay, then write 0xc5 to REG_I2CCNT. For writing i is the loop i for iteration, for reading replace that with 1. When reading, read the data from REG_I2CCNT. Return a error if REG_I2CCNT bit 4 SCL hold is set, otherwise return normal.<br />
<br />
== I2C devices ==<br />
<br />
I2C device table:<br />
{| class="wikitable" border="1"<br />
! Device address<br />
! Device swiWaitByLoop delay<br />
! I2CDATA bit0 set with dev addr required for reading<br />
! Device description<br />
|-<br />
| 0x7A<br />
| 0x00<br />
| No<br />
| Camera0?<br />
|-<br />
| 0x78<br />
| 0x00<br />
| No<br />
| Camera1?<br />
|-<br />
| 0xA0<br />
| 0x00<br />
| No<br />
| Camera0 related?<br />
|-<br />
| 0xE0<br />
| 0x00<br />
| No<br />
| Camera1 related?<br />
|-<br />
| 0x4A<br />
| 0x180<br />
| Yes<br />
| Power management<br />
|-<br />
| 0x40<br />
| 0x00<br />
| Yes<br />
| ?<br />
|-<br />
| 0x90<br />
| 0x00<br />
| Yes<br />
| ?<br />
|}<br />
<br />
=== Cameras ===<br />
<br />
{| class="wikitable" border="1"<br />
! REGISTER<br />
! WIDTH<br />
! DESCRIPTION<br />
|-<br />
| 0x18<br />
| 2<br />
| Unknown<br />
|-<br />
| 0x98c<br />
| 2<br />
| Unknown<br />
|-<br />
| 0x990<br />
| 2<br />
| Unknown<br />
|}<br />
<br />
=== Power management ===<br />
When register 0x11 has value one written to, a power cycle is done. When reg 0x70 val 1 is written before reg 0x11, sysmenu/launcher doesn't display the heath screen, otherwise when not written with the register value left at zero the health screen is displayed. Reg 0x70 would be zero on hard boot, when any twlsdk app does a system reset it writes value 1 to reg 0x70.<br />
<br />
{| class="wikitable" border="1"<br />
! REGISTER<br />
! WIDTH<br />
! DESCRIPTION<br />
|-<br />
| 0x0<br />
| 1<br />
| Unknown, battery related? Usually this reg val is 0x33?<br />
|-<br />
| 0x10<br />
| 1<br />
| Power flags. When bit0 is set, arm7 does a system reset. When bit1 or bit3 are set, arm7 does a shutdown. Bits 0-2 are used for DSi [[Interrupts|IRQ6]] IF flags.<br />
|-<br />
| 0x11<br />
| 1<br />
| Power reg? Writing value 1 here does a system reset. Writing value 2 powers off all DSi-only hw.<br />
|-<br />
| 0x12<br />
| 1<br />
| Might be MMC bus power related, unknown.<br />
|-<br />
| 0x20<br />
| 1<br />
| Battery flags. When zero the battery is at critical level, arm7 does a shutdown. Bit7 is set when the battery is charging. When the battery icon is full bars, this is 0x0F, and when the battery icon has one solid red bar left this is 0x03?<br />
|-<br />
| 0x21<br />
| 1<br />
| ?<br />
|-<br />
| 0x31<br />
| 1<br />
| External camera LED control, valid values are 0-2. Value 0 disables the LED, value 1 activates the LED, value 2 activates the LED with the LED blinking.<br />
|-<br />
| 0x40<br />
| 1<br />
| Volume level: 0x00 - 0x1F.<br />
|-<br />
| 0x70<br />
| 1<br />
| BOOTFLG<br />
|}<br />
<br />
=== Device 0x90 ===<br />
{| class="wikitable" border="1"<br />
! REGISTER<br />
! WIDTH<br />
! DESCRIPTION<br />
|-<br />
| 0x2<br />
| 1<br />
| Used for DSi [[Interrupts|IRQ6]] IF flags.<br />
|-<br />
| 0x4<br />
| 1<br />
| Unknown (bit0 toggled)<br />
|}</div>Ludo6431https://dsibrew.org/w/index.php?title=I2C_Bus&diff=3436I2C Bus2011-02-02T20:28:13Z<p>Ludo6431: /* I2C devices */</p>
<hr />
<div>== Registers ==<br />
{| class="wikitable" border="1"<br />
! NAME<br />
! ADDRESS<br />
! WIDTH<br />
|-<br />
| REG_I2CDATA<br />
| 0x04004500<br />
| 1<br />
|-<br />
| REG_I2CCNT<br />
| 0x04004501<br />
| 1<br />
|}<br />
<br />
== REG_I2CCNT ==<br />
{| class="wikitable" border="1"<br />
! BIT<br />
! DESCRIPTION<br />
|-<br />
| 0<br />
| R/W, clear for write, set for read<br />
|-<br />
| 1<br />
| Start/device select bit?<br />
|-<br />
| 2<br />
| Restart/device reselect bit?<br />
|-<br />
| 3<br />
| ?<br />
|-<br />
| 4<br />
| SCL hold. When clear SCL is being held low, set when SCL is high. This bit must always be set(by reading CNT again) after writing REG_I2CCNT. This bit must be set when writing blocks of data(more than 1 byte) with bit0 clear.<br />
|-<br />
| 5<br />
| SCL, toggle this for each loop iteration(in the loop execute the I2C WR code) with max 8 iterations where the loop exits successfully when bit 4 is set. This bit must be set when writing blocks of data(more than 1 byte) with bit0 clear.<br />
|-<br />
| 6<br />
| Unknown, always set when writing to CNT?<br />
|-<br />
| 7<br />
| Enable/busy, wait for this bit to clear after writing to I2CCNT.<br />
|}<br />
<br />
== REG_I2CDATA ==<br />
<br />
When selecting a register, the register byte address is written here. When reading or writing data to the I2C device, it's read/written from here.<br />
When selecting a device, the device byte address is written here. Bit0 is unknown, when reading from certain devices, the device is first selected and then the register, following that the device is reselected with device byte address bit0 set.<br />
<br />
== Protocol ==<br />
<br />
Wait for the busy bit to clear. Write the device address to REG_I2CDATA, then write 0xc2(busy/enable, bit 6, and start bit 1 set) to REG_I2CCNT. Execute swiWaitByLoop for a device-specific duration, then write the register address to REG_I2CDATA, and write 0xc0 to REG_I2CCNT.(busy/enable and bit 6 set) Wait with swiWaitByLoop device duration, then write the data to REG_I2CDATA when writing. When reading, write the device address to REG_I2CDATA and write 0xc2 to REG_I2CCNT. When the delay value is zero, write 0xc1 | i<<5 to REG_I2CCNT, otherwise write 0xc0 | i<<5 to REG_I2CCNT, wait for busy to clear, delay, then write 0xc5 to REG_I2CCNT. For writing i is the loop i for iteration, for reading replace that with 1. When reading, read the data from REG_I2CCNT. Return a error if REG_I2CCNT bit 4 SCL hold is set, otherwise return normal.<br />
<br />
== I2C devices ==<br />
<br />
I2C device table:<br />
{| class="wikitable" border="1"<br />
! Device address<br />
! Device swiWaitByLoop delay<br />
! I2CDATA bit0 set with dev addr required for reading<br />
! Device description<br />
|-<br />
| 0x7A<br />
| 0x00<br />
| No<br />
| Camera0?<br />
|-<br />
| 0x78<br />
| 0x00<br />
| No<br />
| Camera1?<br />
|-<br />
| 0xA0<br />
| 0x00<br />
| No<br />
| ?<br />
|-<br />
| 0xE0<br />
| 0x00<br />
| No<br />
| ?<br />
|-<br />
| 0x4A<br />
| 0x180<br />
| Yes<br />
| Power management<br />
|-<br />
| 0x40<br />
| 0x00<br />
| Yes<br />
| ?<br />
|-<br />
| 0x90<br />
| 0x00<br />
| Yes<br />
| ?<br />
|}<br />
<br />
=== Cameras ===<br />
<br />
{| class="wikitable" border="1"<br />
! REGISTER<br />
! WIDTH<br />
! DESCRIPTION<br />
|-<br />
| 0x18<br />
| 2<br />
| Unknown<br />
|-<br />
| 0x98c<br />
| 2<br />
| Unknown<br />
|-<br />
| 0x990<br />
| 2<br />
| Unknown<br />
|}<br />
<br />
=== Power management ===<br />
When register 0x11 has value one written to, a power cycle is done. When reg 0x70 val 1 is written before reg 0x11, sysmenu/launcher doesn't display the heath screen, otherwise when not written with the register value left at zero the health screen is displayed. Reg 0x70 would be zero on hard boot, when any twlsdk app does a system reset it writes value 1 to reg 0x70.<br />
<br />
{| class="wikitable" border="1"<br />
! REGISTER<br />
! WIDTH<br />
! DESCRIPTION<br />
|-<br />
| 0x0<br />
| 1<br />
| Unknown, battery related? Usually this reg val is 0x33?<br />
|-<br />
| 0x10<br />
| 1<br />
| Power flags. When bit0 is set, arm7 does a system reset. When bit1 or bit3 are set, arm7 does a shutdown. Bits 0-2 are used for DSi [[Interrupts|IRQ6]] IF flags.<br />
|-<br />
| 0x11<br />
| 1<br />
| Power reg? Writing value 1 here does a system reset. Writing value 2 powers off all DSi-only hw.<br />
|-<br />
| 0x12<br />
| 1<br />
| Might be MMC bus power related, unknown.<br />
|-<br />
| 0x20<br />
| 1<br />
| Battery flags. When zero the battery is at critical level, arm7 does a shutdown. Bit7 is set when the battery is charging. When the battery icon is full bars, this is 0x0F, and when the battery icon has one solid red bar left this is 0x03?<br />
|-<br />
| 0x21<br />
| 1<br />
| ?<br />
|-<br />
| 0x31<br />
| 1<br />
| External camera LED control, valid values are 0-2. Value 0 disables the LED, value 1 activates the LED, value 2 activates the LED with the LED blinking.<br />
|-<br />
| 0x40<br />
| 1<br />
| Volume level: 0x00 - 0x1F.<br />
|-<br />
| 0x70<br />
| 1<br />
| BOOTFLG<br />
|}<br />
<br />
=== Device 0x90 ===<br />
{| class="wikitable" border="1"<br />
! REGISTER<br />
! WIDTH<br />
! DESCRIPTION<br />
|-<br />
| 0x2<br />
| 1<br />
| Used for DSi [[Interrupts|IRQ6]] IF flags.<br />
|-<br />
| 0x4<br />
| 1<br />
| Unknown (bit0 toggled)<br />
|}</div>Ludo6431https://dsibrew.org/w/index.php?title=Talk:Private/ds/app/484E94*/pit.bin&diff=3426Talk:Private/ds/app/484E94*/pit.bin2011-01-31T00:10:00Z<p>Ludo6431: </p>
<hr />
<div>'''If you have photos or frames in the */100NIN01 folder, can you send me your pit.bin file please at <ludolacost_gm@il_com> ? '''</div>Ludo6431https://dsibrew.org/w/index.php?title=User:Ludo6431&diff=3425User:Ludo64312011-01-31T00:03:21Z<p>Ludo6431: </p>
<hr />
<div>{{Userboxtop}}<br />
{{Userbox DS Lite|1}}<br />
{{Userbox DSi|1}}<br />
{{Userbox system menu|1.4.1}}<br />
{{Userboxbottom}}<br />
<br />
French DS C coder since 2005.<br />
<br />
Don't forget to check [[Special:Contributions/Ludo6431 | my contributions]] to dsibrew, in particular :<br />
* I figured out the [[Private/ds/app/484E94*/pit.bin | pit.bin]] file structure,<br />
* I created a [[User:Ludo6431/pit-read.c | pit.bin file reader]].</div>Ludo6431https://dsibrew.org/w/index.php?title=User:Ludo6431&diff=3424User:Ludo64312011-01-31T00:01:43Z<p>Ludo6431: </p>
<hr />
<div>{{Userboxtop}}<br />
{{Userbox DS Lite|1}}<br />
{{Userbox DSi|1}}<br />
{{Userbox system menu|1.4.1}}<br />
{{Userboxbottom}}<br />
<br />
French DS(i) C coder since 2005.<br />
<br />
Don't forget to check [[Special:Contributions/Ludo6431 | my contributions]] to dsibrew.<br />
<br />
I figured out the [[Private/ds/app/484E94*/pit.bin | pit.bin]] file structure and created a [[User:Ludo6431/pit-read.c | pit.bin file reader]].</div>Ludo6431https://dsibrew.org/w/index.php?title=Private/ds/app/484E94*/pit.bin&diff=3423Private/ds/app/484E94*/pit.bin2011-01-30T23:59:38Z<p>Ludo6431: </p>
<hr />
<div>'''If you have photos or frames in the */100NIN01 folder, can you send me your pit.bin file please at <ludolacost_gm@il_com> ?'''<br />
<br />
<br />
== File Header ==<br />
{| class="wikitable" border="1"<br />
|-<br />
! OFFSET (bytes)<br />
! SIZE (bytes)<br />
! DESCRIPTION (common value)<br />
|-<br />
| 0x00<br />
| 4<br />
| Magic ("0TIP")<br />
|-<br />
| 0x04<br />
| 4<br />
| UNKNOWN ("_1""00" LE, maybe number of first folder or max number of photos per folder)<br />
|-<br />
| 0x08<br />
| 2<br />
| # slots in the file (3000)<br />
|-<br />
| 0x0A<br />
| 2<br />
| Folder counter; hundreds' digit (?)<br />
|-<br />
| 0x0C<br />
| 2<br />
| Folder counter; tens' digits (i.e. : next folder's number will be ++foldercounter)<br />
|-<br />
| 0x0E<br />
| 2<br />
| Photo counter (i.e. : next photo's number will be ++photocounter)<br />
|-<br />
| 0x10<br />
| 2<br />
| UNKNOWN (0x0000)<br />
|-<br />
| 0x12<br />
| 2<br />
| Frame counter (i.e. : next frame's number will be ++framecounter)<br />
|-<br />
| 0x14<br />
| 2<br />
| CRC16 of whole file<br />
|-<br />
| 0x16<br />
| 2<br />
| Size of header (0x0018)<br />
|}<br />
It is known that if the offset to entries (size of header) is pushed passed the end of the file, the system freezes, it is not known wether this is exploitable or not. Infact any change which makes it read passed the end of the file makes it crash.<br />
<br />
== Each entry (16 bytes) ==<br />
{| class="wikitable" border="1"<br />
|-<br />
! OFFSET (bytes)<br />
! SIZE (bytes)<br />
! DESCRIPTION (common value)<br />
|-<br />
| 0x00<br />
| 4<br />
| Date (# seconds since Jan/1/2000)<br />
|-<br />
| 0x04<br />
| 8<br />
| UNKNOWN (0x00 8 times)<br />
|-<br />
| 0x0C<br />
| 4<br />
| flags (see below)<br />
|}<br />
<br />
=== flags field ===<br />
{| class="wikitable" border="1"<br />
|-<br />
! OFFSET (bits)<br />
! SIZE (bits)<br />
! DESCRIPTION (common value)<br />
|-<br />
| 0<br />
| 1<br />
| # folder where the photo is; hundreds' digit (?)<br />
|-<br />
| 1<br />
| 7<br />
| # folder where the photo is; tens' digits<br />
|-<br />
| 8<br />
| 3<br />
| UNKNOWN (000b)<br />
|-<br />
| 11<br />
| 7<br />
| Photo's number minus 1<br />
|-<br />
| 18<br />
| 2<br />
| Sticker (0: None, 1: Star, 2: Clover, 3: Heart)<br />
|-<br />
| 20<br />
| 1<br />
| Type of the entry (0: Photo, 1: Frame)<br />
|-<br />
| 21<br />
| 11<br />
| UNKNOWN (0b 11 times)<br />
|}<br />
<br />
== Misc information ==<br />
Photos are stored in:<br />
* SD:\DCIM\100NIN01<br />
* SD:\DCIM\100NIN02<br />
Frames are stored in:<br />
* SD:\private\ds\app\484E494A\DCIM\100NIN01<br />
* SD:\private\ds\app\484E494A\DCIM\100NIN02<br />
<br />
== See also ==<br />
* [[User:Ludo6431/pit-read.c | pit.bin file reader]]<br />
* [[User:Remark/Pit-fixcrc.c | pit.bin crc fixer]]</div>Ludo6431https://dsibrew.org/w/index.php?title=Private/ds/app/484E94*/pit.bin&diff=3421Private/ds/app/484E94*/pit.bin2011-01-30T23:52:35Z<p>Ludo6431: </p>
<hr />
<div>'''If you have photos or frames in the */100NIN01 folder, can you send me your pit.bin file please at <ludolacost_gm@il_com> ?'''<br />
<br />
<br />
== File Header ==<br />
{| class="wikitable" border="1"<br />
|-<br />
! OFFSET (bytes)<br />
! SIZE (bytes)<br />
! DESCRIPTION (common value)<br />
|-<br />
| 0x00<br />
| 4<br />
| Magic ("0TIP")<br />
|-<br />
| 0x04<br />
| 4<br />
| UNKNOWN ("_1""00" LE, maybe number of first folder or max number of photos per folder)<br />
|-<br />
| 0x08<br />
| 2<br />
| # slots in the file (3000)<br />
|-<br />
| 0x0A<br />
| 2<br />
| Folder counter; hundreds' digit (?)<br />
|-<br />
| 0x0C<br />
| 2<br />
| Folder counter; tens' digits (i.e. : next folder's number will be ++foldercounter)<br />
|-<br />
| 0x0E<br />
| 2<br />
| Photo counter (i.e. : next photo's number will be ++photocounter)<br />
|-<br />
| 0x10<br />
| 2<br />
| UNKNOWN (0x0000)<br />
|-<br />
| 0x12<br />
| 2<br />
| Frame counter (i.e. : next frame's number will be ++framecounter)<br />
|-<br />
| 0x14<br />
| 2<br />
| CRC16 of whole file<br />
|-<br />
| 0x16<br />
| 2<br />
| Size of header (0x0018)<br />
|}<br />
It is known that if the offset to entries (size of header) is pushed passed the end of the file, the system freezes, it is not known wether this is exploitable or not. Infact any change which makes it read passed the end of the file makes it crash.<br />
<br />
== Each entry (16 bytes) ==<br />
{| class="wikitable" border="1"<br />
|-<br />
! OFFSET (bytes)<br />
! SIZE (bytes)<br />
! DESCRIPTION (common value)<br />
|-<br />
| 0x00<br />
| 4<br />
| Date (# seconds since Jan/1/2000)<br />
|-<br />
| 0x04<br />
| 8<br />
| UNKNOWN (0x00 8 times)<br />
|-<br />
| 0x0C<br />
| 4<br />
| flags (see below)<br />
|}<br />
<br />
=== flags field ===<br />
{| class="wikitable" border="1"<br />
|-<br />
! OFFSET (bits)<br />
! SIZE (bits)<br />
! DESCRIPTION (common value)<br />
|-<br />
| 0<br />
| 1<br />
| # folder where the photo is; hundreds' digit (?)<br />
|-<br />
| 1<br />
| 7<br />
| # folder where the photo is; tens' digits<br />
|-<br />
| 8<br />
| 3<br />
| UNKNOWN (000b)<br />
|-<br />
| 11<br />
| 7<br />
| Photo's number minus 1<br />
|-<br />
| 18<br />
| 2<br />
| Sticker (0: None, 1: Star, 2: Clover, 3: Heart)<br />
|-<br />
| 20<br />
| 1<br />
| Type of the entry (0: Photo, 1: Frame)<br />
|-<br />
| 21<br />
| 11<br />
| UNKNOWN (0b 11 times)<br />
|}<br />
<br />
== Misc information ==<br />
Photos are stored in:<br />
* SD:\DCIM\100NIN01<br />
* SD:\DCIM\100NIN02<br />
Frames are stored in:<br />
* SD:\private\ds\app\484E494A\DCIM\100NIN01<br />
* SD:\private\ds\app\484E494A\DCIM\100NIN02<br />
<br />
== See also ==<br />
* [[User:Ludo6431/pit-read.c | pit file reader]]</div>Ludo6431https://dsibrew.org/w/index.php?title=Private/ds/app/484E94*/pit.bin&diff=3420Private/ds/app/484E94*/pit.bin2011-01-30T23:51:35Z<p>Ludo6431: </p>
<hr />
<div>== File Header ==<br />
{| class="wikitable" border="1"<br />
|-<br />
! OFFSET (bytes)<br />
! SIZE (bytes)<br />
! DESCRIPTION (common value)<br />
|-<br />
| 0x00<br />
| 4<br />
| Magic ("0TIP")<br />
|-<br />
| 0x04<br />
| 4<br />
| UNKNOWN ("_1""00" LE, maybe number of first folder or max number of photos per folder)<br />
|-<br />
| 0x08<br />
| 2<br />
| # slots in the file (3000)<br />
|-<br />
| 0x0A<br />
| 2<br />
| Folder counter; hundreds' digit (?)<br />
|-<br />
| 0x0C<br />
| 2<br />
| Folder counter; tens' digits (i.e. : next folder's number will be ++foldercounter)<br />
|-<br />
| 0x0E<br />
| 2<br />
| Photo counter (i.e. : next photo's number will be ++photocounter)<br />
|-<br />
| 0x10<br />
| 2<br />
| UNKNOWN (0x0000)<br />
|-<br />
| 0x12<br />
| 2<br />
| Frame counter (i.e. : next frame's number will be ++framecounter)<br />
|-<br />
| 0x14<br />
| 2<br />
| CRC16 of whole file<br />
|-<br />
| 0x16<br />
| 2<br />
| Size of header (0x0018)<br />
|}<br />
It is known that if the offset to entries (size of header) is pushed passed the end of the file, the system freezes, it is not known wether this is exploitable or not. Infact any change which makes it read passed the end of the file makes it crash.<br />
<br />
== Each entry (16 bytes) ==<br />
{| class="wikitable" border="1"<br />
|-<br />
! OFFSET (bytes)<br />
! SIZE (bytes)<br />
! DESCRIPTION (common value)<br />
|-<br />
| 0x00<br />
| 4<br />
| Date (# seconds since Jan/1/2000)<br />
|-<br />
| 0x04<br />
| 8<br />
| UNKNOWN (0x00 8 times)<br />
|-<br />
| 0x0C<br />
| 4<br />
| flags (see below)<br />
|}<br />
<br />
=== flags field ===<br />
{| class="wikitable" border="1"<br />
|-<br />
! OFFSET (bits)<br />
! SIZE (bits)<br />
! DESCRIPTION (common value)<br />
|-<br />
| 0<br />
| 1<br />
| # folder where the photo is; hundreds' digit (?)<br />
|-<br />
| 1<br />
| 7<br />
| # folder where the photo is; tens' digits<br />
|-<br />
| 8<br />
| 3<br />
| UNKNOWN (000b)<br />
|-<br />
| 11<br />
| 7<br />
| Photo's number minus 1<br />
|-<br />
| 18<br />
| 2<br />
| Sticker (0: None, 1: Star, 2: Clover, 3: Heart)<br />
|-<br />
| 20<br />
| 1<br />
| Type of the entry (0: Photo, 1: Frame)<br />
|-<br />
| 21<br />
| 11<br />
| UNKNOWN (0b 11 times)<br />
|}<br />
<br />
== Misc information ==<br />
Photos are stored in:<br />
* SD:\DCIM\100NIN01<br />
* SD:\DCIM\100NIN02<br />
Frames are stored in:<br />
* SD:\private\ds\app\484E494A\DCIM\100NIN01<br />
* SD:\private\ds\app\484E494A\DCIM\100NIN02<br />
<br />
== See also ==<br />
* [[User:Ludo6431/pit-read.c | pit file reader]]</div>Ludo6431https://dsibrew.org/w/index.php?title=Talk:Private/ds/app/484E94*/pit.bin&diff=3419Talk:Private/ds/app/484E94*/pit.bin2011-01-30T23:48:03Z<p>Ludo6431: Blanked the page</p>
<hr />
<div></div>Ludo6431https://dsibrew.org/w/index.php?title=User:Ludo6431/pit-read.c&diff=3418User:Ludo6431/pit-read.c2011-01-30T23:47:22Z<p>Ludo6431: Created page with "<source lang="c"> /* * pitread.c -- pit.bin file reader by Ludo6431 <ludolacost_gm@il_com> */ #include <stdlib.h> #include <stdio.h> #include <stdarg.h> #include <string.h> #..."</p>
<hr />
<div><source lang="c"><br />
/*<br />
* pitread.c -- pit.bin file reader by Ludo6431 <ludolacost_gm@il_com><br />
*/<br />
<br />
#include <stdlib.h><br />
#include <stdio.h><br />
#include <stdarg.h><br />
#include <string.h><br />
#include <time.h><br />
<br />
typedef unsigned char u8;<br />
typedef unsigned short u16;<br />
typedef unsigned int u32;<br />
#ifndef BIT<br />
# define BIT(b) (1<<(b))<br />
#endif<br />
<br />
void mexit(int ret, char *format, ...) {<br />
if(format) {<br />
va_list ap;<br />
va_start(ap, format);<br />
vfprintf(stderr, format, ap);<br />
fprintf(stderr, "\n");<br />
va_end(ap);<br />
}<br />
exit(ret);<br />
}<br />
<br />
typedef struct PIT_HDR sPIT_HDR;<br />
struct PIT_HDR {<br />
u32 magic;<br />
u32 dunno1; // "00_1"<br />
u16 slotsnum; // 3000 slots in the file<br />
u16 msbfolderctr;<br />
u16 lsbfolderctr; // next folder's number will be ++folderctr<br />
u16 photoctr; // next photo's number will be ++photoctr<br />
u16 dunno2; // 0x0000<br />
u16 framectr; // next frame's number will be ++framectr<br />
u16 checksum; // crc16 of whole file<br />
u16 hdrsize; // 0x18<br />
};<br />
<br />
#define F_DIRNUM(f) (((f)&0x1)*100 + ((f)>>1)&0x7f) // 8bits (100-129)<br />
#define F_ENTNUM(f) ((((f)>>11)&0x7f)+1) // 7bits (0-99)<br />
#define F_STICKER(f) (((f)>>18)&0x3)<br />
#define F_TYPE(f) (((f)>>20)&0x1)<br />
typedef struct PIT_ENTRY sPIT_ENTRY;<br />
struct PIT_ENTRY {<br />
u32 date;<br />
u8 dunno[8];<br />
u32 flags; // (bit0: hundreds' digit of folder num; bit1-7: tens' digits of folder num; bit8-10: UNKNOWN (0); bit11-17: photo's number minus 1; bit18-19: sticker 0: None, 1: Star, 2: Clover, 3: Heart; bit20: type 0:photo, 1:frame; bit21-31: UNKNOWN (0))<br />
};<br />
<br />
int main(int argc, char *argv[]) {<br />
if(argc!=2) mexit(1, "Usage:\n\t%s <pit.bin>", argv[0]);<br />
<br />
char *fname = argv[1];<br />
FILE *fd = fopen(fname, "rb+");<br />
if(!fd) mexit(1, "Can't open file \"%s\"!", fname);<br />
<br />
fseek(fd, 0, SEEK_END);<br />
unsigned fsize = ftell(fd);<br />
rewind(fd);<br />
<br />
sPIT_HDR hdr;<br />
<br />
if(fread((void *)&hdr, 1, sizeof(sPIT_HDR), fd)!=sizeof(sPIT_HDR)) {<br />
fclose(fd);<br />
mexit(1, "Can't read file \"%s\"!", fname);<br />
}<br />
<br />
printf("magic : \"%c%c%c%c\"\n", hdr.magic>>24, (hdr.magic>>16)&0xFF, (hdr.magic>>8)&0xFF, hdr.magic&0xFF);<br />
printf("dunno1 : \"%c%c%c%c\"\n", hdr.dunno1&0xFF, (hdr.dunno1>>8)&0xFF, (hdr.dunno1>>16)&0xFF, hdr.dunno1>>24);<br />
printf("slotsnum : %d\n", hdr.slotsnum);<br />
printf("folderctr : %d%02d\n", hdr.msbfolderctr, hdr.lsbfolderctr);<br />
printf("photoctr : %d\n", hdr.photoctr);<br />
printf("framectr : %d\n", hdr.framectr);<br />
printf("checksum : 0x%02x\n", hdr.checksum);<br />
printf("headersize : %d\n", hdr.hdrsize);<br />
<br />
// jump after the header<br />
fseek(fd, hdr.hdrsize, SEEK_SET);<br />
<br />
u32 i, photocnt=0, framecnt=0, offset;<br />
sPIT_ENTRY entry;<br />
for(i=0; i<hdr.slotsnum; i++) {<br />
offset = ftell(fd);<br />
if(fread((void *)&entry, 1, sizeof(sPIT_ENTRY), fd)!=sizeof(sPIT_ENTRY)) {<br />
fclose(fd);<br />
mexit(1, "Can't read file \"%s\" (after %d+%d valid entries)!", fname, photocnt, framecnt);<br />
}<br />
<br />
if(!entry.date) continue;<br />
<br />
switch(F_TYPE(entry.flags)) {<br />
case 0: // photo<br />
photocnt++;<br />
printf("-- photo%04d -- (slot%d in file)\n", photocnt, (offset-hdr.hdrsize)>>4);<br />
break;<br />
case 1: // frame<br />
framecnt++;<br />
printf("-- frame%04d -- (slot%d in file)\n", framecnt, (offset-hdr.hdrsize)>>4);<br />
break;<br />
default:<br />
break;<br />
}<br />
<br />
struct tm ttm;<br />
time_t stm;<br />
bzero(&ttm, sizeof(ttm));<br />
ttm.tm_year = 2000 - 1900; // 2000<br />
ttm.tm_mon = 0; // january<br />
ttm.tm_mday = 1; // 1st<br />
stm = mktime(&ttm);<br />
stm += entry.date;<br />
<br />
printf(" date(UTC) : %s", asctime(gmtime(&stm)));<br />
printf(" folder : %d\n", F_DIRNUM(entry.flags));<br />
printf(" number : %d\n", F_ENTNUM(entry.flags));<br />
<br />
char fname[128];<br />
switch(F_TYPE(entry.flags)) {<br />
case 0:<br />
printf(" sticker : %d\n", F_STICKER(entry.flags));<br />
sprintf(fname, "/DCIM/%03dNIN02/HNI_%04d.JPG", F_DIRNUM(entry.flags), F_ENTNUM(entry.flags));<br />
break;<br />
case 1:<br />
sprintf(fname, "/private/ds/app/484E494A/DCIM/%03dNIN02/HNI_%04d.JPG", F_DIRNUM(entry.flags), F_ENTNUM(entry.flags));<br />
break;<br />
default:<br />
break;<br />
}<br />
<br />
printf(" filename : %s\n", fname);<br />
}<br />
printf("The file contains %d photos and %d frames.\n", photocnt, framecnt);<br />
<br />
fclose(fd);<br />
}<br />
</source></div>Ludo6431https://dsibrew.org/w/index.php?title=User:Ludo6431&diff=3417User:Ludo64312011-01-30T23:30:52Z<p>Ludo6431: </p>
<hr />
<div>Hello, i'm a french DS C coder.<br />
<br />
{{Userboxtop}}<br />
{{Userbox DS Lite|1}}<br />
{{Userbox DSi|1}}<br />
{{Userbox system menu|1.4.1}}<br />
{{Userboxbottom}}</div>Ludo6431https://dsibrew.org/w/index.php?title=Talk:Private/ds/app/484E94*/pit.bin&diff=3416Talk:Private/ds/app/484E94*/pit.bin2011-01-30T00:31:06Z<p>Ludo6431: added pit.bin file reader</p>
<hr />
<div>== pit.bin file reader ==<br />
<br />
<source lang="c"><br />
/*<br />
* pitread.c -- pit.bin file reader by Ludo6431 <ludolacost_gm@il_com><br />
*/<br />
<br />
#include <stdlib.h><br />
#include <stdio.h><br />
#include <stdarg.h><br />
#include <string.h><br />
#include <time.h><br />
<br />
typedef unsigned char u8;<br />
typedef unsigned short u16;<br />
typedef unsigned int u32;<br />
#ifndef BIT<br />
# define BIT(b) (1<<(b))<br />
#endif<br />
<br />
void mexit(int ret, char *format, ...) {<br />
if(format) {<br />
va_list ap;<br />
va_start(ap, format);<br />
vfprintf(stderr, format, ap);<br />
fprintf(stderr, "\n");<br />
va_end(ap);<br />
}<br />
exit(ret);<br />
}<br />
<br />
typedef struct PIT_HDR sPIT_HDR;<br />
struct PIT_HDR {<br />
u32 magic;<br />
u32 dunno1; // "00_1"<br />
u16 slotsnum; // 3000 slots in the file<br />
u16 msbfolderctr;<br />
u16 lsbfolderctr; // next folder's number will be ++folderctr<br />
u16 photoctr; // next photo's number will be ++photoctr<br />
u16 dunno2; // 0x0000<br />
u16 framectr; // next frame's number will be ++framectr<br />
u16 checksum; // crc16 of whole file<br />
u16 hdrsize; // 0x18<br />
};<br />
<br />
#define F_DIRNUM(f) (((f)&0x1)*100 + ((f)>>1)&0x7f) // 8bits (100-129)<br />
#define F_ENTNUM(f) ((((f)>>11)&0x7f)+1) // 7bits (0-99)<br />
#define F_STICKER(f) (((f)>>18)&0x3)<br />
#define F_TYPE(f) (((f)>>20)&0x1)<br />
typedef struct PIT_ENTRY sPIT_ENTRY;<br />
struct PIT_ENTRY {<br />
u32 date;<br />
u8 dunno[8];<br />
u32 flags; // (bit0: hundreds' digit of folder num; bit1-7: tens' digits of folder num; bit8-10: UNKNOWN (0); bit11-17: photo's number minus 1; bit18-19: sticker 0: None, 1: Star, 2: Clover, 3: Heart; bit20: type 0:photo, 1:frame; bit21-31: UNKNOWN (0))<br />
};<br />
<br />
int main(int argc, char *argv[]) {<br />
if(argc!=2) mexit(1, "Usage:\n\t%s <pit.bin>", argv[0]);<br />
<br />
char *fname = argv[1];<br />
FILE *fd = fopen(fname, "rb+");<br />
if(!fd) mexit(1, "Can't open file \"%s\"!", fname);<br />
<br />
fseek(fd, 0, SEEK_END);<br />
unsigned fsize = ftell(fd);<br />
rewind(fd);<br />
<br />
sPIT_HDR hdr;<br />
<br />
if(fread((void *)&hdr, 1, sizeof(sPIT_HDR), fd)!=sizeof(sPIT_HDR)) {<br />
fclose(fd);<br />
mexit(1, "Can't read file \"%s\"!", fname);<br />
}<br />
<br />
printf("magic : \"%c%c%c%c\"\n", hdr.magic>>24, (hdr.magic>>16)&0xFF, (hdr.magic>>8)&0xFF, hdr.magic&0xFF);<br />
printf("dunno1 : \"%c%c%c%c\"\n", hdr.dunno1&0xFF, (hdr.dunno1>>8)&0xFF, (hdr.dunno1>>16)&0xFF, hdr.dunno1>>24);<br />
printf("slotsnum : %d\n", hdr.slotsnum);<br />
printf("folderctr : %d%02d\n", hdr.msbfolderctr, hdr.lsbfolderctr);<br />
printf("photoctr : %d\n", hdr.photoctr);<br />
printf("framectr : %d\n", hdr.framectr);<br />
printf("checksum : 0x%02x\n", hdr.checksum);<br />
printf("headersize : %d\n", hdr.hdrsize);<br />
<br />
// jump after the header<br />
fseek(fd, hdr.hdrsize, SEEK_SET);<br />
<br />
u32 i, photocnt=0, framecnt=0, offset;<br />
sPIT_ENTRY entry;<br />
for(i=0; i<hdr.slotsnum; i++) {<br />
offset = ftell(fd);<br />
if(fread((void *)&entry, 1, sizeof(sPIT_ENTRY), fd)!=sizeof(sPIT_ENTRY)) {<br />
fclose(fd);<br />
mexit(1, "Can't read file \"%s\" (after %d+%d valid entries)!", fname, photocnt, framecnt);<br />
}<br />
<br />
if(!entry.date) continue;<br />
<br />
switch(F_TYPE(entry.flags)) {<br />
case 0: // photo<br />
photocnt++;<br />
printf("-- photo%04d -- (slot%d in file)\n", photocnt, (offset-hdr.hdrsize)>>4);<br />
break;<br />
case 1: // frame<br />
framecnt++;<br />
printf("-- frame%04d -- (slot%d in file)\n", framecnt, (offset-hdr.hdrsize)>>4);<br />
break;<br />
default:<br />
break;<br />
}<br />
<br />
struct tm ttm;<br />
time_t stm;<br />
bzero(&ttm, sizeof(ttm));<br />
ttm.tm_year = 2000 - 1900; // 2000<br />
ttm.tm_mon = 0; // january<br />
ttm.tm_mday = 1; // 1st<br />
stm = mktime(&ttm);<br />
stm += entry.date;<br />
<br />
printf(" date(UTC) : %s", asctime(gmtime(&stm)));<br />
printf(" folder : %d\n", F_DIRNUM(entry.flags));<br />
printf(" number : %d\n", F_ENTNUM(entry.flags));<br />
<br />
char fname[128];<br />
switch(F_TYPE(entry.flags)) {<br />
case 0:<br />
printf(" sticker : %d\n", F_STICKER(entry.flags));<br />
sprintf(fname, "/DCIM/%03dNIN02/HNI_%04d.JPG", F_DIRNUM(entry.flags), F_ENTNUM(entry.flags));<br />
break;<br />
case 1:<br />
sprintf(fname, "/private/ds/app/484E494A/DCIM/%03dNIN02/HNI_%04d.JPG", F_DIRNUM(entry.flags), F_ENTNUM(entry.flags));<br />
break;<br />
default:<br />
break;<br />
}<br />
<br />
printf(" filename : %s\n", fname);<br />
}<br />
printf("The file contains %d photos and %d frames.\n", photocnt, framecnt);<br />
<br />
fclose(fd);<br />
}<br />
</source></div>Ludo6431https://dsibrew.org/w/index.php?title=Private/ds/app/484E94*/pit.bin&diff=3415Private/ds/app/484E94*/pit.bin2011-01-30T00:26:34Z<p>Ludo6431: /* flags field */</p>
<hr />
<div>== File Header ==<br />
{| class="wikitable" border="1"<br />
|-<br />
! OFFSET (bytes)<br />
! SIZE (bytes)<br />
! DESCRIPTION (common value)<br />
|-<br />
| 0x00<br />
| 4<br />
| Magic ("0TIP")<br />
|-<br />
| 0x04<br />
| 4<br />
| UNKNOWN ("_1""00" LE, maybe number of first folder or max number of photos per folder)<br />
|-<br />
| 0x08<br />
| 2<br />
| # slots in the file (3000)<br />
|-<br />
| 0x0A<br />
| 2<br />
| Folder counter; hundreds' digit (?)<br />
|-<br />
| 0x0C<br />
| 2<br />
| Folder counter; tens' digits (i.e. : next folder's number will be ++foldercounter)<br />
|-<br />
| 0x0E<br />
| 2<br />
| Photo counter (i.e. : next photo's number will be ++photocounter)<br />
|-<br />
| 0x10<br />
| 2<br />
| UNKNOWN (0x0000)<br />
|-<br />
| 0x12<br />
| 2<br />
| Frame counter (i.e. : next frame's number will be ++framecounter)<br />
|-<br />
| 0x14<br />
| 2<br />
| CRC16 of whole file<br />
|-<br />
| 0x16<br />
| 2<br />
| Size of header (0x0018)<br />
|}<br />
It is known that if the offset to entries (size of header) is pushed passed the end of the file, the system freezes, it is not known wether this is exploitable or not. Infact any change which makes it read passed the end of the file makes it crash.<br />
<br />
== Each entry (16 bytes) ==<br />
{| class="wikitable" border="1"<br />
|-<br />
! OFFSET (bytes)<br />
! SIZE (bytes)<br />
! DESCRIPTION (common value)<br />
|-<br />
| 0x00<br />
| 4<br />
| Date (# seconds since Jan/1/2000)<br />
|-<br />
| 0x04<br />
| 8<br />
| UNKNOWN (0x00 8 times)<br />
|-<br />
| 0x0C<br />
| 4<br />
| flags (see below)<br />
|}<br />
<br />
=== flags field ===<br />
{| class="wikitable" border="1"<br />
|-<br />
! OFFSET (bits)<br />
! SIZE (bits)<br />
! DESCRIPTION (common value)<br />
|-<br />
| 0<br />
| 1<br />
| # folder where the photo is; hundreds' digit (?)<br />
|-<br />
| 1<br />
| 7<br />
| # folder where the photo is; tens' digits<br />
|-<br />
| 8<br />
| 3<br />
| UNKNOWN (000b)<br />
|-<br />
| 11<br />
| 7<br />
| Photo's number minus 1<br />
|-<br />
| 18<br />
| 2<br />
| Sticker (0: None, 1: Star, 2: Clover, 3: Heart)<br />
|-<br />
| 20<br />
| 1<br />
| Type of the entry (0: Photo, 1: Frame)<br />
|-<br />
| 21<br />
| 11<br />
| UNKNOWN (0b 11 times)<br />
|}<br />
<br />
== Misc information ==<br />
Photos are stored in:<br />
* SD:\DCIM\100NIN01<br />
* SD:\DCIM\100NIN02<br />
Frames are stored in:<br />
* SD:\private\ds\app\484E494A\DCIM\100NIN01<br />
* SD:\private\ds\app\484E494A\DCIM\100NIN02<br />
<br />
<br />
If you have photos or frames in the */100NIN01 folder, can you send me your pit.bin file please at <ludolacost_gm@il_com> ?</div>Ludo6431https://dsibrew.org/w/index.php?title=Private/ds/app/484E94*/pit.bin&diff=3414Private/ds/app/484E94*/pit.bin2011-01-30T00:25:09Z<p>Ludo6431: /* File Header */</p>
<hr />
<div>== File Header ==<br />
{| class="wikitable" border="1"<br />
|-<br />
! OFFSET (bytes)<br />
! SIZE (bytes)<br />
! DESCRIPTION (common value)<br />
|-<br />
| 0x00<br />
| 4<br />
| Magic ("0TIP")<br />
|-<br />
| 0x04<br />
| 4<br />
| UNKNOWN ("_1""00" LE, maybe number of first folder or max number of photos per folder)<br />
|-<br />
| 0x08<br />
| 2<br />
| # slots in the file (3000)<br />
|-<br />
| 0x0A<br />
| 2<br />
| Folder counter; hundreds' digit (?)<br />
|-<br />
| 0x0C<br />
| 2<br />
| Folder counter; tens' digits (i.e. : next folder's number will be ++foldercounter)<br />
|-<br />
| 0x0E<br />
| 2<br />
| Photo counter (i.e. : next photo's number will be ++photocounter)<br />
|-<br />
| 0x10<br />
| 2<br />
| UNKNOWN (0x0000)<br />
|-<br />
| 0x12<br />
| 2<br />
| Frame counter (i.e. : next frame's number will be ++framecounter)<br />
|-<br />
| 0x14<br />
| 2<br />
| CRC16 of whole file<br />
|-<br />
| 0x16<br />
| 2<br />
| Size of header (0x0018)<br />
|}<br />
It is known that if the offset to entries (size of header) is pushed passed the end of the file, the system freezes, it is not known wether this is exploitable or not. Infact any change which makes it read passed the end of the file makes it crash.<br />
<br />
== Each entry (16 bytes) ==<br />
{| class="wikitable" border="1"<br />
|-<br />
! OFFSET (bytes)<br />
! SIZE (bytes)<br />
! DESCRIPTION (common value)<br />
|-<br />
| 0x00<br />
| 4<br />
| Date (# seconds since Jan/1/2000)<br />
|-<br />
| 0x04<br />
| 8<br />
| UNKNOWN (0x00 8 times)<br />
|-<br />
| 0x0C<br />
| 4<br />
| flags (see below)<br />
|}<br />
<br />
=== flags field ===<br />
{| class="wikitable" border="1"<br />
|-<br />
! OFFSET (bits)<br />
! SIZE (bits)<br />
! DESCRIPTION (common value)<br />
|-<br />
| 0<br />
| 1<br />
| # folder where the photo is; hundreds' digit (?)<br />
|-<br />
| 1<br />
| 7<br />
| # folder where the photo is; tens' digits<br />
|-<br />
| 8<br />
| 3<br />
| UNKNOWN (0)<br />
|-<br />
| 11<br />
| 7<br />
| Photo's number minus 1<br />
|-<br />
| 18<br />
| 2<br />
| Sticker (0: None, 1: Star, 2: Clover, 3: Heart)<br />
|-<br />
| 20<br />
| 1<br />
| Type of the entry (0: Photo, 1: Frame)<br />
|-<br />
| 21<br />
| 11<br />
| UNKNOWN (0)<br />
|}<br />
<br />
== Misc information ==<br />
Photos are stored in:<br />
* SD:\DCIM\100NIN01<br />
* SD:\DCIM\100NIN02<br />
Frames are stored in:<br />
* SD:\private\ds\app\484E494A\DCIM\100NIN01<br />
* SD:\private\ds\app\484E494A\DCIM\100NIN02<br />
<br />
<br />
If you have photos or frames in the */100NIN01 folder, can you send me your pit.bin file please at <ludolacost_gm@il_com> ?</div>Ludo6431https://dsibrew.org/w/index.php?title=Private/ds/app/484E94*/pit.bin&diff=3413Private/ds/app/484E94*/pit.bin2011-01-30T00:24:43Z<p>Ludo6431: </p>
<hr />
<div>== File Header ==<br />
{| class="wikitable" border="1"<br />
|-<br />
! OFFSET (bytes)<br />
! SIZE (bytes)<br />
! DESCRIPTION (common value)<br />
|-<br />
| 0x00<br />
| 4<br />
| Magic ("0TIP")<br />
|-<br />
| 0x04<br />
| 4<br />
| UNKNOWN ("_1""00" LE, maybe number of first folder or max number of photos per folder)<br />
|-<br />
| 0x08<br />
| 2<br />
| # slots in the file (3000)<br />
|-<br />
| 0x0A<br />
| 2<br />
| Folder counter; hundreds' digit (?)<br />
|-<br />
| 0x0C<br />
| 2<br />
| Folder counter; tens' digits (i.e. : next folder's number will be ++foldercounter)<br />
|-<br />
| 0x0E<br />
| 2<br />
| Photo counter (i.e. : next photo's number will be ++photocounter)<br />
|-<br />
| 0x10<br />
| 2<br />
| UNKNOWN (0x0000)<br />
|-<br />
| 0x12<br />
| 2<br />
| Frame counter (i.e. : next frmae's number will be ++framecounter)<br />
|-<br />
| 0x14<br />
| 2<br />
| CRC16 of whole file<br />
|-<br />
| 0x16<br />
| 2<br />
| Size of header (0x0018)<br />
|}<br />
It is known that if the offset to entries (size of header) is pushed passed the end of the file, the system freezes, it is not known wether this is exploitable or not. Infact any change which makes it read passed the end of the file makes it crash.<br />
<br />
== Each entry (16 bytes) ==<br />
{| class="wikitable" border="1"<br />
|-<br />
! OFFSET (bytes)<br />
! SIZE (bytes)<br />
! DESCRIPTION (common value)<br />
|-<br />
| 0x00<br />
| 4<br />
| Date (# seconds since Jan/1/2000)<br />
|-<br />
| 0x04<br />
| 8<br />
| UNKNOWN (0x00 8 times)<br />
|-<br />
| 0x0C<br />
| 4<br />
| flags (see below)<br />
|}<br />
<br />
=== flags field ===<br />
{| class="wikitable" border="1"<br />
|-<br />
! OFFSET (bits)<br />
! SIZE (bits)<br />
! DESCRIPTION (common value)<br />
|-<br />
| 0<br />
| 1<br />
| # folder where the photo is; hundreds' digit (?)<br />
|-<br />
| 1<br />
| 7<br />
| # folder where the photo is; tens' digits<br />
|-<br />
| 8<br />
| 3<br />
| UNKNOWN (0)<br />
|-<br />
| 11<br />
| 7<br />
| Photo's number minus 1<br />
|-<br />
| 18<br />
| 2<br />
| Sticker (0: None, 1: Star, 2: Clover, 3: Heart)<br />
|-<br />
| 20<br />
| 1<br />
| Type of the entry (0: Photo, 1: Frame)<br />
|-<br />
| 21<br />
| 11<br />
| UNKNOWN (0)<br />
|}<br />
<br />
== Misc information ==<br />
Photos are stored in:<br />
* SD:\DCIM\100NIN01<br />
* SD:\DCIM\100NIN02<br />
Frames are stored in:<br />
* SD:\private\ds\app\484E494A\DCIM\100NIN01<br />
* SD:\private\ds\app\484E494A\DCIM\100NIN02<br />
<br />
<br />
If you have photos or frames in the */100NIN01 folder, can you send me your pit.bin file please at <ludolacost_gm@il_com> ?</div>Ludo6431https://dsibrew.org/w/index.php?title=Private/ds/app/484E94*/pit.bin&diff=3412Private/ds/app/484E94*/pit.bin2011-01-29T17:27:07Z<p>Ludo6431: /* Each entry (16 bytes) */</p>
<hr />
<div>== File Header ==<br />
{| class="wikitable" border="1"<br />
|-<br />
! OFFSET<br />
! SIZE<br />
! DESCRIPTION (common value)<br />
|-<br />
| 0x00<br />
| 4<br />
| Magic ("0TIP")<br />
|-<br />
| 0x04<br />
| 4<br />
| UNKNOWN ("_1""00" LE, maybe number of first folder or max number of photos per folder)<br />
|-<br />
| 0x08<br />
| 2<br />
| Block-Size (0x0BB8 => 3000 Bytes)<br />
|-<br />
| 0x0A<br />
| 2<br />
| # folders' hundreds digit<br />
|-<br />
| 0x0C<br />
| 2<br />
| # folders' tens digit <br />
|-<br />
| 0x0E<br />
| 2<br />
| Incremental photo counter (i.e. : next photo's number will be this counter + 1)<br />
|-<br />
| 0x10<br />
| 2<br />
| UNKNOWN (0x0000)<br />
|-<br />
| 0x12<br />
| 2<br />
| # of frames<br />
|-<br />
| 0x14<br />
| 2<br />
| CRC16 of whole file<br />
|-<br />
| 0x16<br />
| 2<br />
| Size of header (0x0018)<br />
|}<br />
It is known that if the offset to entries (size of header) is pushed passed the end of the file, the system freezes, it is not known wether this is exploitable or not. Infact any change which makes it read passed the end of the file makes it crash.<br />
<br />
== Each entry (16 bytes) ==<br />
{| class="wikitable" border="1"<br />
|-<br />
! OFFSET<br />
! SIZE<br />
! DESCRIPTION (common value)<br />
|-<br />
| 0x00<br />
| 4<br />
| Date (# seconds since Jan/1/2000)<br />
|-<br />
| 0x04<br />
| 8<br />
| UNKNOWN (0x00 8 times)<br />
|-<br />
| 0x0C<br />
| 1<br />
| # folder where the photo is (bit0: hundreds' digit; bit1-7: tens' digits)<br />
|-<br />
| 0x0D<br />
| 1<br />
| UNKNOWN (8 * n <-- n is may entry number (first = 0 seconds = 1 ...) only the last Byte of the result is used)?<br />
|-<br />
| 0x0E<br />
| 1<br />
| Sticker? (0/1/2/3: None, 4: Star, 8: Clover, 12: Heart, 16: Frame)<br />
|-<br />
| 0x0F<br />
| 1<br />
| UNKNOWN (0x00)<br />
|}<br />
<br />
== Misc information ==<br />
Photos are stored in:<br />
* SD:\DCIM\100NIN01<br />
* SD:\DCIM\100NIN02<br />
Frames are stored in:<br />
* SD:\private\ds\app\484E494A\DCIM\100NIN01<br />
* SD:\private\ds\app\484E494A\DCIM\100NIN02</div>Ludo6431https://dsibrew.org/w/index.php?title=FAQ&diff=3411FAQ2011-01-29T17:10:26Z<p>Ludo6431: </p>
<hr />
<div>'''Frequently asked questions are here.'''<br />
<br />
'''Q:''' What is the purpose of this project?<br />
<br />
'''A:''' Getting unsigned "homebrew" code running on the Nintendo DSi in native DSi mode.<br />
<br />
<br />
'''Q:''' Any progress?<br />
<br />
'''A:''' Not much as this project just started. However, [[Team Twiizers]] has managed to execute some form of unsigned code by directing the save file area of a DSi-mode game to an Arudino chip. This will lead to further - and easier to replicate - exploits. <br />
<br />
<br />
'''Q:''' What is the purpose of running "homebrew" code on the Nintendo DSi?<br />
<br />
'''A:''' The Nintendo DSi is a decently powerful system that has a SD slot, 2 cameras on it and a touch screen all in a portable system great for homebrew.<br />
<br />
<br />
'''Q:''' Why not just rely on already available flash carts for homebrew?<br />
<br />
'''A:''' The goal here is to run our own code via a software exploit, not a hardware one. Also, some flash carts have a bad reputation. Finally, current flash carts only allow you to run DS-native homebrew, with no DSi features (such as the cameras) or increased processing power being available. Also, SD Cards for the DSi are cheaper than flash carts.<br />
<br />
<br />
'''Q:''' How can we know DSiware title code?<br />
<br />
'''A:''' If you mean title IDs, see the title list. If you want to download DSiWare from NUS, you can't without the ticket which isn't available on NUS.<br />
<br />
<br />
'''Q:''' What is FATFS? /PXI<br />
<br />
'''A:''' PXI is the TWL SDK inter-processor communication system over the FIFO. FATFS is the TWL SDK Arm7 FAT interface for NAND, SD, etc.</div>Ludo6431https://dsibrew.org/w/index.php?title=Private/ds/app/484E94*/pit.bin&diff=3410Private/ds/app/484E94*/pit.bin2011-01-29T16:56:48Z<p>Ludo6431: /* Each entry (16 bytes) */</p>
<hr />
<div>== File Header ==<br />
{| class="wikitable" border="1"<br />
|-<br />
! OFFSET<br />
! SIZE<br />
! DESCRIPTION (common value)<br />
|-<br />
| 0x00<br />
| 4<br />
| Magic ("0TIP")<br />
|-<br />
| 0x04<br />
| 4<br />
| UNKNOWN ("_1""00" LE, maybe number of first folder or max number of photos per folder)<br />
|-<br />
| 0x08<br />
| 2<br />
| Block-Size (0x0BB8 => 3000 Bytes)<br />
|-<br />
| 0x0A<br />
| 2<br />
| # folders' hundreds digit<br />
|-<br />
| 0x0C<br />
| 2<br />
| # folders' tens digit <br />
|-<br />
| 0x0E<br />
| 2<br />
| Incremental photo counter (i.e. : next photo's number will be this counter + 1)<br />
|-<br />
| 0x10<br />
| 2<br />
| UNKNOWN (0x0000)<br />
|-<br />
| 0x12<br />
| 2<br />
| # of frames<br />
|-<br />
| 0x14<br />
| 2<br />
| CRC16 of whole file<br />
|-<br />
| 0x16<br />
| 2<br />
| Size of header (0x0018)<br />
|}<br />
It is known that if the offset to entries (size of header) is pushed passed the end of the file, the system freezes, it is not known wether this is exploitable or not. Infact any change which makes it read passed the end of the file makes it crash.<br />
<br />
== Each entry (16 bytes) ==<br />
{| class="wikitable" border="1"<br />
|-<br />
! OFFSET<br />
! SIZE<br />
! DESCRIPTION (common value)<br />
|-<br />
| 0x00<br />
| 4<br />
| Date (# seconds since Jan/1/2000)<br />
|-<br />
| 0x04<br />
| 8<br />
| UNKNOWN (0x00 8 times)<br />
|-<br />
| 0x0C<br />
| 1<br />
| Type? (1/3/5)<br />
|-<br />
| 0x0D<br />
| 1<br />
| UNKNOWN (8 * n <-- n is may entry number (first = 0 seconds = 1 ...) only the last Byte of the result is used)?<br />
|-<br />
| 0x0E<br />
| 1<br />
| Sticker? (0/1/2/3: None, 4: Star, 8: Clover, 12: Heart, 16: Frame)<br />
|-<br />
| 0x0F<br />
| 1<br />
| UNKNOWN (0x00)<br />
|}<br />
<br />
== Misc information ==<br />
Photos are stored in:<br />
* SD:\DCIM\100NIN01<br />
* SD:\DCIM\100NIN02<br />
Frames are stored in:<br />
* SD:\private\ds\app\484E494A\DCIM\100NIN01<br />
* SD:\private\ds\app\484E494A\DCIM\100NIN02</div>Ludo6431https://dsibrew.org/w/index.php?title=List_of_DSi_Homebrew&diff=3393List of DSi Homebrew2011-01-28T14:36:21Z<p>Ludo6431: /* Sudokuhax */</p>
<hr />
<div>This '''list''' is designed to be a updated collection of current DSi mode homebrew.<br />
<br />
==Regarding the current state of DSi mode homebrew in general==<br />
There is currently no practical way to run homebrew in DSi-mode. Save game hacks exist, but these have severe limitations:<br />
* The SD slot and NAND flash are inaccessible.<br />
* The amount of code space is limited to the available space in the game's save file. (A few kilobytes)<br />
** This restriction can be lifted with external hardware like [[EEPUART]] or [[spime]]. This is how [http://svn.navi.cx/misc/trunk/nds/dsi/cookinject/ larger chunks of code] or [http://www.flickr.com/photos/micahdowty/3794878172/in/set-72157621023570420/ image files] have been loaded by developers so far.<br />
<br />
==Exploits==<br />
===The Drunken Coder's savegame exploit===<br />
This exploit allows DSi homebrew coders to run unsigned ARM asm code in DSi-mode utilizing a buffer overflow in Cooking Coach. The hack can be found [http://drunkencoders.com/2009/08/dsi-hack-update/ here].<br />
<br />
===Sudokuhax===<br />
This exploit allows homebrew labeled boot.nds in the root of the SD card to be launched upon startup of the DSiware Sudoku game. This hack can be found [http://hackmii.com/2011/01/sudokuhax-release/ here]<br />
<br />
===CookInject===<br />
This is [[User:Scanlime]]'s exploit for Cooking Coach. It works with external hardware to bootstrap larger amounts of C code into system memory. Its primary feature is that it's possible to modify code from the game's ARM9 or ARM7 binaries, then return from the exploit back to the game. This allows insertion of hooks that modify or trace the game's normal behaviour. The code can be found [http://svn.navi.cx/misc/trunk/nds/dsi/cookinject/ here].<br />
<br />
==Homebrew==<br />
<br />
==Computer applications==</div>Ludo6431https://dsibrew.org/w/index.php?title=List_of_DSi_Homebrew&diff=3392List of DSi Homebrew2011-01-28T14:35:52Z<p>Ludo6431: </p>
<hr />
<div>This '''list''' is designed to be a updated collection of current DSi mode homebrew.<br />
<br />
==Regarding the current state of DSi mode homebrew in general==<br />
There is currently no practical way to run homebrew in DSi-mode. Save game hacks exist, but these have severe limitations:<br />
* The SD slot and NAND flash are inaccessible.<br />
* The amount of code space is limited to the available space in the game's save file. (A few kilobytes)<br />
** This restriction can be lifted with external hardware like [[EEPUART]] or [[spime]]. This is how [http://svn.navi.cx/misc/trunk/nds/dsi/cookinject/ larger chunks of code] or [http://www.flickr.com/photos/micahdowty/3794878172/in/set-72157621023570420/ image files] have been loaded by developers so far.<br />
<br />
==Exploits==<br />
===The Drunken Coder's savegame exploit===<br />
This exploit allows DSi homebrew coders to run unsigned ARM asm code in DSi-mode utilizing a buffer overflow in Cooking Coach. The hack can be found [http://drunkencoders.com/2009/08/dsi-hack-update/ here].<br />
<br />
===Sudokuhax===<br />
This exploit allows homebrew labeled boot.nds in the root of the SD card to be launched upon startup of the Sudoku game. This hack can be found [http://hackmii.com/2011/01/sudokuhax-release/ here]<br />
<br />
===CookInject===<br />
This is [[User:Scanlime]]'s exploit for Cooking Coach. It works with external hardware to bootstrap larger amounts of C code into system memory. Its primary feature is that it's possible to modify code from the game's ARM9 or ARM7 binaries, then return from the exploit back to the game. This allows insertion of hooks that modify or trace the game's normal behaviour. The code can be found [http://svn.navi.cx/misc/trunk/nds/dsi/cookinject/ here].<br />
<br />
==Homebrew==<br />
<br />
==Computer applications==</div>Ludo6431https://dsibrew.org/w/index.php?title=Private/ds/app/484E94*/pit.bin&diff=3391Private/ds/app/484E94*/pit.bin2011-01-28T14:32:56Z<p>Ludo6431: /* File Header */</p>
<hr />
<div>== File Header ==<br />
{| class="wikitable" border="1"<br />
|-<br />
! OFFSET<br />
! SIZE<br />
! DESCRIPTION (common value)<br />
|-<br />
| 0x00<br />
| 4<br />
| Magic ("0TIP")<br />
|-<br />
| 0x04<br />
| 4<br />
| UNKNOWN ("_1""00" LE, maybe number of first folder or max number of photos per folder)<br />
|-<br />
| 0x08<br />
| 2<br />
| Block-Size (0x0BB8 => 3000 Bytes)<br />
|-<br />
| 0x0A<br />
| 2<br />
| # folders' hundreds digit<br />
|-<br />
| 0x0C<br />
| 2<br />
| # folders' tens digit <br />
|-<br />
| 0x0E<br />
| 2<br />
| Incremental photo counter (i.e. : next photo's number will be this counter + 1)<br />
|-<br />
| 0x10<br />
| 2<br />
| UNKNOWN (0x0000)<br />
|-<br />
| 0x12<br />
| 2<br />
| # of frames<br />
|-<br />
| 0x14<br />
| 2<br />
| CRC16 of whole file<br />
|-<br />
| 0x16<br />
| 2<br />
| Size of header (0x0018)<br />
|}<br />
It is known that if the offset to entries (size of header) is pushed passed the end of the file, the system freezes, it is not known wether this is exploitable or not. Infact any change which makes it read passed the end of the file makes it crash.<br />
<br />
== Each entry (16 bytes) ==<br />
4 : Date <br />
8 : Zeroes<br />
1 : Type (1: Frame, 3: Photo)<br />
1 : UNKNOWN : 8 * n <-- n is may entry number (first = 0 seconds = 1 ...) only the last Byte of the result is used<br />
1 : Sticker (0: None, 4: Star, 8: Clover, 12: Heart, 16: Frame)<br />
1 : UNKNOWN : Always zero<br />
<br />
== Misc information ==<br />
Photos are stored in:<br />
* SD:\DCIM\100NIN01<br />
* SD:\DCIM\100NIN02<br />
Frames are stored in:<br />
* SD:\private\ds\app\484E494A\DCIM\100NIN01<br />
* SD:\private\ds\app\484E494A\DCIM\100NIN02</div>Ludo6431https://dsibrew.org/w/index.php?title=Private/ds/app/484E94*/pit.bin&diff=3386Private/ds/app/484E94*/pit.bin2011-01-28T11:11:22Z<p>Ludo6431: /* File Header */</p>
<hr />
<div>== File Header ==<br />
{| class="wikitable" border="1"<br />
|-<br />
! OFFSET<br />
! SIZE<br />
! DESCRIPTION (common value)<br />
|-<br />
| 0x00<br />
| 4<br />
| Magic ("0TIP")<br />
|-<br />
| 0x04<br />
| 4<br />
| UNKNOWN ("_1""00" LE, maybe number of first folder or max number of photos per folder)<br />
|-<br />
| 0x08<br />
| 2<br />
| Block-Size (0x0BB8 => 3000 Bytes)<br />
|-<br />
| 0x0A<br />
| 2<br />
| # folders' hundreds digit<br />
|-<br />
| 0x0C<br />
| 2<br />
| # folders' tens digit <br />
|-<br />
| 0x0E<br />
| 2<br />
| Higher number of photos reached in the last folder (i.e. : next photo's number will be this number+1)<br />
|-<br />
| 0x10<br />
| 2<br />
| UNKNOWN (0x0000)<br />
|-<br />
| 0x12<br />
| 2<br />
| # of frames<br />
|-<br />
| 0x14<br />
| 2<br />
| CRC16 of whole file<br />
|-<br />
| 0x16<br />
| 2<br />
| Size of header (0x0018)<br />
|}<br />
It is known that if the offset to entries (size of header) is pushed passed the end of the file, the system freezes, it is not known wether this is exploitable or not. Infact any change which makes it read passed the end of the file makes it crash.<br />
<br />
== Each entry (16 bytes) ==<br />
4 : Date <br />
8 : Zeroes<br />
1 : Type (1: Frame, 3: Photo)<br />
1 : UNKNOWN : 8 * n <-- n is may entry number (first = 0 seconds = 1 ...) only the last Byte of the result is used<br />
1 : Sticker (0: None, 4: Star, 8: Clover, 12: Heart, 16: Frame)<br />
1 : UNKNOWN : Always zero<br />
<br />
== Misc information ==<br />
Photos are stored in:<br />
* SD:\DCIM\100NIN01<br />
* SD:\DCIM\100NIN02<br />
Frames are stored in:<br />
* SD:\private\ds\app\484E494A\DCIM\100NIN01<br />
* SD:\private\ds\app\484E494A\DCIM\100NIN02</div>Ludo6431https://dsibrew.org/w/index.php?title=Private/ds/app/484E94*/pit.bin&diff=3385Private/ds/app/484E94*/pit.bin2011-01-28T11:10:42Z<p>Ludo6431: /* File Header */</p>
<hr />
<div>== File Header ==<br />
{| class="wikitable" border="1"<br />
|-<br />
! OFFSET<br />
! SIZE<br />
! DESCRIPTION (common value)<br />
|-<br />
| 0x00<br />
| 4<br />
| Magic ("0TIP")<br />
|-<br />
| 0x04<br />
| 4<br />
| UNKNOWN ("_1""00" LE, maybe number of first folder or max number of photos per folder)<br />
|-<br />
| 0x08<br />
| 2<br />
| Block-Size (0x0BB8 => 3000 Bytes)<br />
|-<br />
| 0x0A<br />
| 2<br />
| # folders' hundreds digit<br />
|-<br />
| 0x0C<br />
| 2<br />
| # folders' tens digit <br />
|-<br />
| 0x0E<br />
| 2<br />
| higher number of photos reached in the last folder (i.e. : next photo's number will be this number+1)<br />
|-<br />
| 0x10<br />
| 2<br />
| UNKNOWN (0x0000)<br />
|-<br />
| 0x12<br />
| 2<br />
| # of frames<br />
|-<br />
| 0x14<br />
| 2<br />
| CRC16 of whole file<br />
|-<br />
| 0x16<br />
| 2<br />
| Size of header (0x0018)<br />
|}<br />
It is known that if the offset to entries (size of header) is pushed passed the end of the file, the system freezes, it is not known wether this is exploitable or not. Infact any change which makes it read passed the end of the file makes it crash.<br />
<br />
== Each entry (16 bytes) ==<br />
4 : Date <br />
8 : Zeroes<br />
1 : Type (1: Frame, 3: Photo)<br />
1 : UNKNOWN : 8 * n <-- n is may entry number (first = 0 seconds = 1 ...) only the last Byte of the result is used<br />
1 : Sticker (0: None, 4: Star, 8: Clover, 12: Heart, 16: Frame)<br />
1 : UNKNOWN : Always zero<br />
<br />
== Misc information ==<br />
Photos are stored in:<br />
* SD:\DCIM\100NIN01<br />
* SD:\DCIM\100NIN02<br />
Frames are stored in:<br />
* SD:\private\ds\app\484E494A\DCIM\100NIN01<br />
* SD:\private\ds\app\484E494A\DCIM\100NIN02</div>Ludo6431https://dsibrew.org/w/index.php?title=Template:Navbox_system_updates&diff=3156Template:Navbox system updates2010-10-03T16:29:51Z<p>Ludo6431: added missing 1.4.2</p>
<hr />
<div>{{Navbox<br />
|name = Navbox system menu versions<br />
|state = uncollapsed<br />
|title = [[System Menu]] versions<br />
|list2 = '''[[System Menu 1.0|1.0]]'''{{·}} '''[[System Menu 1.2|1.2]]'''{{·}} '''[[System Menu 1.3|1.3]]'''{{·}} '''[[System Menu 1.4|1.4]]'''{{·}} '''[[System Menu 1.4.1|1.4.1]]'''{{·}} '''[[System Menu 1.4.2|1.4.2]]'''<br />
}}<noinclude></div>Ludo6431https://dsibrew.org/w/index.php?title=Talk:CODEC_SPI&diff=2795Talk:CODEC SPI2010-03-20T10:30:09Z<p>Ludo6431: New page: I think there is a problem in the number of arguments : in CDC_ChangePage() : CDC_WriteRegister(0x7F, page); and: void CDC_WriteRegister(u32 page, u32 reg, u32 val); --~~...</p>
<hr />
<div>I think there is a problem in the number of arguments :<br />
<br />
in CDC_ChangePage() :<br />
CDC_WriteRegister(0x7F, page);<br />
and:<br />
void CDC_WriteRegister(u32 page, u32 reg, u32 val);<br />
<br />
--[[User:Ludo6431|Ludo6431]] 10:30, 20 March 2010 (UTC)</div>Ludo6431https://dsibrew.org/w/index.php?title=AES_Engine&diff=2693AES Engine2010-02-05T17:03:45Z<p>Ludo6431: tables</p>
<hr />
<div>== Registers ==<br />
{| class="wikitable" border="1"<br />
! NAME<br />
! ADDRESS<br />
! WIDTH<br />
|-<br />
| REG_AESCNT<br />
| 0x04004400<br />
| 4<br />
|-<br />
| REG_AESBLKCNT<br />
| 0x04004404<br />
| 4<br />
|-<br />
| REG_AESWRFIFO<br />
| 0x04004408<br />
| 4<br />
|-<br />
| REG_AESRDFIFO<br />
| 0x0400440C<br />
| 4<br />
|-<br />
| REG_AESCTR<br />
| 0x04004420<br />
| 16<br />
|-<br />
| REG_AESMAC<br />
| 0x04004430<br />
| 16<br />
|-<br />
| REG_AESKEY0<br />
| 0x04004440<br />
| 48<br />
|-<br />
| REG_AESKEY1<br />
| 0x04004470<br />
| 48<br />
|-<br />
| REG_AESKEY2<br />
| 0x040044A0<br />
| 48<br />
|-<br />
| REG_AESKEY3<br />
| 0x040044D0<br />
| 48<br />
|}<br />
<br />
<br />
|}<br />
<br />
== REG_AESCNT ==<br />
{| class="wikitable" border="1"<br />
! BIT<br />
! DESCRIPTION<br />
|-<br />
| 4-0<br />
| Write fifo count<br />
|-<br />
| 9-5<br />
| Read fifo count<br />
|-<br />
| 10<br />
| Flush write fifo<br />
|-<br />
| 11<br />
| Flush read fifo<br />
|-<br />
| 15-12<br />
| ?<br />
|-<br />
| 18-16<br />
| MAC size (size in bytes = s*2+2, e.g, 7 == 16 bytes)<br />
|-<br />
| 19<br />
| ?<br />
|-<br />
| 20<br />
| MAC input control (0 = read MAC from FIFO, 1 = read MAC from REG_AESMAC)<br />
|-<br />
| 21<br />
| MAC status (0 = invalid, 1 = verified)<br />
|-<br />
| 23-22<br />
| ?<br />
|-<br />
| 24<br />
| Key select<br />
|-<br />
| 25<br />
| Key schedule busy<br />
|-<br />
| 27-26<br />
| Key slot (0..3)<br />
|-<br />
| 29-28<br />
| Mode (0=AES CCM decrypt, 1=AES CCM encrypt, 2=AES CTR)<br />
|-<br />
| 30<br />
| Interrupt enable<br />
|-<br />
| 31<br />
| Enable<br />
|}<br />
<br />
<br />
== REG_AESBLKCNT ==<br />
{| class="wikitable" border="1"<br />
! BIT<br />
! DESCRIPTION<br />
|-<br />
| 15-0<br />
| CBC-MAC associated data blocks to process (1 block = 4 words)<br />
|-<br />
| 31-16<br />
| CTR or payload data blocks to process (1 block = 4 words)<br />
|}<br />
<br />
== REG_AESKEY0/1/2/3 ==<br />
{| class="wikitable" border="1"<br />
! BYTE<br />
! DESCRIPTION<br />
|-<br />
| 0-15<br />
| Key data<br />
|-<br />
| 16-31<br />
| Special key data X<br />
|-<br />
| 32-47<br />
| Special key data Y<br />
|}<br />
<br />
<br />
Key gets updated when either the last word of the key data or the last word of "special key data y" is written. When writing to special key data the actual key is F((key data x) xor (key data y)) where F is some unkown function implemented in hardware.<br />
<br />
<br />
== AES CCM mode (Counter with CBC-MAC) ==<br />
AES CCM mode combines AES CTR with AES CBC-MAC, to provide confidentiality and authenticity of a message.<br />
<br />
The message contains optional associated data and an actual payload. The payload is XORed with an AES CTR generated stream, while AES CBC-MAC is used to generate a MAC based on both the associated data and the payload. The MAC can be used to verify integrity of the message. In addition, a nonce is used to initialize the AES CTR and CBC-MAC modes of operation. <br />
<br />
More information can be found in NIST 800-38C or RFC 3610.<br />
<br />
The used MAC size can be adjusted in hardware, but usually a MAC size of 16 bytes is used. The hardware has a hardcoded maximum payload size of 24 bits for CCM, and this automatically means the nonce is 12 bytes. <br />
<br />
When encrypting or decrypting, the first 12 bytes of REG_AESCTR are used for the nonce. The actual counter used is defined in NIST 800-38C, and looks like this: (02 <nonce> 00 00 00). The last 3 bytes are the counter and is incremented for each subsequent AES CTR operation. The first block for AES CBC-MAC is also defined in NIST 800-38C, and looks like this: (<flags> <nonce> <payloadsize>), where flags is (0 <adata> <m> <q>), where adata is 1 or 0 if associated data is used, m the encoded mac size, and q the sizebytes (always 2).<br />
<br />
== CCM hardware encryption ==<br />
First, the optional associated data is written to the write fifo. During this time, the hardware will internally update the MAC with the associated data. If no associated data is used, this step can be skipped.<br />
Then, the actual payload is written to the write fifo. The crypted payload will appear in the read fifo, and during this time the MAC will be internally updated with the payload data.<br />
Once all blocks are done, the MAC can be read from the read fifo. The hardware knows when this is because the number of associated blocks and payload blocks are specified in REG_AESBLKCNT.<br />
<br />
== CCM hardware decryption ==<br />
It is possible to let the hardware use the dedicated MAC slot in REG_AESMAC or from the write fifo for verification. This option depends on bit 20 of REG_AESCNT.<br />
Like encryption, first the optional associated data is written to the write fifo. Then the actual payload is written to the write fifo, and the crypted payload will appear in the read fifo. If using the dedicated MAC slot, the hardware will now verify whether the MAC matches. Otherwise, the MAC must be supplied into the write fifo for verification.</div>Ludo6431https://dsibrew.org/w/index.php?title=DSi_Enhanced_Games&diff=2471DSi Enhanced Games2009-11-30T08:23:58Z<p>Ludo6431: format</p>
<hr />
<div>DSi Enhanced Games are games for all versions the Nintendo DS that act normally on a DS Phat or DS Lite but when the game is run in a DSi will have access to the DSi hardware (Such as the extra RAM and most commenly cameras).<br />
<br />
So far thhough the DSi sections of the games have not been put into a ROM (As with the first DSi Exclusive Game, Monster Finder). So how the game detects the DSi and uses the extra features is not know<br />
<br />
'''DSi Enhanced Exploits[[DSi exploits]]'''<br />
<br />
The DSi Enhanced games have been used to make the DSi run custome code in DSi mode and the first DSi homebrew<br />
<br />
'''List of DSi Enhanced Games (As of 29th November 2009)'''<br />
{|<br />
|-<br />
!Name<br />
!Publisher<br />
|-<br />
|My Healthy Cooking Coach<br />
|Ubisoft<br />
|-<br />
|Classic Word Games<br />
|Ubisoft<br />
|-<br />
|THE iDOLM@STER: Dearly Stars<br />
|Namco<br />
|-<br />
|Imagine Journalist<br />
|Ubisoft<br />
|-<br />
|The Biggest Loser<br />
|THQ<br />
|-<br />
|Dolphin Island Underwater Adventures<br />
|Ubisoft<br />
|-<br />
|Imagine Rescue Vet<br />
|Ubisoft<br />
|-<br />
|Rabbids Go Home<br />
|Ubisoft<br />
|-<br />
|Girls Life: Fashion Addict<br />
|Ubisoft<br />
|-<br />
|Girls Life: Make Over<br />
|Ubisoft<br />
|-<br />
|Women's Murder Club: Games of Passion<br />
|THQ<br />
|-<br />
|Assassin's Creed II: Discovery<br />
|Ubisoft<br />
|-<br />
|Style Lab: Jewelry Design<br />
|Ubisoft<br />
|}</div>Ludo6431https://dsibrew.org/w/index.php?title=User:Ludo6431&diff=2294User:Ludo64312009-09-09T11:03:23Z<p>Ludo6431: </p>
<hr />
<div>Hello, i'm a french DS C coder.<br />
<br />
{{Userboxtop}}<br />
{{Userbox DS Lite|1}}<br />
{{Userbox DSi|1}}<br />
{{Userbox system menu|1.4}}<br />
{{Userboxbottom}}</div>Ludo6431https://dsibrew.org/w/index.php?title=User:Remark/dec-flipbook.c&diff=1990User:Remark/dec-flipbook.c2009-08-15T23:41:36Z<p>Ludo6431: </p>
<hr />
<div><source lang="c"><br />
// dec_flipbook<br />
// written by remark<br />
// thanks to steven & ludo<br />
<br />
#include <stdio.h><br />
#include <stdlib.h><br />
<br />
char key [0x40] = {<br />
0xF7, 0x4C, 0x6A, 0x3A, 0xFB, 0x82, 0xA6, 0x37, 0x6E, 0x11, 0x38, 0xCF, 0xA0, 0xDD, 0x85, 0xC0,<br />
0xC7, 0x9B, 0xC4, 0xD8, 0xDD, 0x28, 0x8A, 0x87, 0x53, 0x20, 0xEE, 0xE0, 0x0B, 0xEB, 0x43, 0xA0,<br />
0xDB, 0x55, 0x0F, 0x75, 0x36, 0x37, 0xEB, 0x35, 0x6A, 0x34, 0x7F, 0xB5, 0x0F, 0x99, 0xF7, 0xEF,<br />
0x43, 0x25, 0xCE, 0xA0, 0x29, 0x46, 0xD9, 0xD4, 0x4D, 0xBB, 0x04, 0x66, 0x68, 0x08, 0xF1, 0xF8<br />
};<br />
<br />
#define ERR(x ...) { printf(x); exit(1); }<br />
#define PERR(x) { perror(x); exit(1); }<br />
<br />
int fsize(FILE *f)<br />
{<br />
int pos = ftell (f);<br />
fseek (f, 0, SEEK_END);<br />
int end = ftell (f);<br />
fseek (f, pos, SEEK_SET);<br />
return end;<br />
}<br />
<br />
<br />
int main(int argc, char* argv[])<br />
{<br />
if(argc != 3)<br />
{<br />
printf("usage: %s <file_in> <file_out>\n", argv[0]);<br />
return 0;<br />
}<br />
<br />
FILE* f = fopen(argv[1], "rb");<br />
if(!f)<br />
PERR("fopen");<br />
<br />
int len = fsize(f);<br />
char* buf = malloc(len);<br />
if(!buf)<br />
{<br />
fclose(f);<br />
PERR("malloc");<br />
}<br />
<br />
if(fread(buf,len,1,f) != 1)<br />
{<br />
fclose(f);<br />
free(buf);<br />
PERR("fread");<br />
}<br />
<br />
int i;<br />
for(i=0; i<len; i++)<br />
{<br />
buf[i] ^= key[i%0x40];<br />
}<br />
<br />
FILE* fout = fopen(argv[2], "wb+");<br />
if(!fout) <br />
{<br />
fclose(f);<br />
free(buf);<br />
PERR("fopen");<br />
}<br />
<br />
if(fwrite(buf, len, 1, fout) != 1)<br />
{<br />
fclose(f);<br />
free(buf);<br />
fclose(fout);<br />
PERR("fwrite");<br />
}<br />
<br />
free(buf);<br />
fclose(f);<br />
fclose(fout);<br />
<br />
return 0;<br />
}<br />
</source></div>Ludo6431https://dsibrew.org/w/index.php?title=Talk:Nintendo_DS_Cart_Whitelist&diff=1842Talk:Nintendo DS Cart Whitelist2009-08-05T19:59:07Z<p>Ludo6431: /* C representations */</p>
<hr />
<div>== C representations ==<br />
typedef struct {<br />
char ID[4]; // An ID<br />
unsigned char pad[0x80];<br />
unsigned long number; // number of titles<br />
} sHNHA_Header;<br />
<br />
typedef struct {<br />
char TID[4]; // Title ID<br />
unsigned long ver; // Title version<br />
unsigned char SHA[2][20]; // the two SHA-1 sums<br />
} sHNHA_Title;<br />
<br />
typedef struct {<br />
unsigned char pad[0x18];<br />
} sHNHA_Footer;<br />
--[[User:Ludo6431|Ludo6431]] 19:59, 5 August 2009 (UTC)<br />
<br />
== C dumper ==<br />
void myprint(char *format, unsigned char *data, size_t datasize) {<br />
while(datasize--)<br />
printf(format, (unsigned char)*data++);<br />
}<br />
<br />
int main(int argc, char *argv[]) {<br />
if(argc!=2) exit(1);<br />
<br />
FILE *fd=fopen(argv[1], "rb");<br />
if(!fd) exit(1);<br />
<br />
sHNHA_Header header;<br />
sHNHA_Title title;<br />
sHNHA_Footer footer;<br />
<br />
fread(&header, 1, 0x88, fd); // read the header<br />
printf("\nnumber of titles : %d", header.number);<br />
<br />
size_t count=header.number;<br />
while(count--) { // read each title<br />
fread(&title, 1, sizeof(sHNHA_Title), fd);<br />
<br />
printf("\nTID=");<br />
myprint("%c", title.TID, 4);<br />
printf("\nver=%d", title.version);<br />
printf("\nSHA=");<br />
myprint("%02X", title.SHA[0], 20);<br />
printf("\nSHA=");<br />
myprint("%02X", title.SHA[1], 20);<br />
}<br />
<br />
fread(&footer, 1, sizeof(sHNHA_Footer), fd); // read the footer<br />
<br />
if(fgetc(fd)!=EOF) printf("error");<br />
<br />
fclose(fd);<br />
}<br />
--[[User:Ludo6431|Ludo6431]] 19:24, 5 August 2009 (UTC)</div>Ludo6431https://dsibrew.org/w/index.php?title=Nintendo_DS_Cart_Whitelist&diff=1841Nintendo DS Cart Whitelist2009-08-05T19:57:37Z<p>Ludo6431: a footer</p>
<hr />
<div>== Description ==<br />
If i remember correctly, HNHA.bin is a file stored in the DSi (NAND fs ?), that contains a list of white listed DS games.<br />
<br />
== Basic HNHA.bin File Structure ==<br />
<br />
The file consists in one header, a list of Titles and a footer.<br />
<br />
=== Header Structure ===<br />
The header is 136 bytes.<br />
{| class="wikitable"<br />
|- style="background-color: #ddd;"<br />
! Start<br />
! Length<br />
! Description<br />
|-<br />
| 0x00<br />
| 4<br />
| An ID (NDHT)<br />
|-<br />
| 0x04<br />
| 0x80<br />
| Unknown<br />
|-<br />
| 0x84<br />
| 4<br />
| Number of titles in file<br />
|}<br />
<br />
=== Title Structure ===<br />
A title is 48 bytes.<br />
{| class="wikitable"<br />
|- style="background-color: #ddd;"<br />
! Start<br />
! Length<br />
! Description<br />
|-<br />
| 0x00<br />
| 4<br />
| The title ID<br />
|-<br />
| 0x04<br />
| 4<br />
| The title version<br />
|-<br />
| 0x08<br />
| 20<br />
| The first SHA-1 sum<br />
|-<br />
| 0x1C<br />
| 20<br />
| The second SHA-1 sum<br />
|}<br />
<br />
=== Footer Structure ===<br />
The footer is 24 bytes.<br />
{| class="wikitable"<br />
|- style="background-color: #ddd;"<br />
! Start<br />
! Length<br />
! Description<br />
|-<br />
| 0x00<br />
| 24<br />
| Unknown<br />
|}</div>Ludo6431https://dsibrew.org/w/index.php?title=Talk:Nintendo_DS_Cart_Whitelist&diff=1840Talk:Nintendo DS Cart Whitelist2009-08-05T19:56:54Z<p>Ludo6431: a footer</p>
<hr />
<div>== C representations ==<br />
typedef struct {<br />
char ID[4]; // An ID<br />
unsigned char pad[0x84];<br />
} sHNHA_Header;<br />
<br />
typedef struct {<br />
char TID[4]; // Title ID<br />
unsigned long ver; // Title version<br />
unsigned char SHA[2][20]; // the two SHA-1 sums<br />
} sHNHA_Title;<br />
<br />
typedef struct {<br />
unsigned char pad[0x18];<br />
} sHNHA_Footer;<br />
--[[User:Ludo6431|Ludo6431]] 19:56, 5 August 2009 (UTC)<br />
<br />
== C dumper ==<br />
void myprint(char *format, unsigned char *data, size_t datasize) {<br />
while(datasize--)<br />
printf(format, (unsigned char)*data++);<br />
}<br />
<br />
int main(int argc, char *argv[]) {<br />
if(argc!=2) exit(1);<br />
<br />
FILE *fd=fopen(argv[1], "rb");<br />
if(!fd) exit(1);<br />
<br />
sHNHA_Header header;<br />
sHNHA_Title title;<br />
sHNHA_Footer footer;<br />
<br />
fread(&header, 1, 0x88, fd); // read the header<br />
printf("\nnumber of titles : %d", header.number);<br />
<br />
size_t count=header.number;<br />
while(count--) { // read each title<br />
fread(&title, 1, sizeof(sHNHA_Title), fd);<br />
<br />
printf("\nTID=");<br />
myprint("%c", title.TID, 4);<br />
printf("\nver=%d", title.version);<br />
printf("\nSHA=");<br />
myprint("%02X", title.SHA[0], 20);<br />
printf("\nSHA=");<br />
myprint("%02X", title.SHA[1], 20);<br />
}<br />
<br />
fread(&footer, 1, sizeof(sHNHA_Footer), fd); // read the footer<br />
<br />
if(fgetc(fd)!=EOF) printf("error");<br />
<br />
fclose(fd);<br />
}<br />
--[[User:Ludo6431|Ludo6431]] 19:24, 5 August 2009 (UTC)</div>Ludo6431https://dsibrew.org/w/index.php?title=Nintendo_DS_Cart_Whitelist&diff=1839Nintendo DS Cart Whitelist2009-08-05T19:37:03Z<p>Ludo6431: number of titles</p>
<hr />
<div>== Description ==<br />
If i remember correctly, HNHA.bin is a file stored in the DSi (NAND fs ?), that contains a list of white listed DS games.<br />
<br />
== Basic HNHA.bin File Structure ==<br />
<br />
The file consists in one header (0x88 bytes) and in a list of Titles.<br />
<br />
=== Header Structure ===<br />
{| class="wikitable"<br />
|- style="background-color: #ddd;"<br />
! Start<br />
! Length<br />
! Description<br />
|-<br />
| 0x00<br />
| 4<br />
| An ID (NDHT)<br />
|-<br />
| 0x04<br />
| 0x80<br />
| Unknown<br />
|-<br />
| 0x84<br />
| 0x04<br />
| Number of titles in file<br />
|}<br />
<br />
<br />
=== Title Structure ===<br />
{| class="wikitable"<br />
|- style="background-color: #ddd;"<br />
! Start<br />
! Length<br />
! Description<br />
|-<br />
| 0x00<br />
| 4<br />
| The title ID<br />
|-<br />
| 0x04<br />
| 4<br />
| The title version<br />
|-<br />
| 0x08<br />
| 20<br />
| The first SHA-1 sum<br />
|-<br />
| 0x1C<br />
| 20<br />
| The second SHA-1 sum<br />
|}</div>Ludo6431https://dsibrew.org/w/index.php?title=Talk:Nintendo_DS_Cart_Whitelist&diff=1838Talk:Nintendo DS Cart Whitelist2009-08-05T19:24:39Z<p>Ludo6431: New page: == C representations == typedef struct { char ID[4]; // An ID unsigned char pad[0x84]; } sHNHA_Header; typedef struct { char TID[4]; // Title ID unsigned long ver; // Title ver...</p>
<hr />
<div>== C representations ==<br />
typedef struct {<br />
char ID[4]; // An ID<br />
unsigned char pad[0x84];<br />
} sHNHA_Header;<br />
<br />
typedef struct {<br />
char TID[4]; // Title ID<br />
unsigned long ver; // Title version<br />
unsigned char SHA[2][20]; // the two SHA-1 sums<br />
} sHNHA_Title;<br />
--[[User:Ludo6431|Ludo6431]] 19:24, 5 August 2009 (UTC)<br />
<br />
== C dumper ==<br />
void myprint(char *format, unsigned char *data, size_t datasize) {<br />
while(datasize--)<br />
printf(format, (unsigned char)*data++);<br />
}<br />
<br />
int main(int argc, char *argv[]) {<br />
if(argc!=2) exit(1);<br />
<br />
FILE *fd=fopen(argv[1], "rb");<br />
if(!fd) exit(1);<br />
<br />
sHNHA_Header header;<br />
sHNHA_Title title;<br />
<br />
fread(&header, 1, 0x88, fd); // read the header<br />
<br />
while(fread(&title, 1, 48, fd)==48) { // read each title<br />
printf("\nTID=");<br />
myprint("%c", title.TID, 4);<br />
printf("\nver=%d", title.version);<br />
printf("\nSHA=");<br />
myprint("%02X", title.SHA[0], 20);<br />
printf("\nSHA=");<br />
myprint("%02X", title.SHA[1], 20);<br />
}<br />
<br />
fclose(fd);<br />
}<br />
--[[User:Ludo6431|Ludo6431]] 19:24, 5 August 2009 (UTC)</div>Ludo6431https://dsibrew.org/w/index.php?title=Nintendo_DS_Cart_Whitelist&diff=1837Nintendo DS Cart Whitelist2009-08-05T19:24:26Z<p>Ludo6431: HNHA.bin</p>
<hr />
<div>== Description ==<br />
If i remember correctly, HNHA.bin is a file stored in the DSi (NAND fs ?), that contains a list of white listed DS games.<br />
<br />
== Basic HNHA.bin File Structure ==<br />
<br />
The file consists in one header (0x88 bytes) and in a list of Titles.<br />
<br />
=== Header Structure ===<br />
{| class="wikitable"<br />
|- style="background-color: #ddd;"<br />
! Start<br />
! Length<br />
! Description<br />
|-<br />
| 0x00<br />
| 4<br />
| An ID (NDHT)<br />
|-<br />
| 0x04<br />
| 0x84<br />
| Unknown<br />
|}<br />
<br />
<br />
=== Title Structure ===<br />
{| class="wikitable"<br />
|- style="background-color: #ddd;"<br />
! Start<br />
! Length<br />
! Description<br />
|-<br />
| 0x00<br />
| 4<br />
| The title ID<br />
|-<br />
| 0x04<br />
| 4<br />
| The title version<br />
|-<br />
| 0x08<br />
| 20<br />
| The first SHA-1 sum<br />
|-<br />
| 0x1C<br />
| 20<br />
| The second SHA-1 sum<br />
|}</div>Ludo6431https://dsibrew.org/w/index.php?title=DSiBrew:News/Archive&diff=1632DSiBrew:News/Archive2009-07-09T15:18:10Z<p>Ludo6431: only 4 items</p>
<hr />
<div>*'''12 April 09:''' A [[DSiBrew:Contests|DSiBrew logo]] contest has started.<br />
*'''5 April 09:''' The Nintendo DSi has been released in North America.<br />
*'''3 April 09:''' Nintendo has released [[System Update 1.3]]. DSi Shop is accessible. All DSi flashcarts still work. Added a button to start DSi Camera application when pressing L or R.<br />
*'''3 April 09:''' The Nintendo DSi has been released in Europe.<br />
*'''2 April 09:''' The Nintendo DSi has been released in Australia.<br />
*'''19 February 09:''' [http://nintendo.co.uk/NOE/en_GB/news/2008/nintendo_dsi_arrives_in_europe_on_3_april_2009_11627.html Nintendo of Europe] and [http://www.nintendo.com/whatsnew/detail/Q5D4ti_bPqJO_I0Oup0AMFudaUOLz6C7 Nintendo of America] have announced that the DSi will be released on April 3 in Europe and April 5 in North America.<br />
* '''25 January 09 ''': [[User:Bushing|Bushing]] from [http://www.hackmii.com Hackmii] created this wiki as a spinoff of the [http://wiibrew.org/wiki/Main_Page WiiBrew wiki].</div>Ludo6431https://dsibrew.org/w/index.php?title=DSiBrew_talk:Contests&diff=1597DSiBrew talk:Contests2009-07-05T13:15:08Z<p>Ludo6431: /* Votes */</p>
<hr />
<div>== contest? ==<br />
So how do we make this a contest? should people come here to vote? --[[User:Funkamatic|<font face="Copperplate Gothic Light"><font color="red">FUNK<font color="black">A</font>MATIC</font></font>]][[User talk:Funkamatic|<font face="Impact"><font color="black"> ~talk</font></font>]] 15:36, 14 April 2009 (UTC)<br />
: There should be a deadline set for entries first. {{:User:Nintend06/sig}} 17:41, 14 April 2009 (UTC)<br />
:: Agreed. When we do vote, should people just leave their vote in comment form here? I don't know if there is any way to make a poll in wiki.--[[User:Funkamatic|<font face="Copperplate Gothic Light"><font color="red">FUNK<font color="black">A</font>MATIC</font></font>]][[User talk:Funkamatic|<font face="Impact"><font color="black"> ~talk</font></font>]] 17:19, 15 April 2009 (UTC)<br />
::: People can, in theory, change other people's votes on a wiki. When tallying votes, they could check the page history to be sure, but that sounds like too much trouble. {{:User:Nintend06/sig}} 17:35, 15 April 2009 (UTC)<br />
:::: Just have a table like wikipedia. [[User:Muzer|Muzer]] 17:41, 15 April 2009 (UTC)<br />
::::: I never said it wasn't doable; just that voting on a wiki isn't the best way to do things. If there's a forum like WiiBrew's, setting up a poll there would probably be the best way to vote. There needs to be a deadline first, though. {{:User:Nintend06/sig}} 18:12, 16 April 2009 (UTC)<br />
:::::: If any one wants i could build a small voting script but it will be very basic and i wont be using a db so if someone clears there cookies then they can alter the results to there liking [[User:Thetooth|Thetooth]] 21:37, 18 April 2009 (UTC)<br />
:::::: '''Update:''' I have modifyed a script to be used as voting it is secure and will work perfectly! if you want it please send mail to thetooth@ameoto.com and i'll send it with instuctions on how to use. [[User:Thetooth|Thetooth]] 10:52, 19 April 2009 (UTC)<br />
:: so anybody knows when will the contest end? [[User:Moonhack|Moonhack]] 13:29, 20 April 2009 (UTC)<br />
:::The contest should close on May 12, exactly 1 month after the contest began. As for the voting, the poll will take place on a wikipage that I set up. More details will come when the contest closes. <tt>--[[User:Blooper4912|<font style="color:#FF6C0A;">'''Blooper'''</font>]] [[User talk:Blooper4912|<font style="color:black;"><small>(Talk)</small></font>]]</tt> 01:52, 21 April 2009 (UTC)<br />
::::Uhhhh, so the contest ended 2 days ago? I think we should warn people a few days before the contest ends. In addition to that, the method that we're voting should be announced.--[[User:Funkamatic|<font face="Copperplate Gothic Light"><font color="red">FUNK<font color="black">A</font>MATIC</font></font>]][[User talk:Funkamatic|<font face="Impact"><font color="black"> ~talk</font></font>]] 08:52, 14 May 2009 (UTC)<br />
:::Obviously noone does really care about this wiki. Not even the administrators. --[[User:Makorus|Makorus]] 07:58, 16 May 2009 (UTC)<br />
::::Correction: Nobody does really care about this competition, not even the administrators. [[User:Muzer|Muzer]] 09:10, 17 May 2009 (UTC)<br />
:::::Let's just take the one by albertoi or Moonhack (if you like Wiibrew-style) for now, would always be better than that crappy steaming pot... :P --[[User:BlackNeedle|BlackNeedle]] 19:38, 17 May 2009 (UTC)<br />
<br />
this site currently = FAIL.... but i hope that changes, like when some of the admins come decide what to do with this contest.<br />
--[[User:ChuckBartowski|ChuckBartowski]] 02:47, 18 May 2009 (UTC)<br />
<br />
<br />
== Vote ==<br />
Alright, how do we vote now?--[[User:Funkamatic|<font face="Copperplate Gothic Light"><font color="red">FUNK<font color="black">A</font>MATIC</font></font>]][[User talk:Funkamatic|<font face="Impact"><font color="black"> ~talk</font></font>]] 01:34, 30 May 2009 (UTC)<br />
<br />
== So... ==<br />
Whose logo will be used? --[[User:Bg4545|bg4545]] 03:43, 9 June 2009 (UTC)<br />
:Yeah, whose logo? --[[User:Moonhack|Moonhack]] Around 12, 14 June 2009 (UTC)<br />
::Why, of course the one with the most votes... Wait, did you just say we never did vote? :P --[[User:BlackNeedle|BlackNeedle]] 16:20, 15 June 2009 (UTC)<br />
<br />
== Voting time! ==<br />
<br />
Okay, here's the deal. '''Review all the logos on the [[DSiBrew:Contests|contest page]]. You can vote for as many logos as you like. Please copy the template below and add your vote to the end of the ''Votes'' section.''' At the end of the voting period, the logo with the strongest support will be chosen. The administrators reserve the right to reject a logo for any reason, even if it is in the lead.<br />
<br />
=== The template ===<br />
Please copy this in it's entirety (replacing what's inside the gallery tags, obviously), including the squiggles at the bottom (that's your signature).<br />
<br />
<pre><br />
<gallery><br />
Image:logo.png | Author<br />
Image:anotherlogo.jpg | Another author<br />
Image:etc.gif | And so on...<br />
</gallery><br />
--~~~~<br />
<br />
</pre><br />
<br />
=== Discussion ===<br />
Discuss the voting here.<br />
<br />
=== Vote example ===<br />
<gallery><br />
Image:Dsibrew.jpg | [[User:Mha|Mha]]<br />
</gallery><br />
--<tt>--[[User:Blooper4912|<font style="color:#FF6C0A;">'''Blooper'''</font>]] [[User talk:Blooper4912|<font style="color:black;"><small>(Talk)</small></font>]]</tt> 18:55, 25 June 2009 (UTC)<br />
<br />
=== Votes ===<br />
<gallery><br />
Image:DSi_brew_logo_thetooth.png | [[User:Thetooth|Thetooth]]<br />
Image:NDSiBrew1.png | [[User:Dvdhn|dvdhn]] (me)<br />
</gallery><br />
--[[User:Dvdhn|dvdhn]] 12:07, 4 July 2009 (UTC)<br />
<br />
<gallery><br />
Image:Dsi.png | [[User:Bg4545|bg4545]] (me)<br />
Image:Bg4545dsibrewlogo2white.png | [[User:Bg4545|bg4545]] (me)<br />
Image:Bg4545dsibrewlogo2black.png | [[User:Bg4545|bg4545]] (me)<br />
Image:NDSiBrew1.png | [[User:Dvdhn|dvdhn]]<br />
</gallery><br />
--[[User:Bg4545|bg4545]] 00:39, 26 June 2009 (UTC)<br />
<br />
<gallery><br />
Image:Dsibrew-logo.png | [[User:Makorus|Makorus]] (me)<br />
Image:Dsibrew-logo2a.png | [[User:Makorus|Makorus]] (me)<br />
Image:DSi_brew_logo_thetooth.png | [[User:Thetooth|Thetooth]]<br />
</gallery><br />
--[[User:Makorus|Makorus]] 16:21, 26 June 2009 (UTC)<br />
<br />
<gallery><br />
Image:Dsibrew.png | [[User:Mvit|Mvit]]<br />
</gallery><br />
--this mug one is the best [[User:Funkamatic|<font face="Copperplate Gothic Light"><font color="red">FUNK<font color="black">A</font>MATIC</font></font>]][[User talk:Funkamatic|<font face="Impact"><font color="black"> ~talk</font></font>]] 16:36, 26 June 2009 (UTC)<br />
<br />
<gallery><br />
Image:NDSiBrew1.png | [[User:Dvdhn|dvdhn]]<br />
</gallery><br />
Beautiful. --[[User:Zack|Zack]] 19:38, 26 June 2009 (UTC)<br />
<br />
<gallery><br />
Image:NDSiBrew1.png | [[User:Dvdhn|dvdhn]]<br />
</gallery><br />
I Like this one. --[[User:Remadon|Remadon]] 5:48, 3 July 2009 (UTC)<br />
<br />
<gallery><br />
Image:NDSiBrew1.png | [[User:Dvdhn|dvdhn]]<br />
</gallery><br />
--[[User:Heecrak|Heecrak]] 21:23, 26 June 2009 (UTC)<br />
<br />
<gallery><br />
Image:DSi_brew_logo_thetooth.png | [[User:Thetooth|Thetooth]]<br />
Image:Dsibrew.png | [[User:Mvit|Mvit]]<br />
Image:NDSiBrew1.png | [[User:Dvdhn|dvdhn]]<br />
Image:Dsi.png | [[User:Bg4545|Bg4545]]<br />
</gallery><br />
--[[User:Ludo6431|Ludo6431]] 00:14, 27 June 2009 (UTC)<br />
<br />
<gallery><br />
Image:Dsibrew.png | [[User:Mvit|Mvit]]<br />
</gallery><br />
UBER [[TwoBladedKnight|TwoBladedKnight]] 08:24, 29 June 2009 (UTC)<br />
<br />
<gallery><br />
Image:Dsibrew.png | [[User:Mvit|Mvit]]<br />
</gallery><br />
--[[User:Siestacat|Siestacat]] 22:16, 30 June 2009 (UTC)<br />
<br />
<gallery><br />
Image:Dsibrew1_Moonhack.png | [[User:Moonhack|Moonhack]]<br />
</gallery><br />
--[[User:Moonhack|Moonhack]] 15:22, 2 July 2009 (UTC)<br />
<br />
<gallery><br />
Image:NDSiBrew3NE.png | [[User:dvdhn|dvdhn]]<br />
</gallery><br />
--[[User:Tabibito|Tabibito]] 06:05, 3 July 2009 (UTC)<br />
<br />
<gallery><br />
Image:Dsibrew.png | [[User:Mvit|Mvit]]<br />
</gallery><br />
Epic image is epic. --[[User:SquidMan|SquidMan]] 06:18, 3 July 2009 (UTC)<br />
<gallery><br />
Image:Dsibrew1_Moonhack.png | [[User:Moonhack|Moonhack]]<br />
Image:TwilightW DSi Logo 3.png | [[User:TwilightW|Twilight W]]<br />
</gallery><br />
--[[User:TwilightW|TwilightW]] 20:31, 3 July 2009 (BST)<br />
<gallery><br />
Image:Dsibrew final.png | [[User:albertoi|albertoi]]<br />
Image:F Dsibrew.png | [[User:Ferrie|Ferrie]]<br />
Image:Nintendolinksilver2.png | [[User:Linksilver|Linksilver]]<br />
</gallery><br />
--[[User:Arikado|Arikado]] 19:42, 3 July 2009 (UTC)<br />
<gallery><br />
Image:Dsit3.png | [[User:Danielbr|Danielbr]]<br />
Image:Grass.png | [[User:Andaimaru|Andaimaru]]<br />
</gallery><br />
--[[User:Winmaster|Winmaster]] 01:52, 4 July 2009 (UTC)<br />
<gallery><br />
Image:DSi_brew_logo_thetooth.png | [[User:Thetooth|Thetooth]]<br />
Image:NDSiBrew1.png | [[User:dvdhn|dvdhn]] (second revision)<br />
Image:Dsibrew.png | [[User:Mvit|Mvit]]<br />
</gallery><br />
--[[User:Acwwh|Acwwh]] 22:37, 4 July 2009 (EST)<br />
<gallery><br />
Image:DSibrew logo.jpg | [[User:Ndoll1|Ndoll1]]<br />
Image:NDSiBrew1.png | [[User:dvdhn|dvdhn]]<br />
</gallery><br />
--[[User:Ndoll1|Ndoll1]] 09:30, 4 July 2009 (UTC)<br />
<gallery><br />
Image:Dsibrew final.png | [[User:albertoi|albertoi]]<br />
Image:NDSiBrew1.png | [[User:dvdhn|dvdhn]]<br />
</gallery><br />
--[[User:Da-Bomb1|Da-Bomb1]] 15:42, 4 July 2009 (PST)<br />
<br />
<gallery><br />
Image:Dsibrew1_Moonhack.png | [[User:Moonhack|Moonhack]]<br />
Image:Dsi.png | [[User:Bg4545|Bg4545]] <br />
Image:Hbcdsi.png | [[User:iBrew|iBrew]]<br />
Image:Dsibrew.png | [[User:Mvit|Mvit]]<br />
</gallery><br />
--[[User:Pkmn789123|Pkmn789123]] 23:58, 4 July 2009 (UTC)</div>Ludo6431https://dsibrew.org/w/index.php?title=DSiBrew_talk:Contests&diff=1561DSiBrew talk:Contests2009-06-27T00:14:59Z<p>Ludo6431: /* Votes */ My vote</p>
<hr />
<div>== contest? ==<br />
So how do we make this a contest? should people come here to vote? --[[User:Funkamatic|<font face="Copperplate Gothic Light"><font color="red">FUNK<font color="black">A</font>MATIC</font></font>]][[User talk:Funkamatic|<font face="Impact"><font color="black"> ~talk</font></font>]] 15:36, 14 April 2009 (UTC)<br />
: There should be a deadline set for entries first. {{:User:Nintend06/sig}} 17:41, 14 April 2009 (UTC)<br />
:: Agreed. When we do vote, should people just leave their vote in comment form here? I don't know if there is any way to make a poll in wiki.--[[User:Funkamatic|<font face="Copperplate Gothic Light"><font color="red">FUNK<font color="black">A</font>MATIC</font></font>]][[User talk:Funkamatic|<font face="Impact"><font color="black"> ~talk</font></font>]] 17:19, 15 April 2009 (UTC)<br />
::: People can, in theory, change other people's votes on a wiki. When tallying votes, they could check the page history to be sure, but that sounds like too much trouble. {{:User:Nintend06/sig}} 17:35, 15 April 2009 (UTC)<br />
:::: Just have a table like wikipedia. [[User:Muzer|Muzer]] 17:41, 15 April 2009 (UTC)<br />
::::: I never said it wasn't doable; just that voting on a wiki isn't the best way to do things. If there's a forum like WiiBrew's, setting up a poll there would probably be the best way to vote. There needs to be a deadline first, though. {{:User:Nintend06/sig}} 18:12, 16 April 2009 (UTC)<br />
:::::: If any one wants i could build a small voting script but it will be very basic and i wont be using a db so if someone clears there cookies then they can alter the results to there liking [[User:Thetooth|Thetooth]] 21:37, 18 April 2009 (UTC)<br />
:::::: '''Update:''' I have modifyed a script to be used as voting it is secure and will work perfectly! if you want it please send mail to thetooth@ameoto.com and i'll send it with instuctions on how to use. [[User:Thetooth|Thetooth]] 10:52, 19 April 2009 (UTC)<br />
:: so anybody knows when will the contest end? [[User:Moonhack|Moonhack]] 13:29, 20 April 2009 (UTC)<br />
:::The contest should close on May 12, exactly 1 month after the contest began. As for the voting, the poll will take place on a wikipage that I set up. More details will come when the contest closes. <tt>--[[User:Blooper4912|<font style="color:#FF6C0A;">'''Blooper'''</font>]] [[User talk:Blooper4912|<font style="color:black;"><small>(Talk)</small></font>]]</tt> 01:52, 21 April 2009 (UTC)<br />
::::Uhhhh, so the contest ended 2 days ago? I think we should warn people a few days before the contest ends. In addition to that, the method that we're voting should be announced.--[[User:Funkamatic|<font face="Copperplate Gothic Light"><font color="red">FUNK<font color="black">A</font>MATIC</font></font>]][[User talk:Funkamatic|<font face="Impact"><font color="black"> ~talk</font></font>]] 08:52, 14 May 2009 (UTC)<br />
:::Obviously noone does really care about this wiki. Not even the administrators. --[[User:Makorus|Makorus]] 07:58, 16 May 2009 (UTC)<br />
::::Correction: Nobody does really care about this competition, not even the administrators. [[User:Muzer|Muzer]] 09:10, 17 May 2009 (UTC)<br />
:::::Let's just take the one by albertoi or Moonhack (if you like Wiibrew-style) for now, would always be better than that crappy steaming pot... :P --[[User:BlackNeedle|BlackNeedle]] 19:38, 17 May 2009 (UTC)<br />
<br />
this site currently = FAIL.... but i hope that changes, like when some of the admins come decide what to do with this contest.<br />
--[[User:ChuckBartowski|ChuckBartowski]] 02:47, 18 May 2009 (UTC)<br />
<br />
<br />
== Vote ==<br />
Alright, how do we vote now?--[[User:Funkamatic|<font face="Copperplate Gothic Light"><font color="red">FUNK<font color="black">A</font>MATIC</font></font>]][[User talk:Funkamatic|<font face="Impact"><font color="black"> ~talk</font></font>]] 01:34, 30 May 2009 (UTC)<br />
<br />
== So... ==<br />
Whose logo will be used? --[[User:Bg4545|bg4545]] 03:43, 9 June 2009 (UTC)<br />
:Yeah, whose logo? --[[User:Moonhack|Moonhack]] Around 12, 14 June 2009 (UTC)<br />
::Why, of course the one with the most votes... Wait, did you just say we never did vote? :P --[[User:BlackNeedle|BlackNeedle]] 16:20, 15 June 2009 (UTC)<br />
<br />
== Voting time! ==<br />
<br />
Okay, here's the deal. '''You can vote for as many logos as you like. Please follow the template below and add your vote to the end of the ''Votes'' section.''' At the end of the voting period, the logo with the strongest support will be chosen. The administrators reserve the right to reject a logo for any reason, even if it is in the lead.<br />
<br />
=== The template ===<br />
Please copy this in it's entirety (replacing what's inside the gallery tags, obviously), including the squiggles at the bottom (that's your signature).<br />
<br />
<pre><br />
<gallery><br />
Image:logo.png | Author<br />
Image:anotherlogo.jpg | Another author<br />
Image:etc.gif | And so on...<br />
</gallery><br />
--~~~~<br />
<br />
</pre><br />
<br />
=== Discussion ===<br />
Discuss the voting here.<br />
<br />
=== Votes ===<br />
<gallery><br />
Image:Dsibrew.jpg | example<br />
</gallery><br />
--<tt>--[[User:Blooper4912|<font style="color:#FF6C0A;">'''Blooper'''</font>]] [[User talk:Blooper4912|<font style="color:black;"><small>(Talk)</small></font>]]</tt> 18:55, 25 June 2009 (UTC)<br />
<br />
<gallery><br />
Image:Dsi.png | [[User:Bg4545|bg4545]] (me)<br />
Image:Bg4545dsibrewlogo2white.png | [[User:Bg4545|bg4545]] (me)<br />
Image:Bg4545dsibrewlogo2black.png | [[User:Bg4545|bg4545]] (me)<br />
Image:NDSiBrew1.png | [[User:Dvdhn|dvdhn]]<br />
</gallery><br />
--[[User:Bg4545|bg4545]] 00:39, 26 June 2009 (UTC)<br />
<br />
<gallery><br />
Image:Dsibrew-logo.png | [[User:Makorus|Makorus]] (me)<br />
Image:Dsibrew-logo2a.png | [[User:Makorus|Makorus]] (me)<br />
Image:DSi_brew_logo_thetooth.png | [[User:Thetooth|Thetooth]]<br />
</gallery><br />
--[[User:Makorus|Makorus]] 16:21, 26 June 2009 (UTC)<br />
<br />
<gallery><br />
Image:Dsibrew.png | [[User:Mvit|Mvit]]<br />
</gallery><br />
--this mug one is the best [[User:Funkamatic|<font face="Copperplate Gothic Light"><font color="red">FUNK<font color="black">A</font>MATIC</font></font>]][[User talk:Funkamatic|<font face="Impact"><font color="black"> ~talk</font></font>]] 16:36, 26 June 2009 (UTC)<br />
<br />
<gallery><br />
Image:NDSiBrew1.png | [[User:Dvdhn|dvdhn]]<br />
</gallery><br />
Beautiful. --[[User:Zack|Zack]] 19:38, 26 June 2009 (UTC)<br />
<br />
<gallery><br />
Image:NDSiBrew1.png | [[User:Dvdhn|dvdhn]]<br />
</gallery><br />
--[[User:Heecrak|Heecrak]] 21:23, 26 June 2009 (UTC)<br />
<br />
<gallery><br />
Image:DSi_brew_logo_thetooth.png | [[User:Thetooth|Thetooth]]<br />
Image:Dsibrew.png | [[User:Mvit|Mvit]]<br />
Image:NDSiBrew1.png | [[User:Dvdhn|dvdhn]]<br />
Image:Dsi.png | [[User:Bg4545|Bg4545]]<br />
</gallery><br />
--[[User:Ludo6431|Ludo6431]] 00:14, 27 June 2009 (UTC)</div>Ludo6431https://dsibrew.org/w/index.php?title=User:Ludo6431&diff=1507User:Ludo64312009-06-17T18:54:24Z<p>Ludo6431: userboxes</p>
<hr />
<div>Hello, i'm a french DS C coder.<br />
<br />
{{Userboxtop}}<br />
{{Userbox DS Lite|1}}<br />
{{Userbox DSi|1}}<br />
{{Userboxbottom}}</div>Ludo6431https://dsibrew.org/w/index.php?title=DCIM/&diff=1260DCIM/2009-05-05T14:06:43Z<p>Ludo6431: thanks BooJoh</p>
<hr />
<div>All files/folders created on SD/SDHC from the DSi.<br />
<br />
Note that this directory layout is standard; see [http://en.wikipedia.org/wiki/DCIM Wikipedia's page on DCIM]<br />
<br />
[[SD Filesystem|< Return to /]]<br />
<br />
*[[???NIN02/]] : Contains photos copied to the SD<br />
<br />
??? represent a number (called N here) which begins with 100 and is incremented with 1 each 100 photos copied to the SD, each directory formed on this format contains the (N-100)*100+1 to (N-99)*100 photos named from HNI_0001.JPG to HNI_0100.JPG</div>Ludo6431https://dsibrew.org/w/index.php?title=Talk:DCIM/&diff=1259Talk:DCIM/2009-05-05T14:04:46Z<p>Ludo6431: </p>
<hr />
<div>who have photos on the 100NIN01/ directory ? --[[User:Ludo6431|Ludo6431]] 14:26, 25 April 2009 (UTC)<br />
<br />
The 100NIN01 folder is where the Wii stores pictures, such as from Animal Crossing or My Pokemon Ranch. I used the same SD card in my Wii and DSi for a bit and found that Wii pics were in the 100NIN01 folder and DSi photos were in the 100NIN02 folder.<br />
<br />
oh yeah !<br />
thanks :) --[[User:Ludo6431|Ludo6431]] 14:04, 5 May 2009 (UTC)</div>Ludo6431https://dsibrew.org/w/index.php?title=Icon.bin&diff=1216Icon.bin2009-04-27T11:16:00Z<p>Ludo6431: endianness</p>
<hr />
<div>These are the banners you'll see in various places in the [[System Menu]]. They have the dimension 32x32 pixels.<br />
<br />
[[Image:icon_1.gif]]<br />
[[Image:icon_2.gif]]<br />
[[Image:icon_3.gif]]<br />
[[Image:icon_4.gif]]<br />
[[Image:icon_5.gif]]<br />
<br />
These are converted by a tool bLAStY wrote. Icon files were supplied by loopy.<br />
<br />
== Basic File Structure ==<br />
{| class="wikitable"<br />
|- style="background-color: #ddd;"<br />
! Start<br />
! Length<br />
! Description<br />
|-<br />
| 0x0000<br />
| 2<br />
| File Version/Magic (should be 0x0103)<br />
|-<br />
| 0x0002<br />
| 2*4<br />
| 4 CRC checksums (polynominal 0xA001)<br />
|-<br />
| 0x000A<br />
| 22<br />
| Padding (00's)<br />
|-<br />
| 0x0020<br />
| 512<br />
| Default Bitmap<br />
|-<br />
| 0x0220<br />
| 32<br />
| Palette for above<br />
|-<br />
| 0x0240<br />
| 256*8<br />
| Application Title (in 8 languages), wide chars<br />
|-<br />
| 0x0A40<br />
| 2048<br />
| Padding (00's)<br />
|-<br />
| 0x1240<br />
| 512*8<br />
| 8 Bitmaps (for animation)<br />
|-<br />
| 0x2240<br />
| 32*8<br />
| 8 Palettes<br />
|-<br />
| 0x2340<br />
| 128<br />
| Animation Sequence<br />
|}<br />
Languages (in correct order) are: Japanese, English, French, German, Italian, Spanish, Unknown, Unknown.<br />
<br />
== Animation Sequence ==<br />
The sequence is represented by 2-byte tokens, in the following format (we're now talking bits, from left to right):<br />
{| class="wikitable"<br />
|- style="background-color: #ddd;"<br />
! Length<br />
! Description<br />
! Mask<br />
|-<br />
| 1<br />
| Flip Vertically<br />
| 0x8000<br />
|-<br />
| 1<br />
| Flip Horizontally<br />
| 0x4000<br />
|-<br />
| 3<br />
| Palette Index<br />
| 0x3800<br />
|-<br />
| 3<br />
| Bitmap Index<br />
| 0x0700<br />
|-<br />
| 8<br />
| Frame Duration (in frames (one frame = 1/60sec))<br />
| 0x00FF<br />
|}<br />
Both bytes being zero indicates the end of the sequence. If the first token is zero, the non-animated default image is shown.<br />
<br />
== Bitmap Format ==<br />
The bitmap is tiled 8x8 pixels (Nintendo tends to do this). Each pixel contain 4 bits of data, being the index into the palette specified by the current sequence-token.<br />
<br />
== The Palettes == <br />
Each color in the palette is in the standard 2-byte RGB5551 format (used since GBA).<br />
<br />
The conversion to RGB888 is made like this (C):<br />
u8 r = ((color ) & 0x1f)<<3;<br />
u8 g = ((color >> 5) & 0x1f)<<3;<br />
u8 b = ((color >> 10) & 0x1f)<<3;<br />
<br />
== Checksums ==<br />
The CRC-output is not bitwise inverted after the calculation, but it is byte-swapped to big-endian. Polynominal used is: 0xA001, same for all.<br />
<br />
{| class="wikitable"<br />
|- style="background-color: #ddd;"<br />
! Number<br />
! Range<br />
|-<br />
| 0<br />
| 020-83F<br />
|-<br />
| 1<br />
| 020-93F<br />
|-<br />
| 2<br />
| 020-A3F<br />
|-<br />
| 3<br />
| 1240-23C0<br />
|}</div>Ludo6431https://dsibrew.org/w/index.php?title=Icon.bin&diff=1215Icon.bin2009-04-27T10:33:48Z<p>Ludo6431: Some fixes</p>
<hr />
<div>These are the banners you'll see in various places in the [[System Menu]]. They have the dimension 32x32 pixels.<br />
<br />
[[Image:icon_1.gif]]<br />
[[Image:icon_2.gif]]<br />
[[Image:icon_3.gif]]<br />
[[Image:icon_4.gif]]<br />
[[Image:icon_5.gif]]<br />
<br />
These are converted by a tool bLAStY wrote. Icon files were supplied by loopy.<br />
<br />
== Basic File Structure ==<br />
{| class="wikitable"<br />
|- style="background-color: #ddd;"<br />
! Start<br />
! Length<br />
! Description<br />
|-<br />
| 0x0000<br />
| 2<br />
| File Version/Magic (should be 0x0301)<br />
|-<br />
| 0x0002<br />
| 2*4<br />
| 4 CRC checksums (polynominal 0x6000 or 0xA001)<br />
|-<br />
| 0x000A<br />
| 22<br />
| Padding (00's)<br />
|-<br />
| 0x0020<br />
| 512<br />
| Default Bitmap<br />
|-<br />
| 0x0220<br />
| 32<br />
| Palette for above<br />
|-<br />
| 0x0240<br />
| 256*8<br />
| Application Title (in 8 languages), wide chars<br />
|-<br />
| 0x0A40<br />
| 2048<br />
| Padding (00's)<br />
|-<br />
| 0x1240<br />
| 512*8<br />
| 8 Bitmaps (for animation)<br />
|-<br />
| 0x2240<br />
| 32*8<br />
| 8 Palettes<br />
|-<br />
| 0x2340<br />
| 128<br />
| Animation Sequence<br />
|}<br />
Languages (in correct order) are: Japanese, English, French, German, Italian, Spanish, Unknown, Unknown.<br />
<br />
== Animation Sequence ==<br />
The sequence is represented by 2-byte tokens, in the following format (we're now talking bits, from left to right):<br />
{| class="wikitable"<br />
|- style="background-color: #ddd;"<br />
! Length<br />
! Description<br />
! Mask<br />
|-<br />
| 1<br />
| Flip Vertically<br />
| 0x8000<br />
|-<br />
| 1<br />
| Flip Horizontally<br />
| 0x4000<br />
|-<br />
| 3<br />
| Palette Index<br />
| 0x3800<br />
|-<br />
| 3<br />
| Bitmap Index<br />
| 0x0700<br />
|-<br />
| 8<br />
| Frame Duration (in frames (one frame = 1/60sec))<br />
| 0x00FF<br />
|}<br />
Both bytes being zero indicates the end of the sequence. If the first token is zero, the non-animated default image is shown.<br />
<br />
== Bitmap Format ==<br />
The bitmap is tiled 8x8 pixels (Nintendo tends to do this). Each pixel contain 4 bits of data, being the index into the palette specified by the current sequence-token.<br />
<br />
== The Palettes == <br />
Each color in the palette is in the standard 2-byte RGB5551 format (used since GBA).<br />
<br />
The conversion to RGB888 is made like this (C):<br />
u8 r = ((color ) & 0x1f)<<3;<br />
u8 g = ((color >> 5) & 0x1f)<<3;<br />
u8 b = ((color >> 10) & 0x1f)<<3;<br />
<br />
== Checksums ==<br />
The CRC-output is not bitwise inverted after the calculation, but it is byte-swapped to big-endian. Polynominal used is: 0xA001, same for all.<br />
<br />
{| class="wikitable"<br />
|- style="background-color: #ddd;"<br />
! Number<br />
! Range<br />
|-<br />
| 0<br />
| 020-83F<br />
|-<br />
| 1<br />
| 020-93F<br />
|-<br />
| 2<br />
| 020-A3F<br />
|-<br />
| 3<br />
| 1240-23C0<br />
|}</div>Ludo6431https://dsibrew.org/w/index.php?title=User_talk:Ludo6431&diff=1199User talk:Ludo64312009-04-25T15:50:03Z<p>Ludo6431: </p>
<hr />
<div>Thanks, but all I have is a .psd... Is that okay? [http://www.mediafire.com/?1lm2tatydwx Here] And I really didn't spend too much time on it so I know theres some little mistakes... --[[User:Bg4545|bg4545]] 02:57, 13 April 2009 (UTC)</div>Ludo6431https://dsibrew.org/w/index.php?title=DCIM/&diff=1198DCIM/2009-04-25T14:52:00Z<p>Ludo6431: </p>
<hr />
<div>All files/folders created on SD/SDHC from the DSi.<br />
<br />
Note that this directory layout is standard; see [http://en.wikipedia.org/wiki/DCIM Wikipedia's page on DCIM]<br />
<br />
[[SD Filesystem|< Return to /]]<br />
<br />
*[[???NIN02/]] : Contains photos taken with the exterior camera<br />
*[[???NIN01/]] : Contains photos taken with the interior camera [''Need a confirmation'']<br />
<br />
??? represent a number (called N here) which begins with 100 and is incremented with 1 each 100 photos copied to the SD, each directory formed on this format contains the (N-100)*100+1 to (N-99)*100 photos named from HNI_0001.JPG to HNI_0100.JPG</div>Ludo6431https://dsibrew.org/w/index.php?title=Talk:DCIM/&diff=1197Talk:DCIM/2009-04-25T14:26:01Z<p>Ludo6431: New page: who have photos on the 100NIN01/ directory ? --~~~~</p>
<hr />
<div>who have photos on the 100NIN01/ directory ? --[[User:Ludo6431|Ludo6431]] 14:26, 25 April 2009 (UTC)</div>Ludo6431https://dsibrew.org/w/index.php?title=Title_database&diff=1190Title database2009-04-25T12:11:18Z<p>Ludo6431: Price</p>
<hr />
<div>The Nintendo DSi uses the same title scheme and update servers as the Wii, but they introduced a new (currently unknown) common-key for the DSi title decryption. <br />
<br />
As with on the Wii, the [[title metadata]] for these titles may be fetched on Nintendo Servers.<br />
<br />
Each game specific url uses above 4 letter code.<br />
<br />
Titles can be downloaded with [http://wiibrew.org/wiki/NUS_Downloader NUS Downloader], an app that allows to download titles from NUS servers.<br />
<br />
== Title codes ==<br />
<br />
=== Region Codes ===<br />
<br />
Region codes are used to determine what region a title belongs to. They are at the end of a Title ID.<br />
<br />
{| class="wikitable sortable" width="55%"<br />
|-<br />
! ASCII<br />
! HEX<br />
! Region<br />
|-<br />
| V<br />
| 56<br />
| Europe (only for games)<br />
|-<br />
| J<br />
| 4A<br />
| Japan<br />
|-<br />
| P<br />
| 50<br />
| Europe (only for applications and system), Australia and other PAL regions<br />
|-<br />
| E<br />
| 45<br />
| North America<br />
|}<br />
<br />
=== System Codes ===<br />
<br />
System codes are used to determine what type of title it is. They are at the beginning of a Title ID.<br />
<br />
{| class="wikitable sortable" width="50%"<br />
|-<br />
! ASCII<br />
! HEX<br />
! System<br />
|-<br />
| K<br />
| 4B<br />
| DSi Ware Game<br />
|-<br />
| H<br />
| 48<br />
| DSi Ware Application or System<br />
|}<br />
<br />
== Title database ==<br />
<br />
=== DSi Ware (00030004) ===<br />
<br />
DSi Ware is an online service available on the [[Nintendo DSi Shop]] to download DSi applications.<br />
<br />
==== Europe ====<br />
<br />
The official list of DSi Ware Europe titles is located on [http://www.nintendo.co.uk/NOE/en_GB/games/nintendo_dsiware_11805.html the Nintendo Europe website]<br />
<br />
{| class="wikitable sortable" width="100%"<br />
|-<br />
! Title ID<br />
! Type<br />
! Name<br />
! Price<br />
|-<br />
| KAAV (4B414156)<br />
| Game<br />
| Art Style : AQUITE<br />
| 500<br />
|-<br />
| KADV (4B414456)<br />
| Game<br />
| Art Style : CODE<br />
| 500<br />
|-<br />
| HNGP (484E4750)<br />
| Application<br />
| [[Nintendo DSi Browser]]<br />
| 0<br />
|-<br />
| KP6V (4B503656)<br />
| Game<br />
| Pyoro<br />
| 200<br />
|-<br />
| KMMV (4B4D4D56)<br />
| Game<br />
| Mixed Message<br />
| 500<br />
|-<br />
| KAMV (4B414D56)<br />
| Game<br />
| Paper Plane<br />
| 200<br />
|-<br />
| KUWV (4B555756)<br />
| Game<br />
| WarioWare: Snapped!<br />
| 500<br />
|-<br />
| KS9V (4B533956)<br />
| Game<br />
| Real Football 2009<br />
| 800<br />
|-<br />
|}<br />
<br />
==== Japan ====<br />
<br />
The official list of DSi Ware Japan titles is located on [http://www.nintendo.co.jp/ds/dsiware/titlelist.html the Nintendo japanese website]<br />
<br />
{| class="wikitable sortable" width="100%"<br />
|-<br />
! Title ID<br />
! Type<br />
! Name<br />
! Price<br />
|-<br />
| KMSJ (4B4D534A)<br />
| Game<br />
| 3-tsu no Shuffle Game<br />
| <br />
|-<br />
| KAAJ (4B41414A)<br />
| Game<br />
| Art Style : AQUARIO<br />
| 500<br />
|-<br />
| KADJ (4B41444A)<br />
| Game<br />
| Art Style : DECODE<br />
| 500<br />
|-<br />
| KAPJ (4B41504A)<br />
| Game<br />
| Art Style : PICOPICT<br />
| 500<br />
|-<br />
| KASJ (4B41534A)<br />
| Game<br />
| Art Style : SOMNIUM<br />
| 500<br />
|-<br />
| KTPJ (4B54504A)<br />
| Game<br />
| Asobi Taizen<br />
| <br />
|-<br />
| KNRJ (4B4E524A)<br />
| Game<br />
| Brain Training - Science version<br />
| <br />
|-<br />
| KD9J (4B44394A)<br />
| Game<br />
| Dr. Mario<br />
| 500<br />
|-<br />
| KMFJ (4B4D464A)<br />
| Game<br />
| Funny Face<br />
| <br />
|-<br />
| KAMJ (4B414D4A)<br />
| Game<br />
| Kami Hikouki<br />
| <br />
|-<br />
| KMMJ (4B4D4D4A)<br />
| Game<br />
| Mixed Message<br />
| 500<br />
|-<br />
| HNGJ (484E474A)<br />
| Application<br />
| [[Nintendo DSi Browser]]<br />
| 0<br />
|-<br />
| KM9J (4B4D394A)<br />
| Game<br />
| Osoroshii Suuji<br />
| <br />
|-<br />
| KP6J (4B50364A)<br />
| Game<br />
| Tori to Mame<br />
| <br />
|-<br />
| KGUJ (4B47554A)<br />
| Game<br />
| Ugoku Memo Chou<br />
| <br />
|-<br />
| KUWJ (4B55574A)<br />
| Game<br />
| Utsutsu! Made in Wario<br />
| <br />
|-<br />
|}<br />
<br />
==== United States ====<br />
<br />
The official list of DSi Ware US titles is located on [http://www.nintendo.com/games/guide#qhardware=DS&qesrbRating=&qplay=dsiware&qgenre=&qrelease=&panel=qplay the Nintendo US website]<br />
<br />
{| class="wikitable sortable" width="100%"<br />
|-<br />
! Title ID<br />
! Type<br />
! Name<br />
! Price<br />
|-<br />
| KAAE (4B414145)<br />
| Game<br />
| Art Style : AQUIA<br />
| 500<br />
|-<br />
| KP6E (4B503645)<br />
| Game<br />
| Bird & Beans<br />
| <br />
|-<br />
| KMME (4B4D4D45)<br />
| Game<br />
| Mixed Message<br />
| 500<br />
|-<br />
| HNGE (484E4745)<br />
| Application<br />
| [[Nintendo DSi Browser]]<br />
| 0<br />
|-<br />
| KUWE (4B555745)<br />
| Game<br />
| WarioWare: Snapped!<br />
| 500<br />
|}<br />
<br />
=== System ===<br />
<br />
Need more informations about system titles. Please add an observation if you found something.<br />
<br />
{| class="wikitable sortable" width="100%"<br />
|-<br />
! Folder<br />
! Title ID<br />
! Versions<br />
! Observation<br />
! CDN Availability<br />
|-<br />
| 00030005<br />
| HNIJ (484e494a)<br />
| v256<br />
| [[Nintendo DSi Camera]]<br />
| v256<br />
|-<br />
| 00030005<br />
| HNJJ (484e4a4a)<br />
| v512<br />
| Nintendo Zone<br />
| v512<br />
|-<br />
| 00030005<br />
| HNJE (484e4a45)<br />
| v512<br />
| Nintendo Zone<br />
| v512<br />
|-<br />
| 00030005<br />
| HNJP (484e4a50)<br />
| v512<br />
| Nintendo Zone<br />
| v512<br />
|-<br />
| 00030005<br />
| HNKJ (484e4b4a)<br />
| v256<br />
| [[Nintendo DSi Sound]]<br />
| v256<br />
|-<br />
| 00030005<br />
| HNKE (484e4b45)<br />
| v256<br />
| [[Nintendo DSi Sound]]<br />
| v256<br />
|-<br />
| 00030005<br />
| HNKP (484e4b50)<br />
| v256<br />
| [[Nintendo DSi Sound]]<br />
| v256<br />
|-<br />
| 0003000f<br />
| HNLJ (484e4c4a)<br />
| v1, v2, v3<br />
| ?<br />
| v1, v2, v3<br />
|-<br />
| 0003000f<br />
| HNLE (484e4c45)<br />
| v3<br />
| ?<br />
| v3<br />
|-<br />
| 0003000f<br />
| HNLP (484e4c50)<br />
| v3<br />
| ?<br />
| v3<br />
|-<br />
| 0003000f<br />
| HNCA (484e4341)<br />
| v256<br />
| ?<br />
| v256<br />
|-<br />
| 00030015<br />
| HNFJ (484e464a)<br />
| v1024, v1280, v1536<br />
| [[Nintendo DSi Shop]]<br />
| v1024, v1280, v1536<br />
|-<br />
| 00030015<br />
| HNFE (484e4645)<br />
| v1536<br />
| [[Nintendo DSi Shop]]<br />
| v1536<br />
|-<br />
| 00030015<br />
| HNFP (484e4650)<br />
| v1536<br />
| [[Nintendo DSi Shop]]<br />
| v1536<br />
|-<br />
| 00030017<br />
| HNAJ (484e414a)<br />
| v256<br />
| [[System Menu]]<br />
| v256<br />
|-<br />
|}<br />
<br />
== See also ==<br />
<br />
* [[Title metadata|Title metadata (TMD)]]<br />
* [http://wiibrew.org/wiki/NUS_Downloader NUS Downloader]<br />
* [[Nintendo DSi Shop]]<br />
* [[Nintendo Software]]<br />
* [[System Menu]]</div>Ludo6431https://dsibrew.org/w/index.php?title=Talk:Nintendo_DSi_Browser&diff=1189Talk:Nintendo DSi Browser2009-04-25T11:39:30Z<p>Ludo6431: Added CSS3 test for opera DS</p>
<hr />
<div>== CSS3 test : http://www.css3.info/selectors-test/ ==<br />
<br />
{| class="wikitable sortable" width="75%"<br />
|-<br />
! System<br />
! Selectors passed<br />
! Tests passed<br />
|-<br />
| Opera 9.50 DSi<br />
| 39/43<br />
| 574/578<br />
|-<br />
| Opera 9.64 Desktop<br />
| 43/43<br />
| 578/578<br />
|-<br />
| Mozilla Firefox 3.0.9-ubuntu Desktop<br />
| 36/43<br />
| 373/578<br />
|-<br />
| Opera 8.50 DS<br />
| very buggy, random number of tests<br />
| N/A<br />
|}<br />
<br />
== Access to Opera's Configuration ==<br />
Usually to configure the browser, we wrote "about:config" or "opera:config" but in Nintendo DSi Browser, this doesn't work !<br />
<br />
== Opera's Widgets ==<br />
The widgets for Opera Browser (widgets.opera.com) are not working on DSi Browser. And also the wigdets for Wii not working too !</div>Ludo6431