Getting good at SNES games through DLL injection
HTML-код
- Опубликовано: 2 авг 2024
- Follow me on Mastodon: hachyderm.io/@fasterthanlime
Support me on Patreon or GitHub: fasterthanli.me/donate
00:00 I'm bad at SNES games
01:00 Injecting a DLL into Snes9X
04:35 Reading the gamepad state, x360 input vs joysticks
10:09 Mapping buttons, event handling
13:10 Synthesizing keyboard events with SendInput
16:50 Time to test it out!
18:00 Gamers rise up Наука
Hey, great video!
I wrote an article about something very similar not too long ago: Injecting keypresses into a Game Boy emulator.
Your superb output over the years was actually a big inspiration for finally starting to write myself. Thanks a lot!
I found your channel like two days ago, and I think I'm just gonna binge watch all of your videos. Great stuff!
Nice video :) I would love more of these with Rust.
i love ur content, low level programming is awesome, are few content about this, !! suscribed
Hey, great video!
is the source code available somewhere?
since most of the coding done in fast forward it could be really great to have a look at the code yourself after watching
These recent videos has been going really great tbh. Interesting stuff. I only wish that you explained more with less music :)
I'm gonna be 100% honest with you here - I get bored while editing. It also feels really weird to have gaps of complete silence when fast forwarding to the typing. Most of what I cut was "so we're gonna put an X, then a Y...", just mumbling to myself. I see why this isn't ideal but I haven't found a good solution yet. Writing a script in advance helps a bunch but not completely.
@@fasterthanlime Music is perfect! Great work!
Content is great, music is also great!
Press and depress (a button) mean the same thing. I think you meant “release” :)
Amazing Procedures, you had show one of the amazing sides of reverse engineering!
Thats awesome, best I could do is glue a spaghetti noodle or a straw to F5
Lol Juniper W
what's the plugin you're using to show the errors on each line? looks very helpful
great video too, coming from cpp to rust to do similar things
The plug-in is Error Lens: marketplace.visualstudio.com/items?itemName=usernamehw.errorlens
Hey,
So instead of creating sockets for the output couldn't you just create new console window?
I've seen some dll injections videos (using c++) and that's what they normally do.
Sure! I just like it having it in the same terminal where I launch the injector from. Also, I originally wanted to make an actual web frontend (to control it from the browser), but had to stop myself to keep the video short.
I need a bigger thumbs up
the lazy boy did it again 😂
16:03 Maybe you could try sending shift as a scancode (ki.wScan) instead of the VK, I have a project that uses SendInput extensively and it allows me to do SendInput(4, ...) when using scancodes, which you should probably do either way because some programs straight up ignore VK keycodes and can only be influenced with scancodes.
This is how a hacker is born :D
Why do you want to track depression of a button?
input has two states, Pressed and not Pressed e.g. KeyDown and KeyUp, when you press a key the OS emits an event which your program's chosen input handler polls for using something like for event in event_entity.poll() { /*handle key presses*/ } in the main loop, you want to know when a key is pressed to handle a "key press" event, and when its up to know when to stop handling the event, programs often get multiple inputs sometimes simultaneously for example in a FPS you might be pushing 'w' and 'space' rapidly to bunny hop, the 'w' key would be in a KeyDown state for the duration of the time you held it down, while the 'space' key would alternate between KeyUp and KeyDown events rapidly.
@@nsdfilthyasmels4852 yes I know about button been in activated position by how one will track it mental state 😉
@@KanykaAiM mentally you don't really need to keep track of it, you just slap your input handlers poll method in your main loop so that when the event fires your handler picks it up and passes it to the appropriate if/else chain to do things with, unless your talking about toggle'd buttons where they have a "sticky" state ie they stay on or off if they are clicked (like a light switch) and that particular toggle is tied to the main program in such way that it modifies the behavior of the program (most people would use checkboxes in this instance and keep track of the state of these checks in a struct, e.g. struct Global_State { bool options[xx]} my_state; if my_state.options[SOME_CONST_NAMED_OPTION] == true { /*do stuff*/ }
It's depressed :(
Pretty sure you can use a gamepad key binder tool to do this in like 5m, but fair enough
Oh definitely, it's just an excuse to learn the other thing.