Hacking Validating Wii U address range?

BullyWiiPlaza

Nintendo Hacking <3
OP
Member
Joined
Aug 2, 2014
Messages
1,932
Trophies
0
XP
2,477
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: CosmoCortney

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: https://www.techradar.com/gaming/consoles-pc/ayns-new-gaming-handheld-looks-like-a-psp-and-it-mig...