ROM Hack Modified NTR Client with Gateshark support

Status
Not open for further replies.
Hmm, it'll be really laggy if you want to play through the debugger.
And it's not exactly practical. :/
I don't want to play, i need this to control a game like pokémon (use GTS), and the command must be send like 1 time per 20-30 sec. Even if it's laggy, it's not a problem actualy
 
No problem.

I've learned the hard way, trying and figuring how it's working and by asking question around (especially to @cell9 who must be tired of me). x)
could you please ask cell9 to fix the stuck at 3DS Logo bug after running any cheat.plg on ntr cfw 3.3 or 3.4? seems you are the only person who have contact with him :)
 
Last edited by dsrules,
You're right, but at this time, I don't know what to do, even with a plugin, i continue to (dig my head ?) worth english ;)

I recommend to try to make a plugin instead of working with the debugger, it's probably faster and less bothering to use.
Now, I was bored and I thought of how I would have done an automatized input sender (assuming my first thought on injecting input is working which I really don't know :p):
Code:
void    send_key(u32 keys)
{
    int i;
   
    for (i = 0; i < 1000000; i++) //< adjust this value for the game to detect the input
    {
        setHID(keys);
    }
}

void    my_super_bot(void)
{
    //Press L + A +B to exit the loop
    while(hidKeysDown() != (KEY_A | KEY_B | KEY_L))
    {
        //send A
        send_key(KEY_A);
        //wait 1s
        svcSleep(1000000000);
        //send B
        send_key(KEY_B);
        //wait 1s
        svcSleep(1000000000);
        //send A
        send_key(KEY_A);
        //wait 10s
        svcSleep(10000000000);
        scanHID();
    }
}
 
I think it's better for me to try with Debugguer, cause plugin is not directly connected with my computer, and I need to send some differents commands
 
What sort of command ?

You're not limited in a plugin, plus you can start your "bot" without a computer if it's a plugin. ;)
And it'll be better for edit the memory if it's made directly on the console.
 
What sort of command ?

You're not limited in a plugin, plus you can start your "bot" without a computer if it's a plugin. ;)
And it'll be better for edit the memory if it's made directly on the console.

Sent you a PM in logic's forum
 
For those interested in the input sender, my idea is working with a modded ntr client but the code I gave earlier do not work as a plugin.

So with a little work, we should be able to make plugin that can send input.
Something like:
- RapidFire
- Mapping key to another key (for broken console)
should be possible soon. :)

I think that maybe we should work on a open lib for helping those who want to make plugin with common function, and little by little increasing the possibilities of a plugin (Like a full plugin with nice ui and touchscren :D).

P.S.: Sorry @imthe666st to pollute your thread. :blush:
 
For those interested in the input sender, my idea is working with a modded ntr client but the code I gave earlier do not work as a plugin.

So with a little work, we should be able to make plugin that can send input.
Something like:
- RapidFire
- Mapping key to another key (for broken console)
should be possible soon. :)

I think that maybe we should work on a open lib for helping those who want to make plugin with common function, and little by little increasing the possibilities of a plugin (Like a full plugin with nice ui and touchscren :D).

P.S.: Sorry @imthe666st to pollute your thread. :blush:

Its a shame NTR isn't open source. It would be improved so much by now if it was...
 
I'm not so sure about that.

Even if it would give the choice of course, there is not many guys who are working on the current open sources cfw.

I prefer to see the glass half full and be happy that we already have this cfw. :P
The cfw itself is not limiting the plugins, the only limiter is that there's not a simple lib to make plugin.

I've successfully made a plugin using the last ctrulib, but a lot of the initialization functions need to be reworking because a lot of resources are already existing and we just need to graft over instead of re-init them.

But I think it's something doable, it'll just take time. :p
 
The working plugin function to inject inputs:
Code:
/*
** hidSharedMem can be 0x10000000, 0x10001000, 0x10002000 (maybe even 0x10003000 but didn't see the case until now)
** the address can be different between games
** I don't know for now how to retrieve it automatically so you must define the good one manually
*/
vu32     *hidSharedMem = (u32 *)0x10002000;

void    setHID(u32 keys)
{
    u32 id;

    id = hidSharedMem[4];
    if(id > 7)
        id = 7;
    rtCheckRemoteMemoryRegionSafeForWrite (getCurrentProcessHandle(), (u32)hidSharedMem + (10 + id * 4),  4);
    hidSharedMem[10 + id * 4] |= keys;
}

Personal tests:
- Zelda Ocarina of Time: 0x10002000
- Final Fantasy Explorers: 0x10002000
- Pokemon OR: 0x10000000
 
If anybody wants to work on this project, feel free to fork the latest commit. I won't be able to actively work on this project for some weeks now, since I'm stuck on a different project which is more important to me.

I tried to make the project as userfriendly as possible and included several functions for basic tasks such as reading memory, creating write command strings, converting little endian...

How to add pre-coded cheat codes:
Either you use c# code to perform the cheat code tasks or you use the gateshark engine in this project. In order to use the gateshark engine create a multiline string that has the format of a normal gateshark code and create a new gateshark object with this multiline code as argument. In order to run the code execute() the gateshark object.

Adding debug information:
Use the function Program.dc.Addlog(String l) to add a message to the debug console added in the latest commits. You can add commands to the debug console in the DebugConsole.cs file in the folder /Program/Window/DebugConsole.cs

If you have further questions feel free to ask me. I'll try and answer the questions as good as possible ^_^

---

For anybody who has indepth knowledge in the function of ARcodes, ( or gateshark codes ). I'd greatly appreciate it if you could take a look at the gateshark.cs file and improve some code. I'm pretty sure not all codes work the way they were intended to work.

---

Small note at the end: I am not abandoning this project. I'm just very busy with a different project which I need in the near future. I hope there will be somebody updating this project. Feel free to contact me and ask some questions in case my code is not clear.
 
I'm sorry but the way the bootntr debugger works is shit, I can't use your program if the debugger doesn't work for more than 30 seconds.
 
Status
Not open for further replies.

Site & Scene News

Popular threads in this forum