Project Help with My Pokemon Ranch Project

Larsenv

Dr. Wii, Ph.D
OP
Member
Joined
Sep 28, 2013
Messages
992
Trophies
2
Website
larsenv.xyz
XP
4,235
Country
United States
We have cracked open My Pokemon Ranch around a year ago and have fully translated the Japanese exclusive Platinum version. However, there’s a problem with it that prevents it from being released, which is figuring out how to get the Japanese ROM that the Platinum version of the game sends over to the DS to transfer Pokemon to work with the US Platinum version of the game. The version that comes with the regular version of the game will give a message saying that the ROM only works with Diamond and Pearl version of the game. Unfortunately, any kind of patches we’ve done to the ARM9 will either give the game a black or white screen, and we are not sure what can be done to properly get past the check. Also, the transfer tool only will work on flash cart, because Twilight doesn’t support that feature, and the ROM is RSA signed. HaxxStation won’t work to distribute a patched version of the ROM as that targets the DS Download Station application.

Here is some technical information for the people which can help. This was not written by me.

The Glossary:
MPR = My Pokemon Ranch
EOO = Acronym unknown, a .dat executable file that lives within the DPPt ROM. It appears to be responsible for driving interactions with the Wii, such as downloading ROMs and booting to them. (I think Battle Revolution has it's own special version?)
SRL = Acronym unknown, basically a .nds file. Used colloquially to refer to the ROM MPR sends to the Nintendo DS to upload Pokemon to Ranch, a-la DS Download Play.
zukan = Japanese for Pokedex(?) - An important file in the SRLs
GameID = The unique ID associated with each Pokemon game version (Diamond = 10 (0x0A), Pearl = 11 (0x0B), Platinum = 12 (0x0C))
LanguageID = Same as GameID, a unique ID associated to each language
"DPPt Only" = A very common error thrown by the SRL, halting any progress
Vanilla = Unmodified from original game code

So, from what we can tell, a basic flowchart of the DS <-> Ranch communication works as follows:

When "Connect to DS" is selected in MPR, the wireless signal begins to broadcast. At the minimum, this includes Ranch's game code (WMBJ, WMBE, etc.), wherein the fourth character represents the region.
When the DS game boots to the main menu (where the save file is selected), it detects the communications for the Wii.
If the region character matches the DS game's region, the "Connect to Wii" option appears.
When selecting "Connect to Wii" this is where we suspect, possibly only in part, we start executing eoo.dat. The Wii will start uploading the SRL to the DS.
The DS then boots the SRL, as it would any other DS cartridge, thus performing all the same signature checks (Unconfirmed, I think? But vanilla DPPt can't boot a modified SRL)
At this point, the DS is now running the downloaded SRL, and following its logic.

Generic properties of the SRL itself:

- Ranch performs some sort of signature check on the SRL, and will crash if it does not match what is expected. We know for a fact the SRL header is included in these checks, but are not sure what, if anything else, may be included. This causes problems as you can problem guess, as the SRL includes the ROM size and where arm7.bin and arm9.bin start & end, meaning we're limited in what we can change in terms of filesizes unless we crack the header checks and can rewrite them.
- The ROM contains some minimal text data in some strange encoding (@larsenv#0 is more familiar, he found the "DPPt Only" message)
- Speaking of, the "DPPt Only" error is the bug bear. It appears to throw whenever there's anything the SRL doesn't like. Crucially, if English DPPt tries to run the vanilla Japanese Plat Update SRL, this error is thrown, though in Japanese.
- The SRL makes references to most .narc files from DPPt, and in some select cases, actively appears to be running existence checks or loading the data to memory. As @specialagentape#0 mentioned, it's reusing a lot of content from the game itself.
- There are a three clear iterations of the SRL: The original JP release, the US/EU release, and the Pt Update JP Release.
- The original JP SRL is compressed in the same weird format as most Ranch files, the latter two are uncompressed.
- While EU/US appear to be on the same or similar logic, they are not identical. As you would expect, EU contains large switch statement blocks to handle the various languages, while US and all JP releases are mono-language.

Important .narc files:

- personal.narc/personal_pearl.narc/personal_pl.narc: As the names imply, these correspond to Diamond/Pearl/Platinum respectively (though curiously, Platinum has both personal.narc and personal_pl.narc). The SRL references all three of these in logic that also refers to the GameIDs of those respective versions. Overwriting the SRL to force it to return a specific GameID following these checks though has no impact, and continues to result in the DPPt Only message regardless of version.
- zukan.narc: This is the only file that _specifically_ moves due to regional differences. Between the D/P/Pt versions, we find some files come and go, such as the personal.narcs, but these are consistent across all regions. zukan.narc is the only file that is always in a different location (and file size) for EU/US versus JP. The Pt Update JP SRL attempts to call a function on the JP file path, and then a function on the international file path, despite never seeing an international release. This call happens in the same place as a check on the personal.narc files. When swapping the filepaths however, the game whitescreens.

I won't go too much into the things I've tried, as I think a fresh mind is sorely needed, or at least, that's the excuse I'm giving because I've forgotten most of it. I'm also a Software Engineer by trade rather than a Reverse Engineer, so a lot of my approaches, assumptions, and assertions have probably been a bit naff anyway.

But as mentioned above, changing GameIDs and filepaths on what seem to be checks against these things hasn't had any effect, or it's white screened.
I was hoping finding where that DPPt Only message lived would help as we could trace it back, when trying to build a mental stack trace (we sadly don't have the tools to create crash reports due to using real hardware), I came to a dead end on some routes, and ultimately mental madness: https://transfer.archivete.am/EbEwt/ZazsonasVeryMessyStackTraceNotes.txt

Now for the people who want to know how we cracked it open, My Pokemon Ranch uses a special version of ASH to compress its files. ASH is a compression algorithm which is based on Huffman which is used also on the following, but uses a different version.

- Animal Crossing: City Folk
- Super Mario Maker
- Wii Menu

Turns out the reason why My Pokemon Ranch ASH could not be extracted properly is because of the bit length of the leaf node.

We have a decompressor that can extract My Pokemon Ranch files made by NWPlayer123. You will have to go to their GitHub Gist to find it because due to forum rules I don’t think we can link it because it’s based on info from the Wii SDK. A compressor also was made, but it works by using ASH Compressor by conanac to post process the file
 

Exidous

Well-Known Member
Member
Joined
Mar 2, 2021
Messages
467
Trophies
0
Age
45
XP
958
Country
United States
Very cool. You seemingly cast a wide net so here's a barely better than random idea:

Modify the individual varying pieces of otherwise vanilla D/P ROMs you're using for testing to unmatching versions (provided it wouldn't change the filesize) to see if you can identify what your bug bear is checking. I think the least impactful/most likely to work would be D<>P since both of those sound like they work without issue. GameID, LanguageID, EOO sound like appropriate variables to try first.

It may be that work has to be done on the US Pt rather than MPR.
 

Mudkip_Banana

New Member
Newbie
Joined
Sep 8, 2018
Messages
1
Trophies
0
XP
160
Country
United States
Hypothetically speaking, if the private RSA keys for the DS were leaked/discovered somehow, would you be able to patch the rom and sign it yourself, or would that not bypass the checks for the ARM9 patches?
 

SwoopKing

New Member
Newbie
Joined
Nov 11, 2020
Messages
3
Trophies
0
XP
46
Country
United States
I have absolutely no skillset to help with this, but just want to say I've been waiting for this for a very long time and am here for moral support lol! I hope the connection issues can be remedied. I can't believe they never bothered to make an English version of the update back in the day
 

KeiMegurine

New Member
Newbie
Joined
Oct 21, 2024
Messages
2
Trophies
0
Age
29
XP
20
Country
Mexico
If you ever figure it out it would be such a cool thing! I would really like to connect Platinum and HGSS, would be cool if you could withdraw from any game, too if possible, like if I deposited from Diamond and could withdraw it using a Platinum for example
 

Hazado

Member
Newcomer
Joined
May 17, 2009
Messages
6
Trophies
1
XP
73
Country
United States
I think the platinum decomp has the rom check located in sub_02024358
Just need to figure out how to null that OS_terminate() I would think
 

Soulo

New Member
Newbie
Joined
Jun 27, 2023
Messages
2
Trophies
0
Age
29
XP
54
Country
United States
This is really promising! I've always wanted this to come to fruition. Is there a way to release this in its current state, so that I can use it with my Japanese Platinum ROM in the meantime?
 

Speedy77

Member
Newcomer
Joined
Sep 26, 2020
Messages
15
Trophies
0
Age
32
XP
116
Country
United States
Following as well!

I would love to help in any way I can, I have very minimal programming experience but own most of the necessary equipment required to do any kind of testing (besides Japanese copies of the games).

I’m currently doing a Gen 4 tournament with friends and I’d love a place to dump all my extra Pokemon caught in Platinum version. Would also be cool to see mods made in the future like no player-specific withdraws and support for HG/SS.

Any news on how this is going?
 
  • Like
Reactions: edgypikachu

scj643

New Member
Newbie
Joined
May 11, 2017
Messages
2
Trophies
0
Age
26
XP
68
Country
United States
Definitely interested in this. I have some background with programing and am especially good at debugging
 

asdzfxcbvnm

New Member
Newbie
Joined
Jan 2, 2024
Messages
2
Trophies
0
Age
124
XP
33
Country
Zimbabwe
really promising. been waiting for dis translation almost 20 years now!


would b nice to have the current translation to use w/ japanese versions

hope the project achieves its goals, n even expands on em! like expanding compatibility to PAL versions or more
 

The12thGripper

Member
Newcomer
Joined
Apr 14, 2014
Messages
5
Trophies
1
XP
153
Country
United States
Please share the Japanese version with the translation! Having perfect compatibility would be nice but please don't let that be the reason this never comes out if current problems are never solved!
 

Tony_98662

New Member
Newbie
Joined
May 10, 2025
Messages
3
Trophies
0
Age
22
XP
15
Country
United States
This is mind blowing I was having the same question if it can be patch and it can but requires skills that I don't have, hopefully it can be cracked and shared to the community.:yaysp: Good luck guys.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    realtimesave @ realtimesave: @cearp I get paid for the travel time +1