Pocket Monsters Diamond/Pearl source code available

Ryccardo

Penguin accelerator
OP
Member
Joined
Feb 13, 2015
Messages
7,687
Trophies
1
Age
28
Location
Imola
XP
6,902
Country
Italy
pockemon.jpg

No precompiled debug builds to play with this time around, but the source code for the launch versions (Rev 0) of the Japanese games "Pocket Monsters Diamond and Pearl" is now unofficially available to the public (at least for a short time).

The release is called "pokemon_dp_VER20060816.zip" and has a SHA-1 hash of 846CCF2CBC1014EF31C4B72E40AC0BDB3F727335.

Apart from actual source code, the pack includes game-specific authoring tools for 32-bit Windows, as well as rom_header*.template.sbin for both versions. (A generic version of this library is part of the SDK, however licensed commercial games are to be compiled with their individual Nintendo-provided variant of this file, responsible for the title-specific encryption mechanism).


[GAME=/game/pok-mon-diamond.1560]Pocket Monsters Diamond[/GAME] [GAME=/game/pok-mon-pearl.1518]Pocket Monsters Pearl[/GAME]
 
Last edited by Ryccardo,

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,285
Country
United Kingdom
Can this be used to make completely new games out of the diamond and pearl games?
You could have done that anyway but yes that is usually what source code being made available allows.

How much work you would have to do to convert it to another device, or get something to compile it is a different matter. If it is anything like the previous source leaks (one of the princess maker games accidentally included source in the ROM) then you will have to find and install Nintendo's own tools which might be easier said than done (I don't know if the later versions of them have since been leaked to the public -- some people doing flash cart things had access to things but whether that made it to wider distribution is another matter, and they had some serious protections and phone home stuff if they are to be believed, which I do). One of the more annoying things will be I think you will possibly lack header files as a lot of them were precompiled and thus will possibly have to reverse engineer those or figure out what it is doing/playing to/expects, or if you are just going on the DS again maybe fish such things out of the retail ROM.


Short version. If you saw the Mario 64 PC/Switch stuff where people can get the code, fight with getting a compiler up and running for an hour or so and then start to twiddle things to their own ends whilst having a beginner's guide to C on the other screen then probably not so much. One day maybe but that is a fairly substantial rework project, or someone that really knows this compiler/code building lark taking the time to put an option together.

Right now it is probably more useful for people that would previously have spent years making the likes of https://www.glitchcity.info/wiki/List_of_Pokémon_disassembly_projects or if you want to poke around the code to have an easier way of making things like https://www.dragonflycave.com/mechanics/gen-i-capturing as you should literally have the high level code right there for it and can see everything that goes into it (or at least went in on that version -- if this is older code, or updates/porting to other regions changed something then eh, though should still get you most of the way there).
 
  • Like
Reactions: Asia81

Ryccardo

Penguin accelerator
OP
Member
Joined
Feb 13, 2015
Messages
7,687
Trophies
1
Age
28
Location
Imola
XP
6,902
Country
Italy
Article edited to replace erroneous filename "libsyscall.a" with "rom_header*.template.sbin" - thanks to Myria for the correction

you will have to find and install Nintendo's own tools which might be easier said than done
Yes, if you want to compile the code you'll need the official DS SDK and additional libraries - the appropriate versions (which happen to not be the most widely unofficially-available ones either) too; however since this has "pokemon" in the name, someone made and circulated a preconfigured VM

Right now it is probably more useful for [documentation]
Indeed the first "major" discovery seems to be a newly identified mechanic - on certain days (= mm/dd pairs), the probability of wild battles is influenced by a fairly negligible modifier - the involved days are mainly holidays in the six countries most representative of the six languages the game was released into (Koreans excluded), but also include the bombings of Hiroshima, Nagasaki, and the Twin Towers!
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,285
Country
United Kingdom
Indeed the first "major" discovery seems to be a newly identified mechanic - on certain days (= mm/dd pairs), the probability of wild battles is influenced by a fairly negligible modifier - the involved days are mainly holidays in the six countries most representative of the six languages the game was released into (Koreans excluded), but also include the bombings of Hiroshima, Nagasaki, and the Twin Towers!

Compared to what I have seen in the past out of pokemon hackers that is woefully lacking for such a thing to be a discovery.
I would normally have expected to see most such variables teased out as a matter of course, and if programmed even vaguely normally (a big ask for pokemon I know) I imagine that would have stood out like a sore thumb.
Maybe they spent more time on battle mechanics or something.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: You booze you snooze?