Download
this pack.
Extract what in "for TTDS microSD" to the flashcard microSD card.
For the case of Super Mario 64 DS, rename abpathsetter.nds to SM64DS.dat (as located on the launcher (NDS) at 0xD1A0). The homebrew I created (already DLDI patched) will set the autoboot rom path in YSMenu.ini on the microSD root, and boot YSMenu.nds also on the root, so rename/backup any existing YSMenu.ini file that's anywhere on the card.
Using a hex-editor, fill 0x22DE7 through 0x22EE8 with 00s, and set the full ROM path at 0x22DE7 (like "Games/SM64DS.nds"), use "Paste write" if path is copied.
Finally, install the CIA and launch it.