Tutorial  Updated

Building NTR custom firmware cheat plugins w/ cheat menu

so thanks to @cell9 for releasing the source for NTR cheat plugins that use the cheat menu instead of the outdated button toggles method that has interference with certain games.
Today is the moment you've all been waiting for. this is some simple steps on building your own cheat plugins!
first there are some prerequisites:
you'll need python 2.7 from here
https://www.python.org/download/releases/2.7/
and devkitpro from here
https://gbatemp.net/threads/ds-programming-environment-on-windows.292386/
and you'll need a computer with Windows XP/Vista/7/8/8.1/10 edit: this also works on the Ematic tablet computer that has Windows 8.1 on it
then get @cell9 's source code here
http://gbatemp.net/threads/source-cheat-menu-plugin-demo-for-ntr-cfw.411032/
and my improvement to the gameplg.c sample file here (i put a sample of adding in more cheat entries)
http://gbatemp.net/threads/source-cheat-menu-plugin-demo-for-ntr-cfw.411032/#post-5996714

ok so here's the steps

1) extract menuCheat.zip from @cell9 's source code thread and replace the gameplg.c in /menuCheat/source/ with the improved sample gameplg.c from my post.

2) open gameplg.c from /menuCheat/sources/ with your source code editor of choice (e.g. notepad++ on Windows or DroidEdit on Android), scroll to near the bottom where the cheats are and edit them with your own found with NTR debugger/Cheat Engine or from someone requesting a cheat plugin for codes they found but dont know how to build cheat plugins. then scroll down more for the cheat entry names and edit them to match the cheats you put in. to add more entries, simply follow the pattern and format of them with proper bracketing and tab-spacing and follow the numbering for the cheats (0, 1, 2, 3, 4, etc.) and hit save in your source code editor. make sure your edited gameplg.c is in /menuCheat/sources/ ! (use FTP transfers if you used DroidEdit like I did lmao)

3) then go to the /menuCheat/ folder and doubleclick the startenv.bat (make sure python and devkitpro are installed before you do this!) and it'll open a command prompt window with the directory aimed at /menuCheat/. then type in build.bat and hit enter! at this point it will run python and build your cheat plugin, which will appear in the /menuCheat/ folder. you can then place cheat.plg in /plugin/[titleid]/ with the appropriate titleid for your game from here
http://3dsdb.com/ and test your NTR custom firmware plugin cheats!
note: @cell9 said so himself that these plugins won't work online so don't expect to ruin games online with this!

Enjoy~
 
Last edited by supermariorick,
Seriously kind of lost. I just installed Devkitpro and am getting linker errors, most notably:

./lib\libc.a(lib_a-freer.o): In function `_malloc_trim_r':
(.text+0x48): undefined reference to `_sbrk_r'
./lib\libc.a(lib_a-freer.o): In function `_malloc_trim_r':
(.text+0x78): undefined reference to `_sbrk_r'
./lib\libc.a(lib_a-freer.o): In function `_malloc_trim_r':
(.text+0xc0): undefined reference to `_sbrk_r'
./lib\libc.a(lib_a-makebuf.o): In function `__smakebuf_r':
(.text+0x30): undefined reference to `_fstat_r'
./lib\libc.a(lib_a-makebuf.o): In function `__smakebuf_r':
(.text+0x124): undefined reference to `_isatty_r'
./lib\libc.a(lib_a-mallocr.o): In function `_malloc_r':
(.text+0x2e0): undefined reference to `_sbrk_r'
./lib\libc.a(lib_a-mallocr.o): In function `_malloc_r':
(.text+0x358): undefined reference to `_sbrk_r'
./lib\libc.a(lib_a-stdio.o): In function `__sread':
(.text+0xc): undefined reference to `_read_r'
./lib\libc.a(lib_a-stdio.o): In function `__swrite':
(.text+0x68): undefined reference to `_lseek_r'
./lib\libc.a(lib_a-stdio.o): In function `__swrite':
(.text+0x88): undefined reference to `_write_r'
./lib\libc.a(lib_a-stdio.o): In function `__sseek':
(.text+0xa0): undefined reference to `_lseek_r'
./lib\libc.a(lib_a-stdio.o): In function `__sclose':
(.text+0xcc): undefined reference to `_close_r'
arm-none-eabi-ld: error: required section '.rel.plt' not found in the linker script
arm-none-eabi-ld: final link failed: Invalid operation

Is there anyone who can help me resolve this?

--------------------- MERGED ---------------------------

eh got problems when building it i have python 2.7 and devkit pro installed http://prntscr.com/b1zv7w
In addition, did you try launching the setenv.bat file first?
 
Seriously kind of lost. I just installed Devkitpro and am getting linker errors, most notably:

./lib\libc.a(lib_a-freer.o): In function `_malloc_trim_r':
(.text+0x48): undefined reference to `_sbrk_r'
./lib\libc.a(lib_a-freer.o): In function `_malloc_trim_r':
(.text+0x78): undefined reference to `_sbrk_r'
./lib\libc.a(lib_a-freer.o): In function `_malloc_trim_r':
(.text+0xc0): undefined reference to `_sbrk_r'
./lib\libc.a(lib_a-makebuf.o): In function `__smakebuf_r':
(.text+0x30): undefined reference to `_fstat_r'
./lib\libc.a(lib_a-makebuf.o): In function `__smakebuf_r':
(.text+0x124): undefined reference to `_isatty_r'
./lib\libc.a(lib_a-mallocr.o): In function `_malloc_r':
(.text+0x2e0): undefined reference to `_sbrk_r'
./lib\libc.a(lib_a-mallocr.o): In function `_malloc_r':
(.text+0x358): undefined reference to `_sbrk_r'
./lib\libc.a(lib_a-stdio.o): In function `__sread':
(.text+0xc): undefined reference to `_read_r'
./lib\libc.a(lib_a-stdio.o): In function `__swrite':
(.text+0x68): undefined reference to `_lseek_r'
./lib\libc.a(lib_a-stdio.o): In function `__swrite':
(.text+0x88): undefined reference to `_write_r'
./lib\libc.a(lib_a-stdio.o): In function `__sseek':
(.text+0xa0): undefined reference to `_lseek_r'
./lib\libc.a(lib_a-stdio.o): In function `__sclose':
(.text+0xcc): undefined reference to `_close_r'
arm-none-eabi-ld: error: required section '.rel.plt' not found in the linker script
arm-none-eabi-ld: final link failed: Invalid operation

Is there anyone who can help me resolve this?

--------------------- MERGED ---------------------------


In addition, did you try launching the setenv.bat file first?
Seriously kind of lost. I just installed Devkitpro and am getting linker errors, most notably:

./lib\libc.a(lib_a-freer.o): In function `_malloc_trim_r':
(.text+0x48): undefined reference to `_sbrk_r'
./lib\libc.a(lib_a-freer.o): In function `_malloc_trim_r':
(.text+0x78): undefined reference to `_sbrk_r'
./lib\libc.a(lib_a-freer.o): In function `_malloc_trim_r':
(.text+0xc0): undefined reference to `_sbrk_r'
./lib\libc.a(lib_a-makebuf.o): In function `__smakebuf_r':
(.text+0x30): undefined reference to `_fstat_r'
./lib\libc.a(lib_a-makebuf.o): In function `__smakebuf_r':
(.text+0x124): undefined reference to `_isatty_r'
./lib\libc.a(lib_a-mallocr.o): In function `_malloc_r':
(.text+0x2e0): undefined reference to `_sbrk_r'
./lib\libc.a(lib_a-mallocr.o): In function `_malloc_r':
(.text+0x358): undefined reference to `_sbrk_r'
./lib\libc.a(lib_a-stdio.o): In function `__sread':
(.text+0xc): undefined reference to `_read_r'
./lib\libc.a(lib_a-stdio.o): In function `__swrite':
(.text+0x68): undefined reference to `_lseek_r'
./lib\libc.a(lib_a-stdio.o): In function `__swrite':
(.text+0x88): undefined reference to `_write_r'
./lib\libc.a(lib_a-stdio.o): In function `__sseek':
(.text+0xa0): undefined reference to `_lseek_r'
./lib\libc.a(lib_a-stdio.o): In function `__sclose':
(.text+0xcc): undefined reference to `_close_r'
arm-none-eabi-ld: error: required section '.rel.plt' not found in the linker script
arm-none-eabi-ld: final link failed: Invalid operation

Is there anyone who can help me resolve this?

--------------------- MERGED ---------------------------


In addition, did you try launching the setenv.bat file first?
Yes I did same thing happens
 
hi , i wont to know if there is a way to encrypt the file.plg, i need to reed and copy that is in, for created new version with few codes in. thanks in advance
 
excellent tutorial, will begin creating some .plg cheat. But how can I edit them? for example, I wanna try to add some more cheats to another .plg.
 
excellent tutorial, will begin creating some .plg cheat. But how can I edit them? for example, I wanna try to add some more cheats to another .plg.
Unfortunately the short answer is you can't. Not without either the source code of the PLG or using a C decompiler, which can get messy.

--------------------- MERGED ---------------------------

Still, a lot of the people working on plugins here share their source. So you can most likely help contribute to projects here if you like. And at the same time, if you want help checking your work and improving on it, make sure to share your source and memory offsets.
 
  • Like
Reactions: Nightwinter
I'm trying to build an NTR cheat plugin (for Terry's Wonderland 3D, if it matters), but have run into an issue. It only spits out cheat.plg with a single cheat for Infinite Coins.

I followed the guide and I've installed both Python and devkitpro. The gameplg.c in the source folder has the cheats I want, it's just for whatever reason it only spits out plugins with Infinite Coins.

Here's what it spits out when I try to run build.bat through startenv.bat:

rm: cannot lstat `obj/*.o': No such file or directory
rm: cannot lstat `bin/*.elf': No such file or directory
'arm-none-eabi-gcc' is not recognized as an internal or external command,
operable program or batch file.
'arm-none-eabi-gcc' is not recognized as an internal or external command,
operable program or batch file.
'arm-none-eabi-ld' is not recognized as an internal or external command,
operable program or batch file.
cp: cannot stat `*.o': No such file or directory
cp: cannot stat `a.out': No such file or directory
'arm-none-eabi-objcopy' is not recognized as an internal or external command,
operable program or batch file.
rm: cannot lstat `*.o': No such file or directory
rm: cannot lstat `*.out': No such file or directory
1 file(s) copied.

Anyone have a clue what's up?

Edit-
Here's a pastebin of what I'm trying to make into a cheat.plg. http://pastebin.com/Y1rsK6Wa

Edit 2-
Ended up fixing it. Reinstalled the devkit to my C drive instead of F, and it's working fine now.
 
Last edited by Einzbern,
  • Like
Reactions: Nightwinter
I'm trying to build an NTR cheat plugin (for Terry's Wonderland 3D, if it matters), but have run into an issue. It only spits out cheat.plg with a single cheat for Infinite Coins.

I followed the guide and I've installed both Python and devkitpro. The gameplg.c in the source folder has the cheats I want, it's just for whatever reason it only spits out plugins with Infinite Coins.

Here's what it spits out when I try to run build.bat through startenv.bat:

rm: cannot lstat `obj/*.o': No such file or directory
rm: cannot lstat `bin/*.elf': No such file or directory
'arm-none-eabi-gcc' is not recognized as an internal or external command,
operable program or batch file.
'arm-none-eabi-gcc' is not recognized as an internal or external command,
operable program or batch file.
'arm-none-eabi-ld' is not recognized as an internal or external command,
operable program or batch file.
cp: cannot stat `*.o': No such file or directory
cp: cannot stat `a.out': No such file or directory
'arm-none-eabi-objcopy' is not recognized as an internal or external command,
operable program or batch file.
rm: cannot lstat `*.o': No such file or directory
rm: cannot lstat `*.out': No such file or directory
1 file(s) copied.

Anyone have a clue what's up?

Edit-
Here's a pastebin of what I'm trying to make into a cheat.plg. http://pastebin.com/Y1rsK6Wa

Edit 2-
Ended up fixing it. Reinstalled the devkit to my C drive instead of F, and it's working fine now.

For anyone wondering why it wouldn't work, the log indicates that the compile failed due to a corrupt/invalid installation of devkit. The batch file wasn't actually doing anything new.


On a sidenote..
I would love to see this possible on linux in the future.
 
Sorry if this has already been awnsered (i see no q&a) but is there any way for the game used for the sample to be changed? Or is it game-wide, where i can use any cheat I want?
 
Last edited by NeoUmbreon,
Okay, it works with any game from the eShop. But, how do I create plugins for custom vc games? (e.g. Pokemon Red Colorized Hack)

Also, http://3dsdb.net/ is a virus website.. It's http://3dsdb.com/
Please fix that.
for custom titles look up the titleid in FBI cia manager. as for 3dsdb the url has changed from when I posted this.
 
  • Like
Reactions: NeoUmbreon
Hello! Is this tutorial still valid? Because when I compiled a plugin for mhgen usa, using codes from fort42, most codes will hang the game.
Though, I noticed a strange interaction. When i used my plugin with the ntr hpbar overlay, some codes works. specifically those of offset 003FFFFF and below. If im not using the other plugin, non works.
Im using the bootntr preview 6 mode 3. My question, was it the plugin, or ntr itself that causes the hangs?
 
Is there a way to do this in reverse? I'm trying to make a code for Majora's Mask 3D which unlocks only the Fierce Deity's mask, and I want to know where the addresses are which handle the mask inventory. There's a code which unlocks them all that I'd like to peek at. By the way, how is it that people are finding these addresses to begin with? Does the current 3DS emulator have a live memory viewer/search/compare function?
 
Last edited by Meteor7,
Is there a way to do this in reverse? I'm trying to make a code for Majora's Mask 3D which unlocks only the Fierce Deity's mask, and I want to know where the addresses are which handle the mask inventory. There's a code which unlocks them all that I'd like to peek at. By the way, how is it that people are finding these addresses to begin with? Does the current 3DS emulator have a live memory viewer/search/compare function?
From my understanding it's from either gateshark or the NTR debugger built into the NTR CFW. It is essentially a cheat engine for the 3DS
 
I know maybe this is not the right thread,but I need an help on compiling/building ntr plugins with build.bat
I haven't understood what build.bat does exactly and what it compile? Thank you
 

Site & Scene News

Popular threads in this forum