Neither “New Super Mario Bros. (1)” nor “Super Mario 64 DS” are digitally signed. Signatures were introduced with the DSi. All DS games released before the DSi were put on a
whitelist.
The DSi and the 2|3DS (without CFW) check DS software before starting:
* Does the game have a valid signature?
*
If not: Is it on the whitelist?
If none is the case:
“An error has occurred.”
Changing anything on a digitally signed file makes the signature invalid. That is the purpose of a signature. Creating valid signatures for the DSi or 3DS requires a private key only Nintendo has.
Flashcarts bypass this by embedding at least parts of ROMs on the whitelist.
Better/longer explanation:
https://hackmii.com/2010/02/lawsuit-coming-in-3-2-1/
“DS-repros” are usually very cheap flashcarts with their micro-SD slot hidden/closed autobooting a single ROM.