The only way to get true analog movement in Super Mario 64 DS is the touch pad & that little thumb-nub that never really felt good.
But on the 3DS, Wii U, and emulators, you can manipulate Mario's speed with the Y button...which is how it works in 2D Mario and Super Mario 3D Land. It's not perfect, but it works well enough, and certainly better than using a stylus or thumb-nub.