6 ms·
Nearly all Nintendo 64 games can now be recompiled into native PC ports
- ranger_danger 2y agoJamulator did this for NES way back in 2013 but nobody really seemed to care... https://andrewkelley.me/post/jamulator.html https://andrewkelley.me/post/jamulator.html There is also Winlator for running Windows programs on Android: https://github.com/brunodev85/winlator https://github.com/brunodev85/winlator Also is the youtube video linked in the article using an AI voice?
- BearOso 2y agoJamulator was unsuccessful because so much extra hardware was on the cartridges. Recompilation complicates things and doesn't provide many benefits in that situation. The N64 is fixed hardware, so it's a little bit easier. Even so, this project still uses emulation for the RDP. I don't know how it handles generated RSP microcode, maybe it doesn't. A lot of games just used the official libraries.
- claudex 2y ago>Jamulator did this for NES way back in 2013 but nobody really seemed to care... At least Mr WiseGuy seems to care. From the N64Recom Github repo[0]: "This is not the first project that uses static recompilation on game console binaries. A well known example is jamulator, which targets NES binaries." [0]: https://github.com/Mr-Wiseguy/N64Recomp https://github.com/Mr-Wiseguy/N64Recomp
- zamadatix 2y agoJamulator didn't take it farther than what NES emulators could do beyond the way it ran. If Jamulator had released with similar enhancements for Zelda it probably would have been a lot more popular. I.e. the interest is more from what is now available with it than about how it does it. That's just Nerrel, a real person, narrating. It's crazy (in an interesting way, not necessarily a doom and gloom way) how we have AI voices these days so good we start to suspect people who don't speak like we expect are AI.
- refracture 2y agoThat's just Nerrel; his narration is so flat that he's always sounded like an AI. I enjoy that mix with his humor.
- jonhohle 2y agoThis is really cool. Many of the foundational tools created for N64 decomp are finding their way into other system decomp packages. I recently came across https://decomp.me/ https://decomp.me/ which allows collaborative decompilarion for a bunch of systems with presets for their relevant SDKs and hardware. I’d imagine this happening several more systems in the coming years.
- protoster 2y agoDo typical emulators compile ahead of time? Just-in-time? If not, why? This approach (ahead of time compilation) appears to have huge benefits.
- ranger_danger 2y agoA fair amount of 32-bit and later emulators do have JIT recompilation, but I'm not aware of any ahead-of-time translation unless that's how TeknoParrot works (you can run linux arcade games that use ELF binaries on windows with it for example), but I wouldn't call that emulation either way since the architecture is the same.
- entropicdrifter 2y agoModern Vintage Gamer over on Youtube has worked with Nightdive and Limited Run Games and helped design a C recompiler called Carbon Engine for various older consoles that are functionally the same as ahead of time compiled emulators. https://youtu.be/eZRzaGFWoz8?si=XQyJol0pe2z2oG6d https://youtu.be/eZRzaGFWoz8?si=XQyJol0pe2z2oG6d
- jerf 2y agoYou name the compilation and/or interpreter technique and there's at least one emulator that uses it.
- chlorion 2y agoThere are lots of emulation methods but interpretation is probably(?) the most common or at least very common. Interpretation involves writing a VM that represents the state of various parts of the machine, and executes instructions that change the state of the VM, with varying levels of accuracy.
- izzydata 2y agoI hope this eventually also works for Linux so that N64 games can be reliably played on very low end portable handhelds. N64 is notoriously tricky to emulate, but building them for the platform natively removes all performance problems.
- vaughnegut 2y agoI watched the youtube video this article links to the other day and it mentioned that it supports Linux, specifically mentioning that it should be usable on Steam Deck.
- izzydata 2y agoThe steam deck has way more than enough resources to power through any and all N64 emulation so that wouldn't change much there. I'm specifically talking about something $50 retro handhelds and the like. For example Mario64 and Ocarina of Time are completely reverse engineered and have native support for Windows and Linux and they run perfectly on those systems as where they really struggle when trying to emulate.
- vundercind 2y agoI still get audio pops and glitches with whatever the default n64 emulator EmuDeck installs is, on many games. Be nice to eliminate that.
- andrewclunn 2y agoThat will likely require full decompilation. This is akin to wrapping the emulator up with the rom, with a few common functions (found via decompilation) being updated to support more modern rendering approaches. This isn't so much "native" as it is a patched container in an executable form. EDIT - But hey, you can always just add another layer of emulation via Proton to run it in Linux.
- GaggiX 2y agoI don't think that's true, it really does recompile the N64 games into native executables, you can compile them using any C compiler like msvc, gcc and clang.
- xnx 2y agoWould this recompilation technique be applicable to other systems (3DS, GameCube, Wii, etc.)?
- naikrovek 2y agoIn theory it will work for anything, but there is a LOT of work that must be done to annotate the binaries on the source platform so that tooling such as this can pull it apart and reassemble all the pieces into something that works on the target platform. A straight recompilation is one thing, but what this tool does is recompile with the target system’s apis for input and output in mind. A straight recompilation would offer less than an emulator, really. This tool knows (or is told) where rendering routines are, for example, so that they can be replaced with destination platform versions. That’s how higher resolutions and different aspect ratios are supported in a recombination.
- vouaobrasil 2y agoOne thing this could be cool for is games like Goldeneye, which is hard to play on PC because it expects that weird joystick input. It would be awesome to have a native Goldeneye port with normal mouse behaviour like other FPSes.
- wodenokoto 2y agoWouldn't it still expect a weird joystick?
- haiku2077 2y agoThe native ports have additional features, which are easy to implement starting from the native compilation. For example, the native port of Zelda has gyro aiming and automatic autosave options.
- vouaobrasil 2y agoWell I was hoping there'd be a way to translate mouse input into the joystick input in a straightforward way that isn't available on emulators.
- haiku2077 2y agoIt could be done with native mouse control. No joystick intermediate- instead modify the C code to allow direct control of the player character with a mouse.
- whateveracct 2y agoWASD with mouse aim control doesn't really work with the game though. The modal aspect of aiming combined with the travel time/return-to-center of the cursor is a really fun part of the game. If you could just free-aim while running a la PC FPS it would kind of ruin the campaign since everything is designed around this. Picking your spots and keeping cool while aiming are the appeal. That said, if you keep the modal aspect and have the mouse just 1) rotate Bond like left/right on the stick does and 2) control the cursor only in "aim mode" (hit R)..then I think that could be fun. Tbh, I wish shooters didn't go straight to Quake-style WASD+mouse free-aim across the board. The modal aspect makes gives Goldeneye a certain physicality I really like.
- skrrtww 2y agoTo operate this tool, you still need to disassemble the ROM up front and annotate it heavily before it can be recompiled. This tool is very nice, to be sure, but the hyperbole about anything close to one-click generation of standalone executables for an arbitrary ROM is getting out of hand.
- speps 2y agoExcept this work can be done once, stored somewhere and shared. Take a ROM (it means read-only after all) and get native port out...
- deleted 2y ago[deleted]
- Hamuko 2y agoShared legally?
- blindstitch 2y ago100% legal if you delete within 24 hours.
- kkukshtel 2y agoI saw this when it came out, and as someone that doesn't follow the ROM hacking scene, I'm wondering - why did this approach take so long to come up with? Translating the assembly instructions to C and then recompiling them seems like an obvious method to try early on, but I'm wondering if there was some other breakthrough that made this possible in a way it wasn't before?
- pjc50 2y agoEmulating the hardware usually requires cycle-accurate emulation of things running in parallel, so it's not quite so simple as just the program in the ROM.
- whizzter 2y agoYes and no, with the 8bits and probably 16bits like the C64, NES, etc you really want cycle accuracy and emulating something like the PS2 really well would probably need a fair bit of accuracy. HOWEVER.. writing an recompiler (not feasible for 8bits due to the amount of self-mod code) you could probably insert pattern checks to detect writes to DMA-starting locations,etc (thinking back to our PS2 games) and transform it to safe sequences without accurate timing for most games that really only would be happy with some extra cycles.
- OnlyMortal 2y agoGood point about 8bit self modifying code. The UK C64 disk for “Skate or Die” had copy protection that did exactly that, as an example.
- tom_ 2y agoIt's pretty much best practice on the 6502. Loading code from disk or tape is basically the sane thing too.
- OnlyMortal 2y ago
- anthk 2y agoI'd love to see this with THPS2 and 3, some games I love but not with the 'modern' graphics (PSP/DC and up).
- nottorp 2y agoIsn't Nintendo hunting every one of their fans^H^H^H^H IP abusers with their black helicopters? Why do people even bother when they know they'll get lawyers at their door in 3... 2... 1... ?
- kotaKat 2y agoBecause a few of them will turn and go take a job offer from NERD. https://www.nerd.nintendo.com/files/Secu%20Job%20Offer%202022-2.pdf https://www.nerd.nintendo.com/files/Secu%20Job%20Offer%20202...
- babypuncher 2y agoNintendo doesn't typically go after emulation projects. Yuzu was the exception, and there are reasons for that related to how the Yuzu team ran their project and distributed it that painted a legal target on their back. This project isn't distributing any of Nintendo's code, game assets, or other intellectual property.
- 0xcde4c3db 2y agoNintendo has also gone after a handful of specific tools for circumventing the Switch encryption, which has led to speculation that this push is really about shoring up "Switch 2" against existing hacks and emulators being updated (in the event that it's substantially the same software platform with updated silicon).
- fl0ki 2y agoTo be fair, newer models of the old Switch do not have published exploits either. People solder chips onto them just like the bad old days of console modding. I'd like to think that it's inevitable more exploits will eventually be found, but the increased gap between discoveries may suggest Nintendo is finally learning key lessons regarding endpoint security.
- yamazakiwi 2y agoNintendo isn't as hard on tracking people emulating older systems, emulating their most modern system is where they start to get particularly whiny.
- deleted 2y ago[deleted]
- elorant 2y agodupe https://news.ycombinator.com/item?id=40337009 https://news.ycombinator.com/item?id=40337009
- djmips 2y agoWhat's the advantage over an emulator? This is after all, a form of an emulator - one where you translate ahead. This sort of thing has been done in the past with things like Bleem so it can be more performant but on a modern PC any good emulator is going to perform well. https://en.wikipedia.org/wiki/Bleem https://en.wikipedia.org/wiki/Bleem!
- ThrowawayTestr 2y agoRecompilation is not emulation.
- anthk 2y agoI don´t get the downvotes, this is just... porting.
- wmf 2y agoJIT emulation can cause stutters while AOT should not. The difference may not be noticeable now that computers are so much faster than the N64.
- doublepg23 2y agoThe video shows multiple bugs disappearing when using this method vs. emulation.
- skrrtww 2y agoThe goals of this project and the goals of N64 emulation are fairly different. The goal of N64 emulators (generally) is to accurately recreate the behavior of the original console. Conversely, there is a large crowd of people who just want to play SM64, OOT and MM with a bevy of "graphical enhancements" like 60fps, widescreen, texture packs, randomizers, etc. For these people, the fact that these games originally ran on the N64 is practically irrelevant. In fact, it's a hindrance; The N64's graphical pipeline is cumbersome to emulate and actively stands in the way of modern 'enhancements.' This project is more aimed at giving the games themselves modern treatments, removing the N64-centric aspects of the games from the equation entirely.
- deadbabe 2y agoWould love to play fully ray traced N64 games.
- DrNosferatu 2y agoAny efforts for other platforms? I would love to play a source-port of arcade “GTI Club”! <3
- DrNosferatu 2y agoAny tutorials/step by step guide on why to use these tools and perform this from start to finish?
- pipes 2y agoAs an aside, the perfect dark decompile port is really nice to play on the steam deck. Not sure why, but the Linux version tends to freeze on the villa level. Switching to the windows version and using proton works great. https://github.com/fgsfdsfgs/perfect_dark https://github.com/fgsfdsfgs/perfect_dark
- simple10 2y agoSuper impressive walkthrough video in the article. It does a great job of explaining Majora's Mask. Although, it's probably glossing over a lot of the upfront technical challenges of using it to port games.
- lcnmrn 2y agoI wish all game executables would be OS agnostic, something similar to WebAssembly: GameAssembly. For example you can no longer play 32-bit games on new macOS version, neither 32-bit Windows games under Wine. It's almost impossible to find 64-bit .exe files so they can run under fine under Wine/Crossover.
- lupusreal 2y agoThe JVM does this pretty well for Minecraft. I doubt Minecraft would support Linux, the BSDs, etc without it. Bedrock edition (the not-JVM version which supports Windows and consoles/phones) doesn't even support MacOS even though it obviously could.
- hot_gril 2y agoIf Minecraft were a Microsoft product from the start, they probably wouldn't have made the Java version compatible with Mac or Linux (even though it uses JVM, there are some natives included), or wouldn't have made a Java version to begin with.
- pjerem 2y agoAlso it’s pretty ironic that Microsoft, who wants to convince the entire world that c#/netcore is the next multi-os platform isn’t capable of delivering anything else than Minecraft Java on Linux. It’s a shame that I can’t play with my son from my Linux PC since he plays on switch (so the c#/bedrock edition)
- hot_gril 2y agoIt doesn't work in Wine? Or maybe that's too annoying to deal with.
- jamesgeck0 2y agoThe PC version of Bedrock edition is only available from the relatively locked down Microsoft Store.
- tombert 2y agoThis is pretty neat; can someone tell me if this could lead to a proper working version of Conker on the MiSTer? E.g. could this be used to assist in a decompilation and then someone could make a fix?
- theyinwhy 2y agoAny suggestion for a high quality n64 controller compatible with windows or linux? The official one touts "Switch only".
- deleted 2y ago[deleted]
- mikestew 2y agoI'm wondering if a wireless Xbox controller would work. It's what I use with Apple TV without issue. Button layout is close enough (runs to living room to compare Xbox controller to Switch Pro...), in fact they're basically identical. OTOH, I haven't tried the Switch Pro controller with anything else but a Switch, so maybe it can be made to work? (EDIT: just tried it: my Mac connects to the Switch Pro via BT, haven't actually tried it, 'cuz damned work is in the way.)
- haiku2077 2y agoIt would but the N64 controller's layout is unique and it's more intuitive to play games on the original controller.
- mikestew 2y agoThanks for the correction. Of course as someone without an N64, I went with "sure, that Dvorak keyboard will be recognized!" without checking if it's actually fit for purpose.
- haiku2077 2y ago8BitDo sells a kit to modify an original N64 controller into a wireless controller with a modern Hall effect joystick.
- Rychard 2y agoI use the N64 controller with my PC, it's available for purchase by anyone who subscribes to NSO. It connects via bluetooth (the USB connection is for charging only). https://www.nintendo.com/us/store/products/nintendo-64-controller/ https://www.nintendo.com/us/store/products/nintendo-64-contr...
- rcarmo 2y agoNintendo is probably having kittens about now. Extremely impressive.
- helpfulContrib 2y ago[dead]
- deleted 2y ago[deleted]
- Gala999 2y agoThere was speculation Nintendo did this for the Switch port of Super Mario Sunshine released in 2020. Someone is mentioning "NERD's recompilation tool" there : https://gbatemp.net/threads/who-said-switch-gamecube-emulation-was-impossible.626870/ https://gbatemp.net/threads/who-said-switch-gamecube-emulati...