ROM Hack Adding a deactivator to gw code Start Button

dahacker2017

Well-Known Member
OP
Member
Joined
Jun 1, 2016
Messages
171
Trophies
0
XP
145
Country
United States
Plz Help Me i Need a deactivator and acivator for this code both Start Button
D3000000 10000000
947909D4 00000001
D3000000 00000000
DD000000 00000110
6FFFFBF4 00000000
BFFFFBF4 00000000
B00005CC 00000000
DB000000 00000054
D4000000 00000001
D8000000 00000054
D2000000 00000000
DD000000 00000120
6FFFFBF4 00000000
BFFFFBF4 00000000
B00005CC 00000000
DB000000 00000054
D4000000 FFFFFFFF
D8000000 00000054
D2000000 00000000
DD000000 00000110
6FFFFBF4 00000000
BFFFFBF4 00000000
B00005CC 00000000
DB000000 00000046
D4000000 00000001
D6000000 00000046
D8000000 00000000
DD000000 00000120
6FFFFBF4 00000000
BFFFFBF4 00000000
B00005CC 00000000
DB000000 00000046
D4000000 FFFFFFFF
D8000000 00000046
D2000000 00000000
 
Last edited by dahacker2017,

Nanquitas

Well-Known Member
Member
Joined
Sep 29, 2015
Messages
2,345
Trophies
0
Age
30
Location
South of France :)
XP
3,336
Country
France
I think of two ways for doing it:
- Create your code in asm like @ymyn does his codes (really impressive and fun by the way ;))
- Find a unused byte in the memory and do the following:
  1. Check the value, if it's not 1 or 0 set it to 0
  2. From now, 0 = disabled, 1 enabled
  3. On the press of start check that byte, if it's 0 set it to 1, if it's 1 set it to 0
  4. Do a conditional block on that byte, if it's 1 you're executing the code else you're exiting the code
 

dsrules

Well-Known Member
Member
Joined
Sep 20, 2005
Messages
8,752
Trophies
2
XP
6,322
Country
he wants to use the same button
unlike ntr, gw will run all lines, so the last line will be the one it will run because there is no if else command on gw
 

MichiS97

"Leftist snowflake milennial"
Member
Joined
Jun 14, 2011
Messages
1,817
Trophies
2
Age
26
Location
Munich
XP
3,622
Country
Germany
I think of two ways for doing it:
- Create your code in asm like @ymyn does his codes (really impressive and fun by the way ;))
- Find a unused byte in the memory and do the following:
  1. Check the value, if it's not 1 or 0 set it to 0
  2. From now, 0 = disabled, 1 enabled
  3. On the press of start check that byte, if it's 0 set it to 1, if it's 1 set it to 0
  4. Do a conditional block on that byte, if it's 1 you're executing the code else you're exiting the code
Is there any tutorial about making ASM codes for the 3DS?
 

Nanquitas

Well-Known Member
Member
Joined
Sep 29, 2015
Messages
2,345
Trophies
0
Age
30
Location
South of France :)
XP
3,336
Country
France
give an example
//assuming I found that 0x08123456 is an unused address
// I'm lazy so addr mean 0x08123456
[exemple]
68123456 00000000 //if addr != 0 {
68123456 00000001 //if addr != 1 {
08123456 00000000 //addr = 0
D0000000 00000000 //}
D0000000 00000000 //}
DD000000 00000008 //if start is pressed{
58123456 00000000 //if addr == 0 {
08123456 00000001 //addr = 1
D0000000 00000000 //}
58123456 00000001 //if addr == 1 {
08123456 00000000 // addr = 0
D0000000 00000000 //}
D0000000 00000000 //}
58123456 00000001 //if addr == 1 {
0FFFFFFF FFFFFFFF //do all the cheats actions
D2000000 00000000 //} end of the code

Theory validated with the converter:
Code:
void    exemple_2d5e(void)
{
    u32    data;
    u32    offset;

    data = 0;
    offset = 0;
    if ( 0x00000000 != READU32(0x08123456 + offset))
    {
        if ( 0x00000001 != READU32(0x08123456 + offset))
        {
            WRITEU32(0x08123456 + offset, 0x00000000);
        }
    }
    if (is_pressed( BUTTON_ST ))
    {
        if ( 0x00000000 == READU32(0x08123456 + offset))
        {
            WRITEU32(0x08123456 + offset, 0x00000001);
        }
        if ( 0x00000001 == READU32(0x08123456 + offset))
        {
            WRITEU32(0x08123456 + offset, 0x00000000);
        }
    }
    if ( 0x00000001 == READU32(0x08123456 + offset))
    {
        WRITEU32(0x0FFFFFFF + offset, 0xFFFFFFFF);
    }
    data = 0;
    offset = 0;
}

The code above is generated by my converter when I'll give him the code.

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

Is there any tutorial about making ASM codes for the 3DS?
You can read those for NDS, it's working the same way. ;)
 
Last edited by Nanquitas,

dsrules

Well-Known Member
Member
Joined
Sep 20, 2005
Messages
8,752
Trophies
2
XP
6,322
Country
Theory validated with the converter:You can read those for NDS, it's working the same way. ;)
it might work on ntr but it won't work on gw because
DD000000 00000008 //if start is pressed{
58123456 00000000
08123456 00000001 //this will set addr = 1
D0000000 00000000
58123456 00000001 //then if addr == 1
08123456 00000000 // addr will become 0 , it will always run this line when addr = 1
 

Nanquitas

Well-Known Member
Member
Joined
Sep 29, 2015
Messages
2,345
Trophies
0
Age
30
Location
South of France :)
XP
3,336
Country
France
Oh yeah... what a dummy...

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

But using another variable as a boolean it might work:
[exemple]
68123456 00000000
68123456 00000001
08123456 00000000
D0000000 00000000
D0000000 00000000
DD000000 00000008
58123456 00000000
08123456 00000001
18123458 00000001
D0000000 00000000
58123456 00000001
08123456 00000000
18123458 00000001
D0000000 00000000
D0000000 00000000
98123458 00000001
18123458 00000000
D0000000 00000000
58123456 00000001
0FFFFFFF FFFFFFFF
D2000000 00000000
Generated code:
Code:
void    exemple_4124(void)
{
    u32    data;
    u32    offset;

    data = 0;
    offset = 0;
    if ( 0x00000000 != READU32(0x08123456 + offset))
    {
        if ( 0x00000001 != READU32(0x08123456 + offset))
        {
            WRITEU32(0x08123456 + offset, 0x00000000);
        }
    }
    if (is_pressed( BUTTON_ST ))
    {
        if ( 0x00000000 == READU32(0x08123456 + offset))
        {
            WRITEU32(0x08123456 + offset, 0x00000001);
            WRITEU16(0x08123458 + offset, 0x00000001 & 0xFFFF);
        }
        if ( 0x00000001 == READU32(0x08123456 + offset))
        {
            WRITEU32(0x08123456 + offset, 0x00000000);
            WRITEU16(0x08123458 + offset, 0x00000001 & 0xFFFF);
        }
    }
    if ( 0x00000001 == READU16(0x08123458 + offset))
    {
        WRITEU16(0x08123458 + offset, 0x00000000 & 0xFFFF);
    }
    if ( 0x00000001 == READU32(0x08123456 + offset))
    {
        WRITEU32(0x0FFFFFFF + offset, 0xFFFFFFFF);
    }
    data = 0;
    offset = 0;
}
We mark the address to signal a current change of state, with that it won't fill the second condition ;)
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Psionic Roshambo @ Psionic Roshambo: Microsoft is worth 3.2 Trillion according to Google lol