Codes are getting added to nds-bootstrap.ini kinda fine (DSiMenu++ won't accept subfolders in the code list) however they never seem to be applied correctly to the game.
Only 'constant write' codes are working as expected (codes beginning wth 0, 1 or 2).
Patch codes have no effect at all and conditional codes seem to malfunction as well.
More info about code types here and here.
Additional information
(for using with DSiMenu++, the GUI for nds-bootstrap)
_nds folder.cheats.xml example
<?xml version="1.0" encoding="UTF-8"?>
<codelist>
<game>
<name>Castlevania - Dawn of Sorrow (U)</name>
<gameid>ACVE 9a6b468a</gameid>
<date>2018/06/20 15:01</date>
<cheat>
<name>Unlock everything</name>
<codes>0210AA88 008F7F7F </codes>
</cheat>
<cheat>
<name>Moon Jump</name>
<note>Only works on Default button mapping</note>
<codes>94000130 FFFD0000 020CA96C FFFFB1D5 D2000000 00000000 </codes>
</cheat>
<cheat>
<name>Speed modifier (4x Speed)</name>
<codes>521F6854 E0800006 021F6854 E0800106 D2000000 00000000 </codes>
</cheat>
<cheat>
<name>Patch code test</name>
<note>Replace "Start game." with "0123456789." on the data management menu description</note>
<codes>E2219056 0000000A 13121110 17161514 00001918 00000000</codes>
</cheat>
</game>
</codelist>
all the codes get added fine to the ini file.
CHEAT_DATA = 0210AA88 008F7F7F 94000130 FFFD0000 020CA96C FFFFB1D5 D2000000 00000000 521F6854 E0800006 021F6854 E0800106 D2000000 00000000 E2219056 0000000A 13121110 17161514 00001918 00000000
I have been reported here #57
added the info from the other issue's comments
The problem could be linked to the handling of the 00000000 values since code starting by 0 1 or 2 does not have 00000000 in the middle or at the end
Are cheat code even working in v0.11.0 ? I have some doubt about the loadCheatData function code
nope, cheat codes don't work at all on v0.11.0
I am reworking it
Ok using your CHEAT_DATA values example there is a lot of wrong values copied into memory (not all of them but almost half of them). The problem should be on the CHEAT_DATA option parsing code itself into main.cpp.
The problem is confirmed to be with the conversion from string to u32 :
cheat_data[i] = strtol(("0x"+cheats[i]).c_str(), NULL, 16);
Can you try the latest master build piratesephiroth ?
still not working.
They get added to the ini but have no effect at all in the games.
By the way Nitrohax allow a maximum of 64kb of cheat code, I will try to implement the same limit into nds-boostrap instead of the current 1KiB limit
Can you please try again with the latest master build piratesephiroth ?
With b69338a “Press B To Moon Jump” works on “Super Mario 64 DS”.
Select for weapon type of code works in mario kart
Please try also to add more code for one game to test that the new limit (32KB, 8192 hex values) is properly implemented.
Whoa it's really working now.
Conditional codes are working fine but patch codes are borked.
I edited the patch code in my cheats.xml above and it should produce this result:

However I get "234567ga89." instead (the original String is "Start game.")
the code should copy 10 bytes from these values:
13121110 17161514 00001918
proper result:
10 11 12 13 14 15 16 17 18 19
current result:
12 13 14 15 16 17 XX XX 18 19
Ah I just read this note regarding the patch codes:
That means that the first address to write to must be aligned in case of the
number of bytes to copy is superior to 3 (else there will be a 'bug' if the
number of code to write is > 3 and not a multiple of 4), and that the number of
bytes to write doesn't not have to be a multiple of 4 (can be any number).
So the correct way to do it is to split into 2 patch codes:
E2219056 00000002 00001110 00000000
E2219058 00000008 15141312 19181716
So yeah, it is working fine indeed.
I was just testing my codes on desmume and it doesn't have that "bug" on this particular type of code (it still demands alignment on constant write codes though)
So are cheats working now? Like anti piracy ones?
yeah, everything seems to be working now
Please help trying to use this codes but not working for me. what am i doing wrong?

use r4cce to build your cheats.xml, as I said in the first post
I have use R4cce v0.84 to build the XML file add cheat.xml to _nds folder on the root of my SD card.
i start a new game in Megaman Zx Advent with twilight menu latest version i have check if the codes
are enable but it seem that the All form selectable codes are not being enable by using R4cce 0.84,
i have try many times and codes don't seem to enable them self with twitlight menu using cheat.xml
please help.
Have all forms selectable (DS) North America
1212127E 0000F7CF
02121280 F7F7F7FF
works fine here so you must be making some mistake
<?xml version="1.0" encoding="UTF-8"?>
<codelist>
<name>derp</name>
<game>
<name>MegaMan ZX: Advent (U)</name>
<gameid>YZXE 59DB331C</gameid>
<date>2018/10/05 22:31</date>
<cheat>
<name>Have All Forms Selectable</name>
<codes>1212127E 0000F7CF 02121280 F7F7F7FF</codes>
</cheat>
</game>
</codelist>
make sure your file is named cheats.xml
Please tell me your trying to pull my leg with this :
when doing the XML do you enable any options? like Enable Codes before you save it to cheats.xml?
how many codes/ games can you add to cheats.xml? usually i use 2 to 3 codes at a time per game.
can i use 1 XML for multiple games or for now is one at a game at a time in cheats.xml?
You need to put all codes for all games in the same cheats.xml.
All the codes are always enabled.
The cheat limit is 32768 characters of codes per game so you can pretty much add as many codes as you wish.
OK. thanks for the help...awesome work.
It looks like cheats with more than 15 code lines aren't working even in the latest release of nds bootstrap,
I tried different cheat codes with Pokemon Black and the most complex ones (such as event codes) break the game (it gives back white screen once loaded in TW Menu). The same does not happen with item codes. The .ini file correctly report the codes I have prepared with R4cce so I am pretty sure I did not make any kind of mistake.
Here's what I did:
The problem is with the code itself.
This part writes a block of code to 0x2002000
E2002000 00000068
29016DA9 2108D12D
D1074208 42080189
0849D10A D0244208
E006200D 20A04911
390A7008 E0051D02
1CC22046 7008490D
70083154 3001315E
280F7008 2848D003
28A3D001 3001D101
2812E7F4 284BD003
28A6D001 3803D100
D1EB4290 65A92100
47702010 021D9FF8
And then this one makes some code in the game jump to 0x2002000, the block that the patch code above wrote
021D5284 FEBCF62C
Now the cheat was made for flashcard and emulators so that area of RAM is definitely empty in those cases.
If the code causes a crash it's because that area of memory is being overwritten by nds-bootstrap.
Thank you for the quick reply! So It seems those kind of codes will be unavalaible for a while, I hope you fix this issue soon, the nds bootstrab is working flawlessly in every other aspect.
I had no idea about it was possible to use cheat codes on nds bootstrap!
I tried using a lot of codes on MKDS and everything worked fine, except for one small issue: only the first 5 codes are loaded.
If this is an issue I hope it gets fixed soon, and if it's a limitation I hope the amount of codes can be expanded in the future!
I tried using a lot of codes on MKDS and everything worked fine, except for one small issue: only the first 5 codes are loaded.
did you test other codes and in different order to confirm that?
You gonna add usrcheat.dat cheat database support too? It has every cheats for most games in an R4.
I tried using a lot of codes on MKDS and everything worked fine, except for one small issue: only the first 5 codes are loaded.
did you test other codes and in different order to confirm that?
That's exactly what I did ;)
What About New Super Mario Bros. DS?
Most helpful comment
You gonna add usrcheat.dat cheat database support too? It has every cheats for most games in an R4.