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,

Rhapsody

Well-Known Member
Member
Joined
Jan 4, 2016
Messages
252
Trophies
0
Age
27
Location
United States
Website
www.google.com
XP
863
Country
United States
So more like this?

Code:
void freezeCheatValue() {
   // Freezes money at 9999 until cheat is disabled. Change value by changing second hex entry.
   if (cheatEnabled[0]) {
     WRITEU16(0x149997D0, 0x0000270F);
   }
   // All enemies drop their items upon death.
   if (cheatEnabled[1]) {
     WRITEU16(0x17D99848, 0xE1D11AB2);
     WRITEU16(0x17D9984C, 0xE3510000);
   }
 

supermariorick

Well-Known Member
OP
Member
Joined
Jun 18, 2010
Messages
640
Trophies
1
XP
816
Country
United States
So more like this?

Code:
void freezeCheatValue() {
   // Freezes money at 9999 until cheat is disabled. Change value by changing second hex entry.
   if (cheatEnabled[0]) {
     WRITEU16(0x149997D0, 0x0000270F);
   }
   // All enemies drop their items upon death.
   if (cheatEnabled[1]) {
     WRITEU16(0x17D99848, 0xE1D11AB2);
     WRITEU16(0x17D9984C, 0xE3510000);
   }
nope. that still has them in the brackets.
they should be outside of brackets where scripts are called.
 

Rhapsody

Well-Known Member
Member
Joined
Jan 4, 2016
Messages
252
Trophies
0
Age
27
Location
United States
Website
www.google.com
XP
863
Country
United States
nope. that still has them in the brackets.
they should be outside of brackets where scripts are called.

Gotcha, I'll try compiling it without the comments for now to see how it works.

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

So using the code that I mentioned before is still causing the game to crash after trying it out. Here's the full code; http://pastebin.com/jzUs4Mt3

I still have some of the codes left from the example file, but that's to replace and for reference. I'm not actually using them and it shouldn't matter if they're just there. Point is, I edited the first and second one to be a money hack and a unit drop hack. The money hack works perfectly, but the unit drop hack causes the game to crash.
 

supermariorick

Well-Known Member
OP
Member
Joined
Jun 18, 2010
Messages
640
Trophies
1
XP
816
Country
United States
Gotcha, I'll try compiling it without the comments for now to see how it works.

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

So using the code that I mentioned before is still causing the game to crash after trying it out. Here's the full code; http://pastebin.com/jzUs4Mt3

I still have some of the codes left from the example file, but that's to replace and for reference. I'm not actually using them and it shouldn't matter if they're just there. Point is, I edited the first and second one to be a money hack and a unit drop hack. The money hack works perfectly, but the unit drop hack causes the game to crash.
the unit drop hack is an ASM code meant for spider ARcode and not NTR cheat codes. you'd have to find the ASM code again in NTR debugger.
 

Rhapsody

Well-Known Member
Member
Joined
Jan 4, 2016
Messages
252
Trophies
0
Age
27
Location
United States
Website
www.google.com
XP
863
Country
United States
the unit drop hack is an ASM code meant for spider ARcode and not NTR cheat codes. you'd have to find the ASM code again in NTR debugger.

I'm probably not going to bother doing that, but can you describe what that might entail? Is there any way to explicitly tell if a code uses ASM code?

I'd love to say that multi-line codes have been working for me so far, but they haven't been, and without a way to identify if it's ASM code or not I can't really tell if I'm doing something wrong. I'm trying this code now;

Code:
// x64 EXP multiplier
03E77A5C E1A04301
03E77A60 E3540064

I converted it to NTR format and now it looks like this;

Code:
  if (cheatEnabled[1]) {
     WRITEU16(0x17E77A5C, 0xE1A04301);
     WRITEU16(0x17E77A60, 0xE3540064);
   }

As an aside, I'm sorry about all the shit I'm asking and making you check. This is hopefully the last thing I'll need to know before I'm off. Your help has been invaluable; thanks!
 

Rhapsody

Well-Known Member
Member
Joined
Jan 4, 2016
Messages
252
Trophies
0
Age
27
Location
United States
Website
www.google.com
XP
863
Country
United States
Ok, I hate to be mean; please don't take this wrong.

At this point, if you do not know C and the basics of the 3DS; you should not be building this.

It's not that I'm looking to make giant commits or even help with the project itself. I'm basically trying to learn how to make these codes at all for personal use or perhaps to help others. At that point while knowing C would definitely be useful, a lot of my questions stem from the utter lack of good documentation on this.
 
  • Like
Reactions: FlappyFalco

gudenau

Largely ignored
Member
Joined
Jul 7, 2010
Messages
3,882
Trophies
2
Location
/dev/random
Website
www.gudenau.net
XP
5,381
Country
United States
It's not that I'm looking to make giant commits or even help with the project itself. I'm basically trying to learn how to make these codes at all for personal use or perhaps to help others. At that point while knowing C would definitely be useful, a lot of my questions stem from the utter lack of good documentation on this.
There are a few posts about comments in the code, which by definition do nothing to the outputted binary. The problem your having is not related to the coments, I did not catch what game you are using; might be able to assist some.
 

Rhapsody

Well-Known Member
Member
Joined
Jan 4, 2016
Messages
252
Trophies
0
Age
27
Location
United States
Website
www.google.com
XP
863
Country
United States
There are a few posts about comments in the code, which by definition do nothing to the outputted binary. The problem your having is not related to the coments, I did not catch what game you are using; might be able to assist some.

The problems I'm having are detailed in my previous posts; the comments discussion was simply because it was brought up. The game is Fire Emblem Awakening.
 

supermariorick

Well-Known Member
OP
Member
Joined
Jun 18, 2010
Messages
640
Trophies
1
XP
816
Country
United States
You need to configure the god damn cheats yourself. if someone uploaded a compiled version it wont have what u want.

Here is the video @supermariorick!

thanks bruh. you're a boss. and that mistake with the folder was my bad. also to everyone please disregard what I said about putting multiple lines in the code. I tested it and I think I didn't do that right. I am still trying to get the format for codes down for the plugin and I had no idea how that works and still don't. if there's anything more and I don't know it then ask @cell9 or @DarkFlare69 instead.

Ok, I hate to be mean; please don't take this wrong.

At this point, if you do not know C and the basics of the 3DS; you should not be building this.
i like what you said but in cases like this I am going to have to disagree as any script kid can do this as long as it isn't complicated shit like ASM or adding special things to the cheat menu. however I agree that to do the most with it that you'd have to know C and how the ARM/MIPS architecture of the 3DS works. but I designed this basic tutorial for anyone who wants cheats on 3DS in NTR CFW and knows nothing about C. I was able to build a very simple cheat plugin myself minus the more complicated features not known to those uneducated in C. the plugin works but I'm not pretending to know how all of it works just the basic steps of making simple plugins. I appreciate any positive criticism so when more complicated things are addressed they can be approached properly by people that actually know how to code C. As soon as I got a plugin working I decided to make a tutorial as I couldn't find one anywhere - at least not one up to date and not missing information. criticism is welcome and encouraged so everyone can make their plugins so we don't have to rely on a barely navigateable Chinese website and a Spanish website with outdated half-working plugins to get codes for games.
 
  • Like
Reactions: gudenau

Lyomak

Well-Known Member
Member
Joined
Jun 24, 2009
Messages
436
Trophies
1
Age
39
Location
Bogotá
Website
twitch.tv
XP
389
Country
Colombia
don't ask me how to convert from Gateshark as I do not have a Gateway; however usually spider arcode to NTR code is +0x14000000 unless the memory addresses for NTR for a game are out of range from the addresses for spider arcode due to physical memory addresses vs virtual memory addresses. as for codes more than one line long, the old source code has an example

if (cheatEnabled) {
// freeze hearts
WRITEU16(0x168b6044 , 0x5050);
// freeze rupees
WRITEU16(0x168b5fa8 , 9999);
}

Hello. Can this Spider AR code be converted to NTR? How do you convert the codes, I can't understand the +0x14000000 and what to do with it, but I'm a good learner.

Code:
StreetPass Mii Plaza NTSC-U 4.0

99 Plaza Tickets
0176CF90 00000063
027FD9F6 00000063
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: Lol rappers still promoting crypto