fincs' DS development blog

July 10, 2010

Status update

Filed under: DS homebrew — fincs @ 8:36 pm

Yay for this two month hiatus.

No, I’ve not abandoned, it’s just that:

  • There is a non-DS-dev-related project I want to take care about.
  • I was ending the school year.
  • General lazyness.

I now have a summer break so I should be able to work on DS homebrew, including a PAlib-to-libnds transition layer. A sneak peek of what’s coming:

(yes, that’s a pacifier)

For those who are worried about the Lua port, it’s indeed in my project list. The source code for the latest test R4i knockoff bootstrap will also be released once I clean it up (requested by Steve).

April 29, 2010

Ubuntu 10.04 is here!

Filed under: Uncategorized — fincs @ 10:08 pm

It’s April 29th, that means Ubuntu Lucid Lynx is out! I’m particularly sceptical about this release because it fixes some audio problems.
It appears they have had last minute problems but anyway…

As I have a 64-bit machine I’ve downloaded the 64-bit version. Too bad I’m busy until Saturday so I won’t be able to install it today…

April 22, 2010

The beginnings of yet another Lua port for the DS

Filed under: DS homebrew — Tags: — fincs @ 11:47 pm

I’ve decided to make my own DS port of Lua because:

  • DSLua was abandoned (and uses PAlib).
  • Micro Lua DS was abandoned by the original developer.
  • Apparently noone noticed Lua defaults to the double floating point type (which is ridiculously slow on the DS due to its lack of a fp unit).
  • Lua is easy to learn and can be a friendly introduction to Nintendo DS homebrew programming.

Compiling an integer-only version of Lua for DS was really easy, and I got key and stylus support in a couple of minutes. Division and module operations are done using the hardware registers for performance. Here are some pictures:

(EDIT: There’s something wrong in the main page, please click on “Read more”. Can a mod fix this?)

Cute, isn’t it? Well, it still lacks support for almost everything, but something is better than nothing. Here is a list of planned things:

  • libnds lua bindings for background/sprite/VRAM functions
  • maxmod lua bindings
  • sleek object-based sockets API
  • good ol’ POKE and PEEK functions
  • memory buffers for use with the functions above
  • file loading to memory buffers
  • luaballs (archives containing Lua scripts and resources) with compression support
  • preparsed Lua scripts support in order to speed up the loading process
  • shell entirely written in Lua (with minimal C bootstrapping)
  • debugging over Wifi via the DBGp protocol
  • runtime version for converting Lua programs into standalone .nds files
  • PC runtime emulation layer for quick testing and easier debug

Don’t forget to post your thoughts here!

April 13, 2010

R4i Christmas HBMenu bootstrap

Filed under: DS homebrew — Tags: , , — fincs @ 5:46 pm

I was bought a DSi-compatible flashcard to test my homebrew last January as the hinge of my DS is broken. It turned out the only thing they had in the shop was one of those R4i cheap knockoffs, so yeah…

Here’s a photo of the card (the web address on it is blurred to prevent copying):

The menu they have is heavily biased towards piracy (and made with PAlib!). As I can’t stand piracy I wanted to replace it with HomebrewMenu, which apart from being homebrew-friendly it is officially supported by devkitPro, the providers of basically the core of Nintendo DS homebrew: the toolchain (devkitARM) and the libraries (libnds, libfat, dswifi, maxmod, etc).

This was not as easy as it seems. This card has a built-in hardware rootkit. Yeah that’s right, they have some protection around the menu. The menu binary has a strange watermark on every 512-byte sector plus a halfword index key. When the card is requested to read such sectors it checks for the watermark and spews out different data according to the index value. They are also checking somehow if the first 6 bytes of every sector match with the data in the card.

As you might have spotted, there is a flaw. They are not checking the remaining part of the sector data. So what did I do? After extracting the actual menu binary from the card (to prevent sector replacing) I basically injected a loader in the gaps between sector “headers”.

There’s also the _DS_MENU.DAT mystery file. It appears to contain the original R4 firmware and some data ripped off commercial ROMs. Removing the illegal data doesn’t appear to break the system (I use a DSi which is on V1.4E) so it might just be for padding or simply to piss Ninty off even more.

Anyway, from now on I (and you too) can enjoy a 100% piracy free flashcard!

Here’s the download link: R4i Christmas HBMenu bootstrap v1.0

Edit: This hack is confirmed to work with other R4i knockoffs, thanks to Steven and WinterMute for testing.

My new blog

Filed under: Uncategorized — fincs @ 6:22 am

So I have decided to get a drunkencoders blog as everyone seemed to have one ;p

Well, here I will finally have an organized space to place all my thoughts on Nintendo’s little portable console.

Stay tuned for stuff!

Powered by WordPress