The only truly "legal" method is dumping the files from your own Nintendo DS/DSi system. MelonDS provides official tools, such as the BIOS/firmware dumper , which you can run on your console to create these files.
Click the file icon to browse and select your bios9.bin for the BIOS9 path, bios7.bin for the BIOS7 path, and firmware.bin for the Firmware path. Click . Setting Up DSi Mode on MelonDS melonds bios download
Once you have acquired your files, you need to tell melonDS where to find them. The only truly "legal" method is dumping the
Trusted emulation sites like the Emulation General Wiki often provide links to the necessary files, including iQue and DSi-specific files. such as the BIOS/firmware dumper