Pocket Monsters Diamond/Pearl source code available

Ryccardo

watching Thames TV from London
OP
Member
Joined
Feb 13, 2015
Messages
7,406
Trophies
0
Age
27
Location
Imola
XP
6,383
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
35,286
Trophies
2
Website
trastindustries.com
XP
24,944
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

watching Thames TV from London
OP
Member
Joined
Feb 13, 2015
Messages
7,406
Trophies
0
Age
27
Location
Imola
XP
6,383
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
35,286
Trophies
2
Website
trastindustries.com
XP
24,944
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.
 
General chit-chat
Help Users
  • FAST6191 @ FAST6191:
    Are there any codes that modify the handler to do fun extras like there are for DS codes?
    Gift
  • gudenau @ gudenau:
    I don't see why you would need that, Gecko just allows you to do ASM directly instead of needing to make codes to add new code types.
    Gift
  • gudenau @ gudenau:
    There is nothing stopping you from doing that though.
    Gift
  • FAST6191 @ FAST6191:
    I was thinking more if there were (some of the DS stuff allowing I think it was different boolean masks than stock) then it would confirm that.
    Gift
  • gudenau @ gudenau:
    Some of the later DS stuff was pretty impressive. I do want to figure out how some of the lower level stuff worked one of these days.
    Gift
  • gudenau @ gudenau:
    Is this chat still on IRC?
    Gift
  • FAST6191 @ FAST6191:
    I don't know if there is a second room connected to it
    but I doubt it
    Gift
  • FAST6191 @ FAST6191:
    There is still an IRC server/channel though
    Gift
  • KenniesNewName @ KenniesNewName:
    Neat steam deck dock shipped finally
    Gift
  • mthrnite @ mthrnite:
    psi gets a dick dock and you get a deck dock, poetic!
    Gift
  • KenniesNewName @ KenniesNewName:
    Ye but mine comes with a promise of less viruses
    Gift
  • Gift
  • Dark_Phoras @ Dark_Phoras:
    Prey - this kicks Alien's ass all day
    Gift
  • mthrnite @ mthrnite:
    cool, i like that aubrey plaza chick a lot, she's really cool
    Gift
  • mthrnite @ mthrnite:
    i have zero interest in the predator property, but was planning to see it for her sake, and just hope it was good
    Gift
  • mthrnite @ mthrnite:
    that is aubrey plaza ain't it....
    Gift
  • mthrnite @ mthrnite:
    oh it ain't eek, oh well, might watch it anyway
    Gift
  • Dark_Phoras @ Dark_Phoras:
    If you don't like Predator, there's little chance you'll like Prey
    Gift
  • mthrnite @ mthrnite:
    I liked the first flick, second was ok, everything after that was b-movie stuff
    Gift
  • mthrnite @ mthrnite:
    haven't seen Predators (2010) tho
    Gift
  • mthrnite @ mthrnite:
    heard that was a bit better
    Gift
  • Dark_Phoras @ Dark_Phoras:
    Watched the first, and now this
    Gift
  • mthrnite @ mthrnite:
    I grew up on that shit, first one's fun as hell seen it half a dozen times at least
    Gift
  • DEMONGreninjaPG @ DEMONGreninjaPG:
    what is even happening
    Gift
  • KenniesNewName @ KenniesNewName:
    Mthr what was the first crt box like
    Gift
    KenniesNewName @ KenniesNewName: Mthr what was the first crt box like