Hacker Gets Super NES Games Running On Unmodified NES (arstechnica.com) 43
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.
Near-perfect emulation? Not really.. (Score:5, Insightful)
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.
Re: (Score:3)
Well, as mentioned in the video, the glitchiness is because he's having to guess what the address will be before it actually gets read from, modifying his guess when predicted wrong for the next pass. Yes, he mentioned some facets of the experience due to the non-RT nature of the platform, but largely it's because of the having to guess addresses to respond to in advance.
In essence, the NES is a particularly convoluted video output converter here. A very impressive and difficult way to do something relat
Re: (Score:3)
Also this is how Super Mario Bros. 3 works: there is an ASIC instead of the PPU ROM, which is why it is not only quite large but supports both horizontal and vertical scrolling at the same time, with more palettes than normal. Except he put a Raspberri Pi in it instead of an ASIC. So he just decided to emulate SNES games for fun after figuring out the PPU.
Re: (Score:3)
Also this is how Super Mario Bros. 3 works: there is an ASIC instead of the PPU ROM, which is why it is not only quite large
The Memory Management Controller (MMC3) helps make Super Mario Bros. 3 large, but it doesn't quite replace the CHR ROM. It just controls the high address lines (A16-A10) of CHR ROM and the high address lines (A17-A12) of PRG ROM. It's not conceptually different from the MMU used by a modern CPU to translate virtual memory addresses into physical memory addresses. MMC3 also contains a programmable interval timer that generates an IRQ by counting how often the PPU switches between reading sprite tile memory a
Re: (Score:2)
I learn something new everyday. I was not quite right it seems. But it's interesting what they did to enhance the power of the NES near the end of its lifetime.
Re: (Score:2)
Perhaps so, but I'll give him the benefit of the doubt that perhaps there's some complication since he did do a pretty impressive job. Of course he also says he could have done better on PPU fetch pattern prediction, which may be what you refer to.
Since it's just a fun stunt to pull, not like it has to be perfect anyway.
More like... (Score:4, Insightful)
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.
Re: (Score:1)
Re: (Score:2)
He beat the game he was playing but that game was to get a NES to play SNES games. I recommend watching the video. In reading the summary my first thought was similar to yours but after watching the video I understand why he did it. It's very fascinating.
SGB return, with a twist. (Score:2)
So basically similar to the Super Gameboy, but with a NES instead of SNES as the host and an (emulated) SNES instead of a GB as the guest.
and with a PiZero (powerpoint presentation) or a Pi3 (SNES game) driving DIRECTLY THE ROM BUS - and that's the freaking awesome part.
He's not writing to a dual-ported RAM that then the PPU reads instead of ROM (like tons of official games from Nintendo do), he's feeding the PPU input straight from the Raspberry Pis. He's basically emulating what the ROM chips would be ans
Video (Score:3, Insightful)
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"
Re: (Score:3)
More accurate to say "Hacker turns cartridge into cartridge that can send bizarre output into a NES using all kinds of crazy tricks" and is able to get higher resolution output on a machine never meant to be capable of it.
I mean, it is technically one of those wastes of time as emulating a full SNES with video out would have been much easier - but it's a really cool the way he's done it.
No need to always jump to the most cynical interpretation.
Re: (Score:2)
Yeah, the snark about the headline accuracy is really unnecessary; it's an impressive feat to do this with an unmodified NES, however it's achieved. And sure, there's probably ways to do it better. And sure, there's not much practical use for this specific thing. But it's a cool and interesting proof of concept; taking the knowledge gained from this, one could develop a NES cartridge that could make an unmodified NES do all sorts of things no-one would dream it's capable of.
The fact the cartridge would nece
Re: (Score:2)
Re: (Score:3)
It's a bit philosophical. Do you consider an NES to be modded if you put a SMB3 cart into it? (SMB3 cart had an extra MMU on it) What about a famicom with Castlevania 3? (That had a sound chip on it that could output directly through the NES audio)
The NES itself hasn't been modded. I don't consider plugging in a cartridge to be "modding", at least not any more than was already done with the NES.
Re: (Score:2)
Maybe everyone is wrong but you. But maybe, just maybe, you're the one with a strange idea about what "modified" means.
If I plug a USB webcam into my desktop PC, my PC hasn't been modified, it's had a peripheral plugged into it to provide functionality it otherwise lacked. On unplugging said peripheral, my PC is back to being the same as it previously was. This cartridge of his can be plugged into any old NES, using the exact same interface as any other cartridge, and provide it additional functionality. On
Not the first, but the weirdest (Score:2)
It's not the first time even.
Some of the special ASICs used in official NES cartridges by Nintendo did feed programmable RAM instead of ROM to the PPU.
Wikipedia mentions Zelda and Castlevania that use the MMC1 to map RAM so they can animate backgrounds by modifying tiles.
Other posts here mention Mario 3 using ASIC for multidirectional scrolling, etc.
(And that for the NES only. Then the SNES came with its co-processors embed in cartridges, be it SuperFX accelerator, or the Super Gameboy cartridge)
So if you f
Awww yeah! (Score:2)
First up: Watch the whole video. It's worth the time!
I've been wondering about the counter-side to this for years: Ubiquitous emulation.
As technology advances, emulators get more sophisticated. Eventually, emulators are going to be showing up earlier and earlier, and be better and better.
Functionally, you're only going to need any unique hardware plugged into a friendly interface, and a any system can act like a less efficient version of any other, perhaps one generation worth of speed lost for the conve
"you may remember him from" (Score:1)
Okay, I <3 Tom, but it's worth picking out this bit:
"you may remember him from previous efforts to teach an AI how to play NES games"
And point out that that *may* have been a joke. Where he explained part of it in a Youtube video wearing a colander on his head. If he later actually made the joke work, that's terrific, but holy shit, submissions to SIGBovik aren't, uh, real?
Re: (Score:1)
Re: (Score:1)
Okay, that honestly makes my damn day.
Not "running on" (Score:4, Informative)
It's not running on the NES any more than it's running on the tv set used to display the output...
The NES is merely being used as an intermediate output device, the actual game is running on the raspberry pi.
Re: (Score:2)
Well it's also handling the input from the controller, I think.
Yes, it's true that the game isn't actually running on the Nintendo hardware, but it's also not as though he's just bypassing the internal hardware to output to the display capabilities. From what I can understand, the Nintendo thinks it's playing a game, but he's screwing with the output from the game cartridge to make it display things that a Nintendo shouldn't be capable of.
It's sort of like a good magic trick. Yes, it's a trick, but the
Re: (Score:1)
I can't watch the video right now so apologies if this is all explained, but I don't see why the summary makes it sound so complicated. The NES PPU gets its tile data from ROM on the cart. Most of the NES library uses a mapper that supports replacing this ROM with an electrically compatible RAM setup. More complicated mappers write data to this RAM on behalf of the game code to provide support for features the NES can't do.
He could obviously just take this approach to its logical conclusion and dump the emu
Re: (Score:2)
The main difficulty is latency. He has only a few nanoseconds to put the requested data on the PPU bus but the Pi and emulator are nowhere near fast enough. That's the purpose of the imperfect prediction scheme.
Quake on an xterm (Score:2)
Yeah someone made Quake "run" inside xterm by making an adaptation layer converting the graphics to ASCII art. You can turn any computer into a dumb terminal with external processing. But that's not "running" a program on the actual machine, it's more like "streaming" :P
Hmm (Score:2)
Re: (Score:2)
typical (Score:2)
on old home computers of the 8 and 16 bit era you can find similar projects.
most of the time these had a bus that could replace the main cpu, so some people replace them with fpga's or arms or whatever really.
you can then build some supercomputer with it, most of the time producing impressive results.