I wrote it in Java, using the game library LibGDX:
https://libgdx.badlogicgames.com/...
It's a pretty minimalistic emulator. In fact, it only simulates the cpu. There's no APU emulation at all, instead you write an adapter that listens for your game performing sound engine calls---then it converts these calls into playback of an OGG file. The PPU emulation is just straight tile based, no raster effects in your original NES code will work. To achieve raster effects, game specific adapters need to be written to render the ppu data in the desired fashion. Anything much more complex than a split screen is possible in theory with a fragment shader, but I don't think I'll ever have the need to try this.
*edit* Finally, games must be totally free of timing-dependent code. Usually the best way to achieve this is by following Disch's "Frame and NMI" doc on nesdev. It basically relies on nmi and main loop behaving as though they are separate threads of execution, and in fact are run on separate threads in ggvm. So it's not quite as forgiving as the actual NES hardware. But that lets me take a ton of shortcuts to get decent performance without fully emulating the NES hardware.
The end result is sort of a compromise between having to pay/ask for permission from real emulator authors and totally rewriting my game for PC. Just modest effort on my part to get a game adapted for this system.