> Windows doesn't care that much about userspace programs - thought Linux got kinda cranky about that?
That's absolutely not the case. On non-hardened Linux, any application can mess with any other application's memory, as long as the target is running as the same user. With SELinux or AppArmor, such things can be prevented, but even then it's trivial to disable SELinux or install a custom policy allowing the trainer to modify the game's memory, as long as you have root.
> And, subsequently, why I wondered - is there somewhere in the Vulkan/MESA/Wayland subsystems a way to similarly "compromise" everything...or do you have to run a Linux PC like a console with a deliberately broken everything in order to do it?
There is no need to "compromise" anything if you're root. You can just do things, and no protection will be able to permanently get in your way, since you are root and root is god.
> If so, so be it...but there's a healthy amount of Linux games out now and an equal amount of pirates...haven't seen one trainer for any of them.
There's always good old scanmem. It's not a targeted trainer, but it shows that what you're suggesting is absolutely possible.
I think the closest you can get to ollydbg is edb and there is GameConqueror if you just want Smith simple for modifying memory, but it is not nearly as powerful ad CheatEngine.
Maintainer here, it's nice to see some people visiting.
If someone wants to help, we're looking for translators for GameConqueror (the graphical interface): https://github.com/scanmem/scanmem/issues/254
The way CheatEngine works is similar to the way a debugger may work. It attaches to a running process by using a system call , ptrace for Linux.
>The ptrace() system call provides a means by which one process (the "tracer") may observe and control the execution of another process (the "tracee"), and examine and change the tracee's memory and registers.
There is already a CheatEngine alternative for Linux it is called scanmem, I believe it exists in Debian, Ubuntu and Arch repos. There is also the source code in github. Maybe it can help you
I would look into higan, it supports multiple consoles and is 100% open source. It is written in C++ though.
Keep in mind you can also easily emulate the controller input using whatever scripting language you want. E.g. setup a python script that uses the keyboard package.
For reading from memory look into scanmem and PINCE.
Based on what it is you want to do (I'm guessing writing a bot to play SNES games?) I would advise looking into other tools people have written before you get started. Something to also consider is having the bot make decisions based off of what's actually being drawn to the screen instead of trying to read the actual memory data. SNES games are pretty great for this because you have a limited number of sprites that are going to show up that you can easily identify.