Homebrew Homebrew Development

  • Thread starter Thread starter aliak11
  • Start date Start date
  • Views Views 1,474,989
  • Replies Replies 6,048
  • Likes Likes 54
does anyone know if we could use the 7.x savekey with the savedatafiler and in theory make a new decryptor for 7.x encryptions that are unsupported and are corrupt with 3ds flash carts?


I don't believe we have that key yet. If we did, it would have been done by now. The only 7.x key available is the key used to decrypt 3DS game images.
 
I don't believe we have that key yet. If we did, it would have been done by now. The only 7.x key available is the key used to decrypt 3DS game images.
I know that key is used for decrypting games, but does that mean we'd have to obtain the 7.xkey y I'm sure the decrypting key i'm talking about must be the x key right?
 
Does setlocale function works on libctru based functions? (Like FS service functions?)
I'm trying to add Latin-1 (and maybe UTF-8) support to lpp-3ds but it seems collate category is not changed (or change does not affect libctru functions).

Code:
setlocale(LC_COLLATE, "ISO-8859-1");

EDIT: It seems also smealum's hb_menu doesn't support Latin1/UTF-8 char codifies...
 
Does setlocale function works on libctru based functions? (Like FS service functions?)
I'm trying to add Latin-1 (and maybe UTF-8) support to lpp-3ds but it seems collate category is not changed (or change does not affect libctru functions).

Code:
setlocale(LC_COLLATE, "ISO-8859-1");

EDIT: It seems also smealum's hb_menu doesn't support Latin1/UTF-8 char codifies...
it looks like there is a branch of libctru to address this.
 
  • Like
Reactions: Rinnegatamante
Does someone knows where i'm wrong with libjpeg? I'm trying to load a JPG image through this lib but i get a ninjhax crash when i try it:

Here's my code:
Code:
Bitmap* decodeJpg(unsigned char* in,u64 size)
{
    Bitmap* result;
    struct jpeg_decompress_struct cinfo;
    jpeg_create_decompress(&cinfo);
    jpeg_mem_src(&cinfo, in, size);
    jpeg_read_header(&cinfo, TRUE);
    jpeg_start_decompress(&cinfo);
    int width = cinfo.output_width;
    int height = cinfo.output_height;
    int row_bytes = width * 3;
    u8* bgr_buffer = (u8*) malloc(width*height*3);
    while (cinfo.output_scanline < cinfo.output_height) {
        u8* buffer_array[1];
        buffer_array[0] = bgr_buffer + (cinfo.output_scanline) * row_bytes;
        jpeg_read_scanlines(&cinfo, buffer_array, 1);
    }
    jpeg_finish_decompress(&cinfo);
    jpeg_destroy_decompress(&cinfo);
    result->bitperpixel = 24;
    result->width = width;
    result->height = height;
    result->pixels = bgr_buffer;
    return result;
}

Where in is a buffer containing a full JPG image extracted from a video with ffmpeg and size is the size of the buffer.
 
does anyone know if we could use the 7.x savekey with the savedatafiler and in theory make a new decryptor for 7.x encryptions that are unsupported and are corrupt with 3ds flash carts?

Why would you want to do that?

Edit: Nevermind, I misread your question. Whoops!
 
Does someone knows where i'm wrong with libjpeg? I'm trying to load a JPG image through this lib but i get a ninjhax crash when i try it:

Here's my code:
[CUT]

Where in is a buffer containing a full JPG image extracted from a video with ffmpeg and size is the size of the buffer.

1) You don't allocate any space for the result structure.
2) This is nonsense:
Code:
[INDENT=1]u8* buffer_array[1];[/INDENT]
[INDENT=1]buffer_array[0] = bgr_buffer + (cinfo.output_scanline) * row_bytes;[/INDENT]
[INDENT=1]jpeg_read_scanlines(&cinfo, buffer_array, 1);[/INDENT]

It should be something like this:
Code:
[INDENT=1]u8* buffer_array;[/INDENT]
[INDENT=1]buffer_array = bgr_buffer + (cinfo.output_scanline) * row_bytes;[/INDENT]
[INDENT=1]jpeg_read_scanlines(&cinfo, buffer_array, 1);[/INDENT]
 
1) You don't allocate any space for the result structure.
2) This is nonsense:
Code:
[INDENT=1]u8* buffer_array[1];[/INDENT]
[INDENT=1]buffer_array[0] = bgr_buffer + (cinfo.output_scanline) * row_bytes;[/INDENT]
[INDENT=1]jpeg_read_scanlines(&cinfo, buffer_array, 1);[/INDENT]

It should be something like this:
Code:
[INDENT=1]u8* buffer_array;[/INDENT]
[INDENT=1]buffer_array = bgr_buffer + (cinfo.output_scanline) * row_bytes;[/INDENT]
[INDENT=1]jpeg_read_scanlines(&cinfo, buffer_array, 1);[/INDENT]

jpeg_read_scanlines take as second argument an u8** so your code is problematic and also buffer_array is used only to take the address where to write decoded rows
 
jpeg_read_scanlines take as second argument an u8** so your code is problematic and also buffer_array is used only to take the address where to write decoded rows

You should use something like this then:

Code:
u8* buffer_array = bgr_buffer + (cinfo.output_scanline) * row_bytes;
jpeg_read_scanlines(&cinfo, &buffer_array, 1);

And your code indeed crashes because you are updating an unallocated pointer at the end of the function.

Code:
Bitmap *result = (Bitmap *) malloc(sizeof(Bitmap));
 
if (result !=NULL) {
    result->bitperpixel = 24;
    result->width = width;
    result->height = height;
    result->pixels = bgr_buffer;
}

is necessary.
 
You should use something like this then:

Code:
u8* buffer_array = bgr_buffer + (cinfo.output_scanline) * row_bytes;
jpeg_read_scanlines(&cinfo, &buffer_array, 1);

And your code indeed crashes because you are updating an unallocated pointer at the end of the function.

Code:
Bitmap *result = (Bitmap *) malloc(sizeof(Bitmap));
 
if (result !=NULL) {
    result->bitperpixel = 24;
    result->width = width;
    result->height = height;
    result->pixels = bgr_buffer;
}

is necessary.

For what i'm creating is not necessary checking if the image exists cause it always exists.
I give you another question: http://gbatemp.net/attachments/libjpeg_example-zip.14595/
The code i wrote is inspired from this sample.
Then why it works and mine not?
 
If anyone is looking to quickly deploy and test CIA files while developing homebrew, I just added support for installing CIA files over the network to my CIA installer, FBI. You'll need to build sockfile in order to send CIA files to it. Once both are set up, you can press Y to open FBI for connections, run "sockfile <ip> <file>" on your PC, and confirm the transmission to install a CIA file.

I've tested it a few times with small CIAs, so it should work fine with those. I haven't tested larger CIAs yet, but they should work as well.
 

Site & Scene News

Popular threads in this forum