Homebrew 3DS Controller

  • Thread starter CTurt
  • Start date
  • Views 412,930
  • Replies 1,200
  • Likes 104

~Poke~

Well-Known Member
Member
Joined
Aug 18, 2015
Messages
260
Trophies
0
XP
144
Country
Would it be possible to implement Moonlight for Nvidia users?
http://moonlight-stream.com/
Iiii have been looking into a streaming solution, but the 3DS has VERY low bandwidth (100 to 110 kb/s) so it really would not look good. I think the best chances of making it work would need a full proper livestreaming program to stream it, likely OBS so it can be compressed properly. Even then it would probably need to run at something like 10 fps to get a decent picture quality.

Streaming like this takes a lot of code to implement and I'm just a beginner so don't expect it any time soon. (If anyone wants to help, specifically I need an RTMP client and a video player that takes... whatever kind of output that is? I think it's .flv. I've been waiting for the new3ds native video decoding to be supported before I even try looking into how to make that.)
 
Last edited by ~Poke~,

Selim873

Nunnayobeesnes
Member
Joined
Jul 31, 2010
Messages
1,275
Trophies
0
Age
30
Location
Chillin' with Bob Ross
XP
1,112
Country
United States
Iiii have been looking into a streaming solution, but the 3DS has VERY low bandwidth (100 to 110 kb/s) so it really would not look good. I think the best chances of making it work would need a full proper livestreaming program to stream it, likely OBS so it can be compressed properly. Even then it would probably need to run at something like 10 fps to get a decent picture quality.

Streaming like this takes a lot of code to implement and I'm just a beginner so don't expect it any time soon. (If anyone wants to help, specifically I need an RTMP client and a video player that takes... whatever kind of output that is? I think it's .flv)

Wait, really? I wonder why the console uses that low of bandwidth. Is that a hardware limitation or could it be overwritten once a kernel exploit comes out? I just made a recording of Goat Simulator using OBS at even above that bitrate. 100KBS video and 48KBS audio, so 148KBS combined at 400x240 resolution and at 15FPS, and that was even horribly blocky. Bummer.
 

~Poke~

Well-Known Member
Member
Joined
Aug 18, 2015
Messages
260
Trophies
0
XP
144
Country
Wait, really? I wonder why the console uses that low of bandwidth. Is that a hardware limitation or could it be overwritten once a kernel exploit comes out? I just made a recording of Goat Simulator using OBS at even above that bitrate. 100KBS video and 48KBS audio, so 148KBS combined at 400x240 resolution and at 15FPS, and that was even horribly blocky. Bummer.
I'm not sure if that's a hard limit, that's what I measure by using ftp. It makes no difference whether the 3ds is next to the hotspot or 20 metres away so I'm not really sure where the limitation is (it sure isn't my network, since my wifi goes at 3mb/s between computers). It does make sense to have low bandwidth though, it's not really designed to be a video player. That bandwidth is plenty for playing games - think trading pokemon - that's a tiny amount of data to transfer. think smash - controlling one character and receiving the others, it needs to happen fast but there's very little actual data there. When there's a lot of data, like loading/saving Pokemon Bank there's a lot more waiting than you'd expect.

A resolution of 256x144 is the smallest resolution Youtube offers, so that might look... half way bearable? Should also figure out how to completely disable streaming sound in OBS because sure it would be nice but we don't have that luxury.

The main reason I even want to work this out is to play games in 3d but that doubles the bandwidth and makes so many other hoops to jump through so I don't really think it's doable. Maybe if someone makes a game cart that's just a wifi receiver with some decent bandwidth (then again, what kind of bandwidth does the game cart itself have???)
 

Micheleuno

New Member
Newbie
Joined
Sep 22, 2015
Messages
4
Trophies
0
Age
31
XP
57
Country
Cote d'Ivoire
First of all, thanks for your great job, so far i'm able to use de Circle Pad and the buttons, but if i want to configure x360ce it only detects the Circle pad and de "c-stick" (the thing of the new 3ds).
I think this is due that the other buttons are considered as coming from the Keyboard, so there is a way to configure all the buttons on the x360ce?
Sorry is my english is a mess.
 

~Poke~

Well-Known Member
Member
Joined
Aug 18, 2015
Messages
260
Trophies
0
XP
144
Country
First of all, thanks for your great job, so far i'm able to use de Circle Pad and the buttons, but if i want to configure x360ce it only detects the Circle pad and de "c-stick" (the thing of the new 3ds).
I think this is due that the other buttons are considered as coming from the Keyboard, so there is a way to configure all the buttons on the x360ce?
Sorry is my english is a mess.
To make the other 3ds buttons act as controller buttons you must set them to JOY1 JOY2 etc. If you want to use JOY9 and further you must reconfigure vJoy as described in the ini.
 

Kurt91

Well-Known Member
Member
Joined
Sep 9, 2012
Messages
589
Trophies
1
Age
33
Location
Newport, WA
XP
2,240
Country
United States
Would it help the video streaming plan if you were only streaming a part of the computer screen? I'm certain that a lot of people who want to stream video probably want it for playing PC games, so I'd guess that having the option to zoom in on the screen to a specific region, and having the game on windowed mode would help out a bit.

Also, this has probably been asked before, but does the newest CIA version allow the use of the N3DS buttons (C-Stick + ZL/ZR)?
 

~Poke~

Well-Known Member
Member
Joined
Aug 18, 2015
Messages
260
Trophies
0
XP
144
Country
Would it help the video streaming plan if you were only streaming a part of the computer screen? I'm certain that a lot of people who want to stream video probably want it for playing PC games, so I'd guess that having the option to zoom in on the screen to a specific region, and having the game on windowed mode would help out a bit.

Also, this has probably been asked before, but does the newest CIA version allow the use of the N3DS buttons (C-Stick + ZL/ZR)?

That was always the plan. If an entire desktop eg. 1920x1080 or even a small one like 1366x768 were downscaled to 400x240 (or the appropriate 16:9 resolution, 400x225) it would just be a blurry mess.

If a game is rendered in a window at 400x240 (or 3D at 800x240) it is already pretty small and low quality, but that takes more than 100kbps to stream without losing even more quality.

To demonstrate: I downloaded a Youtube video of Black Ops 3 gameplay at the smallest resolution Youtube serves, 256x144 (64% of the width of the 3ds screen size) and at 15fps. Looking in VLC, I can see the bitrate varies between 200 and 250kbps for the H.264 version - the same codec used for livestreaming. I'm not sure how much of this is audio because VLC won't tell me, but it might be a flat 128kbps. The WebM format of the same video shows them separately as 128kbps audio and ~64kbps video (WebM/VP9 really is a lot more compressed, though the picture quality sliiightly suffers).

To see if it's really feasible to do this through streaming, I decided to try record it myself. I set OBS to record at 100kbps 15fps with the lowest audio possible to choose - 32kbps mono. The output file hovers around 150kbps so apparently this isn't quite doable. At this resolution it seems to not be too blocky though (I've also tested at 400x240, which gave me similar kbps but it looked terrible and blocky). The question is, can OBS be set to leave out the audio completely? Can the stream be optimised down to fit in what's available? Is it only even as good as it is because I set it to save the file, would streaming it be worse? Is there a different livestreaming program we need to do this? The test file is here if you want to take a look, and decide whether that quality is acceptable (remembering the actual result will probably not be quite that good). https://mega.nz/#!a15GDCwY!N_0LB5QQs7IHoaVCl6vQk4qPwwIGxFnHv1u-vTJbN6w

In short, yes it is doable but the quality will be pretty bad. I am not really sure how to go ahead and implement this (best case, I'm still waiting on the n3ds video api to be added to ctrulib, just skip o3ds support) and I'm not sure if someone experienced enough would bother because it seems like a lot of work for a pretty unimpressive result. I've also looked into coding it in lua which would be better suited for my skill level, but this means the video gets even less compression (basically, each video frame is an individual jpg) so it seems even less worthwhile.

Keep in mind that I'm a beginner programmer who's not very good at C. Perhaps there's a better way to do this, but it's way outside anything I could hope to do soon.



As for your other question: no. I can't compile or test CIA, so it's using the set up CTurt gave it. I've heard it IS possible to let CIAs use n3ds features but this one cannot, so you'd need to ask someone more experienced in this area to take a look at it.
 

Micheleuno

New Member
Newbie
Joined
Sep 22, 2015
Messages
4
Trophies
0
Age
31
XP
57
Country
Cote d'Ivoire
To make the other 3ds buttons act as controller buttons you must set them to JOY1 JOY2 etc. If you want to use JOY9 and further you must reconfigure vJoy as described in the ini.
Ohh i see, thanks a lot :)
Edit: Works like a charm, really thanks you.
 
Last edited by Micheleuno,

Osakasan

Well-Known Member
Member
Joined
Sep 19, 2015
Messages
1,236
Trophies
1
Age
39
XP
3,146
Country
I have a question about this. If i have an access point configured in my PC for connecting my 3DS (Let's say my Wifi SSID is PC_WiFi, and the access point i created from that one to connect my 3DS is 3DS_WiFi) would this work? It would be neat for certain emulators and games.
 

~Poke~

Well-Known Member
Member
Joined
Aug 18, 2015
Messages
260
Trophies
0
XP
144
Country
I have a question about this. If i have an access point configured in my PC for connecting my 3DS (Let's say my Wifi SSID is PC_WiFi, and the access point i created from that one to connect my 3DS is 3DS_WiFi) would this work? It would be neat for certain emulators and games.

It might work, give it a try. There's no need to have a separate wifi for the 3ds if your main wifi is on the same network as your pc though.


You may need to make sure 3ds_wifi is the only one your 3ds can access if you want to do that, I'm not sure how the 3ds manages multiple networks. On your pc you'll also need to make sure you use the ip address for the correct network since they'll be different.
 

Osakasan

Well-Known Member
Member
Joined
Sep 19, 2015
Messages
1,236
Trophies
1
Age
39
XP
3,146
Country
I share wifi with my neighbor, so my PC with its 9 db antenna doesn't have a problem with reception, but my 3DS is pretty spotty about that, so i had to think on a workaround and that's the only thing i was able to do.

About how 3DS handles multiple networks, it always goes for the most powerful once it has been put to sleep once. I mean, if my 3DS is originally struggling to keep connected to PC_WiFi, once i close the lid and open it again it connects to 3DS_WiFi
 
  • Like
Reactions: ~Poke~

Foxy

Well-Known Member
Newcomer
Joined
May 1, 2015
Messages
76
Trophies
0
XP
198
Country
Brazil
I have a question about this. If i have an access point configured in my PC for connecting my 3DS (Let's say my Wifi SSID is PC_WiFi, and the access point i created from that one to connect my 3DS is 3DS_WiFi) would this work? It would be neat for certain emulators and games.

Yup, it does work. I use mHotspot myself on my laptop, since my router is far and I need the least delay possible for playing osu!. Just make sure there IS internet going through because the 3DS kicks the connection out if it can't find internet in it.

About how 3DS handles multiple networks, it always goes for the most powerful once it has been put to sleep once. I mean, if my 3DS is originally struggling to keep connected to PC_WiFi, once i close the lid and open it again it connects to 3DS_WiFi

Huh, I thought it actually prioritized the networks order on the 1,2,3 and it always worked correctly like that. I always leave my main connection on the last slot so whatever I create would go first.
 
  • Like
Reactions: ~Poke~

daxtsu

Well-Known Member
Member
Joined
Jun 9, 2007
Messages
5,627
Trophies
2
XP
5,194
Country
Antarctica
I can't get the CIA version to work for the life of me. I've disabled my firewall, forwarded ports, made sure the ports match in both ini files three times, made sure the IP address in the 3DS ini is correct, made sure the server is running (it still is, it's in the corner of my desktop :P), and to no avail. It'd be really helpful if the server or client on the 3DS spit out messages about connections or failures..
 

Cydget

Well-Known Member
Member
Joined
Oct 1, 2015
Messages
493
Trophies
0
Age
27
XP
260
Country
United States
I love the app so far and can't wait to see it progress. With streaming video, are you sure the 3ds can only support up to 100kbps. When I connect my N3DS to the internet via connectify(laptop hotspot) and play a netflix video it shows that it can download up to 3mbps.
SXrE2AH.png

Maybe this is a New 3DSXL only type of thing. Also, im not sure if you were aware, but there seems to be someone else who made a controller that streams screens but the controls don't work with most games :( https://gbatemp.net/threads/homebrew-3ds-remote-desktop.381646/
Also, keep up the great work :)
 

~Poke~

Well-Known Member
Member
Joined
Aug 18, 2015
Messages
260
Trophies
0
XP
144
Country
Neat app, any chance of an Android Server so that I can control my Android games with the 3DS?
Well it's doable, but I don't plan to port it. Even if I did Android is unknown territory to me. I think there's another homebrew called EdpJoy that does this.

I love the app so far and can't wait to see it progress. With streaming video, are you sure the 3ds can only support up to 100kbps. When I connect my N3DS to the internet via connectify(laptop hotspot) and play a netflix video it shows that it can download up to 3mbps.
SXrE2AH.png

Maybe this is a New 3DSXL only type of thing. Also, im not sure if you were aware, but there seems to be someone else who made a controller that streams screens but the controls don't work with most games :( https://gbatemp.net/threads/homebrew-3ds-remote-desktop.381646/
Also, keep up the great work :)
Huh, idk then. I have a new 3ds so it should be the same? I've only looked at the speed that ftp gets, and I don't see why that wouldn't be running at full speed. I don't have Netflix but I'll try look at something else. Maybe we can have full glorious 240p ;)
Unless it's a homebrew specific limit.
I've seen that other one, I haven't used it but I got the impression it was pretty low framerate/quality? It also grabs the whole screen which isn't a good idea I don't think, and completely rules out any chance of rendering the game 3d (though that's a huge pain anyway for most games). The problem is that to avoid capturing everything completely I gotta go to a proper livestreaming program which will also give much better compatibility.

This is kinda distant plans for me though.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Mondooooo @ Mondooooo: im fucking motivated