1. DarkMatterCore

    OP DarkMatterCore I like turtles.
    Developer

    Joined:
    May 30, 2009
    Messages:
    1,255
    Country:
    Venezuela
    Yes and yes.
     
  2. duckbill007

    duckbill007 GBAtemp Regular
    Member

    Joined:
    May 5, 2011
    Messages:
    289
    Country:
    Russia
    Just a question - why to patch usb module directly, if boot2 loads and hooks settings before usb. Why not patch there setting, not the module itself?
     
  3. DarkMatterCore

    OP DarkMatterCore I like turtles.
    Developer

    Joined:
    May 30, 2009
    Messages:
    1,255
    Country:
    Venezuela
    Not really, nope. The boot2 reimplementation from Atmosphère is launched after both USB and FS - all it does is call LaunchPostSdCardBootPrograms() and return right away.

    LaunchPostSdCardBootPrograms() then proceeds to launch the rest of the sysmodules, using the AdditionalLaunchPrograms array. At that point, it's already too late to enable USB 3.0 support using the settings flag - I did try hardcoding the flag into ams_mitm, but it didn't work.
     
  4. duckbill007

    duckbill007 GBAtemp Regular
    Member

    Joined:
    May 5, 2011
    Messages:
    289
    Country:
    Russia
  5. DarkMatterCore

    OP DarkMatterCore I like turtles.
    Developer

    Joined:
    May 30, 2009
    Messages:
    1,255
    Country:
    Venezuela
  6. SciresM

    SciresM Developer
    Developer

    Joined:
    Mar 21, 2014
    Messages:
    909
    Country:
    United States
    Meh, I should just integrate usb 3.0 enable shit into ams. I'll do that today.
     
    I pwned U!, Ghost92, kickmeh and 16 others like this.
  7. SciresM

    SciresM Developer
    Developer

    Joined:
    Mar 21, 2014
    Messages:
    909
    Country:
    United States
    Merged usb 3.0 enable stuff into ams-master, from next release onwards usb!usb30_force_enabled in system_settings.ini will work as expected when booting via fusee.

    Hekate will need to get support for this to work when booting via hekate, I'll contact CTCaer about it.
     
    I pwned U!, swabbo, Ghost92 and 17 others like this.
  8. DarkMatterCore

    OP DarkMatterCore I like turtles.
    Developer

    Joined:
    May 30, 2009
    Messages:
    1,255
    Country:
    Venezuela
    Thank you for going out of your way and making it easier for anyone to enable this flag. I truly appreciate it.

    I also saw you added a new config item to Exosphère - a very nice addition, indeed.
     
  9. duckbill007

    duckbill007 GBAtemp Regular
    Member

    Joined:
    May 5, 2011
    Messages:
    289
    Country:
    Russia
    Even if it chainload into fusee-primary?
     
  10. DarkMatterCore

    OP DarkMatterCore I like turtles.
    Developer

    Joined:
    May 30, 2009
    Messages:
    1,255
    Country:
    Venezuela
    Not necessary in that case.
     
  11. duckbill007

    duckbill007 GBAtemp Regular
    Member

    Joined:
    May 5, 2011
    Messages:
    289
    Country:
    Russia
    I see

    — Posts automatically merged - Please don't double post! —

    How can I check that setting applied at correct time?

    Atmosphere with latest commit, usb30_force_enabled in config, loaded through fusee, but USBView still shows:
    Is Port User Connectable: yes
    Is Port Debug Capable: no
    Companion Port Number: 1
    Companion Hub Symbolic Link Name: USB#ROOT_HUB30#5&4087d53&0&0#{f18a0e88-c30c-11d0-8815-00a0c906bed8}
    Protocols Supported:
    USB 1.1: yes
    USB 2.0: yes
    USB 3.0: no
     
  12. DarkMatterCore

    OP DarkMatterCore I like turtles.
    Developer

    Joined:
    May 30, 2009
    Messages:
    1,255
    Country:
    Venezuela
    Are you properly setting USB3 device, configuration, interface and endpoint descriptors? Are you sure you're using a USB3-capable USB-C cable?
     
  13. duckbill007

    duckbill007 GBAtemp Regular
    Member

    Joined:
    May 5, 2011
    Messages:
    289
    Country:
    Russia
    setting device through latest libnx usb_comms.
    the same cable and port shows usb3: yes for external drive.

    — Posts automatically merged - Please don't double post! —

    Also, AFAIK system first selects highest available speed reported by device and only after that asks for descriptors.

    — Posts automatically merged - Please don't double post! —

    Test also simpliest:
    Code:
    int main(int argc, char **argv)
    {
        consoleInit(NULL);
    
        usbCommsInitialize();
    
        // Main loop
        while(appletMainLoop())
        {
            //Scan all the inputs. This should be done once for each frame
            hidScanInput();
    
            //hidKeysDown returns information about which buttons have been just pressed (and they weren't in the previous frame)
            u64 kDown = hidKeysDown(CONTROLLER_P1_AUTO);
    
            if (kDown & KEY_PLUS) break; // break in order to return to hbmenu
    
            consoleUpdate(NULL);
        }
    
        consoleExit(NULL);
        return 0;
    }
     
  14. DarkMatterCore

    OP DarkMatterCore I like turtles.
    Developer

    Joined:
    May 30, 2009
    Messages:
    1,255
    Country:
    Venezuela
    Try manually setting up USB3 descriptors. Personally, I'm not too fond of using usbComms - I prefer to manually deal with the descriptors myself.

    — Posts automatically merged - Please don't double post! —

    By the way, you can check if the USB3 flag is enabled by checking the new SMC config item via splGetConfigItem().
     
  15. duckbill007

    duckbill007 GBAtemp Regular
    Member

    Joined:
    May 5, 2011
    Messages:
    289
    Country:
    Russia
    This flag set only on initial preUSB config parsing, right?
     
  16. DarkMatterCore

    OP DarkMatterCore I like turtles.
    Developer

    Joined:
    May 30, 2009
    Messages:
    1,255
    Country:
    Venezuela
    You can access it at any moment from HOS via spl.
     
  17. blawar

    blawar Developer
    Developer

    Joined:
    Nov 21, 2016
    Messages:
    1,674
    Country:
    United States
    You should not use libnx usbcomms, for multiple reasons. I see it as really just proof of concept code.
     
  18. duckbill007

    duckbill007 GBAtemp Regular
    Member

    Joined:
    May 5, 2011
    Messages:
    289
    Country:
    Russia
    I mean, then this flag reflect this value read while boot2 process, not later by set.mitm.

    I know that. I think it enough just to test USB3 capabilities.

    — Posts automatically merged - Please don't double post! —

    @DarkMatterCore do you have example of correct USB3 Device descriptor?
     
  19. SciresM

    SciresM Developer
    Developer

    Joined:
    Mar 21, 2014
    Messages:
    909
    Country:
    United States
    as the author of the libnx usbcomms code, pretty much this. I don't recommend using it.

    USB 3.0 definitely works fine with usb:ds, when testing with the work-in-progress ams.tma code:

    upload_2021-3-3_6-16-40.png

    and the flag retrieved via spl will tell you if support is enabled, I don't know why you're confused about when it's set/etc. It's set by fusee, and never changeable without editing system_settings.ini and rebooting.
     
    Ghost92, peteruk and DarkMatterCore like this.
  20. duckbill007

    duckbill007 GBAtemp Regular
    Member

    Joined:
    May 5, 2011
    Messages:
    289
    Country:
    Russia
    So, is it bad even for test initialize?
     
Draft saved Draft deleted
Loading...

Hide similar threads Similar threads with keywords - libusbhsfs, Filesystem, Storage