gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Mario Kart DS - Emblem loading?

#62091 - MaHe - Sun Nov 27, 2005 9:55 am

I was thinking about making an application to save a picture from GBAmp to MK:DS save space, but...

Is it even possible?
In what format does MK:DS save it's Emblem?

*Sorry for my bad english

#62149 - Veg - Sun Nov 27, 2005 8:54 pm

It would be a great idea.

I've backed up my MarioKart memory by using the EEPROM tool by SaTa - and that includes the emblem. It'd be a matter of finding it in there.

#62156 - Dark Knight ez - Sun Nov 27, 2005 9:42 pm

Worth trying is altering the emblem completely, just after a save backup... and after that making another backup.
Comparing the two backups could give you a hunch on where the emblem is stored. The part which contains the emblem should be different in both backups.

#62166 - chishm - Mon Nov 28, 2005 12:11 am

I've had a look at this a few days ago, so my memory is a bit rusty. However, I am pretty sure the emblem was stored in the first 0x400 bytes of the save, and mirrored again halfway through the save. Unfortunately, it appeared to be encrypted in some way, as a change to only 4 pixels resulted in 0x3F0 bytes being changed.
_________________
http://chishm.drunkencoders.com
http://dldi.drunkencoders.com

#62170 - Joat - Mon Nov 28, 2005 1:22 am

I'll confirm that. I played with it for a few hours. The save is encrypted, and it's not a straight xor cipher as far as I can tell. Didn't honestly care enough to continue working on it. Probably more worthwhile to just disasm the game and find the encryption code than to do tweak-and-dump-and-compare.
_________________
Joat
http://www.bottledlight.com

#62175 - CubeGuy - Mon Nov 28, 2005 2:08 am

Is it encrypted to the point that complete changes wouldn't be noticable?

Such as all black to all white?
_________________
It's 'CubeGuy.' One word. No space.

#62176 - chishm - Mon Nov 28, 2005 2:30 am

It is encrypted so that even the smallest change alters the entire block of data. So a full black to white change would look the same as a one pixel change, from the perspective of the raw save data.
_________________
http://chishm.drunkencoders.com
http://dldi.drunkencoders.com

#62179 - CubeGuy - Mon Nov 28, 2005 2:43 am

How thoughtful of Nintendo...

Although maybe this is an area that shouldn't be messed with at all. If anyone were to crack the encryption, that could lead to altering of WFC stats. Who knows if Nintendo has any sort of preventative measures against that.
_________________
It's 'CubeGuy.' One word. No space.

#62183 - tepples - Mon Nov 28, 2005 3:13 am

CubeGuy wrote:
If anyone were to crack the encryption, that could lead to

...SaveMe. Nintendo likely saw that Microsoft's Xbox console was blown wide open through save exploits.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#62193 - CubeGuy - Mon Nov 28, 2005 4:44 am

I stand corrected. The integrity of the MKDS WFC stats are a small price to pay for a new *Me method. =3
_________________
It's 'CubeGuy.' One word. No space.

#62205 - Dwedit - Mon Nov 28, 2005 8:07 am

I guess the way to crack the encryption is to disassemble, or find a key?
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."

#62207 - deltro - Mon Nov 28, 2005 8:47 am

c'mon, it's just 32x32 16 colors, it's not hard to plug in manually.

#62231 - MaHe - Mon Nov 28, 2005 3:09 pm

But still - it takes some time.

#62344 - tssf - Tue Nov 29, 2005 9:42 pm

Besides, it would be nice to have a program on the GBAMP that can "Swap" between emblems at will. Infact that wouldn't be nice, that'd be cool. haha.
_________________
Mathew Valente [TSSF]
------
Chrono Resurrection Musician

#83810 - pas - Thu May 18, 2006 6:50 pm

thulinma did a program for Animalcrossing which can show you all the pictures in the game and let you change the pictures with one of you Computer, I wonder if thulinma could do a sort of program that autodetect pictures in an NDS gamesave and shows it automatically on Pc and can change and export the pictures.

Greets:

Pas

#83849 - HyperHacker - Thu May 18, 2006 11:42 pm

It might be worth getting a second MKDS card (just borrow one) and copying the saves from both, then deleting them from the card, and creating two new ones and seeing if they're the same. This would tell you if the encryption varies between cards. Also try deleting the save from one card and making a new one with the same information on a different DS (with identical firmware settings); this would tell you if the encryption uses MAC addresses.

Of course you should also just try dumping the save, "editing" the emblem to exactly what it was before, and saving again. That'd tell you if the clock is used in the encryption.

#83888 - pas - Fri May 19, 2006 9:50 am

Could you do this then ? I would love it to change the embles of all my NDS games I have really. And I think that the encrypten of the embles would be pretty the same at all games.

Greets:

Pas

#84016 - HyperHacker - Sat May 20, 2006 5:10 am

I only have one MKDS card, and none of my friends would be willing to lend theirs out. I can dump, edit and redump to see if time is involved, but that's it. I'll probably do that fairly soon if I can.

[edit] Alright, I did it. Dump, edit emblem, save, undo the edit, save, and dump again. The two files are quite different, Hex Workshop is giving me obviously wrong information but it's obvious just by looking at it. There seems to be 2 copies of the save in each file, both of which have about half of them changed.

BTW, another use for decrypting saves is that you could dump your save, make a copy, edit out the WFC data, and put it back on the cart. Then you could use it online on a different DS, and just keep swapping the WFC data in and out of the save when you want to switch DSes.

#84262 - philip - Sun May 21, 2006 6:04 pm

HyperHacker wrote:

[edit] Alright, I did it. Dump, edit emblem, save, undo the edit, save, and dump again. The two files are quite different, Hex Workshop is giving me obviously wrong information but it's obvious just by looking at it. There seems to be 2 copies of the save in each file, both of which have about half of them changed.

I wonder why Nintendo have gone to all this effort with MK. What's the point? So you can mess with your stats, but what difference does that make? Funny that DSPet blew Animal Crossing apart with such apparent ease, yet cheating gives you far more advantages in that game!
HyperHacker wrote:

BTW, another use for decrypting saves is that you could dump your save, make a copy, edit out the WFC data, and put it back on the cart. Then you could use it online on a different DS, and just keep swapping the WFC data in and out of the save when you want to switch DSes.

Can anyone tell me why WFC "treats your game cart and DS as a set"? This doesn't seem to serve any useful purpose. Are your online stats and friend code deleted if you use a different DS?

#84278 - tepples - Sun May 21, 2006 7:35 pm

philip wrote:
Can anyone tell me why WFC "treats your game cart and DS as a set"? This doesn't seem to serve any useful purpose.

Mostly to prevent you from impersonating someone if you buy a used DS Game Card.

philip wrote:
Are your online stats and friend code deleted if you use a different DS?

Read your game's manual.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#84331 - HyperHacker - Sun May 21, 2006 11:21 pm

Yeah, I don't get what the big deal is about editing stats. Oh yay, I can have 1337 wins and 0 losses all the time. That does nothing. It wouldn't give any advantage during the game, and any competitions would be pretty stupid to rely on those stats. I'll just bet it's in case of an exploit.