Tesla - The Nintendo Switch Overlay Menu

fhwyjbd.png

Hey all.
I'd like to introduce to you, Tesla: My answer to the growing need for proper ingame front ends for sysmodules.


What is this?

  • Tesla consists of three individual parts. nx-ovlloader, the Tesla menu and libtesla.
    • nx-ovlloader is basically nx-hbloader ported to run as a sysmodule. It runs in the background and loads overlay NROs (.ovl files) given to it.
    • Tesla Menu is the equivalent to the hbmenu. It's the initial thing loaded by nx-ovlloader and acts as a hub for you to select all other overlays.
    • libtesla is where it becomes interesting for developers. It's an easy to use library that handles layer creation, UI drawing and all the overlay UX. It makes it very easy to create a new overlay for anything
  • A frontend for sysmodules that before required either a homebrew or a config file to change settings or used sounds or the LED to give the user feedback.

What is this not?

  • A tool that lets you create overlays that are always visible. Overlays can get unloaded way to easily for this.
  • An excuse to port absolutely everything to a overlay. Nobody's going to need a title manager overlay. If you consider making a overlay, keep it simple. You don't have a whole lot of memory to work with.


How do I use this?

First of all, download the latest release of nx-ovlloader and the Tesla Menu from the GitHub Release page and extract it onto your SD card.
After a reboot, hold down L and DPad Down and push on the right joy stick to bring up Tesla at any time. Navigation works as you imagine it.
Similar to normal homebrews, you place your .ovl files in the /switch/.overlays folder on your SD card.


Screenshots

W8yN2M6.jpg

fdfWAXw.jpg


Notice

Make sure to use the latest Atmosphere release when trying this as older versions ( as the one SX OS uses too ) probably won't have enough memory available for this to run. Overlays do take a lot of space so nx-ovlloader reserves 6MB. 2MB for framebuffers and around 4MB for overlay developers to use in their overlays.


GitHub

nx-ovlloader: https://github.com/WerWolv/nx-ovlloader
Tesla Menu: https://github.com/WerWolv/Tesla-Menu


For Developers

libtesla: https://github.com/WerWolv/libtesla
Tesla build template: https://github.com/WerWolv/Tesla-Template


Download

nx-ovlloader: https://github.com/WerWolv/nx-ovlloader/releases/latest
Tesla-Menu: https://github.com/WerWolv/Tesla-Menu/releases/latest
EdiZon Overlay: http://werwolv.net/downloads/EdiZonOverlay.zip ( As a little preview for what this is capable of and what EdiZon 4.0.0 will have even more of soon :) )

Special thank especially to averne without him, this would not have been possible!


Obligatory Donation links

GitHub Sponsors https://github.com/sponsors/WerWolv
PayPal https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=KP7XRJAND9KWU&source=url
Patreon https://www.patreon.com/werwolv



Thanks a lot and have fun using and extending it :)
 
Last edited by WerWolv,

bloodfalco

Well-Known Member
Member
Joined
Nov 29, 2015
Messages
507
Trophies
0
Age
38
XP
1,765
Country
Indonesia
Hi @WerWolv Thank you very much for replying

The ovlmenu.ovl is already inside /.overlays folder as stated above. Is there any latest update for ovlmenu so it can support 1.2.0 tesla?
 

WerWolv

EdiZon and Tesla Developer
OP
Developer
Joined
Mar 30, 2018
Messages
252
Trophies
0
Age
25
XP
1,864
Country
Switzerland
Any help?
Try running the archive bit fixer in Hekate perhaps. Also make sure fizeau is turned off if you have it

--------------------- MERGED ---------------------------

Good night everybody! I just released a new version of nx-ovlloader, Tesla-Menu and libtesla with LOTS of fancy additions!
https://github.com/WerWolv/nx-ovlloader/releases/tag/v1.0.3
https://github.com/WerWolv/Tesla-Menu/releases/tag/v1.1.0
https://github.com/WerWolv/libtesla/releases/tag/v1.3.0
libtesla Changelog
- Added full touch support
- Added Trackbars
- Rewrote scrolling in lists. This means scroll animations!
- Completely fixed all rendering artifacts and slowdowns in 3D games
- Fixed crashes when adding items to a list and clearing it after it has been created already
- Added functions to change OverlayFrame title and subtitle
- Added HeaderOverlayFrame that allows for custom drawn headers above the usual content
- Fixed joy stick input only working properly in handheld mode
- Make all draw functions take int32s now - Lots of style fixes and fancy pants things by @HookedBehemoth
- Holding down directional button to scroll in lists - Trackbar improvements
- ListItem text scrolling and truncation if it's too long
- libtesla now uses raw fs calls instead of stdio which reduces file size by a lot by @HookedBehemoth
- Lots of fixes and internal improvements by @diwo T
a ton to all contributors!

This doesn't break any compatibility with old overlays so feel free to update right away.

To really see and appreciate the new changes, you'll have to wait for overlay devs to update their projects
 

bloodfalco

Well-Known Member
Member
Joined
Nov 29, 2015
Messages
507
Trophies
0
Age
38
XP
1,765
Country
Indonesia
@WerWolv "Try running the archive bit fixer in Hekate perhaps. Also make sure fizeau is turned off if you have it"

Is there any guide for this? Can I use the archive bit fixer when activating RCMGUI?
 

WerWolv

EdiZon and Tesla Developer
OP
Developer
Joined
Mar 30, 2018
Messages
252
Trophies
0
Age
25
XP
1,864
Country
Switzerland
@WerWolv "Try running the archive bit fixer in Hekate perhaps. Also make sure fizeau is turned off if you have it"

Is there any guide for this? Can I use the archive bit fixer when activating RCMGUI?
It's a single button press in Hekate. Under Tools -> Archive Bit fixer
 

1basti1

Well-Known Member
Member
Joined
Jun 30, 2019
Messages
215
Trophies
0
Age
33
XP
953
Country
Germany
Is it possible to disable the Tesla example? Or do you deleted that anyway in the next or so update? :)

Edith: Oh wait. Its probably an overlay. I updated through the homebrew store... :lol::wacko:
 
Last edited by 1basti1,

komabear

Well-Known Member
Member
Joined
Mar 4, 2017
Messages
113
Trophies
0
XP
1,474
Country
Bulgaria
Code:
 auto *clickableListItem = new tsl::elm::ListItem("Clickable List Item", "...");
        clickableListItem->setClickListener([](u64 keys) {
            if (keys & KEY_A) {
                tsl::changeTo<GuiSecondary>();
                return true;
            }

            return false;
        });

Is this outdated? I'm getting build errors when I try to build this.
 

WerWolv

EdiZon and Tesla Developer
OP
Developer
Joined
Mar 30, 2018
Messages
252
Trophies
0
Age
25
XP
1,864
Country
Switzerland
Code:
 auto *clickableListItem = new tsl::elm::ListItem("Clickable List Item", "...");
        clickableListItem->setClickListener([](u64 keys) {
            if (keys & KEY_A) {
                tsl::changeTo<GuiSecondary>();
                return true;
            }

            return false;
        });

Is this outdated? I'm getting build errors when I try to build this.

What are the build errors? I successfully built it before release
 

komabear

Well-Known Member
Member
Joined
Mar 4, 2017
Messages
113
Trophies
0
XP
1,474
Country
Bulgaria
What are the build errors? I successfully built it before release
This is the error I'm getting:
https://pastebin.com/tWeFfEiY

And this is the code:

Code:
virtual tsl::elm::Element* createUI() override {
        auto rootFrame = new tsl::elm::OverlayFrame("Tesla Template", "v1.1.0");
        auto list = new tsl::elm::List();

        list->addItem(new tsl::elm::ListItem("Test List Item"));
        list->addItem(new tsl::elm::ToggleListItem("Test Toggle List Item", true));

        auto* clickableListItem = new tsl::elm::ListItem("Clickable List Item", "...");
        clickableListItem->setClickListener([](u64 keys) {
            if (keys & KEY_A) {
                tsl::changeTo<GuiSecondary>();
                return true;
            }

            return false;
            });
        list->addItem(new tsl::elm::ListItem("Clickable List Item"));
        rootFrame->setContent(list);

        return rootFrame;

I'm probably doing something wrong as I'm very new to this and I'm just studying, but I can't figure this out. I'm using the overlay template and I can build it fine, but I'm trying to add a click check to return the user to the home menu.

In fact, is there a way to make it so as soon as my option is selected from the main tesla menu, I run my code?
 
Last edited by komabear,

WerWolv

EdiZon and Tesla Developer
OP
Developer
Joined
Mar 30, 2018
Messages
252
Trophies
0
Age
25
XP
1,864
Country
Switzerland
This is the error I'm getting:
https://pastebin.com/tWeFfEiY

And this is the code:

Code:
virtual tsl::elm::Element* createUI() override {
        auto rootFrame = new tsl::elm::OverlayFrame("Tesla Template", "v1.1.0");
        auto list = new tsl::elm::List();

        list->addItem(new tsl::elm::ListItem("Test List Item"));
        list->addItem(new tsl::elm::ToggleListItem("Test Toggle List Item", true));

        auto* clickableListItem = new tsl::elm::ListItem("Clickable List Item", "...");
        clickableListItem->setClickListener([](u64 keys) {
            if (keys & KEY_A) {
                tsl::changeTo<GuiSecondary>();
                return true;
            }

            return false;
            });
        list->addItem(new tsl::elm::ListItem("Clickable List Item"));
        rootFrame->setContent(list);

        return rootFrame;

Looks like you didn't actually pull the latest version from Github. Clone version 1.3.1
 
D

Deleted User

Guest
looks like people having issues with this. Not sure whatsup. Works fine for me on 9.1.0 and atmos 0.10.4 Made video demonstrating working with a drag and drop setup

 

komabear

Well-Known Member
Member
Joined
Mar 4, 2017
Messages
113
Trophies
0
XP
1,474
Country
Bulgaria
@WerWolv hey, I'm very new to C++ programming but I'm trying to make this:
https://github.com/CVFireDragon/PowerToolsNX

Into a tesla sub-menu using the example provided in libtesla.

I've tried with this code:

Code:
#include <unistd.h>
#include <string.h>
#include <stdio.h>
Code:
auto *clickableListItem = new tsl::elm::ListItem("Turn Off", "Turn Switch Off");
        clickableListItem->setClickListener([](u64 keys) {
            if (keys & KEY_A) {
                bpcInitialize();
                bpcShutdownSystem();
            }

            return false;
        });

Even though it compiles, pressing the button in the menu does nothing. I've even tried using printf to check for any errors but it doesn't seem to print anything (should it be printing?)

Is this not possible?

Thanks for the help and sorry to bother you again!
 

masagrator

The patches guy
Developer
Joined
Oct 14, 2018
Messages
6,257
Trophies
3
XP
12,008
Country
Poland
@WerWolv hey, I'm very new to C++ programming but I'm trying to make this:
https://github.com/CVFireDragon/PowerToolsNX

Into a tesla sub-menu using the example provided in libtesla.

I've tried with this code:

Code:
#include <unistd.h>
#include <string.h>
#include <stdio.h>
Code:
auto *clickableListItem = new tsl::elm::ListItem("Turn Off", "Turn Switch Off");
        clickableListItem->setClickListener([](u64 keys) {
            if (keys & KEY_A) {
                bpcInitialize();
                bpcShutdownSystem();
            }

            return false;
        });

Even though it compiles, pressing the button in the menu does nothing. I've even tried using printf to check for any errors but it doesn't seem to print anything (should it be printing?)

Is this not possible?

Thanks for the help and sorry to bother you again!
https://github.com/WerWolv/libtesla/blob/master/example/source/main.cpp#L39
 
  • Like
Reactions: komabear

komabear

Well-Known Member
Member
Joined
Mar 4, 2017
Messages
113
Trophies
0
XP
1,474
Country
Bulgaria

Oops, thanks for the heads up! But I still can't get it to work, even adding "return true;".. Am I missing something? Or did you mean something else? Sorry, I'm VERY new to C++, maybe I'm missing something obvious but I can't tell.

Code:
auto* clickableListItem = new tsl::elm::ListItem("Turn Off", "Turn Switch Off");
        clickableListItem->setClickListener([](u64 keys) {
            if (keys & KEY_A) {
                bpcInitialize();
                bpcShutdownSystem();
                return true;
            }

            return false;
            });
 

masagrator

The patches guy
Developer
Joined
Oct 14, 2018
Messages
6,257
Trophies
3
XP
12,008
Country
Poland
Try moving
Code:
bpcInitialize();
to InitServices

Add bpcExit() under exitServices

And well - it looks like you will need to share more than this, because what you have shared looks good.
 
  • Like
Reactions: komabear

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: Yeah forgot to turn that off