AP-patch preservation

Discussion in 'NDS - ROM Hacking and Translations' started by Robz8, Jul 15, 2017.

  1. dubbz82

    dubbz82 GBAtemp Advanced Maniac

    Member
    7
    Feb 2, 2014
    United States

    The patches I have in that set were derived from no-intro dumps and nds scene tool.
     
    noctis90210 likes this.
  2. noctis90210

    noctis90210 GBAtemp Advanced Fan

    Member
    6
    Dec 24, 2013
    Yeah it works for hgss, guardian signs, typing adventure all in US all in no-intro... Thanks for those...
    But i cant find one from no-intro pokemon bwb2w2 and conquest US... Hope some one can release it since no-intro roms are the clean ones...
     
  3. Valery0p

    Valery0p GBAtemp Fan

    Member
    3
    Jan 16, 2017
    Italy
    There is a patch for the EU version?
     
  4. kinder_bueno

    kinder_bueno Advanced Member

    Newcomer
    2
    Feb 7, 2016
    Poland
  5. noctis90210

    noctis90210 GBAtemp Advanced Fan

    Member
    6
    Dec 24, 2013
    @Robz8 @dubbz82 it looks i figure it out... the patch always change the value of the same offsets regardless of region or if its released by a certain scene group, the cause of error by xdelta patch and on ds rom tool not detecting the specific patch is the crc inside the patch...

    so if we change the crc inside the patch matching the crc of a certain no-intro release... it will finally work...

    just a need help how to make xdelta patch for these:
    the alphanumeric numbers beside the game title (inside the bracket) are the only things i changed to match the crc of US no-intro releases:

    Code:
    Pokemon White Version [B552501C]
    00004600: B0 68 8A 00 79 AA 19 72 13 9A B6 9F E1 CC 8B 10 → 3C 00 9F E5 00 10 90 E5 38 20 9F E5 02 00 51 E1
    00004610: 6F 5B 4F A0 96 42 86 94 76 C3 26 C3 A8 DE 0F A0 → 34 10 9F 05 08 10 80 05 48 11 80 05 2C 10 9F 05
    00004620: 67 61 FE DF 5A F9 45 41 DA 64 3C B1 23 5C 8A F6 → A8 10 80 05 E8 11 80 05 24 00 9F E5 00 10 90 E5
    00004630: A4 4F EC 86 C5 A7 9C B9 41 BB E4 30 F4 FF 67 5D → 20 20 9F E5 02 00 51 E1 01 10 A0 03 0A 10 C0 05
    00004640: 26 8E B1 79 8B 29 02 64 C9 D7 AA 3E 9A A4 83 EA → 1E FF 2F E1 84 7F 18 02 4F 03 5F E1 37 B3 AA 36
    00004650: 70 FB D7 39 32 C6 6D 3A D2 6F 6F 7B → 6A E0 AA 36 00 0A 18 02 1F FF AA 28
    00004EA4: 1E FF 2F E1 → D5 FD FF EA
    
    Pokemon Black Version [4F6E5580]
    00004660: F5 68 9A FF 29 F8 80 02 A2 27 3C 92 20 AF 36 65 → 3C 00 9F E5 00 10 90 E5 38 20 9F E5 02 00 51 E1
    00004670: AF 69 DE CF FC AA F4 9D 5F 9D D4 BA 8D 22 5A C7 → 34 10 9F 05 08 10 80 05 48 11 80 05 2C 10 9F 05
    00004680: F1 23 08 E2 A1 2D CA BE 4F EE D2 8F D6 A8 9D 2B → A8 10 80 05 E8 11 80 05 24 00 9F E5 00 10 90 E5
    00004690: E2 74 11 7C 14 DF 70 47 63 B0 73 DF E3 2C D1 FC → 20 20 9F E5 02 00 51 E1 01 10 A0 03 0A 10 C0 05
    000046A0: C5 AE DD A7 7E DD 26 E7 18 1F EB A9 27 57 BF C2 → 1E FF 2F E1 64 7F 18 02 4F 03 5F E1 37 B3 AA 36
    000046B0: 58 00 27 4B 63 98 C0 96 73 4E EE E4 → 6A E0 AA 36 E0 09 18 02 1F FF AA 28
    00004EA4: 1E FF 2F E1 → ED FD FF EA
    
    Pokemon White Version 2 [777EB04F]
    00004620: EA A2 97 6E 6C D1 51 01 9F 4E CC 5D 16 2B 3F DE → 00 00 9F E5 1E FF 2F E1 83 A8 00 00 00 00 9F E5
    00004630: 83 B4 13 DF 70 47 A6 6C 0C 33 F0 F3 78 75 57 2A → 1E FF 2F E1 CF B3 00 00 00 00 9F E5 1E FF 2F E1
    00004640: 35 23 FA 3F B2 E2 D2 89 33 FB 49 98 AA CF 00 B4 → 27 C1 00 00 00 00 9F E5 1E FF 2F E1 65 AA 00 00
    00004650: 7A 7A D5 92 98 2E DF 18 59 4E 32 CB 52 F7 D4 30 → 6C CA 17 02 FC D1 70 47 94 FC 06 02 F8 B5 82 B0
    00004660: 81 1C FE A8 AC 0F F1 15 2F 9C 5F 14 2C A6 84 28 → 00 20 70 47 1F 40 2D E9 20 00 1F E5 00 10 90 E5
    00004670: 5C A6 64 D0 39 1F 00 70 9C AB 6D F1 2B 58 7D 17 → 24 20 1F E5 02 00 51 E1 00 30 A0 03 B0 30 C0 01
    00004680: D0 25 4A E2 4C 98 4F 01 91 75 51 51 1B 9E 46 B3 → 01 30 A0 03 DE 30 C0 05 38 00 1F E5 00 10 90 E5
    00004690: 3C 4C AA 39 DC 66 3D D1 63 9E 76 61 41 4B 30 D4 → 3C 20 1F E5 02 00 51 E1 40 30 1F 05 00 30 80 05
    000046A0: D3 D4 CF 1B 3A 77 5F 9D F8 B0 11 DF 70 47 A7 51 → 24 00 8F E2 00 10 90 E5 01 00 51 E3 1F 80 BD 08
    000046B0: 51 68 22 FE BA BA 37 8D DA 4C 0B 24 24 1A 81 65 → 00 20 91 E5 04 30 90 E5 03 00 52 E1 08 40 90 05
    000046C0: F3 A1 7A C1 4D 46 9C B4 66 D5 28 1F 26 61 BE F2 → 00 40 81 05 0C 00 80 E2 F5 FF FF EA 14 0A 18 02
    000046D0: D7 EB E4 C9 D1 83 D6 E0 42 F9 90 12 88 1F FB 9F → E8 0E 18 6A 20 46 00 6A C0 0A 18 02 E8 0E 18 6A
    000046E0: 1A 86 BB 74 7F E1 CE A4 3D 63 9B 72 BF 2F FC 10 → 2C 46 00 6A 6C 0B 18 02 E8 0E 18 6A 38 46 00 6A
    000046F0: C0 1D 52 42 41 40 B3 F5 F2 3D 18 33 70 F2 47 96 → E8 43 1A 02 54 3A 1A 6A 44 46 00 6A 01 00 00 00
    00004EA4: 1E FF 2F E1 → EE FD FF EA
    
    Pokemon Black Version 2 [D4427FD1]
    00004620: A9 C9 4A 97 0D 83 82 8C D0 A1 41 D2 25 3D 75 3D → 00 00 9F E5 1E FF 2F E1 83 A8 00 00 00 00 9F E5
    00004630: D5 79 EF 1A 58 08 2D 95 CB 44 CF F2 AF 27 7C 24 → 1E FF 2F E1 CF B3 00 00 00 00 9F E5 1E FF 2F E1
    00004640: B2 0A 2B D4 5A 1F B9 FC 6B 8F 4B 9B 3A 55 1B 61 → 27 C1 00 00 00 00 9F E5 1E FF 2F E1 65 AA 00 00
    00004650: C4 76 FD CD 6B 77 CE 09 6A B1 54 E5 2B 4C 5C 11 → 2C CA 17 02 FC D1 70 47 68 FC 06 02 F8 B5 82 B0
    00004660: CC 9F 74 B4 82 21 06 DF 70 47 A7 E9 AC C2 80 90 → 00 20 70 47 1F 40 2D E9 20 00 1F E5 00 10 90 E5
    00004670: 0B D5 6C 0E 3A 19 42 C0 8F 14 04 FF F5 F8 9F 55 → 24 20 1F E5 02 00 51 E1 00 30 A0 03 B0 30 C0 01
    00004680: 26 FF A5 25 F7 99 EB 06 01 CC 8F 4B 65 57 C1 B5 → 01 30 A0 03 DE 30 C0 05 38 00 1F E5 00 10 90 E5
    00004690: 8F 17 85 66 E7 ED 4B 40 4D F8 CB FA FD 0A C1 88 → 3C 20 1F E5 02 00 51 E1 40 30 1F 05 00 30 80 05
    000046A0: 18 17 D6 5A 93 60 F3 0A C1 63 93 FE 6C B4 49 30 → 24 00 8F E2 00 10 90 E5 01 00 51 E3 1F 80 BD 08
    000046B0: BC 03 05 6B E3 EC 5E E4 FF EA 09 DF 08 1C 70 47 → 00 20 91 E5 04 30 90 E5 03 00 52 E1 08 40 90 05
    000046C0: EF CF 94 B9 02 B6 0B 31 04 C3 C0 1A EC 92 E6 E7 → 00 40 81 05 0C 00 80 E2 F5 FF FF EA D4 09 18 02
    000046D0: D4 74 BE 2E 50 04 D7 ED FC A8 67 D3 76 B5 6F 00 → A8 0E 18 6A 20 46 00 6A 80 0A 18 02 A8 0E 18 6A
    000046E0: 68 AC BE 65 89 C4 75 2D CB 2D D8 86 34 9E 26 D9 → 2C 46 00 6A 2C 0B 18 02 A8 0E 18 6A 38 46 00 6A
    000046F0: A6 06 05 E9 71 1F BB 39 FB 48 5E C5 FB 6E 6B 10 → A8 43 1A 02 14 3A 1A 6A 44 46 00 6A 01 00 00 00
    00004EA4: 1E FF 2F E1 → EE FD FF EA
    
    Pokemon Conquest [A0166347]
    000044E0: FE BE 68 6F 0E 93 F0 E0 FB CA F3 8A 9D DF D5 72 → 00 00 9F E5 1E FF 2F E1 CF B3 00 00 00 00 9F E5
    000044F0: B4 53 D5 60 DF A7 70 29 05 61 64 8E 3E 5C 62 56 → 1E FF 2F E1 75 B9 00 00 00 00 9F E5 1E FF 2F E1
    00004500: 11 DF 70 47 77 3E 7A E7 61 9F 17 EA F0 6C 44 A6 → 83 A8 00 00 00 00 9F E5 1E FF 2F E1 27 C1 00 00
    00004510: F4 C2 A1 08 CC 51 E2 4E 36 21 35 52 11 EA 5B 22 → 1F 40 2D E9 24 00 8F E2 00 10 90 E5 01 00 51 E3
    00004520: C8 59 00 92 F1 C5 AF F6 57 F0 2E 9B C0 C7 93 AE → 1F 80 BD 08 00 20 91 E5 04 30 90 E5 03 00 52 E1
    00004530: 4B 77 C7 54 17 59 6D C7 5D 79 26 E8 0B 38 87 06 → 08 40 90 05 00 40 81 05 0C 00 80 E2 F5 FF FF EA
    00004540: 3D AD 9D B5 60 CA 2D 82 45 EA CF 77 A6 EE 2D DB → 30 6E 21 02 FC 64 21 6A E0 44 00 6A DC 6E 21 02
    00004550: CD 85 B1 AA CB 80 12 2C 9C B1 6A 7D CF 14 03 AE → FC 64 21 6A EC 44 00 6A B4 6F 21 02 88 74 21 6A
    00004560: 50 C6 B2 81 78 9E 0A 50 46 AB CA CF 25 26 74 77 → F8 44 00 6A 60 70 21 02 88 74 21 6A E0 44 00 6A
    00004570: 7A CB 92 2F 15 DF 70 47 4D A9 06 13 A4 DE 08 3E → 78 87 21 02 88 74 21 6A 00 45 00 6A 01 00 00 00
    00004EBC: 1E FF 2F E1 → 93 FD FF EA
    
    
    
    
     
    Last edited by noctis90210, Dec 14, 2018
    Amars and matt! like this.
  6. GaboGabito007

    GaboGabito007 Newbie

    Newcomer
    1
    Oct 14, 2018
    Venezuela
    Venezuela
    Got the patch for M&L BIS and im playing it right now
     
    Last edited by GaboGabito007, Dec 15, 2018
  7. GaboGabito007

    GaboGabito007 Newbie

    Newcomer
    1
    Oct 14, 2018
    Venezuela
    Venezuela
    Hey i patched my rom but every time that i select aa new save file the game crashes into a black screen
     
  8. pakrett

    pakrett GBAtemp Maniac

    Member
    6
    Apr 6, 2015
    France
  9. dubbz82

    dubbz82 GBAtemp Advanced Maniac

    Member
    7
    Feb 2, 2014
    United States
    The patches I've supplied in the odrive folder are mostly (if not entirely?) derived from the above tool. Main benefit being that xdeltas are more cross platform friendly, and there's no additional setup needed before using them.
     
  10. retrogamefan

    retrogamefan GBAtemp Advanced Fan

    Member
    4
    Oct 8, 2009
    Antarctica
    Last edited by retrogamefan, Dec 24, 2018
  11. dubbz82

    dubbz82 GBAtemp Advanced Maniac

    Member
    7
    Feb 2, 2014
    United States
    Thank you. There's a recent influx of interest in this because of nds-bootstrap. It looks like most of the AP protected games should now be addressed with this update.
     
  12. Blany

    Blany Member

    Newcomer
    1
    Dec 31, 2018
    United States
    Quick question. I've done the Ap patch thing(using DS-Scene Rom Tool) With Pokemon HG(patching was successfully added. Dragged it to the Rom folder, etc.) After that loaded up SR Loader tap Pokemon HG and gave me the "This game may not work correctly if it's not AP-patched. Should I ignore this message? Or will the game have problems?
     
  13. Robz8
    OP

    Robz8 Coolest of TWL

    Member
    18
    Oct 1, 2010
    United States
    If it's already AP-patched, then just make it not show the message again.
     
    Blany likes this.
  14. cpwzhr

    cpwzhr Newbie

    Newcomer
    1
    Jan 10, 2019
    Canada
    (deleted)
     
    Last edited by cpwzhr, Jan 24, 2019
  15. miniblue

    miniblue Newbie

    Newcomer
    1
    Feb 7, 2017
    Singapore
    Hello,

    is there any solution to apply ap-patch on a ds rom that already have translation patch?
    The AP-patch for the clean ROM of summon night X (JPN) in DS Scene Room is available so maybe someone can help in merging the AP patch and translation patch? Or do anyone know where one can request AP-patch for the translated rom?
    Thank you in advance.
     
    Last edited by miniblue, Feb 3, 2019
  16. FAST6191

    FAST6191 Techromancer

    pip Reporter
    23
    Nov 21, 2005
    United Kingdom
    I don't envisage any cases in which simple AP removal* would interfere at the highest technical levels with a translation, and anybody vaguely competent at DS ROM manipulation (not even hacking -- if you can operate a file viewer/ndstool/dslazy/dsbuff/... and an compression program enough compress and decompress) can likely combine AP patches with translations for those that want such things. Personally I still say get a flash cart that handles it all rather than messing around with these compatibility layer things but it is what it is I suppose. It might even be as simple as applying the AP patch, then applying the translation patch (which is probably in xdelta format or something similarly potent) but telling it to ignore input verification/checking**.

    *for something like the pokemon typing game then maybe the extra code added to send things over wifi or something would also be the same places a translation would make use of. You would then have to be some flavour of ROM hacker to sort this, though even then it will hopefully not be too bad (space is an issue in DS games but there is usually enough free space able to be made available that you are not going to have to optimise things to make it all fit a la some older devices.

    **old school ROM hacks tended to use the IPS format. IPS is limited in a lot of ways (size, inability to add data, no ability to relocate data/deal with insertions), one of the bigger ones is the lack of input verification. This particularly troubles SNES hackers where various ROMs from different sources will either come with or without headers (with header then shifting everything it expects forward by the same amount as the header) but everybody suffers as people will try to apply it to different versions, different regions, corrupt dumps, otherwise hacked versions...
    Newer patch methods will then do an initial check to try to make sure the ROM presented for patching is the version it expects. If you patch the AP out then it will not appear as such and it will tell you, and maybe refuse to patch unless you tell it to ignore input checking/source verification or whatever it is called in your particular translation of the patching program.

    Anyway general theory of how to combine.

    Anti piracy in ROMs so far as I know is limited to the executable parts, which is to say mainly the ARM9.bin and its overlays. For the PC it can get more fun*** but generally DS checks amount to some number (which can be hundreds or thousands) of things doing the check and seeing if it gets the result it expects if you are running on a flash cart/emulator. The people taking out the anti piracy get to find all these checks and nullify them however they will. The easiest way, one which is accepted by basically everybody, is to NOP (so called no-operation or an operation that ultimately does nothing other than waste a cycle or two) the checks and force their outcomes to the good version (possibly by jumping to the good outcome or preventing a jump). This can all be done in place on a ROM without adding extra sections of code to emulate responses and whatever else.

    *** This video, and the series it is part of, is a pretty nice introduction to what goes on and what historically happened on the PC. The N64 also had something like this, most famously with banjo tooie which only dropped in 2012 https://gbatemp.net/threads/banjo-tooie-for-n64-finally-cracked.338824/ but enough with this aside.

    A ROM hack or translation could do any number of things to the executable parts of the ROM, for most purposes then translations for every DS game I have pulled apart or otherwise seen won't touch them at all but you never know what a dev or hacker did until you check. Even if the ROM hacker/translation group did change the binary it should be in totally different areas to the AP defeating stuff. I can think of perfectly valid reasons for the translators to mess with the AP areas as well but should be no big deal if you first sort the AP and then sort the translation/hack side of things.
    Your job in combining them would be to get the modifications to the ARM9 and overlays, and any changes for the hack/translation into one file.
    If it is uncompressed it is easy enough. I would not be surprised either way when I open a DS ROM and look at its binaries. On some occasions some dumpers even compressed the binary when it was not compressed to begin with but let us not go there, and most of those should have been nuked anyway.
    If it is compressed then technically you should really decompress both versions, merge any changes into one new file, recompress or otherwise dodge the need for compression and carry on accordingly.

    The hack/translation probably also has a bunch of other files inside the DS ROM it changed so you would also need to get the changed files (a simple file compare program will tell you this, or you can copy the lot instead if it is just AP you want to combine with a hack/translation) in there as well.

    Somewhat amusingly I would probably use IPS in making this -- IPS is very basic but as all it essentially does is make changes rather than check to make sure it has the file it expects then it will do the job just fine here, and you are not likely to run into size limits with this (the DS has 4 megs of memory, any executable file has to be less than that, IPS tops out at just under 16 megabytes) and nobody will likely shuffle the binary forward or backward like in other files in the ROM that use pointers. The routine would run get uncompressed ARM9 or overlay files. Generate IPS patches to convert to AP patched version and another to go to translated version. Do AP patch, do new IPS version of translator/hacker patch as well to AP patched version, compress if necessary, rebuild ROM with all the other files that needed changing.

    Thinking about it then it would probably be possible to automate a lot of that, maybe add some checks to confirm people are trying to do what you think they are trying to do, and make ultimately it happen but that would be a thing for a different day. Wonder if I could make a distant cousin to my old ARM7 swapper program.

    I have probably just confused you more. If you want a very basic thing you could try, other than the thing above about disabling verification, that might well fail but is worth trying anyway, especially if it is a translation of a European language game to another European language.
    Do the AP patch to a ROM
    Do the translation patch to another ROM.

    Fully unpack the AP ROM and translation/hacked ROM into separate folders. ndstool should do well here. https://filetrip.net/nds-downloads/...ntendo-ds-rom-tool-ndstool-1-50-1-f29352.html
    Copy the contents of the data folder into the AP game's data folder, overwriting everything in the process. This should leave the overlays and arm9.bin, arm7.bin and all the stuff in the AP folder alone.
    Reassemble the game with ndstool (example commands on the link).
    Hopefully this should be an AP patched and translated game. If not then you have to start merging changes to binaries.
     
    alexander1970 likes this.
  17. miniblue

    miniblue Newbie

    Newcomer
    1
    Feb 7, 2017
    Singapore
    Hello Fast6191
    Thank you so much for the guide and help.

    So I followed your post by unpackng the two of ROM and combine the data folder into one, and it's working:lol:
    The game is now playable without any issues on my 3ds.
    Thank you again for the great advice!
     
  18. triassic911

    triassic911 Burst Mode

    Member
    5
    May 9, 2007
    United States
    NYC, USA

    Thank you!! Much needed.
     
  19. Tattorack

    Tattorack Interstellar Explorer

    Member
    3
    Jun 15, 2011
    Denmark
    Calisto Prime Orbital
    For some reason I can't find any AP patch for 3050 - Age of Empires Mythologies. That's a little frustrating.
     
  20. MythicalData

    MythicalData GBAtemp Advanced Fan

    Member
    6
    May 11, 2017
    United States
    There was a software that has ap patches hosted on it. It's actually the only working part iirc. It's called ds happy box. I used it to patch dq IX and FF fhol
     
    noctis90210 likes this.
Loading...