Validating Wii U address range?

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

  1. BullyWiiPlaza

    BullyWiiPlaza Nintendo Hacking <3

    Aug 2, 2014
    For reading/writing it would be useful to ask the Wii U whether the memory area chosen for the respective operation is "safe" to use or not. I wrote the following piece of code:
    int validateAddressRange(int starting_address, int ending_address) {
        for (int current_address = starting_address; current_address <= ending_address; current_address++) {
            int is_current_address_valid = OSIsAddressValid((void *) current_address);
            if (!is_current_address_valid) {
                return 0;
        return 1;
    What does it do? It checks the memory range from start to end and in byte steps with the OSIsAddressValid() library function since we need to assure that every single address in-between is readable.

    Is there a range version since I assume my implementation could be slightly slow for checking big ranges?

    is for the CPU data cache only. Alternatively I found syscall_get_map_virtual_address_range(), __OSValidateAddressSpaceRange() in coreinit.rpl.
    CosmoCortney likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice