Hacking XorTroll working on USB HDD Feature

Imancol

Otak Productions
Member
Joined
Jun 29, 2017
Messages
1,376
Trophies
0
XP
2,778
Country
Colombia
That little interest has been given to this, when more has been requested ... I am still not clear about the function of fsp-usb. Can you run homebrew from USB ?, including backup
?
 

XorTroll

Switching between my 2DS and my Switch
Developer
Joined
Dec 28, 2017
Messages
643
Trophies
1
Location
Nowhere
Website
github.com
XP
4,270
Country
Spain
If you want to test it, create in /contents/ a directory named 0100000000000BEF, inside it create another directory named flags, inside it create an empty file named boot2.flag. Place the nsp inside the 0100... directory named as exefs.nsp. Thus, you should have:

- contents/0100000000000BEF/exefs.nsp
- contents/0100000000000BEF/flags/boot2.flag
 

duckbill007

Well-Known Member
Member
Joined
May 5, 2011
Messages
699
Trophies
1
XP
2,531
Country
Russia
@XorTroll, I do not understand how to open file:


FsFileSystem drvfs;
rc = fspusbOpenDriveFileSystem(drive_iface_id, &drvfs);
fsdevMountDevice("usbdrv", drvfs);
FsFile file;
char fname[FS_MAX_PATH] = "/test.txt";
rc = fsFsOpenFile(&drvfs, fname, FsOpenMode_Read, &file);

And I got atmosphere panic on last line. Other operations (dir listing as in your test) works perfect.
 

Dracari

Well-Known Member
Member
Joined
Apr 5, 2009
Messages
1,990
Trophies
1
XP
2,488
Country
United States
@XorTroll unless im missing something or have an outdated lib, not sure where im failing, any Compiling dependancies on your Atmosphere fork that contains your moved fsp-usb work (as stated in the readme.md)

C:/Users/xiond/Documents/GitHub/Atmosphere/fusee/fusee-primary/src/sdmmc/sdmmc.c: In function 'sdmmc_sd_decode_scr':
C:/Users/xiond/Documents/GitHub/Atmosphere/fusee/fusee-primary/src/sdmmc/sdmmc.c:349:5: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
resp[3] = *(uint32_t *)&tmp[4];
^~~~
C:/Users/xiond/Documents/GitHub/Atmosphere/fusee/fusee-primary/src/sdmmc/sdmmc.c:350:5: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
resp[2] = *(uint32_t *)&tmp[0];
^~~~
C:/Users/xiond/Documents/GitHub/Atmosphere/fusee/fusee-primary/src/sdmmc/sdmmc.c: In function 'sdmmc_sd_decode_ssr':
C:/Users/xiond/Documents/GitHub/Atmosphere/fusee/fusee-primary/src/sdmmc/sdmmc.c:384:5: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
resp1[3] = *(uint32_t *)&tmp[12];
^~~~~
C:/Users/xiond/Documents/GitHub/Atmosphere/fusee/fusee-primary/src/sdmmc/sdmmc.c:385:5: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
resp1[2] = *(uint32_t *)&tmp[8];
^~~~~
C:/Users/xiond/Documents/GitHub/Atmosphere/fusee/fusee-primary/src/sdmmc/sdmmc.c:386:5: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
resp1[1] = *(uint32_t *)&tmp[4];
^~~~~
C:/Users/xiond/Documents/GitHub/Atmosphere/fusee/fusee-primary/src/sdmmc/sdmmc.c:387:5: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
resp1[0] = *(uint32_t *)&tmp[0];
^~~~~
C:/Users/xiond/Documents/GitHub/Atmosphere/fusee/fusee-primary/src/sdmmc/sdmmc.c:388:5: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
resp2[3] = *(uint32_t *)&tmp[28];
^~~~~
C:/Users/xiond/Documents/GitHub/Atmosphere/fusee/fusee-primary/src/sdmmc/sdmmc.c:389:5: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
resp2[2] = *(uint32_t *)&tmp[24];
^~~~~
C:/Users/xiond/Documents/GitHub/Atmosphere/fusee/fusee-primary/src/sdmmc/sdmmc.c:390:5: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
resp2[1] = *(uint32_t *)&tmp[20];
^~~~~
C:/Users/xiond/Documents/GitHub/Atmosphere/fusee/fusee-primary/src/sdmmc/sdmmc.c:391:5: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
resp2[0] = *(uint32_t *)&tmp[16];
^~~~~
cc1.exe: all warnings being treated as errors
make[4]: *** [/opt/devkitpro/devkitARM/base_rules:85: sdmmc.o] Error 1
make[3]: *** [Makefile:124: build] Error 2
make[3]: Leaving directory '/home/xiond/Documents/GitHub/Atmosphere/fusee/fusee-primary'
make[2]: *** [Makefile:96: check_fusee] Error 2
make[2]: Leaving directory '/home/xiond/Documents/GitHub/Atmosphere/stratosphere/boot'
make[1]: *** [Makefile:10: boot] Error 2
make[1]: Leaving directory '/home/xiond/Documents/GitHub/Atmosphere/stratosphere'
make: *** [Makefile:21: stratosphere] Error 2

C:\Users\xiond\Documents\GitHub\Atmosphere>

(Edit: full log/output: https://pastebin.com/XWVUHPEx )
 
Last edited by Dracari,

Tackskull

Well-Known Member
Member
Joined
Nov 29, 2017
Messages
324
Trophies
0
Age
38
XP
1,450
Country
France
Guys I am not following the entire topic, but I just want to know if atmosphere is getting the feature to read games from an external hard disk drive
 

Resaec

Well-Known Member
Member
Joined
Dec 19, 2017
Messages
409
Trophies
0
XP
885
Country
Germany
Atmosphere is not aimed at pirates. So a feature currently only interesting to pirates will not get developed by the atmos team.
If someone else creates one than there are no barriers keeping them from achieving that goal.
 

Resaec

Well-Known Member
Member
Joined
Dec 19, 2017
Messages
409
Trophies
0
XP
885
Country
Germany
They'd be interested in it too, they aren't pirates.
Since any feature enabling the creation of "backups" would inevitably lead to piracy, so this feature is not implemented into the CFW.
While I think that private backups of permanently owned cartridges are ok, the industry does not. As such it is better for anyone involved in the project if Atmosphere in no way enables the creation or execution of "backups" by itself.
This is why you need additional patches to create and execute "backups" and backups

To continue this in respect of USB loading. For that very reason there is no interest in XCI compatibility. Homebrew comes in nro or nsp format. Healthy use cases of the ability to run your legal backups will not really be limited by the amount of space you have on your 200GB microSD. (big games: 200GB/32GB ~ 6 Games, average: 200GB/10GB ~ 20) + 1 Cartridge in slot
I do agree that the ability to install your nsp from USB would be a useful external feature, but there is no need since installing new backups should not happen that often.
 

nWo

The Game Master
Member
Joined
Oct 20, 2016
Messages
1,006
Trophies
0
Website
www.facebook.com
XP
2,940
Country
Mexico
Could it be possible to play music, videos and comics from USB in the future? Sorry if the question is silly, but I just read the first page of comments and this one.
 

XorTroll

Switching between my 2DS and my Switch
Developer
Joined
Dec 28, 2017
Messages
643
Trophies
1
Location
Nowhere
Website
github.com
XP
4,270
Country
Spain
The point of this feature is being able to browse stuff from drives, basically the same you can currently do with the SD card, except for a proper exFAT and not being able to install titles there. That's it, being able to browse, what opens many doors fro homebrew such as RetroArch, Goldleaf, video and music players, other emulators...
 

Resaec

Well-Known Member
Member
Joined
Dec 19, 2017
Messages
409
Trophies
0
XP
885
Country
Germany
Are there projects for proper exFAT support? I don't think we should expect/rely on any improvements from Nintendo.
I regard "docked" drives via the dock for video, music and emulation to be the most interesting. But I'm not up to date regarding passthrough.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Xdqwerty @ Xdqwerty:
    but how did they go bankrupt?
  • Xdqwerty @ Xdqwerty:
    or rather, why?
  • K3Nv2 @ K3Nv2:
    I'm about to buy a $200 flash cart
  • Psionic Roshambo @ Psionic Roshambo:
    I think I have a 256GB card in my 3DS lol
  • Psionic Roshambo @ Psionic Roshambo:
    It's a New 3DS XL so it's still under warranty... If it ever breaks gonna make Nintendo fix it lol You said it was new.... For eternity!!!
  • Psionic Roshambo @ Psionic Roshambo:
    But my 3DS is loaded with emulators and 3DS games and DS games and GBA games probably thousands of games in total lol
  • Xdqwerty @ Xdqwerty:
    Brb going with my dad
  • Xdqwerty @ Xdqwerty:
    @Psionic Roshambo, are most of those games shovelware?
    +1
  • K3Nv2 @ K3Nv2:
    Nah gotta buy 3 1tb SD cards for 3ds the entire libraries need archived in my home
    +1
  • SylverReZ @ SylverReZ:
    >buys x3 1TB SD cards
    >stores the entire 3DS library on them
    >installs CFW
    >realised why I wasted loads of money and resources
    +2
  • Psionic Roshambo @ Psionic Roshambo:
    Lol no I clean my sets
  • K3Nv2 @ K3Nv2:
    Cause it's in my home ready to go
  • K3Nv2 @ K3Nv2:
    Like uremum
  • Psionic Roshambo @ Psionic Roshambo:
    But 100 games on SNES and Genesis and GBA then TG16 and NES and GB and GBC then all the other random systems and arcade games it all adds up lol
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Virtual Boy alone has probably 5 games!!! Lol
    +1
  • K3Nv2 @ K3Nv2:
    I won't mention any names in chat but some of us wastes $300 on preloaded hdds :tpi:
    +1
  • SylverReZ @ SylverReZ:
    @Psionic Roshambo, The PS5 had none.
    +2
  • Psionic Roshambo @ Psionic Roshambo:
    Lol I spent more than that on a stuffed 4TB drive lol
  • K3Nv2 @ K3Nv2:
    Honestly I've yet to fill the 1tb internal drive on my ps5
    +1
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, 1) except final fantasy 16. 2) why would I have a console's whole catalogue if most of the games are either shovelware or terrible games?
  • Psionic Roshambo @ Psionic Roshambo:
    Kind of a waste, but the allure of all those games over 100,000
  • Psionic Roshambo @ Psionic Roshambo:
    Some shovel ware with low ratings you might enjoy more than the ratings would sugest
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Cruisn on the Wii is one of my personal examples of that, it's considered one of the worst games of all time, I loved it and completed it several times.
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    The trick for me was to go into the settings and crank up the Wiimote sensitivity to the max and it gets twitchy but you can win that way lol
  • Psionic Roshambo @ Psionic Roshambo:
    Lots of other games I enjoyed that reviews would say otherwise lol
    Psionic Roshambo @ Psionic Roshambo: Lots of other games I enjoyed that reviews would say otherwise lol