Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
NES (Games) Software Games Entertainment

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.

This discussion has been archived. No new comments can be posted.

Hacker Gets Super NES Games Running On Unmodified NES

Comments Filter:
  • by willy_me ( 212994 ) on Wednesday May 30, 2018 @09:56PM (#56703066)

    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.

    • by Junta ( 36770 )

      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

      • 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.

        • by tepples ( 727027 )

          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

          • 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.

  • More like... (Score:4, Insightful)

    by Anonymous Coward on Wednesday May 30, 2018 @10:05PM (#56703104)

    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.

    • by rhazz ( 2853871 )
      I could do this even better by routing the output of a SNES directly through the NES console. I'd drill a 1-inch hole all the way through an original unmodified NES, and then run the A/V cables of an unmodified SNES (or even a SNES classic if I had the patience) through the hole and into my TV. There'd be no jitter and you'd get 100% perfect SNES output on the TV. Since it can be done far more quickly this way we'd have far more time to actually play the games, and would be exactly as useful as the article'
      • 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.

    • 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)

    by darkain ( 749283 ) on Wednesday May 30, 2018 @10:42PM (#56703238) Homepage

    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"

    • 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.

      • 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

        • Comment removed based on user account deletion
          • 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.

          • 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

    • 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

  • 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

  • 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?

  • Not "running on" (Score:4, Informative)

    by Bert64 ( 520050 ) <bert@[ ]shdot.fi ... m ['sla' in gap]> on Thursday May 31, 2018 @12:03AM (#56703550) Homepage

    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.

    • 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

      • 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

        • 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.

  • 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

  • by DrXym ( 126579 )
    The NES isn't "running" SNES games, the RPi is. The NES is basically acting as a dumb terminal with shims to the sound, display and inputs. Why even stop at SNES? Whack a few other emulators on there.
  • by sad_ ( 7868 )

    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.

He has not acquired a fortune; the fortune has acquired him. -- Bion

Working...