Dekkia's Blog

Switch Lite Dock

2024-01-21, 17:56:37

I wonder how complicated it would be to build a Nintendo Switch Lite Dock using a Raspberry Pi 5 and SysDVR?

17:57:31

According to Google, some people have done that already, but there aren't any good guides for it.

17:58:27

There's probably better stuff to be done with an rpi5, but I guess that's what mine will do for the time being.

18:00:08

It shouldn't be that hard imo.

There's a guide on how to cross-compile everything needed for SysDVR on ARM.

So I only need a 3D-printed case that looks like a switch dock.

18:00:47

I have everything here I need, except maybe a right-angle USB-C cable for inside the dock.

Lemme order that real quick.

18:04:48

Ugreen advertises some of their Cables with 480Mbps data transfer speed.

Aka USB 2.0.

I have no clue if that makes a difference with SysDVR, it seemed to work fine right now with 2.0 on Windows. But I'll still go with 3.0 just to be on the safe side.

18:06:22

50cm USB-C to USB-A cable acquired.

18:06:54

more or less, that is. It'll arrive on Tuesday.

Then I can design and print a dock that holds everything.

18:14:45

Of course, I won't start with the Raspi part until that's finished because I can't be bothered right now to set it Up.

18:22:20

Ok, so I canceled the Ugreen cable again because I've got another idea:

This should be a real dock, right? So I also want to charge the switch at a "proper" speed.

18:23:02

That's why I bought one of those USB power injectors, so I just can add a second USB-Port on the outside for extra power.

18:23:58

Now it's only USB 2.0, but that shouldn't matter.

TBC on Wednesday.

2024-01-24, 18:48:30

I still haven't gotten all the hardware I need, but the Case is coming along nicely.

A 3D Rendering of a Nintendo Switch dock with some holes for connectors on top and a power button on the side.
A 3D Rendering of a Nintendo Switch dock with some holes for connectors on top and a power button on the side.
The same 3D model but from a different angle. This time a Raspberry Pi 5 can be seen in the back of it, matching up with the holes on the outside.
The same 3D model but from a different angle. This time a Raspberry Pi 5 can be seen in the back of it, matching up with the holes on the outside.

18:51:00

Wat's left to do now:
- Put some software on the Pi.
- Print the case
- Wait for the remaining Cables I ordered.

2024-01-27, 15:10:43

Shoutout to cheap Chinese HDMI capture cards.

A Screenshot of the raspberry pi desktop with sub-par picture quality in VLC.
A Screenshot of the raspberry pi desktop with sub-par picture quality in VLC.

15:29:47

Let's start installing SysDVR, shall we?

15:30:14

Here goes nothing.

chmod +x dotnet-install.sh
./dotnet-install.sh
chmod +x dotnet-install.sh ./dotnet-install.sh

15:33:36

That was anticlimactic.
I 100% expected Microsoft to do Microsoft things.

It just worked and I don't trust it.

The output log of the install-script I just ran.

dotnet-install: Attempting to download using aka.ms link https://dotnetcli.azureedge.net/dotnet/Sdk/8.0.101/dotnet-sdk-8.0.101-linux-arm64.tar.gz
dotnet-install: Remote file https://dotnetcli.azureedge.net/dotnet/Sdk/8.0.101/dotnet-sdk-8.0.101-linux-arm64.tar.gz size is 209542458 bytes.
dotnet-install: Extracting zip from https://dotnetcli.azureedge.net/dotnet/Sdk/8.0.101/dotnet-sdk-8.0.101-linux-arm64.tar.gz
dotnet-install: Downloaded file size is 209542458 bytes.
dotnet-install: The remote and local file sizes are equal.
dotnet-install: Installed version is 8.0.101
dotnet-install: Adding to current process PATH: `/home/pi/.dotnet`. Note: This change will be visible only when sourcing script.
dotnet-install: Note that the script does not resolve dependencies during installation.
dotnet-install: To check the list of dependencies, go to https://learn.microsoft.com/dotnet/core/install, select your operating system and check the "Dependencies" section.
dotnet-install: Installation finished successfully.
The output log of the install-script I just ran. dotnet-install: Attempting to download using aka.ms link https://dotnetcli.azureedge.net/dotnet/Sdk/8.0.101/dotnet-sdk-8.0.101-linux-arm64.tar.gz dotnet-install: Remote file https://dotnetcli.azureedge.net/dotnet/Sdk/8.0.101/dotnet-sdk-8.0.101-linux-arm64.tar.gz size is 209542458 bytes. dotnet-install: Extracting zip from https://dotnetcli.azureedge.net/dotnet/Sdk/8.0.101/dotnet-sdk-8.0.101-linux-arm64.tar.gz dotnet-install: Downloaded file size is 209542458 bytes. dotnet-install: The remote and local file sizes are equal. dotnet-install: Installed version is 8.0.101 dotnet-install: Adding to current process PATH: `/home/pi/.dotnet`. Note: This change will be visible only when sourcing script. dotnet-install: Note that the script does not resolve dependencies during installation. dotnet-install: To check the list of dependencies, go to https://learn.microsoft.com/dotnet/core/install, select your operating system and check the "Dependencies" section. dotnet-install: Installation finished successfully.

15:40:47

It's going pretty well so far.

The only thing that has been *slightly* complicated was compiling Cimgui.

15:45:14

I feel better now.
Would've been weird if it just worked like that.

trying to run SysDRV with dotnet, but the dotnet command is not found.
trying to run SysDRV with dotnet, but the dotnet command is not found.

15:53:46

And here's Microsoft doing their thing. As expected.

Their installer doesn't add their bin directory to PATH.

Adding the /home/pi/.dotnet to $PATH.

After adding it, dotnet is a know command.
Adding the /home/pi/.dotnet to $PATH. After adding it, dotnet is a know command.

15:54:32

It outputs "dotnet-install: Adding to current process PATH: `/home/pi/.dotnet`. Note: This change will be visible only when sourcing script." while running.

What script do you want me to source Mr Gates? The install script?

16:01:05

Fixed that, and onto the next issue.

DotNET not being able to find the library SDL2_image when trying to run SysDVR from shell.
DotNET not being able to find the library SDL2_image when trying to run SysDVR from shell.

16:15:48

Looks like I'm missing libsdl2-dev. But I'm not.

Lovely.

16:16:41

Oh no.

Googling the error message I got only gave one result.
Googling the error message I got only gave one result.

16:20:25

libsdl2-image-dev is its own package but the SysDVR manual install guide doesn't mention that.

16:21:33

But the single Google result did.
Kind of at least. It was for MacOS but potaito potato.

16:24:55

Oh come on!

SysDVR-Client 6.0 - by exelix
https://github.com/exelix11/SysDVR
Build ID: e18a704

Segmentation fault
SysDVR-Client 6.0 - by exelix https://github.com/exelix11/SysDVR Build ID: e18a704 Segmentation fault

16:26:41

It's not completely screwed up, it looks like.

--help Works.

16:28:41

--debug works too.

System.IndexOutOfRangeException: Index was outside the bounds of the array.
at SysDVR.Client.CommandLineOptions.Parse(String[] args)
at SysDVR.Client.Program.RunApp(String[] args)

16:30:12

Wait, does it crash while parsing the command line options?

That's almost funny.

16:37:02

The Legacy Player works.

Guess I'll use that then.

Mario Kart 8 DX being displayed inside the SysDVR Client inside VLC.
Mario Kart 8 DX being displayed inside the SysDVR Client inside VLC.

16:38:47

It's even better with --fullscreen.

16:41:03

Now I just need to figure out how to start it on boot and restart it in case it crashes or exits.

Hey, systemd u up?

17:05:54

Figured it out.
In case anybody stumbles over this thread and wants it:

gist.github.com/RealDekkia/c57

17:18:02

Almost got it right on the first try.

Had to add a
```
After=graphical.target
Wants=graphical.target
```
and now it works on boot.

Nice.

17:20:00

I'd love to post a Video, but the Pi leaks my wifi SSID on boot and that's bad opsec.

17:36:01

Two more finishing touches:

Add a wallpaper as some sort of wait screen.

And install unclutter to get rid of the cursor when the desktop is showing.

17:41:19

Perfection.

Unclutter didn't work but I can't be bothered to fix that.

A short video of Mario Kart 8 DX starting from an empty desktop. The Desktop wallpaper depicts tom nook.

17:42:04

The wallpaper was part of the set Nintendo of Japan sent you in 2021 on your birthday btw.

17:42:52

The lag comes from my cheap capture card. It's better with a real display.

17:43:22

Now I just have to wait for the 3D prints to finish, and I can put it together.

17:45:02

One more thing: Enabling overlayFS to hopefully have it last longer.

18:43:46

Most of the 3D printing is done and the brass inserts are in.

Parts pf the 3D printed switch lite dock with brass thread inserts in various mounting-holes.
Parts pf the 3D printed switch lite dock with brass thread inserts in various mounting-holes.

18:56:06

Here's some great jank: The only M2.5 Screws I had are 10mm long. So used M2.5 Inserts as standooffs.

A picture of a Raspberry pi 5 mounted in a 3D printed shell with threaded brass inserts as standoffs ontop of the PCB.
A picture of a Raspberry pi 5 mounted in a 3D printed shell with threaded brass inserts as standoffs ontop of the PCB.
A top-down view of the whole case with the Pi in it. There's also a USB cable that comes in trough a hole on the bottom.
A top-down view of the whole case with the Pi in it. There's also a USB cable that comes in trough a hole on the bottom.

19:01:35

The rails to hold the swicht centered (just like on the real dock) are in too.

Technically I designed them to be replaceable, in practice I had to hammer them in.
Let's just hope I don't need to replace them.

Zoomed-in picture from the side of the dock where guiderails are visible on either side.
Zoomed-in picture from the side of the dock where guiderails are visible on either side.

19:06:17

And here goes the Fan.

A Picture of the back lid of the dock with a smal Fan mounted to it. On the bottom of the picture is the Raspberry Pi that lines up with the fan.
A Picture of the back lid of the dock with a smal Fan mounted to it. On the bottom of the picture is the Raspberry Pi that lines up with the fan.

19:16:04

And here comes the last part fresh of the Print bed: The power Switch.

I printed it separately to align it in a way that makes it stronger.

A small L-Shaped plastic piece with a scre-hole on the shorter and a power-symbol on the longer arm.
A small L-Shaped plastic piece with a scre-hole on the shorter and a power-symbol on the longer arm.
That L-shaped piece from the previous picture installed at the top right of the shell where the long end of it touches the power-switch on the raspberry pi.
That L-shaped piece from the previous picture installed at the top right of the shell where the long end of it touches the power-switch on the raspberry pi.
The same thing, but visible from the outside. The button is flush with the rest of the case.
The same thing, but visible from the outside. The button is flush with the rest of the case.

19:20:31

Closing up the Case was a lot easier than expected.

I was concerned about the Fan cable, but that went smoth.

The back side of the case I'm working on. It has two bigger screws that hold it on and four small ones around the fan.
The back side of the case I'm working on. It has two bigger screws that hold it on and four small ones around the fan.

19:24:01

And there it is.
With the switch and everything.

I'll post a Real video of it working tomorrow. But I first have to make spaces on TV cupboard for it and I don't fee like doing that now.

A gray switch lite in a 3D printed dock. The logo and Nintendo switch text are white, the rest is black.
A gray switch lite in a 3D printed dock. The logo and Nintendo switch text are white, the rest is black.

19:50:03

Quickly tested it on my Desktop Monitor.

The latency is not like Smash on a CRT but it's serviceable.

The mario kart 150cc win screen with link (player 1)  in first place with 54 points.
The mario kart 150cc win screen with link (player 1) in first place with 54 points.

19:54:11

Playing like that also slowly decreases the battery, because It can't charge fast enough over that USB connection.
I'll have to look into fixing that at some point. But it's not a big deal.

2024-01-28, 07:41:10

Video as Promised.

I consider this project done now.

The Switch Lite dock I built standing on a low cupboard with a projector screen on top. In my right hand I'm holding a switch lite with mario kart running on it. I then put it into the dock and within seconds the display on the screen changes to the game. That's when the game music also starts playing trough the speakers of my setup.