If you own a legitimate copy of Super Mario 64 (e.g., N64 cartridge or Wii Virtual Console), some jurisdictions allow you to create your own PKG using the PC port’s builder script. This is legally safer but technically demanding.
To run this port, your console must be running GoldHEN or a similar Homebrew Enabler.
(homebrew, on a jailbroken PS4): Yes, there is a community port called "SM64PS4" that can be built into a PKG. But this requires compiling it yourself from the official decompilation source + adding assets from a legitimate ROM you own. No pre-made PKG is legal to share.