5 ms·
Duke Nukem: Zero Hour N64 ROM Reverse-Engineering Project Hits 100%
- reassess_blind 1y agoAre LLMs well suited to this kind of reverse engineering?
- viraptor 1y agoYou can definitely do a lot of relabeling that way. It may be also worth trying a loop of "fix until it matches binary" for separate files... But I haven't seen anyone actually write it up. There are attempts like this https://github.com/louisgthier/decompai https://github.com/louisgthier/decompai that are related, but not quite the same as this project. Edit: just gave it a go, and guessing reasonable variable names works extremely well when there's partial information already available. Especially nice for things like naming all the counters and temporaries when you know what you're iterating over (so it's just boring manual and trivial work), but can also figure out the meaning of larger patterns for function names.
- joshschreuder 1y ago> It may be also worth trying a loop of "fix until it matches binary" for separate files... But I haven't seen anyone actually write it up. I might be misunderstanding what you mean, but there is decomp-permuter which I think does just this. Rewrites the code in various heuristics and subtle ways to attempt to find a match at function level. https://github.com/simonlindholm/decomp-permuter https://github.com/simonlindholm/decomp-permuter
- viraptor 1y agoAh yeah, I forgot about this one! Something like that. LLM will be less restricted in choices, but permuter will get you compatible/valid code.
- cactusplant7374 1y agoI'm using an agent to port a game. I have the source. It's not going well. Lots of rabbit holes that are self-inflicted because the LLM doesn't want to port a lot of libraries because it's too much work for one round. It does a lot of stubbing and makes assumptions and that breaks the whole thing.
- viraptor 1y agoHow did you approach it? Some specific harness? Planning?
- hsbauauvhabzb 1y agoI’ve not experimented but I thought they might be valuable for isolated variable / function renaming
- ACCount37 1y agoFairly well. They aren't perfect, but they save a lot of time. They are also downright superhuman at recognizing common library functions or spotting well known algorithms, even if badly mangled by compilation and decompilation.
- a96 1y agoReally? Are there any articles about that. That sounds really interesting.
- ACCount37 1y agoThat's mostly my own experience. The results of reverse engineering can be sexy, but the work itself sure isn't, so we aren't exactly swimming in high quality writeups. But given how much of RE is just going into unfamiliar places and learning unfamiliar things? And how much of it is repetitive but-not-easy-to-automate tasks? I fully expect LLMs to proliferate.
- jonhohle 1y agoI’m not sure if EFF has made any statements about it, but I would be concerned with the copyright aspects. Decompilation works (legally) because a new creative work is being produced. It would be easy to argue LLMs are producing derivative, non-transformative works. AI companies have not made that any easier by paying publishers huge royalties to license training data. I personally would stay away from it to avoid the risk, but I’d imagine if it became “easy” enough to produce a matching decomp with an LLM, we would get a more specific legal precedent pretty quickly.
- TruffleLabs 1y ago"A decompilation of Duke Nukem Zero Hour for N64. Note: To use this repository, you must already own a copy of the game."
- reader9274 1y agoWe all now do, of course
- janwl 1y agoUsually these projects only contain a copy of the source code to build the binary. You still need the game assets like the levels and sounds to play the game.
- icu 1y agoWould really like to know what makes a person (or group of people) invest the time and energy to do this? Is there a group of hobbyist gamers who work on titles they love? Is it about digital conservation?
- jbverschoor 1y agoI guess you’ve never kicked ass and chewed bubble gum
- morellt 1y agoIt's hard to do when you're all out of gum
- j1elo 1y agoSame. Is there a project page or anything that explains the context, the reasons, the history behind this? I bet it would be very interesting. The Readme is too technical and misses a writeup on the soul of the project: Section 1, title. Section 2, already talking about Ubuntu and dependencies. Where is section "Why?" :-) ?
- GranPC 1y agoBased off the commit history, this has been one person's on-off project for 3 years. My guess is that they like this game and they were curious about how decomps come to fruition - and what better way to find out than to do it?
- zamadatix 1y agoIn addition to those categories, speedrunning glitch hunters tend to gravitate to participating in these projects as well. E.g. the Twilight Princess decomp was started primarily by and for the speedrunning community.
- jsheard 1y agoIt's also the endgame for romhacking, once a game is fully decompiled modders can go far beyond what was feasible through prodding the original binary. That can mean much more complicated gameplay mods, but also porting the engine to run natively on modern platforms, removing framerate limits, and so on.
- viraptor 1y agoIt's 100% decompiled to C, but not fully labelled yet. That means there's lots it's auto-generated names all over the place. It would be interesting to see someone try to port it now though.
- nomilk 1y agoWould LLMs be good at labelling, or would the risk of false-positives just waste more time than it saved?
- viraptor 1y agoI wish someone ran a proper study. In my experience it helps mark some patterns you may not be immediately familiar with, like CRC functions/tables. It also does a good job where no thinking is required, like when you have partial information: "for(unk=0; unk<unk2; unk++) { unk3=players[unk]... }" - you know what the names are, you just need to do the boring part. For completely unknown things, it may get more interesting. But I know I'd like to at least see the suggestions. It's a long and boring work to decompile things fully.
- thethimble 1y agoSeems like it would be pretty straight forward to fine tune an LLM based on code + asm pairs to help facilitate reverse engineering.
- deleted 1y ago[deleted]
- sim7c00 1y agobetter add IR too, and all the optimized variants of the ASM for the specified code etc. - its not as straightforward, but that depends also on platform. CISC is generally more wacky than RISC i suppose. also, a lot of things in stuff like ROMs is about I/O to component in the devices, so you can disassemble and decompile all you want but without the right specifications and context you cannot say what the code does. so it will also need all specifications of the hardware platform you are running the code on, as well as in this case perhaps even hardware in the catridge etc. (heard those also sometimes have their own chips etc...). i'd say for 'regular application code' that runs within an OS it might be easier, but still you need to provide a lot of context from the actual execution environment to reason properly what the code actually does? (what does INT 80 run and possibly return anyway, that code is outside of your target binary)
- zamadatix 1y agoGillou68310 looks to have been a one person army for 99% of it, what an impressive show of dedication. The Legend of Zelda: Twilight Princess has been getting farther along as well https://decomp.dev/zeldaret/tp https://decomp.dev/zeldaret/tp
- joshschreuder 1y agoWhile we're here I'll give a shoutout to the Castlevania: Symphony of the Night decomp which is coming along pretty well too (still lots to do) https://github.com/Xeeynamo/sotn-decomp https://github.com/Xeeynamo/sotn-decomp
- jonhohle 1y agoAlways good to see SotN mentioned (and nice to see a familiar handle). There are so many cool things that have been built for this decomp, probably my favorite being the dups tool (tools/dups) for finding duplicate or near duplicate code.
- metadat 1y agoStill [eagerly] waiting over here for Duke Nuke Forever! ..since how long? I've lost track (:
- viraptor 1y agoNot sure if it's a joke, but in case you missed the release - it's already out: https://store.steampowered.com/agecheck/app/57900/ https://store.steampowered.com/agecheck/app/57900/
- _carbyau_ 1y agoThat release is like the Matrix movie sequels. There are no Matrix movie sequels I hear you say? ... Indeed.
- brettermeier 1y agoI think it (Duke Nukem Forever) wasn't as bad as most people say. It's a quite enjoyable shooter I would say.
- bigstrat2003 1y agoThe Matrix sequels are fantastic, the haters are only hurting themselves by refusing to enjoy them.
- extraduder_ire 1y agoAs of earlier this year, it's been out longer than the time between it getting announced and released.
- fennec-posix 1y agooh, this just makes me sad. Has it really been that long?
- boredemployee 1y agoNote: To use this repository, you must already own a copy of the game.
- floam 1y agoI used it just fine without one, I think you’re wrong.
- TheDong 1y agoI believe you are making a technical statement and the parent poster is making a legal one. You're both right I guess
- nakamoto_damacy 1y agoThe parent poster is not making a legal statement. They copied/pasted the first line of the Readme. I made the clarification that the note is a legal disclaimer, not s technical requirement, so people, including the parent poster, are not confused.
- soupfordummies 1y agowell, you better delete it within 24 hours then!
- nakamoto_damacy 1y agothis is a legal disclaimer lol, not an actual requirement
- perching_aix 1y agoHow so? Functionally, the README describes that providing a game copy is necessary for creating a build. This would make sense, since unless the sound, image, text, etc. assets are all baked into the code, those would have to come separately. Legally, it further doesn't make much sense. This is cleaned up (?) and painstakingly bytematched decompiler output (again based on the README), so it's unfortunately just plain illegal [0], disclaimers nonwithstanding. [0] as always, legality depends on jurisdiction - so as always, if in doubt, consult an actual lawyer
- llmthrow0827 1y agoWhy Duke Nukem: Zero Hour of all games?
- random3 1y agoGood question, but I wish they had a screenshot thre so I could send this to my school buddies. Last time we played this everything was still a simple chaotic heaven :)
- scheeseman486 1y agoIt's a bit of a lost gem. Unlike the Playstation games, which are Tomb Raider clones and aren't well regarded, Zero Hour is based on the Build engine like the original Duke Nukem 3D was and while it doesn't hold up to that standard, it's arguably the best of the non-3D Realms Duke Nukem games. Unfortunately they changed the perspective to third person (with a half-finished first person mode as a cheat) and it controls poorly. With the source available, that can now be fixed.
- sunnybeetroot 1y agoWhy is the first person mode considered half finished?
- scheeseman486 1y agoNo deal breakers but the lack of first person viewmodels, the really narrow FOV and an aggressive joystick accelerlation curve make it unpleasant to play. It isn't too bad on emulators that hack in keyboard and mouse, but this port is a good opportunity to polish it up further in much the same way that Perfect Dark port did.
- sunnybeetroot 1y agoExcellent explanation, thank you
- yfcbfetjh 1y ago[dead]
- mikae1 1y agoVery cool! But… GitHub? Do they ever learn? 3, 2, 1… Takedown notice!
- skotobaza 1y agoWhy would they take it down? Decompilations of Nintendo games are on GitHub as well.
- scoopertrooper 1y agoA quick inspection of the repo indicates that it doesn’t contain any copyrighted material. They’ve just uploaded the code to perform the decompilation.
- nness 1y agoZero Hour was one of the must have's of the Nintendo 64 era and one of the few good games in the latter part of the Duke Nukem series. Despite its challenging platforming and a few soul-crushing levels, the game had consistently rich settings and managed to recreate that Duke 3D charm. The recent Perfect Dark port was incredible and I hope this decomp gets the same treatment.