Well...







It doesn't get further than this though, but, considering the amount of work this required, between implementing the newfangled DSi hardware and fixing stupid bugs, this isn't a bad start. We can also thank Martin Korth and all the other comrades who have been paving the way and making this possible at all.



This is nowhere near ready for a release tho. It's an experimental branch in which I felt like playing around with things, attempting to boot a DSi firmware, and, well, this happened.



This also requires a bunch of data that have to be dumped from a DSi:



* NAND dump

* eMMC CID

* console ID

* RSA/Blowfish/AES keys



Those can be dumped from a DSi with unlaunch, but we will need a user-friendly way to do so.



--



There is also the issue that, well, this isn't completely clean and perfect.



When booting the DS firmware, we just load the ARM9 and ARM7 BIOSes, point the emulated CPUs to the reset vectors, and let it do all the work, just like how an actual DS would do. That way, we avoid any issues caused by incomplete memory/register setup when running a game, because the original boot ROM and firmware are taking care of everything. We also have a good reference for perfecting our direct boot implementation.



However, with the DSi, there's an issue: so far, we have only been able to dump the lower 32K of the 64K BIOSes. This is problematic as the first thing the reset vector does is jump to the upper half of the ROM. Then, said upper half is permanently locked right before jumping to the next bootloader stage (boot2), meaning that even if you somehow ran a completely custom boot2, you couldn't dump the upper halves of the BIOSes by software. The only way would be via hardware glitching attacks, or maybe by haxing a 3DS if it happens to have the full DSi BIOSes (noting that, ironically, the 3DS BIOSes were able to be dumped by software).



This means we run into issues like "decryption of X failed because the key is missing". We can work around them, but it's not as clean as starting from square one.



Oh well.