Resource icon

Pokepatch 4.2

This is a patch to allow DS slot flash carts to link up with various GBA slot hardware to use the GBA cart linkup functions (see pal park) that do not otherwise work (various reasons but mainly that GBA carts use SRAM saves where the original game uses flash and as such has different read commands).
~ pokepatch V4 ~
replicates EZ5's patch to allow pokemon migration using various GBA flashcarts and other slot1 cards

Drag and drop Pokemon NDS ROM onto the EXE to apply the patch. This exe will create an output file
in the directory of the file dropped onto the exe with "_pkpt.nds" at the end, this is the patched
output.

** no warranties expressed or implied **
There is a (now good) chance it will work, and a chance it won't. Give it a go. The biggest problems that
have been encoutered are GBA headers that were patched or corrupt save data (sometimes due to bad sram patching.)
If you have a corrupt save error, try playing from an emulator like no$ or vba - the gba game itself is capable
of correcting some errors.

I've tested it thoroughly on the hardware listed using Pokemon Diamond USA on a real R4 (thanks to vvedge) and
found it working well; my initial testing on Pokemon Platinum (with "different DS/Time" errors) required
a couple tries before I got past the initial migration screen but seems OK, it's my understanding Platinum
isn't all that stable on many flashcarts to begin with.

If you run across one that I haven't tested (aka: not diamond/platinum USA) that isn't working, black screen on migration
or white sceen on startup, let me know and I'll re-verify if I can.
---------------------------------------------------------------------------------------------------------------------------
~ Per Card notes ~
EZ I/II:
use single ROM mode and load the saver from the client. Disable as many patches as it allows.

EZ III/IV:
the GBA game has to be on NOR in the first space avaiable, make sure to load your save file from
EZ disk before trying to migrate, it may help. Disable as many patches as you can (ie: don't use EZ4 client)
to try and avoid header issues. This patch is NOT meant to make migration work with ONLY a EZ III/IV, you
will still need a DS slot card to play the NDS game from.

EZ 3in1 :
This will NOT work with Rudolph's tool unless you have the GBA ROM on NOR and not PSRAM.

Flash Advance :
I'm including a couple tools for SRAM management in a zip, as far as I am aware there is nothing eles out there
that allows direct SRAM manipulation. See the FASsram_tool readme for more info. Use FAS1 or AKAIO to write the
GBA ROM to FA works great, then using the sram tool I included to get your save into SRAM
---------------------------------------------------------------------------------------------------------------------------
~ Technical note ~
Copy code and a 'stub' are inserted at the tail end of arm9, which takes the embedded bankswitching code 'stub' and copies it
to 0x23B0F00, arm9 entry is patched to jump to the copy code (so the secure CRC will be buggered in the patched header), FLASH
ident responses are patched in 2 locations, and FLASH bankswitching is patched to jump to the copied 'stub'. arm9 region is
padded to (arm9 size+copy patch size+arm9 footer size) + pad to align to 512 bytes, all other offsets in the header are shifted
to match the new offsets and the FAT table is iterated through to change it's offsets and verify the data at those offsets.

CRC code was used verbatim from the CRC code found in ndstool (see crc.h and crc_tab.h and little.h for source.)
http://devkitpro.svn.sourceforge.net/viewvc/devkitpro/trunk/tools/nds/ndstool/
I'm providing the GPL'd source in this archive to reflect the changes I made to it as the rest of this project does not share
the same license.
---------------------------------------------------------------------------------------------------------------------------
~ some thanks ~
MANY MANY THANKS to vvedge for supplying a diamond save which allows me to migrate on my own DS
Thanks for your help getting the initial version tested kettek, I'm sure there are plenty of pokefans (har har)
that can make use of it.
Thanks to everyone who helped test the kor patch
Thanks to DKPro maintainers and it's contributors
Thanks to Sasq for the great pogoshell, where I shamelessly stole the injected FA bankswitching code from
Thanks to smiths for FAS1 and AKAIO FAS functions
Thanks again to EZ team for the original version of the patches adapted here, and the great hardware along the way
Thanks to theotherfreakyguy for helping verify Platinum migration is working
Thanks to cracker for DSATM, without it's deadbeef padding I'd have had more hours of tedium

Cory1492 - nds.cmamod.com
---------------------------------------------------------------------------------------------------------------------------
General chit-chat
Help Users
  • K3Nv2 @ K3Nv2:
    Don't know why people get so emotional online just get over it ffs
    +2
  • BigOnYa @ BigOnYa:
    He was the ass of gbatemp, everyone knocked on him, I honestly felt bad, even though I was guilty myself, but he egged it all on himself,
  • BigOnYa @ BigOnYa:
    But he still here, but under dif name, he pm me sometimes still even.
  • K3Nv2 @ K3Nv2:
    It's like they think we'll be in their bed pissing on it the next day
  • BigOnYa @ BigOnYa:
    I feel like gbatemp should make t-shirts or memorabilia to remember the lost ones. I bet the Polly shirts would sell out quick.
  • K3Nv2 @ K3Nv2:
    Nah that could actually bring lawsuits
  • K3Nv2 @ K3Nv2:
    Tempsuits
  • BigOnYa @ BigOnYa:
    PollySuits
  • BigOnYa @ BigOnYa:
    Your correct, Somebody would be guilty and there would be riots, then they storm the gbatemp capitol,
  • K3Nv2 @ K3Nv2:
    Online or not there are still certain rights that judges would have no issue handing out a warrant over
  • K3Nv2 @ K3Nv2:
    Just look at Kim dotcom
  • BigOnYa @ BigOnYa:
    Honestly I'm scared to, from you, but ok, lemme turn on vpn, virtual machine, private browser first
  • K3Nv2 @ K3Nv2:
    Remember that Alexa robot I gifted you
  • K3Nv2 @ K3Nv2:
    And that laptop Webcam you never tapped up
  • BigOnYa @ BigOnYa:
    That robot is here somewhere, I hear it moving around at night, but I haven't seen it for months.
  • BigOnYa @ BigOnYa:
    Oh that laptop I give to ancientboi, so you been watching him for months, and he's been watching you
  • K3Nv2 @ K3Nv2:
    Oh good more than enough material for the fbi
    +2
  • BigOnYa @ BigOnYa:
    Damn its 5 in morn, I gotta Go wake your mum and send her to work. Check ya later.
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    He could make so much money!!! His arm would never get tired lol
    +2
  • S @ salazarcosplay:
    How are yall doing
    +2
  • VXNlcm5hbWU @ VXNlcm5hbWU:
    Just had a pure banger of a sandwich there, was very nice
    +1
    VXNlcm5hbWU @ VXNlcm5hbWU: Just had a pure banger of a sandwich there, was very nice +1