Hacking [Source] Cheat menu plugin demo for NTR CFW

Nanquitas

Well-Known Member
Member
Joined
Sep 29, 2015
Messages
2,345
Trophies
0
Age
31
Location
South of France :)
XP
3,346
Country
France
if it's in C that you want to convert it:
Code:
cheat()
{
WRITEU32(0x08550D68, 0x00112233);
WRITEU32(0x08550D68, 0x44556677);
WRITEU32(0x08550D68, 0x8899AABB);
WRITEU16(0x08550D68, 0x0000CCDD);
}

Replace (WRITEUX) by whatever your macro for writing is. ;)
 

gamer4lif3

Well-Known Member
Member
Joined
Dec 31, 2015
Messages
495
Trophies
0
XP
464
Country
United States
hmm this is for menucheat cheat.plg but i think i get the idea

if (cheatEnabled[0]) {
WRITEU32(0x08550D68, 0x00112233);
WRITEU32(0x08550D68, 0x44556677);
WRITEU32(0x08550D68, 0x8899AABB);
WRITEU16(0x08550D68, 0x0000CCDD);
}
 

Nanquitas

Well-Known Member
Member
Joined
Sep 29, 2015
Messages
2,345
Trophies
0
Age
31
Location
South of France :)
XP
3,346
Country
France
Yep this works, but i prefer separate code so my functions aren't too long.
I would have write all of my cheats functions in a deifferent file, and in the gameplg:

Code:
if (cheatEnabled[0])
    cheat();
if (cheatEnabled[1])
    cheat1();
if (cheatEnabled[2])
    cheat2();

I think it's easier to read, and when you have to debug it's easier to find where you forgot this or that ;)
 
Last edited by Nanquitas,

gamer4lif3

Well-Known Member
Member
Joined
Dec 31, 2015
Messages
495
Trophies
0
XP
464
Country
United States
i must be doing sumthing wrong all the single codes i enter work but when try these multi address game locks

if (cheatEnabled[0]) {
WRITEU16(0x0058799C, 0x00000140);
}
if (cheatEnabled[1]) {
WRITEU16(0xDD000000, 0x00000400);
WRITEU16(0x198F5077, 0x0000CB40);
}
if (cheatEnabled[2]) {
WRITEU16(0x005879FF, 0x00000063);
}
if (cheatEnabled[3]) {
WRITEU16(0x005879FE, 0x00000063);
}
if (cheatEnabled[4]) {
WRITEU16(0x00587A04, 0x0000001E);
}
if (cheatEnabled[5]) {
WRITEU16(0x20587A00, 0x00000063);
}
 

Nanquitas

Well-Known Member
Member
Joined
Sep 29, 2015
Messages
2,345
Trophies
0
Age
31
Location
South of France :)
XP
3,346
Country
France
That's cause you're trying to enter raw gateway code as if they were all address...
That's not the case, you have to look at how are built the gateway code and translate them into c code.
The only one code you can enter without convert, are those who begins with 0.

Code:
if (cheatEnabled[0]) {
WRITEU16(0x0058799C, 0x00000140); //May cause some problems but do the job
}
if (cheatEnabled[1]) {
WRITEU16(0xDD000000, 0x00000400); //Wrong
WRITEU16(0x198F5077, 0x0000CB40); //Wrong
}
if (cheatEnabled[2]) {
WRITEU16(0x005879FF, 0x00000063); //May cause some problems but do the job
}
if (cheatEnabled[3]) {
WRITEU16(0x005879FE, 0x00000063); //May cause some problems but do the job
}
if (cheatEnabled[4]) {
WRITEU16(0x00587A04, 0x0000001E); //May cause some problems but do the job
}
if (cheatEnabled[5]) {
WRITEU16(0x20587A00, 0x00000063); //Wrong
}
 
Last edited by Nanquitas,

gamer4lif3

Well-Known Member
Member
Joined
Dec 31, 2015
Messages
495
Trophies
0
XP
464
Country
United States
well dang lol that pretty much ends my hopes of making own cheat.plgs.I don't know how to code lol time to buy me a gateway 3ds i think.
 

Nanquitas

Well-Known Member
Member
Joined
Sep 29, 2015
Messages
2,345
Trophies
0
Age
31
Location
South of France :)
XP
3,346
Country
France
Well with no base in C, yeah it'll be a bit complicated.
But even if you can't convert all the code you still can convert the simple code.
Code:
005879FE FFFFFF63
->WRITEU32(0x005879FE, 0xFFFFFF63)

105879FE 0000AA63
->WRITEU16(0x005879FE, 0x0000AA63)

205879FE 00000063
->WRITEU8(0x005879FE, 0x00000063)

But for now, yes the gateway menu is the easy way to cheat ;)
 

David Rico

Well-Known Member
Newcomer
Joined
Mar 22, 2016
Messages
79
Trophies
0
Age
32
XP
106
Country
Colombia
Hi, i'm new in this, i'm trying to put kid ikarus uprising cheats on mi o3ds but i can't compile the cheat.plg
Code:
C:\Users\configDuvan\Downloads\3DS\Ntr CFW\Plugin maker>set PATH=c:\devkitPro\ms
ys\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System
32\WindowsPowerShell\v1.0\;C:\Program Files\Skype\Phone\;;C:\Program Files\AllWi
nnertech\PhoenixSuit\;C:\devkitPro\devkitARM\bin;C:\devkitPro\devkitARM\bin;C:\d
evkitPro\msys\bin

C:\Users\configDuvan\Downloads\3DS\Ntr CFW\Plugin maker>build.py
rm: cannot lstat `bin/*.elf': No such file or directory
source\gameplg.c: In function 'updateMenu':
source\gameplg.c:55:33: warning: implicit declaration of function 'getCurrentPro
cessId' [-Wimplicit-function-declaration]
  plgLoaderInfo->gamePluginPid = getCurrentProcessId();
                                 ^
source\gameplg.c: In function 'freezeCheatValue':
source\gameplg.c:114:24: warning: large integer implicitly truncated to unsigned
 type [-Woverflow]
   WRITEU16(0x00720C20, 0x0F405900);
                        ^
source\gameplg.c:4:47: note: in definition of macro 'WRITEU16'
 #define WRITEU16(addr, data) *(vu16*)(addr) = data
                                               ^
source\gameplg.c:117:24: warning: large integer implicitly truncated to unsigned
 type [-Woverflow]
   WRITEU16(0x00720CC4, 0x0F40C3878);
                        ^
source\gameplg.c:4:47: note: in definition of macro 'WRITEU16'
 #define WRITEU16(addr, data) *(vu16*)(addr) = data
                                               ^
source\gameplg.c:135:8: error: a label can only be part of a statement and a dec
laration is not a statement
  TODO: handle your own cheat items
        ^
source\gameplg.c:135:8: error: unknown type name 'handle'
source\gameplg.c:135:20: error: expected '=', ',', ';', 'asm' or '__attribute__'
 before 'own'
  TODO: handle your own cheat items
                    ^
source\gameplg.c:139:1: error: expected expression before 'void'
 void updateCheatEnableDisplay(id) {
 ^
source\gameplg.c:191:1: error: expected declaration or statement at end of input

 }
 ^
lib\main.o: In function `threadStart':
D:\3ds\homebrew\gameCheat/source/main.c:19: undefined reference to `gamePluginEn
try'
cp: cannot stat `a.out': No such file or directory
arm-none-eabi-objcopy: 'a.out': No such file
rm: cannot lstat `*.out': No such file or directory
El sistema no puede encontrar el archivo especificado.

C:\Users\configDuvan\Downloads\3DS\Ntr CFW\Plugin maker>

Now i don't know what's next to do!
 

David Rico

Well-Known Member
Newcomer
Joined
Mar 22, 2016
Messages
79
Trophies
0
Age
32
XP
106
Country
Colombia
Ok here is it
Code:
void freezeCheatValue() {
    if (cheatEnabled[0]) {
        //Adress, Value?
        WRITEU32(0x000001E8, 0x7F);
        WRITEU32(0x000001E9, 0x96);
        WRITEU32(0x000001EA, 0x98);
    }
    if (cheatEnabled[1]) {
        WRITEU32(0x00720C20, 0x0F405900);
    }
    if (cheatEnabled[2]) {
        WRITEU32(0x00720CC4, 0x0F40C3878);
    }
    if (cheatEnabled[3]) {
        WRITEU32(0x00720B84, 0x00000014);
    }
    if (cheatEnabled[4]) {
        WRITEU32(0x00720B44, 0x00000014);
    }
    if (cheatEnabled[5]) {
        WRITEU32(0x00720B5C, 0x00000014);
    }
    if (cheatEnabled[6]) {
        WRITEU32(0x00720B94, 0x00000014);
    }
    if (cheatEnabled[7]) {
        WRITEU32(0x00720B64, 0x00000014);
    }
    //
    TODO: handle your own cheat items
}
I've changed the WRITEU16 for the WRITEU32 as you told me but the same error at the time of compile it.
Thanks for answer :3 :D
 

Nanquitas

Well-Known Member
Member
Joined
Sep 29, 2015
Messages
2,345
Trophies
0
Age
31
Location
South of France :)
XP
3,346
Country
France
It's not compiling because you didn't comment the "TODO" line. ;)

You should check your cheats code because the first one will definitely make your 3ds crash. The address which you're trying to write in are not valid.
Code:
    void freezeCheatValue()
    {
        if (cheatEnabled[0]) {
            //Adress, Value?
            WRITEU8(0x000001E8, 0x7F); //<-- incorrect address, your 3ds will freeze
            WRITEU8(0x000001E9, 0x96); //<-- incorrect address, your 3ds will freeze
            WRITEU8(0x000001EA, 0x98); //<-- incorrect address, your 3ds will freeze
        }
        if (cheatEnabled[1]) {
            WRITEU32(0x00720C20, 0x0F405900);
        }
        if (cheatEnabled[2]) {
            WRITEU32(0x00720CC4, 0x0F40C3878);
        }
        if (cheatEnabled[3]) {
            WRITEU8(0x00720B84, 0x00000014);
        }
        if (cheatEnabled[4]) {
            WRITEU8(0x00720B44, 0x00000014);
        }
        if (cheatEnabled[5]) {
            WRITEU8(0x00720B5C, 0x00000014);
        }
        if (cheatEnabled[6]) {
            WRITEU8(0x00720B94, 0x00000014);
        }
        if (cheatEnabled[7]) {
            WRITEU8(0x00720B64, 0x00000014);
        }
        //    TODO: handle your own cheat items <-- you can delete this line, but do not uncomment it
    }
 

David Rico

Well-Known Member
Newcomer
Joined
Mar 22, 2016
Messages
79
Trophies
0
Age
32
XP
106
Country
Colombia
Oh, i got the address from a forum where they said that change that address and put that value with a hex editor, so, i cannot do the same here?
How do i do to convert the address and the value for a correct compliling and editing?
Thaks! :)
 

David Rico

Well-Known Member
Newcomer
Joined
Mar 22, 2016
Messages
79
Trophies
0
Age
32
XP
106
Country
Colombia
Sure.
I want to make the plg file for edit kid ikarus uprising, reading about ntr i foud this forum, then i'm using the address posted at this site: https://gbatemp.net/threads/kid-icarus-uprising-weapons-save-hex-editing.380354/
then for start to do it i get the first thing that apear in there "0x000001E8-1EA 7F 96 98 Max Hearts Pit's" so i puted directly the address in the code (tree address and tree values), but you said me that these address are wrong, so i think i must convert o something like that to mate them correct and compile my fisrt cheat.plg!

pdta:
I'm latin, then mi english is not the best xD
 

Nanquitas

Well-Known Member
Member
Joined
Sep 29, 2015
Messages
2,345
Trophies
0
Age
31
Location
South of France :)
XP
3,346
Country
France
No problem, i'm french so english is not my first language too. :P

For what you're trying to do, it's impossible. The address in this thread, are for save editing. Which have nothing to do with memory editing.
If you want to modify this thing you'll have to find the address in the memory where it's stocked.

On FORT42 there is this code (don't know if it's the one you want):

65,535 Hearts
Code:
WRITEU16(0x00EE9820, 0xFFFF);
 
  • Like
Reactions: David Rico

David Rico

Well-Known Member
Newcomer
Joined
Mar 22, 2016
Messages
79
Trophies
0
Age
32
XP
106
Country
Colombia
Yes! compiled, and yes, it's something like that for what i'm loking, now i'll test on my 3ds and search for codes for memory editing and no save editing xD
Thak you so much! :D :D :D
 

David Rico

Well-Known Member
Newcomer
Joined
Mar 22, 2016
Messages
79
Trophies
0
Age
32
XP
106
Country
Colombia
Perfect!
It has worked perfectly :D
Something more xD ... Can you tell me a god database for thoso codes, in fort42 there is only one for the game but seems to be more codes and it is now in mi personal database for codes :D but if is another i'd like to know it :3 :)
And once again... THANK YOU!
 

Nanquitas

Well-Known Member
Member
Joined
Sep 29, 2015
Messages
2,345
Trophies
0
Age
31
Location
South of France :)
XP
3,346
Country
France
Unfortunately if another database exists, i don't know about it. There are codes that are in various forums (this one, maxconsole for exemple), but outside of fort42 et maxconsoe cheat website, i don't know any database...
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Veho @ Veho:
    You need double breading or more. Then it won't matter if it doesn't stick, there will be a shell of breading around and the pickle rattling about in there :tpi:
    +1
  • BigOnYa @ BigOnYa:
    We got a few inches of snow overnight, think i'll just stay home today and play video games, get drunk, after I finish my pot of coffee first ofcourse.
  • Veho @ Veho:
    The countryside and smaller towns around here got some snow last night too, but the city has its own microclimate so it's just rain here. I hate rain.
    +1
  • BigOnYa @ BigOnYa:
    My wife's family coming to stay with us next week for thanksgiving, so I loaded up on bunch bottles of booze yesterday to prepare myself. Gonna try some butterscotch whiskey today, sounds good.
  • Veho @ Veho:
    Hmm. Does "butterscotch" contain Scotch, or does it come from the same root as "scotch eggs" as in "baked"?
  • Veho @ Veho:
    Google says "sugar and butter."
  • Veho @ Veho:
    So no scotch whiskey.
  • Veho @ Veho:
    *whisky
  • BigOnYa @ BigOnYa:
    More like the butterscotch candy, like a buttery carmel flavor. Yea it called a whiskey, not scotch.
  • BigOnYa @ BigOnYa:
    Here's the bottle:
    revel-stoke-butterscotch-flavored-whiskey-buttersquatch-liquor-geeks.jpg
  • Veho @ Veho:
    And a weed smoking sasquatch to boot.
    +1
  • BigOnYa @ BigOnYa:
    Its pretty weak, only 35% compared to what I norm drink, but just wanted to try it.
  • BigOnYa @ BigOnYa:
    I bet that be good, esp in hot cocoa, or coffee. Or even in a milkshake, I love coffee ice cream n that would be good with.
  • Veho @ Veho:
    Too expensive to drink any way but neat I'm afraid

    :unsure:
  • Veho @ Veho:
    I mean it's more expensive that Bailey's.
  • BigOnYa @ BigOnYa:
    Yea true, that's a sippin only bottle.
  • Veho @ Veho:
    And here I am drinking store brand hooch.
    +1
  • The Real Jdbye @ The Real Jdbye:
    probably more tasty too
  • The Real Jdbye @ The Real Jdbye:
    that looks fucking tasty
    +1
  • The Real Jdbye @ The Real Jdbye:
    make ice cream with that shit
  • The Real Jdbye @ The Real Jdbye:
    boozy ice cream is good
    +1
  • BigOnYa @ BigOnYa:
    I used to have a small ice cream machine but started rust inside so I pitched it, but miss making boozy ice cream. Gonna have to add that to my Xmas list for the old lady. Thanks for the reminder.
  • BigOnYa @ BigOnYa:
    When my grandmother was alive she lived in Germany, she used to send me every year for holidays, chocolates that had dif booze inside them, were so good.
    BigOnYa @ BigOnYa: When my grandmother was alive she lived in Germany, she used to send me every year for holidays...