Operating an NES Emulator Inside Portal 2 Is not Sensible, However it Works

Editorial Team
4 Min Read



Portal 2 stays a masterpiece of puzzle-solving and storytelling, however a latest challenge by a modder referred to as PortalRunner elevates this traditional to uncharted territory: operating a Nintendo Leisure System (NES) emulator inside the sport itself.



Portal 2 has all the time been a modder’s paradise, its Squirrel scripting language performing like a digital sandbox the place creators can bend the sport’s guidelines to their will. PortalRunner’s challenge took this freedom and ran wild with it. The objective? To get Tremendous Mario Bros. operating on a totally coded NES emulator, all crafted in Squirrel and confined inside the sport’s digital partitions.


LEGO Tremendous Mario Nintendo Leisure System 71374 Gameplay Constructing Set, Mannequin Kits for Adults to…

  • Construct an interactive, Eighties-style TV set displaying the traditional Tremendous Mario Bros. sport & activate it with LEGO Mario determine (not included)
  • Genuine particulars of the NES console are recreated in LEGO fashion, together with a controller and a gap slot for the buildable Recreation Pak
  • The TV has a handle-operated scrolling display, Mario determine reacts to the on-screen enemies, obstacles and power-ups when positioned on the highest

NES Emulator Mod Portal 2
Pulling this off meant wrestling with Portal 2’s laborious limits. The sport can solely juggle so many in-game objects earlier than it crashes, making it not possible to instantly mimic the NES’s {hardware}, which might require hundreds of digital components. PortalRunner’s intelligent workaround was to port smolnes, a light-weight emulator designed to sip assets, into Squirrel. By translating smolnes’ C-based code into Portal 2’s scripting language, the challenge dodged the article cap, utilizing sensible scripting methods to duplicate the NES’s conduct with out sending the engine right into a tailspin.

NES Emulator Mod Portal 2
Porting smolnes was a beast of a problem. Squirrel’s flexibility is nice, however but it nonetheless lags behind C’s uncooked velocity, and the NES’s 6502 processor doesn’t precisely play good with Portal 2’s scripting setup. PortalRunner needed to bridge the hole between C’s reminiscence administration and Squirrel’s event-driven quirks, all whereas conserving the NES’s structure centered. Each line of code was a balancing act, making certain the emulator stayed true to the NES whereas conserving Portal 2 from buckling beneath the stress.

The payoff is a working—if barely hobbled—NES emulator. Tremendous Mario Bros. chugs alongside inside Portal 2, its pixelated sprites and chiptune soundtrack rendered at a low-res, stuttering body fee, due to Squirrel’s efficiency limits in comparison with native {hardware} or trendy emulators. It’s a compromise, however a wildly spectacular one.

For anybody itching to do this mod, you’ll want Portal 2 and a knack for tinkering. Getting the emulator up and operating means loading PortalRunner’s Squirrel scripts into the sport’s framework—a course of that’ll really feel like dwelling to seasoned modders however is likely to be a enjoyable studying curve for newcomers.
[Source]

Share This Article