Metroid, Zelda, And Castelvania Auto-Mapped With NES Emulation & Heuristics

The NES was one of the flagship consoles of the glorious era that was the 1980s. Many of the most popular games on the platform involved some sort of adventure through scrolling screens — Metroid, Super Mario, and Zelda all used this common technique. For many games, keeping track of the map was a huge chore and meant mapping by hand on graph paper or using the screenshots published in Nintendo Power magazine. These day’s there’s a better way. [Daniel] set out to automatically map these huge two-dimensional worlds, developing software he calls WideNES to do it.

WideNES is an add-on to [Daniel]’s own NES emulator, ANESE. As part of the emulator, WideNES can easily read the various registers of the NES’s Picture Processing Unit, or PPU. The registers of the PPU are used to control the display of the background and sprite layers of NES graphics, and by monitoring these, it is possible to detect and map out the display of levels in various NES games.

It’s an interesting piece of software that relies on a thorough understanding of the NES display hardware, as well as the implementation of some neat tricks to deal with edge cases such as vertical scrolling in The Legend of Zelda or room changes in games like Castlevania — the use of perceptual hashing is particularly genius. There’s source and more available on the project page, including a GitHub link, if you’re interested in getting down to brass tacks.

We’re impressed by the manner in which WideNES is able to so neatly map out these games of yesteryear, and can’t wait to see where the project goes next. [Daniel] notes that it should be possible to integrate into more popular emulators without too much trouble. If that’s not enough, check out this reverse-emulation Nintendo hack.

[Thanks to Michael for the tip!]

11 thoughts on “Metroid, Zelda, And Castelvania Auto-Mapped With NES Emulation & Heuristics

      1. Nintendo has recently started taking down major emulation sites that host ROMs and ISOs. This isn’t distributing their copyrighted works, so there should be no problems.

        You could theoretically do this with a cartridge reader and not a ROM for full legality. Nintendo didn’t invent the 6502 (although they do like to claim they did…) and the PPU isn’t under any protection anymore, so full research can be released.

        1. It’s certainly legal, but this is the same Nintendo that sent a cease and desist letter for an entire porn site to be taken down because one of their models in one of his posts said that his favorite games are metroid and zelda.

          It’s the same Nintendo that claims all copyright ownership over the 6502 CPU as well.

          You don’t need to break the law to bring the wrath of highly paid lawyers down on you. As it turns out you just need to mention the names metroid or zelda.

  1. Okay, so all that I can think now is that we could also have widescreen versions of all of these games. I mean, enemies popping in well into frame could be confusing as heck, but I can’t quit watching the read ahead on Mario thinking how great that w…could be.

  2. How does it or how could it handle things like hidden passages or areas that require certain power ups to access? Not sure how automated this in that it physically requires the player to play through the entire game? Could an AI do so?

    1. It isn’t automated in any way, really. You (or something) still have to play the game. This program is more like a graphic cache, once the screen is loaded, it’s saved for later. I’d be interested in how it works for old RPGs like Wizardry that don’t have mapping functions.

      1. I would guess that it would work very similarly to Metroid (which didn’t have a mapping function either). Truthfully (as the article stated), most NES games didn’t have a mapping function. They required, “mapping by hand on graph paper or using the screenshots published in Nintendo Power magazine”.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.