Is there any Program or any tutorial that can help me patch Roms by using cheats? I have some codes that can fix new AP Games. So my question is how to use these codes to patch roms
Game fix codes are usually used like other cheat codes, except they have to be on everytime we play the games. If you have some Game fix codes you can submit them here http://cheats.gbatemp.net/forum/nds/
I assume this is a request from a person wanting to be a hacker rather than someone without a decent flash card or something similar (my reply will certain be geared towards the former).
Cheats are little more than lists of memory locations and what you want done to said locations, later hacking tools added a few methods to this list like if greater/less than but the general idea remains the same: http://doc.kodewerx.org/hacking_nds.html#action_replay (the document is called enhacklopedia and has many mirrors/forks in various places so if it is down do search for it).
"Traditionally" this means finding the location of the money/health/ammo in a game and holding that value at a given value. As the game binary is held/available in memory for most modern consoles including the DS you can target this memory that the console sees and as data in a game binary is the same as regular data in memory as far as cheats are concerned you can do interesting things including defeating anti piracy/anti cheat protection (in the case of the DS they can operate in the same way although the DS does also feature games with more traditional anti cheat methods like mirrored and game level encrypted memory).
AP defeating cheats almost always target the rom binaries and/or overlays* with the aim of writing out the AP code sections with either a jump, a NOP or whatever else to bypass the code section (this is what the cheat payload is and why it is not necessarily just a bunch of random numbers) when they are in memory and this is where it can tricky:
You could use something like NDSATM to hardpatch the cheats in but the way the later versions of the app work (using interrupts and the like rather than memory location searching/replacement/injection which makes it far better for "general" cheats will not be ideal for AP defeating cheats especially if the AP is loaded at game start and before your interrupts can be triggered).
Still http://nocash.emubase.de/gbatek.htm#dsmemorymaps tells us what to look for in the ram (desmume has a memory viewer if you lack the developers/hackers version of no$gba or your rom will not work in it- these AP methods can also target emulators with no$gba usually falling prey) which you can relate back to the binaries (the arm7.bin, the arm9.bin and the overlays you see when you pull a rom apart) as necessary.
Edited in from post below and my reply:
NDSTS should tell you the arm7 and arm9 execute location and thus give you pretty much everything you need.
Alas it may not be the case that the ARM9 or ARM7 binaries starts at the start of the 02000000h memory location.
I suggest you load the roms in an emulator dump the memory from 02000000h to 023FFFFFh (there is only 4 megs of ram for it to be in) and do a couple of simple finds using the first few bytes to try and suss out where the binary is in the ram
Now all you have to do is take the offset from the locations you already have*. From there you appear to have all the data you should need to sort this.
*for the sake of example you find CS3E - 4743 - Sonic & SEGA All-Stars Racing starts the ARM9 binary at 020c0000h so you just take c0000 from the memory locations you just listed
0x020c9edc
00 06 09 0A 08 43 00 21
This would mean at 9edc in the ARM9 binary you pluck out from the rom (as you should not be changing the size I would use something like NDSTS for this rather than ndstool) you change whatever is there to 00 06 09 0A 08 43 00 21
The enhacklopedia link tells you how to decode cheats, the ram viewer and cheat itself will help you locate the relevant data and your hex editor should be able to change things (search and replace, finding nearby data and so on) while again the cheat provides the payload you want to change the data with. Modern games has been seen to have many AP sections (even to the point of noticeably slowing the game down) so this search and replace can take a while (probably not as long as it took the hacker(s) to initially track them all down mind).
Problem 2 is that the game binaries can be compressed in various methods when they are stored in the rom image but that is veering into more traditional rom hacking not to mention if you just porting cheats it can be bypassed in various more interesting ways than the initial hacker would have (you can cancel compression at some level (sometimes that is not necessary) or just recompress from a binary snatched from the ram viewer of an emulator).
*overlays are an older computing method used by the DS to extend the binaries while saving memory, as such they are usually only loaded when necessary and the basic cheats might cause trouble if they patch over another overlay's memory. However AP code has been seen several times sitting in overlays so be aware of this, this is more of a problem to the would be cheat maker though.
Below you will see the locations the rom patches in the NDS memory
I hope someone can make into an AR code for it work out to offset in the rom memory to make a patch but i don't know how to do that
My apologies the rest of that sentence should have read [without a decent flash card or something similar] looking for a quick fix.
Edit: Here I go embarrassing myself- NDSTS should tell you the arm7 and arm9 execute location and thus give you everything you need.
Alas it may not be the case that the ARM9 or ARM7 binaries starts at the start of the 02000000h memory location.
I suggest you load the roms in an emulator dump the memory from 02000000h to 023FFFFFh (there is only 4 megs of ram for it to be in) and do a couple of simple finds using the first few bytes to try and suss out where the binary is in the ram
Now all you have to do is take the offset from the locations you already have*. From there you appear to have all the data you should need to sort this.
*for the sake of example you find CS3E - 4743 - Sonic & SEGA All-Stars Racing starts the ARM9 binary at 020c0000h so you just take c0000 from the memory locations you just listed
0x020c9edc
00 06 09 0A 08 43 00 21
This would mean at 9edc in the ARM9 binary you pluck out from the rom (as you should not be changing the size I would use something like NDSTS for this rather than ndstool) you change whatever is there to 00 06 09 0A 08 43 00 21
Sony made a shocking announcement today, revealing that the company plans to move away from physical game releases in the future. Citing claims of how the industry is...
After much speculation, a lot of which being caused by dbrand's unceremonious reveal of their Companion Cube casing, the Steam Machine is finally available to order...
Nintendo's expected Summer showcase is here, offering up plenty of new announcements and exciting reveals. Let's see what they have in store in the latest Nintendo...
What once seemed like a far off dream, and after many, many community restarts throughout the years, the elusive Mother 1 / EarthBound Beginnings Remake, which is a...
Since being decompiled Super Mario 64 has seen a considerable amount of interest. We've had multiple PC ports, but the efforts beyond that are really astounding. It's...
Remember when you could get an Xbox Series S for $300? Those were the days. Microsoft has today announced the latest in their console price hikes, seeing their...
Happy June 15th! Well, this one was close enough. Atmosphere has been updated to add support for the latest Nintendo Switch firmware, 22.5.0. This means all of you...
The delays may be behind us, but the news isn't all good for Grand Theft Auto VI. Rockstar have today announced that pre-orders for the game will go live tomorrow, on...
Following an investigation over misleading commercial practices, today Nintendo has been imposed a fine of 35 million euros related to the controller malfunctions...
After much speculation and rumour, the fabled Nintendo Direct is upon us. Set to go live tomorrow, the 9th of June, at 3pm in the UK, it'll feature 50 minutes of...
Sony made a shocking announcement today, revealing that the company plans to move away from physical game releases in the future. Citing claims of how the industry is...
After much speculation, a lot of which being caused by dbrand's unceremonious reveal of their Companion Cube casing, the Steam Machine is finally available to order...
Remember when you could get an Xbox Series S for $300? Those were the days. Microsoft has today announced the latest in their console price hikes, seeing their...
The delays may be behind us, but the news isn't all good for Grand Theft Auto VI. Rockstar have today announced that pre-orders for the game will go live tomorrow, on...
Nintendo's expected Summer showcase is here, offering up plenty of new announcements and exciting reveals. Let's see what they have in store in the latest Nintendo...
With rumours circulating about a Nintendo Direct in the coming days and weeks, fans are left speculating and hoping as to what might be included. At the centre of all...
After much speculation and rumour, the fabled Nintendo Direct is upon us. Set to go live tomorrow, the 9th of June, at 3pm in the UK, it'll feature 50 minutes of...
Following an investigation over misleading commercial practices, today Nintendo has been imposed a fine of 35 million euros related to the controller malfunctions...
The end has come for the PlayStation 3 and the PlayStation Vita. After supporting the PSN Store on the PS3 and PS Vita since 2006 and 2011 respectively, Sony has...
Since being decompiled Super Mario 64 has seen a considerable amount of interest. We've had multiple PC ports, but the efforts beyond that are really astounding. It's...