Emulators, it's a bit of a controversial topic as to whether they are legal or not ( in general the consensus is that if you own the actual game you have the right to play an emulator of it, but if you do not own the game it is illegal), but they are good in the context of which you are talking about. The emulators themselves are good and are made for people to play them, however there are a few things you need to beware of to have a safe emulator.
Firstly you need to make sure you are using a trustable emulator, such as, for the DS, you could use Desmume or Dolphin, you look into which one would suit you the best, whether that be the design of the menus or settings, generally there should not be much difference at all, even in the appearance of the emulator. Do not trust an unknown emulator, just go with the mainstream ones as they work best and are trustable.
Secondly, you need to make sure that where you are downloading the emulator from is also a trustable website, and will not download possible malwares, spyware or viruses onto your computer. Personally, i hear that a lot of people use Emuparadise (google Emuparadise xD) to download emulators and roms and this website is trustable and will not download anything bad to your computer, i've downloaded a few games from there and i've had no issues so far.
Generally, as long as you get your emulator from a trustable source you should be good, just don't go downloading things if you don't understand what they are/ what they do, always background check through google before downloading a rom or emulator to see if it is (1. safe 2. actually worth downloading XD)