4dsdev
Views: 1,615,594 Main | Rules/FAQ | Memberlist | Active users | Last posts | Calendar | Stats | Online users | Search 12-26-24 02:37 PM
Guest:

Main - Posts by profi200

Pages: 1 2 3 4
profi200
Posted on 05-21-15 08:01 PM, in Staplehax -- Ninjhax with kernel access Link | #135
I just registered. As long as this place doesn't get flooded by GBAfail trolls i will stay.

And on topic: Nice work :)

profi200
Posted on 05-22-15 05:48 PM, in blargSnes -- SNES emulator for the 3DS Link | #147
As always, i offer help by getting exception dumps but i think blargSnes is so stable only Nintendo can beat it :D

profi200
Posted on 05-23-15 09:49 AM, in hi Link | #151
Fuck GBAfail if we can have an idiot free place :)

profi200
Posted on 05-24-15 09:19 AM, in hi Link | #154
2 years? Must be something big.

profi200
Posted on 05-25-15 10:14 AM, in Staplehax -- Ninjhax with kernel access Link | #158
Iirc there are no mirrors but i think you can setup mirrors if you have enough permissions. With such large mem compared to the DS however i don't know if that would be useful.

profi200
Posted on 06-08-15 04:22 PM, in Accessing the NAND (via fopen / opendir) Link | #190
You can only access nandrw and nandro on ARM11 through archives.
See http://3dbrew.org/wiki/Flash_Filesystem and http://3dbrew.org/wiki/FS:OpenArchive

There is a way to get rw access to nandro apparently but i never got that working. Probably FSPXI-only.

Besides that the problems outweigh the benefits. If you want to implement it nevertheless you also maybe want to take a look at my fs interface which simplyfies using Nintendos API: https://github.com/profi200/sysUpdater/blob/master/include/fs.h (There is a bug however i just recently discovered. Using "/" as path doesn't work for copyDir()). It uses UTF-16 paths but that's not a big problem.

profi200
Posted on 06-08-15 04:29 PM, in Copying a file efficiently (on Ninjhax / N3DS) Link | #191
Nintendos API is fucking slow. It DMAs the buffer 2 times before it is in your apps heap. I myself would not go below 2 MB of buffer size.

profi200
Posted on 06-10-15 05:10 PM, in Accessing the NAND (via fopen / opendir) Link | #200
Other IO access flags are checked it seems. Only the direct SDMC one is not. No idea if the ARM9 does this.

It's pretty easy to open an archive.

try // Required because fs::copyDir() can throw!
{
FS_archive nandRwArch = {0x1234567D, {PATH_EMPTY, 0, nullptr}};
FSUSER_OpenArchive(nullptr, &nandRwArch);
fs::copyDir(u"/", u"/nandrw", nandRwArch); // Copy from the root of nandrw to /nandrw on the SD card
FSUSER_CloseArchive(nullptr, &nandRwArch);
}
catch(fsException& e)
{
printf("%s\n", e.what());
}

Make sure to check what the fs:USER calls return. The newest version of my interface has all bugs fixed.

profi200
Posted on 06-11-15 03:56 PM, in Accessing the NAND (via fopen / opendir) Link | #206
It's the other way around. You can always get SD card access somehow but if the other flags are checked on ARM9 you can do nothing about it from the ARM11 side alone.

profi200
Posted on 06-12-15 04:37 PM, in Accessing the NAND (via fopen / opendir) Link | #208
Try it out. No idea if libhax patches the permissions on ARM11. But if the ARM9 checks them too that will not work.

I guess i will change the exception stuff again slightly. I have just recently started using exceptions.

profi200
Posted on 06-13-15 09:17 PM, in Rust on 3DS Link | #210
Nice :) More options for homebrew development can't hurt.

profi200
Posted on 06-17-15 10:31 PM, in Accessing the NAND (via fopen / opendir) Link | #216
Archives are objects with informations for Nintendos API which does all in background.
Archives for RAW unencrypted partition access don't exist. It's all encapsulated in their API. However an archive for RAW NAND access exists (requires special access like the other archives). To get that working you need ARM9 access or xorpads to en-/decrypt on the fly.

profi200
Posted on 06-18-15 04:31 PM, in Accessing the NAND (via fopen / opendir) (rev. 2 of 06-18-15 04:32 PM) Link | #219
1. You can r/w files on the SD card fine. Not sure how much sense it makes to store partition image files on the SD card. No API will give you on the fly decryption with this without xorpads. But sure you can hack something together with a FATfs lib and custom drivers for it which read and decrypt partition image files from the SD card.
2. Yes, see the archive IDs on 3dbrew.
3. No, it just uses what is available on ARM11. Everything security related is handled unreachable for normal ARM11 usrmode apps on ARM9.

profi200
Posted on 06-19-15 03:03 PM, in Staplehax -- Ninjhax with kernel access Link | #221
That's why it is a bad idea to build libhax into apps. That should be done externally.

profi200
Posted on 06-21-15 09:53 AM, in blargSnes -- SNES emulator for the 3DS Link | #226
I bet it's because of libhax because it doesn't work on 9.8.
There should be an extra check to make sure libhax never runs for firmwares >9.2.

profi200
Posted on 06-22-15 06:51 PM, in Using Brahma as a library / loader Link | #231
consoleInit() changes stuff only for the selected screen iirc. So you could have a console on 1 screen and just RGB8 graphics on another screen.

profi200
Posted on 07-01-15 11:46 PM, in Accessing the NAND (via fopen / opendir) (rev. 2 of 07-01-15 11:47 PM) Link | #242
I saw your posts on GBAfail.

The method people get the correct CTR is unnecessary complicated. For CTR related partitions the CTR is the first half of a SHA256 hash over the NAND CID which can be found at the same place every time (see http://3dbrew.org/wiki/Memory_layout#ARM9_ITCM). For TWL partitions it's the first 16 bytes of a SHA1 hash over the NAND CID. The endianess/word order is different for TWL partitions so you need to experiment a bit with it. Otherwise it works exactly the same way as for CTR partitions.

Sorry for the double post. I think otherwise no one notices it :p

profi200
Posted on 07-06-15 11:08 AM, in Accessing the NAND (via fopen / opendir) Link | #247
- Keyslot is 3 for both twln and p.
- CTR is the first 16 bytes of the SHA1 hash. Needs to be set with reversed word order and little endian.
- The en-/decryption params are little endian and reversed word order too.

profi200
Posted on 07-07-15 04:59 PM, in Accessing the NAND (via fopen / opendir) (rev. 2 of 07-07-15 05:02 PM) Link | #249
No.

https://gist.github.com/profi200/469f9fac6a394d23e8e1
Very old code but it worked. I just slapped some comments in it. The way i calculated the CTR with the offset is really shit and could overflow. For me it worked.

profi200
Posted on 07-08-15 04:23 PM, in Accessing the NAND (via fopen / opendir) Link | #251
I don't know what these bits do. Apparently it is from reverse engineering Nintendos code. I just used the knowledge and some of Normmats code as base.
Pages: 1 2 3 4

Main - Posts by profi200

Page rendered in 0.014 seconds. (2048KB of memory used)
MySQL - queries: 22, rows: 99/99, time: 0.005 seconds.
[powered by Acmlm] Acmlmboard 2.064 (2018-07-20)
© 2005-2008 Acmlm, Xkeeper, blackhole89 et al.