I use emulatorJS to do this, they allow you to upload your ROM and then they apply a custom JaveScript and HTML loader along with one of their chosen emulators.
Its how I am able to add various old consoles as browser versions on some of my pages. Hope this helps