• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

My Pokemon Ranch PKM Data

Status
Not open for further replies.

Low Lines

Graphical Artist/Programmer
14
Posts
15
Years
    • Seen Jan 15, 2011
    Okay, I've been working at hacking the save data of my Pokemon Ranch, so basically I can put a couple of those event pokemon which unlock stuff on certain games onto my DS Game, since I live in rural place and haven't a hope at ever getting them physically.

    I have a fairly good understanding of the structure of the WiiWare games save data and at the moment I am trying to decrypt a pokemon that was transferred to it from your DS.

    The attached file is the Ranch Pokemon Data for a Lv50 Japanese Movie Darkrai. Note that pokemon stored on the Ranch have 164 bytes allocated to them, the first 136 bytes being (and I'm pretty sure on this) the pokemon file structure (with bytes 0x8-0x87 encrypted). And the last 28 bytes of the file are used by the ranch (such as locking a Pokemon to a specific DS game card). Also the Wii stores data in Big Endian format which is the opposite to the DS games.

    Now I can't seem to decrypt the Pokemon Data, so I assume my PRNG code is wrong. Can someone who understands Linear Congruential Generator Alogarithms somewhat check or rather help me work out how I'd go about writing the function in Java?
    Bulbapedia has documentation (see Pokémon data structure in the DS) but I haven't played with Mathimatical Functions in several years so it's a bit of a nightmare at the moment for me.

    Any help is appriciated!!

    [edit]

    OK the first thing I'm not sure about is generating the PRNG.

    According to Bulbapedia, it can be represented in the form:
    Code:
    [I]X[n+1] = (0x41C64E6D * X[n] + 0x6073)[/I]
    Where X[n] is the Checksum.
    So say using the Darkrai I mentioned earlier, the checksum would be 0x9ED1. What I hate is I know I did this sort of thing at school and it was fairly easy to do, but now I've forgotten :(

    [edit2]

    After a little more work, I think that Ranch has a different PRNG values.
    An XOR comparison with the first 3 WORDS in the file...
    Code:
    1000000001111111    0x807F (POKE ID ENCRYPTED)
    0000000111101011    0x01EB (POKE ID #491)
    1000000110010100    0x8194 (XOR)
    
    1110100111001001    0xE9C9 (ITEM ENCRYPTED)
    0000000000000000    0x0000 (ITEM #0)
    0001100111001001    0xE9C9 (XOR)
    
    1000100000001011    0x880B (OT ID ENCRYPTED)
    0100110010010011    0x4C93 (OT ID #19603)
    1100010010011000    0xC498 (XOR)
    It's a shame there isn't a Wii/WiiWare equivalent Emulator with Debugging like No$GBA :p

    [edit3]

    Heh, just worked it out on my own, the Pokemon Data is a straight copy from the DS Game Card (meaning it's in Little Endian), I realised that when I figured out what part of the PRNG I was doing wrong. I ought to be able to hack Pokemon now on Ranch ^_^
     
    Last edited:

    Low Lines

    Graphical Artist/Programmer
    14
    Posts
    15
    Years
    • Seen Jan 15, 2011
    Not until I figure out resigning Save Games copied to a SD Card. I can successfully edit the actual save files of the games, but without resigning the file the Wii just rejects them.

    It would be possible to copy file through the SaveGame Manager by Waninkoko (or whatever his name is) but editing the SD Saves is more user friendly and "safe" since your using the Wii to transfer files.

    Until I get round to understanding Elliptic Curve Digital Signature Alogarithms, that's pretty much as far as I can go :p
     

    codemonkey85

    Software Developer
    22
    Posts
    15
    Years
  • I can't believe I overlooked this thread. :O

    Have you made any further progress into this project? If you need any help, feel free to PM me or E-Mail me at my username AT gmail. If you're still interested, I know a lot of potentially useful resources....
     

    Sydian

    fake your death.
    33,379
    Posts
    16
    Years
  • Overlooked? This wasn't even on the first page. Don't bump threads that haven't been posted in for over a month.

    Locked.
     
    Status
    Not open for further replies.
    Back
    Top