I’d say it started on at least Nintendo 64. The original Japan-only Animal Crossing game for N64 had playable, emulated Famicom (NES) games. Nintendo even ran a special offer to get an N64 Controller Pak with Ice Climber pre-loaded which you could plug into your controller like a game cartridge and play inside Animal Crossing.
The Switch has a SNES emulator as well
The 3ds was a full on emulation machine. Heck it started with the Wii!
I’d say it started on at least Nintendo 64. The original Japan-only Animal Crossing game for N64 had playable, emulated Famicom (NES) games. Nintendo even ran a special offer to get an N64 Controller Pak with Ice Climber pre-loaded which you could plug into your controller like a game cartridge and play inside Animal Crossing.