TCP Gecko Installer Memory Shift

Discussion in 'Wii U - Hacking & Backup Loaders' started by BullyWiiPlaza, Nov 13, 2016.

  1. BullyWiiPlaza
    OP

    BullyWiiPlaza Nintendo Hacking <3

    Member
    1,666
    1,370
    Aug 2, 2014
    Germany
    Hey :)

    So I noticed the TCP Gecko browser version memory addresses are "shifted" compared to the Homebrew Launcher version by about 0x4A200. Is there a way to sync them again? Allocating memory shifts everything. By using the following piece of code

    Code:
    struct pygecko_bss_t {
        int error, line;
        void *thread;
        unsigned char stack[0x6F00];
    };
    
    // ...
    
    unsigned int stack = (unsigned int) memalign(0x40, 0x100);
    stack += 0x100;
    instead of
    Code:
    struct pygecko_bss_t {
        int error, line;
        void *thread;
        unsigned char stack[0x8000];
    };
    
    // ...
    
    unsigned int stack = (unsigned int) memalign(0x40, 0x1000);
    stack += 0x1000;
    all addresses are shifted by 0x8000 - 0x6F00 + 0x1000 - 0x100 = 0x2000 so both, allocating in the .bss section and using memalign matters.

    However, the offset to "compensate" for is much bigger.

    Please let me know if you have an idea how to adapt the Homebrew Launcher memory layout to the browser version by changing the allocated memory throughout the entire project in any way, shape or form to accomplish the synchronization or whatever else is necessary.

    Source code repository:
    https://github.com/BullyWiiPlaza/tcpgecko/blob/master/src/pygecko.c

    Thanks.

    @QuarkTheAwesome
    @wj44
    @Maschell
    @Onion_Knight
    @NWPlayer123
     
    Last edited by BullyWiiPlaza, Nov 13, 2016