This was my attempt to create a a SNES to Bluetooth adapter. It works but the average latency was 18.35ms, which I think is too much to be considered a good controller.

30 points

If anyone else was wondering, I found this neat data table of controller latencies to compare:

https://rpubs.com/misteraddons/inputlatency

It looks like 18.35ms is not really among the best, but there are still lots of products in that range.

I dunno if I’d say your project didn’t work out… Maybe more like you succeeded but still have work to do. Do you think you’ll try swapping the Bluetooth for a 2.4Ghz module or something and see if that performs better?

permalink
report
reply
9 points

I use an 8bitdo sn30 pro. Apparently I haven’t been using a good controller. Fooled me!

permalink
report
parent
reply
8 points

I wouldn’t call that controller bad, just not optimal. For this, I would want to have it be under 10ms to publish the code and instructions.

permalink
report
parent
reply
4 points

I’ve had a lot of connection issues with that model

permalink
report
parent
reply
3 points

How so? It disconnects? Or won’t connect to start?

permalink
report
parent
reply
3 points

I have two of em-- They’re pretty good! Definitely not perceptibly laggy or anything, at least to me.

Probably just outed myself as a casual.

permalink
report
parent
reply
3 points

Casuals unite! Fuck it I’m just trying to have fun lol!

permalink
report
parent
reply
4 points

It definitely could but the idea was to use only an esp32 rather than incorporating additional hardware.

permalink
report
parent
reply
3 points

Yeah, I get that. Do you have any sense of whether that’s a limitation of the ESP32, or with your implementation?

permalink
report
parent
reply
3 points

It’s really hard to judge without additional testing, I’m always more likely to blame my code than hardware. My guess would be something in the stack, be it my code or the library that puts it above a frame but that kind of investigation is more than I want a hobby project to be.

permalink
report
parent
reply
11 points

The project equivalent of your mum sticking your drawings to the fridge 😊

Hey, you tried, most wouldn’t bother. You’re the top 1% of humans in that way

permalink
report
reply
9 points

Whether it works or not, this looks incredibly fun! That’s a win in my book.

permalink
report
reply
6 points

How much are you doing with “rolling your own” vs using off the shelf solutions? For example if you are deep into rolling your own which Bluetooth profile are you using?

permalink
report
reply
9 points

So in this case it’s my own code to read the state of the controller and using the ble-gamepad library, which uses NimBLE under the hood. There could be some optimizations but getting to be under 10ms probably is going to use a lot of time I could just be playing games.

permalink
report
parent
reply
6 points

So you suspect the latency (enough of it anyway) is introduced in your translation code? I absolutely understand not wanting to go to the nth degree for optimization when this is a hobby project. Could you throw hardware at it? Not all ESP32 run at the same speed. Perhaps buy an oversized one that will execute your underperforming code faster?

permalink
report
parent
reply
3 points

There probably could be some optimization in the translation, such as passing the controller object as a reference when checking the state of the buttons, rather than doing two loops to read the state and act on it. But I doubt that is the source of the largest latency since this is compiled to run at 240mhz (I did some additional testing at 80 as well, about the same results). I’m using a d1 mini off alliexpress so not the highest quality but I wouldn’t expect a huge performance hit.

permalink
report
parent
reply

I have been contemplating making my own HOTAS since every time I have the cash to buy one, I either can’t find one or it gets cancelled midway through shipping and I get an automatic refund. I’m not sure where to start with that though…

permalink
report
reply

RetroGaming

!retrogaming@lemmy.world

Create post

Vintage gaming community.

Rules:

  1. Be kind.
  2. No spam or soliciting for money.
  3. No racism or other bigotry allowed.
  4. Obviously nothing illegal.

If you see these please report them.

Community stats

  • 4.4K

    Monthly active users

  • 1.4K

    Posts

  • 16K

    Comments