DS Firmware Settings
Posted: Wed Aug 14, 2013 8:31 pm
I haven't found a lot of data about using the PersonalData struct and have run into a lot of trouble, I am a noob it seems.
The nickname is stored as s16[10], why is this? Why not just char[10]? What's more, is that there is no space for a NULL truncator (\0).
I first attempted to typecast it:
printf("Casted: %s", (char[10])PersonalData->name);
With a resultant compile error, I switched to this approach:
char username[11];
memset(username, 0, 11);
int i = 0;
for(i = 0; i < PersonalData->nameLen; i++) username = PersonalData->name;
printf("Nickname: %s", username);
Which works, but it just seems... Dumb. Is there a better way which I am missing?
Another problem I have is that attempting to write to this struct is only temporary, and my changes are reverted next time I turn on the DS:
PersonalData->name[0] = (s16)'k';
for(i = 0; i < PersonalData->nameLen; i++) username = PersonalData->name;
printf("Nickname: %s\n", username);
Is there a way to modify the actual settings in the DS firmware?
Thanks.
The nickname is stored as s16[10], why is this? Why not just char[10]? What's more, is that there is no space for a NULL truncator (\0).
I first attempted to typecast it:
printf("Casted: %s", (char[10])PersonalData->name);
With a resultant compile error, I switched to this approach:
char username[11];
memset(username, 0, 11);
int i = 0;
for(i = 0; i < PersonalData->nameLen; i++) username = PersonalData->name;
printf("Nickname: %s", username);
Which works, but it just seems... Dumb. Is there a better way which I am missing?
Another problem I have is that attempting to write to this struct is only temporary, and my changes are reverted next time I turn on the DS:
PersonalData->name[0] = (s16)'k';
for(i = 0; i < PersonalData->nameLen; i++) username = PersonalData->name;
printf("Nickname: %s\n", username);
Is there a way to modify the actual settings in the DS firmware?
Thanks.