Only SSEQ files can be made into mid but this covers about 60% of the roms.
Grab the .sdat file with NDSTS Having got your shiny sound files (normally they are called sound_data.sdat and are located in an obvious directory name like sound) you will have to rip the sseq files from it.
Have sdattool.exe and your sound file in a directory. Use sdattool.exe with the following DOS command CODE
sdattool -x sound_data.sdat
(obviously change the sound_data.sdat part if your soundfile is not called that)
Up should come a sound_data directory, in the sound_dataSeq directory hopefully is a bunch of .sseq files in it. Extract ssequtil to a directory and in the bin subfolder is a program called sseq2mid.exe. Drag some .sseq files onto it and in the directory the .sseq files came from should be some .mid files which you can play/copy/convert/whatever.
this was all taken from a thread on another forum from over a year ago so keep in mind theres prolly much better ways of doing it now, as i haven't looked into it for over a year i cant say.
I can tell you though at the time i was messing around with sound files the results from the midi wasn't perfect, infact they sounded pretty shit. You would prolly be better off recording the tunes directly from a ds headphones out.
triforce, can you upload all these tools to download center or somewhere else? 2 links dead, if you have the archive upload it please...