• 0 Posts
  • 55 Comments
Joined 2 years ago
cake
Cake day: March 21st, 2024

help-circle

  • 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:

    1. 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.
    2. 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, same data, etc). 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. (This is what we call code reflection - you can reflect the game’s types in your own code. If you’re using the same compiler as the original, even better!)

    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:

    1. 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)
    2. 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.




  • You do not need a dev account.

    The process to sideloading on iOS requires you to use something like AltStore and self-sign the app package (IPA) with your own Apple ID.

    The signature is valid for 7 days and you can do it with up to 10 apps.

    Normally you need a computer in the network with a server that communicates with the sideloading client on the device to perform the signatures, however there are workarounds to do this all on device too (just needs internet access).

    Does this suck? Yes. But the reality is, I hadn’t have had the need to use it. There are (mostly) niche reasons you’d do this (JIT emulation, modded apps, unapproved apps).

    But to be real here, to most people this just isn’t worth it. There are emulators on the App Store now too, so what’s left there aren’t things most people need.

    Is there a bigger argument to be made here on how the need is also silenced by NOT having it easily accessible? Yes. But, do keep in mind, most people don’t bother on Android today already anyway.



  • Not having CFW isn’t the end of the world. It’s a slight inconvenience having to press the button at boot and maybe sometimes randomly a game not launching.

    Also, later super slims are using more modern chips and therefore are much quieter and nicer to use.

    Lastly, currently there is a modchip being developed for a qCFW (quasi-CFW) which will allow for basically 99% CFW capabilities on later models anyway, so there is that going for it too.

    Super slims are a hidden gem imo







  • PPSSPP will attempt to establish connection to any IP or domain that is put in the ad-hoc server text box. So, much like a web browser, it entirely depends on where you tell it to connect.

    That being said, as for any security concerns, I am unaware of any exploits and/or wrongdoings with PPSSPP code, so you should be safe. It only passes the data directly between the emulated games and the chat box feature.


  • So, for PPSSPP multiplayer, you either need to be in a LAN with the other players or, as you’ve said, forward the port.

    So, if you’re on the same LAN as your friend(s), it’s as easy as setting the IP address to the host (on all the clients) and the same wifi channel in PPSSPP settings.

    If you wish to play online, it gets tricky. Most cellular data providers are behind something known as a CGNAT, which basically prohibits port forwarding.

    The only solution and workaround to this is to use a VPN tunnel that can put you in a virtual LAN with your friends but over the internet. One of the most commonly used software on PC for this is LogMeIn Hamachi. Not sure if there is anything like it on Android, though.

    I’ve actually set up a Yu-Gi-Oh Tag Force tournament for DLE but that quickly went nowhere after a couple episodes lol





  • 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).


  • Silent is a real cool dude. I’ve interacted with him directly and he’s always been helpful.

    I assume the code was closed only because it was a bit of a hodge podge he had to clean up. (Well, that and the GTA modding scene is a bit, uh, toxic, to say the least)

    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.