xan1242
@xan1242@lemmy.dbzer0.com
- Comment on Retro Gaming Has a Port-Slop Problem 2 weeks ago:
There’s more questions to ask beyond “who is playing the recomps/decomps”
Regardless of AI, these questions pop up:
- What is the use case?
- Is it worth spending my time and energy as a developer (or from developer’s perspective) doing this?
- Who is this for? (Same question as before, yes)
Even before the AI boom, I asked these questions. Some games are indeed an enigma (Sonic Unleashed is a perfect example), but a lot of others are just… there I guess.
Don’t get me wrong, it’s nice to get a better version on PC with keyboard and mouse support and better graphics and undefined aspect ratios, that’s all fine. But you have to understand one thing and one really big thing - not all games need or even deserve this treatment. A lot of people are just fine with what an emulator offers already.
If you think that “oh all of those features are impossible or really hard to do without a recomp” - think again. I can tell you from first hand experience as a reverse engineer and developer that you can do a lot of those things without doing a decomp (and especially a recomp). All on the original hardware’s limitations sometimes, too. It’s provably quicker and easier to do those hacks on top of existing games rather than recompile it.
As for the “broken games in emulators but are fine in recomps” - those fixes and hacks should’ve been presented to the emulator project first because it can not only fix this one game, but sometimes fix others too.
Ports onto platforms like PSP or iOS sure are nice to have, but be honest - it’s not the best way to play these games. It’s not even a good way to play it portably a lot of the times either. A lot of the times, those same people have other means to play them too. I don’t think most gamers even care about an hour or two of extra battery life playing the game because it’s more power efficient than running the emulator.
The more and more you think about this, the more irrational it becomes to spend time and energy on doing these things.
And to a certain degree - it always was. It was always a “just because you can” type of deal. Some were doing it for clout (even before AI, yes, there are talented people who also are obnoxious doing it), some for the love of the game, etc.
Now - you just have a lot of people doing it for clout and opening up dono pages in ko-fi and patreon. To them, this isn’t a hobby. It’s a business venture. It’s a job. And that is where the spirit of doing this kind if thing is undeniably and truly lost.
- Comment on Sony is losing exclusives as their games get ported to PC with AI 4 weeks ago:
That I can confirm firsthand. Recompiled code is just prebaked CPU instructions in another language that can be compiled. That’s all there is to it.
So for modding, it’s only slightly easier technically as you have the option to inject code easier than on the emulated platform and providing facilities for the host OS to load them (dynamic libraries, which is a big benefit which most of the slop coders don’t fully understand how or why it is).
For proper modding research, a decompilation (of the portions of the game you want to mod very extensively) is needed.
For a simple aspect ratio and UI fix patch (and other simple improvements) - that is achievable on the original code itself via cheats/code injection (anything that has an FPU should work, PS1 and older are harder generally). You generally do not need a whole recompilation/decompilation for this kind of a thing.
Sometimes even the original hardware without any performance boost can handle it, but most of the times this is where emulator’s overclocking and memory extension features come into play to help.
Honestly, in my opinion, machine code hacking is not that hard. It takes way less time and energy to do it than this to achieve the same “improvements” with way lower barriers to entry.
- Comment on How do people make mods for games without access to the game's source code? 3 months ago:
True. But even in this case, the same code injection logic can apply (depending on where you make the changes). The IL itself can simply be seen as yet another platform.
A great example is Android - you can patch the .dex class files with Lucky Patcher (in cases where apktool smali changes cannot help you).
IL obfuscations may also be worked around by patching the IL code directly too, which depends on the use case again.
The gist always is - carve out a space for your own code. No matter the language, a computer program is a computer program.
- Comment on How do people make mods for games without access to the game's source code? 3 months ago:
I do this quite a lot myself.
Beside the games that do officially support it via modding APIs, or older games that are just naturally extensible like Unreal Engine games that ship with an editor; it is usually done by the way of code injection.
Think of code injection like a manually placed interrupt - you modify the flow of execution at some point to execute your own code.
For this, you need something known as an entrypoint - place where mod code begins executing. Usually, at the entrypoint, the mod code bootstraps itself further.
To obtain an entrypoint, you have 2 options:
- On supported OSs, you can abuse dynamic library loading and make a library wrapper which masquerades as the original library. When its execution begins (on Windows this is usually very early in the importing stage, on Unix/Linux you need to swap functions), you can bootstrap your mod(s) further.
- On other systems (game consoles, embedded, etc), you have to modify the game executable directly. Either via the way of memory injection of another tool or direct binary modifications. Depending on the platform, if it supports loading of libraries, you would either load your mod as a library or, if not, inject the mod elsewhere into memory (slack/unused space).
How do you figure all of this mumbo-jumbo out? Well, you use tools designed to disassemble the game binary into machine language. Most popular examples are IDA, Ghidra and Binary Ninja.
You usually won’t have any information on what’s what, but if you know a bit about code design of games, you come to realize that a lot of them follow similar principles/patterns (depending on the era and platform), so you can probably figure it out once you’ve seen a few games. Especially if the game is using the same game engines as others, then you can cross reference stuff.
However, if you’re lucky, you can obtain something known as debugging symbols which have all of the information about the generated binary. Ideally, it’d be for your executable that you’re working with directly, but if it’s not, you can usually just cross reference it by either binary pattern matching or simple deduction (same execution flows). This will give you a nice map of where’s what in your disassembler tool.
Thanks to standardization of binaries, ABIs (Application Binary Interfaces) usually allows you to match the types as they’re defined originally and have them work directly in your bespoke code. This means, for example, that if a function takes 3 arguments, those 3 arguments will be passed in the same way (depending on its calling convention), so you can expect to receive them in your own code the same way.
And, ideally, you would be working with code directly and not with machine language, but some lower level stuff will need it inevitably.
Usually, in your mod source code, you would work with a library that is specifically designed for code injection. This is effectively a JIT compiler which emits machine code instructions which are needed to redirect the flow of execution to your own modded functions. (Usually is capable of memory editing and making branch instructions)
There are 2 ways to perform a code modification:
- Inlined code - this means you write your own code in the middle of another game function. Usually, this is done via lower level assembly and a branch instruction to put it in. Requires decent knowledge of the target CPU to use it (to not corrupt any stack or registers)
- High-level function hooks - this usually means that you interrupt a function call/branch with your own equivalent. Your equivalent function will have to do the job of the original usually, but depending on the case, you may replace it outright or simply pass the call onto the original function. Thanks to ABIs, this is possible.
With all of this being said, you need to have the knowledge being able to read machine language of CPUs. This isn’t too difficult once you realize RISC CPUs are mostly very similar at a glance which helps out a lot.
But, in order to be able to read it, you have to first obtain it and, as we all know, DRMs, executable packers and anti-cheats/tampers protect this, so you may need to get your hands dirty a bit to bypass that (e.g. memory dumps). A lot of the same tricks that security researchers use in their rulebook apply to modding as well.
I hope I’ve explained enough. I’m aware I used a bunch of terms that may be foreign, so I hope you will get the gist at the very least.
- Comment on Playing with mom 6 months ago:
pipotam
- Comment on Epic Store's Unreal Tournament page now has free download links to Unreal, Unreal 2, and Unreal Tournament '99 1 year ago:
Licensing issues very likely. They licensed that version of the engine for Killing Floor and some other games.
- Comment on Of course someone has Doom running on Nintendo Alarmo now 2 years ago:
You could say that this isn’t very alarming
- Comment on SilentPatch for Grand Theft Auto goes open source! 2 years ago:
Similarly how SilentPatch and the WidescreenFix fixes various bugs and adds improvements, mine does as well.
As a matter of fact, I used to maintain ThirteenAG’s WFP for NFS. Now I’m focused on my own thing mostly. (Forked it off of it but barely any of the code is left lol)
It’s called NFS-MultiFix. (I made one ages ago in 2017 for ProStreet but I’m reviving the project now).
It’s a going to basically be an all-in-one thing. So, from basic things like a widescreen fix, to the added ability to change resolutions of environment maps and shadows, fixing clipped/popin shadows in Undercover, fixing crashes, fixing some crap gameplay features, resizable windowed mode, etc. Basically, making it a version of the game that it deserves to be on PC.
It’s a genuinely pretty massive set of fixes spanning over 80 cpp/hpp files with about 500 lines of code on average. I made sure to optimize every nitty-gritty and I ended up with a smaller DLL size than the average widescreen fix while adding so many more features.
I also have a design rule in place - it must do its best effort to work in every possible version of the game without crashing. This includes demo versions of the same games. (This sadly doesn’t count DRM but nothing I can do about that)
That being said, I am currently focused on ProStreet (as I’m also the main coder in Team Pepega for the Pepega Mod) and I hope to make a release within the next year. It should be available for every Black Box NFS on PC (except The Run and World)
If you wanna check out what I made so far, check out the Reformed mod for Undercover. I made an exclusive release for those guys because frankly, Undercover is the worst one out of the bunch (in terms of code).
- Comment on SilentPatch for Grand Theft Auto goes open source! 2 years ago:
Silent is a real cool dude.
I assume the code was closed only because it was a bit of a hodge podge he had to clean up.
I’m currently in a similar position for Black Box NFS games. It’s taken me over a year so far and I’m still not fully satisfied to release anything because there’s so much code to span over 6 (similar, but different) games.
- Comment on Chavtar 2 years ago:
Chart
- Comment on What are your favorite racing games? 2 years ago:
Yeah I meant don’t use joycons lol
Pro Controller at the very least. CTR is a game that should be played with a dpad for steering. You can use the analog inputs but some more advanced tricks (such as tight steering) will require a solid dpad.
- Comment on What are your favorite racing games? 2 years ago:
I’d recommend getting a proper controller for it. CTR is a dpad and shoulder button masher.
- Comment on What are your favorite racing games? 2 years ago:
Any Black Box made Need for Speed.
(Currently busy fixing Pro Street, so many bugs…)
- Comment on Star Wars Outlaws creative director admits forced stealth sections are “incredibly punishing”, says next patch will ease up on them 2 years ago:
Why is there Star Trek in the embed lmao
- Comment on Decorating 2 years ago:
Trucy would be trying her hardest to get him to buy this
- Comment on Is this how you play MTG? 2 years ago:
MTG poops and Yugipoops never get old
- Comment on Does anyone here play Yu-Gi-Oh Master Duel? If so, do you know an easier way to build a deck? 2 years ago:
I used to play Duel Links and shortly Master Duel after it came out. I don’t anymore but hopefully this will help.
If I was going back to the game, I’d go to look for budget deck lists and seeing what ranks up easily. Most of the community is on Discord and Reddit, as well as YouTube (yugitubers and alike) so I’d go and look there.
I’d also go look for some easy farming methods. These usually come in a form of a current event (IIRC in MD there are these “festivals” for each card type, such as Synchro Festival). These events are usually a very easy way to gain a lot of gems for not much playing.
It is what it is. TCG paper Yu-Gi-Oh is even more expensive than MD.
DL is arguably cheaper but it’s been a long time since I last played (2021).
- Comment on I hate it so much 2 years ago:
Self-centered you say?
- Comment on the twins 2 years ago:
BOUNS ROUND
hur hur hur
NYOOM
- Comment on Cyberpunk 2024 2 years ago:
I’m surprised nobody thought of the demoscene twisters
- Comment on God of War Ragnarök is coming to PC on September 19 2 years ago:
Yarr harr fiddle dee dee…
- Comment on PPSSPP has been approved for the iOS App Store! 2 years ago:
Ridge Racer
Gran Turismo
GTA Liberty City Stories
GTA Vice City Stories
God of War Ghost of Sparta
Maybe Tekken 5 DR if you can stand playing it on a portable device.
Loco Roco
And if you’re into Yugioh - Tag Force are some of the best games in the series.
That’s my list OTOH.
- Comment on FF Evangelists 2 years ago:
I’m referring to the philosophy behind the usage of said allocated ram.
If you allocate 5 cookie jars to store 1 cookie in each jar, then that’s not good.
If you store 2 cookies per jar, that’s better already, but still kind of crap.
If the websites keep putting rocks in those jars, then you’ll obviously run rampant with usage. (Read: tonsky.me/blog/js-bloat/ )
The goal is to store as many cookies in least amount of jars. You might crumble them down and reconstruct them later (compression and/or clever code) but that could take more brain (processing) power (of which we kinda have, especially on the desktop).
As you’ve said, it’s often a tradeoff between processing power and memory usage and depending on the application, you can configure things the way you need them (at least when you’re coding it).
- Comment on FF Evangelists 2 years ago:
It’s specifically about the efficiency of the usage. If it’s not used effectively, then it really is a waste.
And we all know how efficient the Web is nowadays…