[Source Code] TeamXPG Trainer Engine

Discussion in 'Trainer Creation' started by begallegal1, Aug 22, 2013.

  1. begallegal1

    begallegal1 Medicine Man Lifetime Gold TeamXPG
    0/47

    3,694
    3,131
    235
    Oct 31, 2011
    In a Field of Green
    Console:
    Xbox
    [​IMG]

    [​IMG]

    This engine was made public by it's creator PermaNulled at Christmas time, http://www.xpgamesaves.com/topic/58863-merry-x-mas-source-code/#.UVqB06LvvDc please visit the original thread and drop him a +rep for sharing with the community.

    I am simply re-uploading the engine for all XPG Gold members to use and learn from ;)

    This may also be used as a discussion thread where you are welcome to share info and tricks with the community anyone having issues using the engine please look through the tutorials posted on site and/or feel free to start a tread regarding the problem your having for more in depth support

    :good2: Happy Training!! :good2:​
    Hidden Content:
    You must reply before you can see the hidden data contained here.
     
    • Like Like x 2
    • Agree Agree x 1
  2. gold972

    gold972 团队XPG影响 Effect XPG Developer TeamXPG
    205/282

    6,833
    14,944
    205
    Dec 6, 2010
    France Kernal XDK
    Console:
    Xbox
  3. xpghax

    xpghax Gold Section Mod/Uploader
    205/282

    8,911
    3,972
    205
    Jan 30, 2011
    in sidey's basement :(
    Console:
    Other
    thanks begal,this is a really good engine to use ;)
     
  4. begallegal1

    begallegal1 Medicine Man Lifetime Gold TeamXPG
    235/282

    3,694
    3,131
    235
    Oct 31, 2011
    In a Field of Green
    Console:
    Xbox
    Here is my most basic source for a +3 trainer for sonic adventures 2 I did a long time ago :LOL:

    I have added in some comments to help understand what is going on, just make a new .h file and name it what you want, add it to your solution and C&P this in ,,edit as needed ;)


    Code:
    #include "common.h"
    
    UINT32 g_titleID = 0x58411202; //<<<< add your games Title ID# here 
    
    
    VOID ShowTrainerMain()
    {
    	//you can edit this as you wish to change the text on the header of the message box
    	Prompt = XShowMessageBoxUI(0, L"TeamXPG XPGamesaves.com begallegal1", L"~Sonic Adventure 2 XBLA +3~\r\nView Available Codes: DPAD-DOWN(x4)\r\n", ARRAYSIZE(g_strButtons), g_strButtons, 0, XMB_PASSCODEMODE, &g_mb_result, &g_xol);
    }
    
    
    VOID ProcessButtonPress( MESSAGEBOX_RESULT g_mb_result )
    {
    	//This prompts the message box that will show your cheats and the passcode used to enable them.(edit text as needed)
        if( g_mb_result.rgwPasscode[0] == DPAD_DOWN && g_mb_result.rgwPasscode[1] == DPAD_DOWN && g_mb_result.rgwPasscode[2] == DPAD_DOWN && g_mb_result.rgwPasscode[3] == DPAD_DOWN )
        {
            Sleep(500);
    		XShowMessageBoxUI(0, L"Viewing All Available Codes", L"Max Score Press X(x4) \r\n~~~~~~~~~~~~~~~ \r\n99 Lives Press LB(x4) \r\n~~~~~~~~~~~~~~~ \r\nMax Rings Press Y(x4) \r\n~~~~~~~~~~~~~~~", ARRAYSIZE(g_strButtons), g_strButtons, 0, XMB_NOICON, &g_mb_result, &g_xol);
    
            memset( &g_mb_result.rgwPasscode[0], 0x00, 0x02 );
            memset( &g_mb_result.rgwPasscode[1], 0x00, 0x02 );
            memset( &g_mb_result.rgwPasscode[2], 0x00, 0x02 );
            memset( &g_mb_result.rgwPasscode[3], 0x00, 0x02 );
            Prompt = 0x9999;
    
        }
    
    
    	//This is our first cheat that is enabled by pressing the 'X' button 4 times when the passcode message box is open 
        if( g_mb_result.rgwPasscode[0] == X_BUTTON && g_mb_result.rgwPasscode[1] == X_BUTTON && g_mb_result.rgwPasscode[2] == X_BUTTON && g_mb_result.rgwPasscode[3] == X_BUTTON )
        {
            Sleep(500);
        
            {
    
            XShowMessageBoxUI(0, L"Cheat Enabled Successfully", L"Max Score - Enabled\r\nMax Score On Every Level!!", ARRAYSIZE(g_strButtons), g_strButtons, 0, XMB_NOICON, &g_mb_result, &g_xol);
              
    		//because this is a 32 bit offset used for score in this game, it will use 4 0x00 bytes to set the new value (compare to 16 bit below)
            BYTE multi1[4] = { 0x05, 0xf5, 0xe0, 0xff };
            memcpy( (void*)0x83850298, multi1, 4);
    		
    		//NOTE**** memcpy (above) is used for Jtag-RGH freeboot consoles, DmSetMemory (below) is used for Dev kernel/XDK consoles
    		//Comment out one or the other for your console type. 
    		
    		//DmSetMemory( (void*)0x83850298, 4, multi1, NULL );
    
            }
    
            memset( &g_mb_result.rgwPasscode[0], 0x00, 0x02 );
            memset( &g_mb_result.rgwPasscode[1], 0x00, 0x02 );
            memset( &g_mb_result.rgwPasscode[2], 0x00, 0x02 );
            memset( &g_mb_result.rgwPasscode[3], 0x00, 0x02 );
            Prompt = 0x9999;
        }
    	
    	//Another cheat using the LB button 
    	if( g_mb_result.rgwPasscode[0] == LEFT_BUMPER && g_mb_result.rgwPasscode[1] == LEFT_BUMPER && g_mb_result.rgwPasscode[2] == LEFT_BUMPER && g_mb_result.rgwPasscode[3] == LEFT_BUMPER )
        {
            Sleep(500);
          
            {
    		
                XShowMessageBoxUI(0, L"Cheat Enabled Successfully", L"99 Lives - Enabled\r\n99 Lives! ", ARRAYSIZE(g_strButtons), g_strButtons, 0, XMB_NOICON, &g_mb_result, &g_xol);
                
    		//because this is a 16 bit offset I used for lives in this game, it will use 2 0x00 bytes to set the new value (compare to 32 bit above)
            BYTE Lives1[2] = { 0x00 , 0x63  };
            memcpy( (void*)0x8385026C, Lives1, 2);
    		//DmSetMemory( (void*)0x8385026C, 2 , Lives1, NULL );
    
            }
    
            memset( &g_mb_result.rgwPasscode[0], 0x00, 0x02 );
            memset( &g_mb_result.rgwPasscode[1], 0x00, 0x02 );
            memset( &g_mb_result.rgwPasscode[2], 0x00, 0x02 );
            memset( &g_mb_result.rgwPasscode[3], 0x00, 0x02 );
            Prompt = 0x9999;
        }
    	
    	//Another cheat using the 'Y' button
    	if( g_mb_result.rgwPasscode[0] == Y_BUTTON && g_mb_result.rgwPasscode[1] == Y_BUTTON && g_mb_result.rgwPasscode[2] == Y_BUTTON && g_mb_result.rgwPasscode[3] == Y_BUTTON )
    	{
    		Sleep(500);
    
    		{
    
    			XShowMessageBoxUI(0, L"Cheat Enabled Successfully", L"Max Rings - Enabled\r\nGet Max Rings On Every Level!\r\n", ARRAYSIZE(g_strButtons), g_strButtons, 0, XMB_NOICON, &g_mb_result, &g_xol);
    
    			//because this is a 16 bit offset I used for rings in this game, it will use 2 0x00 bytes to set the new value (compare to 32 bit above)
    			BYTE Rings1[2] = { 0x03, 0xe7 };
    			memcpy( (void*)0x83850270, Rings1 , 2);
    			//DmSetMemory( (void*)0x83850270, 2 , Rings1,  NULL );
    		}
    
    		memset( &g_mb_result.rgwPasscode[0], 0x00, 0x02 );
    		memset( &g_mb_result.rgwPasscode[1], 0x00, 0x02 );
    		memset( &g_mb_result.rgwPasscode[2], 0x00, 0x02 );
    		memset( &g_mb_result.rgwPasscode[3], 0x00, 0x02 );
    		Prompt = 0x9999;
    		}
    }
    
     
  5. XPGProgrammer

    XPGProgrammer Newbie
    0/47

    802
    214
    0
    Jan 2, 2013
    Canada
    Console:
    Xbox
    For the gold members? Why can I see it :eek:? I just tried to launch the source file and it says that it can't be loaded.
     
  6. evestu

    evestu Newbie
    0/47

    4
    3
    0
    Aug 15, 2013
    Console:
    Xbox
    Thanks for this
     
  7. 740headshot

    740headshot Developer XPG Developer
    25/47

    157
    356
    25
    Sep 8, 2013
    Germany
    Console:
    Xbox One
  8. alex32

    alex32 Newbie
    0/47

    346
    28
    0
    May 17, 2012
    spain
    Console:
    Xbox One
  9. gu

    guarda Newbie
    0/47

    12
    0
    0
    Aug 25, 2014
  10. jtatayoyo

    jtatayoyo Member
    25/47

    228
    23
    25
    Nov 9, 2012
    moon
    Console:
    Xbox
  11. rav3xx

    rav3xx Newbie
    0/47

    113
    7
    0
    Jul 14, 2012
    Console:
    Xbox
  12. fo

    fob Newbie
    0/47

    16
    1
    0
    Sep 26, 2014
    Trainer engines! Such joy :p Legit thanks for posting this, i appreciate people who post things like this because it lets others improve their trainer making skills!
     
  13. bl

    blubber Newbie
    0/47

    53
    6
    0
    Apr 4, 2013
    Console:
    Xbox
    ohh, another engine, will try this...thanks
     
  14. schzen77

    schzen77 Newbie
    0/47

    49
    2
    0
    Oct 4, 2014
  15. Bl

    Blackhard Newbie
    0/47

    4
    0
    0
    Oct 1, 2013
    Console:
    Xbox
  16. la

    lankage21 Newbie
    0/47

    13
    0
    0
    May 16, 2012
    Console:
    Xbox
  17. Su

    Superscanner Newbie
    0/47

    16
    0
    0
    Sep 15, 2012
    Console:
    Xbox
  18. Th

    TheKaoticTeam Newbie
    0/47

    9
    0
    0
    Oct 7, 2014
  19. iiHydraHD

    iiHydraHD Newbie
    0/47

    19
    2
    0
    Nov 10, 2013
    Norway
    Console:
    Xbox
  20. jo

    johnnyquest312 Newbie
    0/47

    53
    1
    0
    Sep 23, 2012
    Console:
    Xbox

Share This Page