Hacking Validating Wii U address range?

  • Thread starter Thread starter BullyWiiPlaza
  • Start date Start date
  • Views Views 761
  • Replies Replies 0
  • Likes Likes 1

BullyWiiPlaza

Nintendo Hacking <3
Member
Joined
Aug 2, 2014
Messages
1,932
Reaction score
1,584
Trophies
0
XP
2,522
Country
Germany
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:
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?

OSIsAddressRangeDCValid()
is for the CPU data cache only. Alternatively I found syscall_get_map_virtual_address_range(), __OSValidateAddressSpaceRange() in coreinit.rpl.
 
  • Like
Reactions: LawnMeower

Site & Scene News

Popular threads in this forum