Hacker Gets Super NES Games Running On Unmodified NES (arstechnica.com)
The latest project from Tom "Tom7" Murphy is an unmodified NES running Super NES games. "Murphy breaks down this wizardry in a pair of detailed videos laying out his tinkering process," reports Ars Technica. "Though the NES hardware itself is untouched, the cartridge running this reverse emulation is a heavily customized circuit board (ordered from China for about $10), with a compact, multi-core Raspberry Pi 3 attached to handle the actual Super NES emulation." From the report: The Pi essentially replaces the PPU portion of the cartridge, connecting to the NES via a custom-coded EEPROM chip that tells the system how to process and display what would normally be an overwhelming stream of graphical data coming from the miniature computer. Only the CIC "copyright" chip from the original cartridge remains unmodified to get around the hardware's lockout chip. Murphy -- you may remember him from previous efforts to teach an AI how to play NES games -- says that the Raspberry Pi actually has too much latency to effectively "stream" tile-by-tile graphical instructions to the NES' cartridge CPU. By the time the Pi manages to "discharge" a set of instruction bits (only 180ns after they were generated), the NES itself has already moved on to the next part of its read-write cycle.
Murphy used a one-cycle delay to compensate for this latency, essentially guessing where the fairly predictable PPU would be writing to next and just sending data to that location ahead of time. That process works pretty well but results in the persistent flickering and graphical noise you see throughout his video demonstrations.
Murphy used a one-cycle delay to compensate for this latency, essentially guessing where the fairly predictable PPU would be writing to next and just sending data to that location ahead of time. That process works pretty well but results in the persistent flickering and graphical noise you see throughout his video demonstrations.
First off, a very cool project. However, this is an example of how when you have a hammer, everything looks like a nail. The jitter in the resulting screen is horrible - probably the result of the CPU not having consistent timing.
The BeagleBone board has a main CPU along with some dedicated, single cycle, accurate timing, real-time processors. It would have been interesting to see such a board being used where the main CPU does the emulation and the real-time processors handle the actual final output. Alternatively, an iCE40 or similar FPGA could have been used. The Pi is just not the right tool for the job. Although, it would be interesting to see it paired with a small FPGA.
So it is great that Tom "Tom7" Murphy got this to work. An excellent first step. But if the jitter problem were to be solved it would be even better.. Oh who am I kidding, it is damn impressive even with the jitter.
Hacker gets video output (with significant glitches due to timing) of a SNES game executing instructions (and receiving controller input) via an Emulator running on a Raspberry Pi displayed on an unmodified NES. Still, good work m8.
More like "Hacker turns NES into a glictchy as fuck Pi video card, and then emulates SNES on Pi, on an 'unmodified' NES with a heavily modified NES game PCB"