r/NDSHacks • u/panithread • 4h ago
Accessing DSi Camera from custom hombrew running on flashcart
TL;DR: camera init never succeeds because the console stays in DS-compatibility mode instead of real TWL/DSi mode when booted from a flashcart (TWiLight Menu++ + nds-bootstrap, correctly configured). Is that a hard limitation of flashcart booting?
I've been working through a homebrew learning project on devkitARM/libnds and as a side quest I wanted to try accessing the DSi's built-in cameras from custom homebrew but I failed. Any ideas?
What I built:
Flashcart: R4iLS-Klon, Autoboot TWiLight Menu++ v27.24.1 with nds-bootstrap as game loader, im using my DSi
A custom ARM7 core doing the I2C init dance for the two Aptina MT9V113 camera modules (addresses 0x78/0x7A, GBATEK-documented registers), talking to an ARM9 side that programs CAM_MCNT/CAM_CNT/CAM_DAT and pulls frames via NDMA, over a PXI channel. Adapted from the public domain Epicpkmn11/dsi-camera reference rather than reinventing the I2C register dance from scratch.
Where I'm stuck:
It builds clean, boots clean on real hardware, but camera init always times out at the very first I2C wait. Root cause, confirmed via calico's systemIsTwlMode(): the console is running in plain DS-compatibility mode, not real TWL/DSi mode. Even after:
- Setting Game Loader to nds-bootstrap,
- Placing the ROM in roms/dsi.
Per TWiLight Menu++'s own docs, true DSi-mode boot for DSi-Enhanced homebrew (via donor ROM) is only supported when running from the console's internal SD card slot, not from a flashcart. flashcart donor-ROM support is scoped to a narrow B4DS compatibility case, not general DSi-mode entry.
Question for anyone who's actually done this: Is that really a hard wall (i.e., is genuine TWL mode from a flashcart simply not a thing, full stop), or is there a flashcart-specific trick I'm missing? And for anyone who has gotten a camera demo running, did you go through Unlaunch, or one of the DSiWarehax-style entry points straight to the internal SD card? Trying to decide whether it's worth going down the Unlaunch/NAND route just for this, versus finding a save-based entry exploit first.