Thursday, February 29, 2024

Hacking a 3ds to add parental controls


 

The 3ds is an amazing piece of hardware. Especially if you hack it to add homebrew/emulators.

My son has been enjoying a bit of "free time" before bed, and playing with a generic "mini arcade" game system. The games are all generic knock offs, and I figured he'd love to play with my hacked 3ds which has thousands of high quality games...

The problem is, the 3ds doesn't have "screen time" controls to encourage him to put it down after X minutes so he gets some sleep. So I decided to download the source for the custom firmware I was using (https://github.com/LumaTeam/Luma3DS) and add the controls myself.

Because I wanted the parental controls to pause the game, and allow "sleep" to save his game, I had to add my code to the firmware itself. This lets me spawn a thread that is running in the background, even when a game is running to keep track of time, and screen time limits. I added the ability to call out to my website with the current game he's playing (so in the future if we want to have certain educational games count for less time, we can)

The basic logic is this: Every few seconds it sends the current game he's playing to my sever, which responds with the screen time limit. In order for this to work "offline" if we are not at home/near internet, it has a built in "default" time of 15 minutes. It then writes to a local file every second to keep track of actual screen time usage. Then if the current screen time usage is over the screen time limit, it pauses the OS, and pops up a screen telling him that his screen time is up.

It also has a hint on how to add more screen time (he's learning to read, so if he figures this out on his own, he deserves the bonus screen time) This is also a way for us to add more time if we need locally. We can add screen time via my server as well.

So far its working great, and just about ready for "prime time" (had some issues with the 3ds getting stuck in sleep mode, but I'm just about done with that.

Once I am finished with the code, I'll upload it all to GitHub so other parents can enjoy :)

Code is gross, but functional. I'll be adding more features as I need them. 
https://github.com/spiffomatic64/Luma3DS


Hacking a 3ds to add parental controls

  The 3ds is an amazing piece of hardware. Especially if you hack it to add homebrew/emulators. My son has been enjoying a bit of "free...