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
  • НаукаНаука

Комментарии • 28

  • @GEBIRGE
    @GEBIRGE 2 года назад +17

    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!

  • @maksymiliank5135
    @maksymiliank5135 Год назад +4

    I found your channel like two days ago, and I think I'm just gonna binge watch all of your videos. Great stuff!

  • @pictureus
    @pictureus 2 года назад +4

    Nice video :) I would love more of these with Rust.

  • @xxaqploboxx
    @xxaqploboxx Год назад

    i love ur content, low level programming is awesome, are few content about this, !! suscribed

  • @aloncohen-magen2844
    @aloncohen-magen2844 2 года назад +12

    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

  • @----__---
    @----__--- 2 года назад +20

    These recent videos has been going really great tbh. Interesting stuff. I only wish that you explained more with less music :)

    • @fasterthanlime
      @fasterthanlime  2 года назад +20

      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.

    • @peterjatek365
      @peterjatek365 2 года назад +11

      @@fasterthanlime Music is perfect! Great work!

    • @Archcorsair
      @Archcorsair Год назад

      Content is great, music is also great!

  • @meowsqueak
    @meowsqueak Год назад +1

    Press and depress (a button) mean the same thing. I think you meant “release” :)

  • @klainclark2449
    @klainclark2449 Год назад +1

    Amazing Procedures, you had show one of the amazing sides of reverse engineering!

  • @johnbruhling8018
    @johnbruhling8018 2 года назад +3

    Thats awesome, best I could do is glue a spaghetti noodle or a straw to F5

  • @polygonerror
    @polygonerror 2 года назад

    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

    • @fasterthanlime
      @fasterthanlime  Год назад +1

      The plug-in is Error Lens: marketplace.visualstudio.com/items?itemName=usernamehw.errorlens

  • @antoniocs8873
    @antoniocs8873 2 года назад +1

    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.

    • @fasterthanlime
      @fasterthanlime  2 года назад +11

      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.

  • @debuti
    @debuti 2 года назад +2

    I need a bigger thumbs up

  • @fraollemecha
    @fraollemecha 2 года назад +3

    the lazy boy did it again 😂

  • @arijanj
    @arijanj Год назад +1

    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.

  • @IamSedrik
    @IamSedrik 2 года назад +9

    This is how a hacker is born :D

  • @KanykaAiM
    @KanykaAiM Год назад +1

    Why do you want to track depression of a button?

    • @nsdfilthyasmels4852
      @nsdfilthyasmels4852 Год назад

      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.

    • @KanykaAiM
      @KanykaAiM Год назад +1

      @@nsdfilthyasmels4852 yes I know about button been in activated position by how one will track it mental state 😉

    • @nsdfilthyasmels4852
      @nsdfilthyasmels4852 Год назад

      @@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*/ }

  • @ozjuanpa
    @ozjuanpa Год назад +1

    It's depressed :(

  • @hamu_sando
    @hamu_sando Год назад +1

    Pretty sure you can use a gamepad key binder tool to do this in like 5m, but fair enough

    • @fasterthanlime
      @fasterthanlime  Год назад +4

      Oh definitely, it's just an excuse to learn the other thing.