To understand the mechanics of the game, the ROM source was explored. Since the NES was based of the MOS 6502 microprocessor, this involves looking at the 6502 assembly. The article details how ...
[ciciplusplus] decided it needed to become a reality, however, and set to work ... simple bit of code burned on a ROM inside the cartridge, which boots up the NES and primes it to receive ...
Remember, these games aren't individual downloads but are bundled together in the Nintendo Switch Online NES, SNES, GB, N64, Genesis / Mega Drive, and GBA applications, which are 'free' to download.