Welcome! Log In Create A New Profile

Advanced

how to get the wii friend code? [RESOLVED]

Posted by owen 
how to get the wii friend code? [RESOLVED]
September 23, 2013 06:20PM
using devkitpro and plain c



Edited 1 time(s). Last edit at 09/24/2013 11:04PM by owen.
Re: how to get the wii friend code?
September 23, 2013 07:27PM
Re: how to get the wii friend code?
September 23, 2013 07:39PM
thanx, chris, did you ever find a easier way to do it or that is the standard/safe way?
Re: how to get the wii friend code?
September 23, 2013 11:23PM
It's the only way I found but I never researched it further after finding a method that worked. I don't see much wrong with that method; it's just init ISFS, open the relevant file, yank out the relevant data - simples. (Probably should have closed the file as well but it was only a wee demo).
Re: how to get the wii friend code?
September 24, 2013 01:16AM
You really shouldn't call ISFS_Read with a buffer that doesn't contain a multiple of 32 bytes and/or is not aligned to an address that is a multiple of 32 bytes.
Regardless friend codes are pretty useless now they've shut down the registration/communication service for them.
Re: how to get the wii friend code?
September 24, 2013 05:10AM
I just want to identify the wii for a online game that I will make. Before I was using the console name but a lot of consoles have similar names so I want to use it as a private key. @t how do I fix the alignment?
Re: how to get the wii friend code?
September 24, 2013 09:06AM
Quote
tueidj
You really shouldn't call ISFS_Read with a buffer that doesn't contain a multiple of 32 bytes and/or is not aligned to an address that is a multiple of 32 bytes.

I did.

char readbuffer[32] ATTRIBUTE_ALIGN(32);

Quote
owen
I just want to identify the wii for a online game that I will make.

From the other thread:

Quote
tueidj
You guys never saw ES_GetDeviceID? It gives an unsigned int unique to each wii.



Edited 1 time(s). Last edit at 09/24/2013 09:11AM by chris.
Re: how to get the wii friend code? [RESOLVED]
September 25, 2013 03:28AM
Recent gcc-powerpc versions (I don't know the exact number) support alignment restrictions for local variables, so you wouldn't need to make readbuffer a global variable if using the latest devkitPPC. But just use ES_GetDeviceID() instead, it's a lot simpler and will never change in the wii's lifetime unlike the friend code which is replaced when the wii is formatted.
Re: how to get the wii friend code? [RESOLVED]
September 25, 2013 03:49AM
I think I will use both keys.

I was trying to printf() the device id. Do I handle it just like any other int or do I have to take care not to loose the precision?

u32 id;

ES_GetDeviceID(&id);

printf("\n    %u32 \n", id);

printf("\n    %i \n", id); /* incomplete */

Sorry, only registered users may post in this forum.

Click here to login