THREAD: How to make a sprx and read/write to the memory
  1. 07-20-2014, 03:47 AM
    Winter's Avatar
    Winter
    <span style="background:url(http://i.imgur.com/ErUqTqV.gif);font-weight:bold;color:purple;">Purple God</span>
    Winter's Avatar
    Winter
    <span style="background:url(http://i.imgur.com/ErUqTqV.gif);font-weight:bold;color:purple;">Purple God</span>
    1,502
    Posts
    21,628
    Reputation
    Aug 2012
    NextGenUpdate

    What you will need:

    Visual Studio 2010
    PS3SDK (Any Version as long as it is 4gb+)
    PS3 Plugins for Visual Studio (version v3 4.20 of prodg)
    A little bit of C++ knowledge


    First off you want to start off by downloading Visual Studio 2010.
    If you're planning to learn how to make things in C++ I shouldn't need to explain/link you to vs 2010 and install it.

    you'll need to reinstall ProDG. (google prodg and this video will come up You must login or register to view this content. download it from there)
    Once it's downloaded, Open it obviously.

    Next you want to select this
    You must login or register to view this content.
    It will say something like "Install vs 2010 integration"

    Once that's installed we'll need the PS3SDK, Sadly I cannot post anything related to the download link.
    So you're on your own there. But i'll tell you this much it needs to be 4+ gb or it wont work.
    Anyways onto the tutorial!


    You want to start out by opening vs 2010 then creating a new project
    You must login or register to view this content.
    If SCE > PS3 isn't there you've obviously messed up along the way or haven't install PS3SDK.

    Select PS3 PPU Project
    Next this Window will come up
    You must login or register to view this content.

    Press Next then press PPU PRX project
    Now click Finish


    Next you want to open up the solution explorer and open prx.cpp

    Most likely it will show like 7 errors
    You must login or register to view this content.
    Just right click on one of the errors and press "Show IntelliSense Errors"

    and their gone, Don't worry about some things that are underlined, the error list is your friend.

    Next you want to add these up at the top of your project

    #include <sys/sys_time.h>
    #include <sys/syscall.h>
    #include <sys/ppu_thread.h>
    #include <string.h>
    #include <sys/syscall.h>
    #include <stdarg.h>
    #include <stddef.h>
    #include <sys/timer.h>


    You must login or register to view this content.

    then add these in above SYS_MODULE_INFO

    void sleep(usecond_t time)
    {
    sys_timer_usleep(time * 1000);
    }

    int console_write(const char * s)
    {
    uint32_t len;
    system_call_4(403, 0, (uint64_t) s, 32, (uint64_t) &len);
    return_to_user_prog(int);
    }

    sys_ppu_thread_t id;
    sys_ppu_thread_t create_thread(void (*entry)(uint64_t), int priority, size_t stacksize, const char* threadname)
    {
    if(sys_ppu_thread_create(&id, entry, 0, priority , stacksize, 0, threadname) != CELL_OK)
    {
    console_write("Thread creation failed\n");
    }
    else
    {
    console_write("Thread created\n");
    }
    return id;
    }


    You must login or register to view this content.

    First we need to make a thread

    First add in this above PS3_PPU_Project1_prx_entry

    void thread_entry(uint64_t arg)
    {

    }//This is where all your mods will begin ^_^


    in PS3_PPU_Project1_prx_entry
    or what ever you named your project_prx_entry

    add this

    create_thread(thread_entry, 0x4AA, 0x6000, "Main_Thread");
    return 0;


    Now we can get started!

    Basics to writing the memory in C++.

    You can read/write the memory in C++ like this:

    Writing the Memory//I'm not entirely sure if this is correct, but it should be.
    1 byte - *(char*)0x0000000 = 0x01; //Yes this is literately how you write the memory in C++.
    2 bytes - *(short*)0x00000000 = 0x01;
    3 bytes - *(float*)0x00000000 = 0x01;
    4 bytes - *(int*)0x00000000 = 0x01;
    8 bytes - *(double*)0x00000000 = 0x01;

    Example:

    for (;Winky Winky//Since the code practically runs once you'll need to add a loop
    {
    if (InGame())//Detects when it's InGame so it knows when to run and not every half a millisecond.
    {
    sleep(5000); //Sleeps for 5 seconds then executes your code below.
    *(char*)0x1786418 = 0x40; //Thanks to mango for the player speed offset, This sets your speed x2 so we'll know if it works or not ^_^
    }
    }


    Reading the Memory
    same concept
    1 byte - *(char*)0x0000000;
    2 bytes - *(short*)0x00000000;
    3 bytes - *(float*)0x00000000;
    4 bytes - *(int*)0x00000000;
    8 bytes - *(double*)0x00000000;

    Example:

    for (;Winky Winky//Since the code practically runs once you'll need to add a loop
    {
    if (InGame())//Detects when it's InGame so it knows when to run and not every half a millisecond.
    {
    sleep(5000); //Sleeps for 5 seconds then executes your code below.
    if (*(char*)0x1786418 == 63)
    {
    *(char*)0x1786418 = 0x40; //Thanks to mango for the player speed offset, This sets your speed x2 so we'll know if it works or not ^_^
    }
    else
    { *(char*)0x1786418 = 0x3F; /*Obviously this wouldn't work because it would turn it on and off every 5 seconds*/ }
    }
    }


    I'll post how to use rpc soon ^_^ enjoy, Also I've probably done something wrong here along the lines so people like SC58 that feel the need to correct me go ahead, plus, I've only been doing C++ for two days.

    Credits:
    Sony - For making the PS3SDK, vs integration and PS3 ^^
    Shark - Big Help with teaching me C++
    Bad Luck Brian - RPC + Other stuff
    Theriftboy - He did magical stuff
    If there's anyone else that needs to be in here let me know lol
    Last edited by Winter ; 07-21-2014 at 04:07 PM. Reason: Updated Versions.

  2. The Following 34 Users Say Thank You to Winter For This Useful Post:

    , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

  3. The Following User Groaned Winter For This Awful Post:


  4. 07-20-2014, 03:58 AM
    Citadel's Avatar
    Citadel
    Samurai Poster
    Citadel's Avatar
    Citadel
    Samurai Poster
    2,553
    Posts
    16,842
    Reputation
    Apr 2013
    NextGenUpdate
    Linking ProDG is against the rules. It's warez silly Happy
  5. 07-20-2014, 03:58 AM
    Winter's Avatar
    Winter
    <span style="background:url(http://i.imgur.com/ErUqTqV.gif);font-weight:bold;color:purple;">Purple God</span>
    Winter's Avatar
    Winter
    <span style="background:url(http://i.imgur.com/ErUqTqV.gif);font-weight:bold;color:purple;">Purple God</span>
    1,502
    Posts
    21,628
    Reputation
    Aug 2012
    NextGenUpdate
    Originally Posted by Citadel View Post
    Linking ProDG is against the rules. It's warez silly Happy


    Already fixed :y:
  6. 07-20-2014, 04:14 AM
    OLDSCHOOLMODZHD's Avatar
    OLDSCHOOLMODZHD
    NextGenUpdate Elite
    OLDSCHOOLMODZHD's Avatar
    OLDSCHOOLMODZHD
    NextGenUpdate Elite
    556
    Posts
    18,603
    Reputation
    Apr 2013
    NextGenUpdate
    Nice Winky Winky Tiphat
  7. 07-20-2014, 04:15 AM
    Citadel's Avatar
    Citadel
    Samurai Poster
    Citadel's Avatar
    Citadel
    Samurai Poster
    2,553
    Posts
    16,842
    Reputation
    Apr 2013
    NextGenUpdate
    Originally Posted by Winter View Post
    Already fixed :y:


    Lol that's def a way to get around it
  8. 07-20-2014, 01:47 PM
    691
    Posts
    20,615
    Reputation
    Sep 2012
    NextGenUpdate
    Originally Posted by Winter View Post

    What you will need:

    Visual Studio 2010
    PS3SDK
    PS3 Plugins for Visual Studio
    A little bit of C++ knowledge


    First off you want to start off by downloading Visual Studio 2010.
    If you're planning to learn how to make things in C++ I shouldn't need to explain/link you to vs 2010 and install it.

    you'll need to reinstall ProDG. (google prodg and this video will come up You must login or register to view this content. download it from there)
    Once it's downloaded, Open it obviously.

    Next you want to select this
    You must login or register to view this content.
    It will say something like "Install vs 2010 integration"

    Once that's installed we'll need the PS3SDK, Sadly I cannot post anything related to the download link.
    So you're on your own there. But i'll tell you this much it needs to be 4+ gb or it wont work.
    Anyways onto the tutorial!


    You want to start out by opening vs 2010 then creating a new project
    You must login or register to view this content.
    If SCE > PS3 isn't there you've obviously messed up along the way or haven't install PS3SDK.

    Select PS3 PPU Project
    Next this Window will come up
    You must login or register to view this content.

    Press Next then press PPU PRX project
    Now click Finish


    Next you want to open up the solution explorer and open prx.cpp

    Most likely it will show like 7 errors
    You must login or register to view this content.
    Just right click on one of the errors and press "Show IntelliSense Errors"

    and their gone, Don't worry about some things that are underlined, the error list is your friend.

    Next you want to add these up at the top of your project

    #include <sys/sys_time.h>
    #include <sys/syscall.h>
    #include <sys/ppu_thread.h>
    #include <string.h>
    #include <sys/syscall.h>
    #include <stdarg.h>
    #include <stddef.h>
    #include <sys/timer.h>


    You must login or register to view this content.

    then add these in above SYS_MODULE_INFO

    void sleep(usecond_t time)
    {
    sys_timer_usleep(time * 1000);
    }

    int console_write(const char * s)
    {
    uint32_t len;
    system_call_4(403, 0, (uint64_t) s, 32, (uint64_t) &len);
    return_to_user_prog(int);
    }

    sys_ppu_thread_t id;
    sys_ppu_thread_t create_thread(void (*entry)(uint64_t), int priority, size_t stacksize, const char* threadname)
    {
    if(sys_ppu_thread_create(&id, entry, 0, priority , stacksize, 0, threadname) != CELL_OK)
    {
    console_write("Thread creation failed\n");
    }
    else
    {
    console_write("Thread created\n");
    }
    return id;
    }


    You must login or register to view this content.

    First we need to make a thread

    First add in this above PS3_PPU_Project1_prx_entry

    void thread_entry(uint64_t arg)
    {

    }//This is where all your mods will begin ^_^


    in PS3_PPU_Project1_prx_entry
    or what ever you named your project_prx_entry

    add this

    create_thread(thread_entry, 0x4AA, 0x6000, "Main_Thread");
    return 0;


    Now we can get started!

    Basics to writing the memory in C++.

    You can read/write the memory in C++ like this:

    Writing the Memory//I'm not entirely sure if this is correct, but it should be.
    1 byte - *(char*)0x0000000 = 0x01; //Yes this is literately how you write the memory in C++.
    2 bytes - *(short*)0x00000000 = 0x01;
    3 bytes - *(float*)0x00000000 = 0x01;
    4 bytes - *(int*)0x00000000 = 0x01;
    8 bytes - *(double*)0x00000000 = 0x01;

    Example:

    for (;Winky Winky//Since the code practically runs once you'll need to add a loop
    {
    if (InGame())//Detects when it's InGame so it knows when to run and not every half a millisecond.
    {
    sleep(5000); //Sleeps for 5 seconds then executes your code below.
    *(char*)0x1786418 = 0x40; //Thanks to mango for the player speed offset, This sets your speed x2 so we'll know if it works or not ^_^
    }
    }


    Reading the Memory
    same concept
    1 byte - *(char*)0x0000000;
    2 bytes - *(short*)0x00000000;
    3 bytes - *(float*)0x00000000;
    4 bytes - *(int*)0x00000000;
    8 bytes - *(double*)0x00000000;

    Example:

    for (;Winky Winky//Since the code practically runs once you'll need to add a loop
    {
    if (InGame())//Detects when it's InGame so it knows when to run and not every half a millisecond.
    {
    sleep(5000); //Sleeps for 5 seconds then executes your code below.
    if (*(char*)0x1786418 == 63)
    {
    *(char*)0x1786418 = 0x40; //Thanks to mango for the player speed offset, This sets your speed x2 so we'll know if it works or not ^_^
    }
    else
    { *(char*)0x1786418 = 0x3F; /*Obviously this wouldn't work because it would turn it on and off every 5 seconds*/ }
    }
    }


    I'll post how to use rpc soon ^_^ enjoy, Also I've probably done something wrong here along the lines so people like SC58 that feel the need to correct me go ahead, plus, I've only been doing C++ for two days.

    Credits:
    Sony - For making the PS3SDK, vs integration and PS3 ^^
    Shark - Big Help with teaching me C++
    Bad Luck Brian - RPC + Other stuff
    Theriftboy - He did magical stuff
    If there's anyone else that needs to be in here let me know lol


    Thank you Winter. This helps. Smile Thanks for helpin out, unlike some people *cough *cough. You know who I'm talking about, and I'm sure he knows too... hint, its starts with a Seb. xD
  9. The Following User Thanked BaSs_HaXoR For This Useful Post:


  10. 07-20-2014, 04:01 PM
    Citadel's Avatar
    Citadel
    Samurai Poster
    Citadel's Avatar
    Citadel
    Samurai Poster
    2,553
    Posts
    16,842
    Reputation
    Apr 2013
    NextGenUpdate
    Originally Posted by HaXoR View Post
    Thank you Winter. This helps. Smile Thanks for helpin out, unlike some people *cough *cough. You know who I'm talking about, and I'm sure he knows too... hint, its starts with a Seb. xD


    Lol I think the *cough cough* was enough to know it was seb Happy
    Still funny none the less though
  11. 07-21-2014, 02:31 PM
    Winter's Avatar
    Winter
    <span style="background:url(http://i.imgur.com/ErUqTqV.gif);font-weight:bold;color:purple;">Purple God</span>
    Winter's Avatar
    Winter
    <span style="background:url(http://i.imgur.com/ErUqTqV.gif);font-weight:bold;color:purple;">Purple God</span>
    1,502
    Posts
    21,628
    Reputation
    Aug 2012
    NextGenUpdate
    Originally Posted by Citadel View Post
    Lol I think the *cough cough* was enough to know it was seb Happy
    Still funny none the less though


    ^true
  12. 07-21-2014, 03:13 PM
    tryme's Avatar
    tryme
    Do a barrel roll!
    tryme's Avatar
    tryme
    Do a barrel roll!
    99
    Posts
    360
    Reputation
    Sep 2011
    NextGenUpdate
    Originally Posted by Winter View Post

    What you will need:

    Visual Studio 2010
    PS3SDK
    PS3 Plugins for Visual Studio
    A little bit of C++ knowledge


    First off you want to start off by downloading Visual Studio 2010.
    If you're planning to learn how to make things in C++ I shouldn't need to explain/link you to vs 2010 and install it.

    you'll need to reinstall ProDG. (google prodg and this video will come up You must login or register to view this content. download it from there)
    Once it's downloaded, Open it obviously.

    Next you want to select this
    You must login or register to view this content.
    It will say something like "Install vs 2010 integration"

    Once that's installed we'll need the PS3SDK, Sadly I cannot post anything related to the download link.
    So you're on your own there. But i'll tell you this much it needs to be 4+ gb or it wont work.
    Anyways onto the tutorial!


    You want to start out by opening vs 2010 then creating a new project
    You must login or register to view this content.
    If SCE > PS3 isn't there you've obviously messed up along the way or haven't install PS3SDK.

    Select PS3 PPU Project
    Next this Window will come up
    You must login or register to view this content.

    Press Next then press PPU PRX project
    Now click Finish


    Next you want to open up the solution explorer and open prx.cpp

    Most likely it will show like 7 errors
    You must login or register to view this content.
    Just right click on one of the errors and press "Show IntelliSense Errors"

    and their gone, Don't worry about some things that are underlined, the error list is your friend.

    Next you want to add these up at the top of your project

    #include <sys/sys_time.h>
    #include <sys/syscall.h>
    #include <sys/ppu_thread.h>
    #include <string.h>
    #include <sys/syscall.h>
    #include <stdarg.h>
    #include <stddef.h>
    #include <sys/timer.h>


    You must login or register to view this content.

    then add these in above SYS_MODULE_INFO

    void sleep(usecond_t time)
    {
    sys_timer_usleep(time * 1000);
    }

    int console_write(const char * s)
    {
    uint32_t len;
    system_call_4(403, 0, (uint64_t) s, 32, (uint64_t) &len);
    return_to_user_prog(int);
    }

    sys_ppu_thread_t id;
    sys_ppu_thread_t create_thread(void (*entry)(uint64_t), int priority, size_t stacksize, const char* threadname)
    {
    if(sys_ppu_thread_create(&id, entry, 0, priority , stacksize, 0, threadname) != CELL_OK)
    {
    console_write("Thread creation failed\n");
    }
    else
    {
    console_write("Thread created\n");
    }
    return id;
    }


    You must login or register to view this content.

    First we need to make a thread

    First add in this above PS3_PPU_Project1_prx_entry

    void thread_entry(uint64_t arg)
    {

    }//This is where all your mods will begin ^_^


    in PS3_PPU_Project1_prx_entry
    or what ever you named your project_prx_entry

    add this

    create_thread(thread_entry, 0x4AA, 0x6000, "Main_Thread");
    return 0;


    Now we can get started!

    Basics to writing the memory in C++.

    You can read/write the memory in C++ like this:

    Writing the Memory//I'm not entirely sure if this is correct, but it should be.
    1 byte - *(char*)0x0000000 = 0x01; //Yes this is literately how you write the memory in C++.
    2 bytes - *(short*)0x00000000 = 0x01;
    3 bytes - *(float*)0x00000000 = 0x01;
    4 bytes - *(int*)0x00000000 = 0x01;
    8 bytes - *(double*)0x00000000 = 0x01;

    Example:

    for (;Winky Winky//Since the code practically runs once you'll need to add a loop
    {
    if (InGame())//Detects when it's InGame so it knows when to run and not every half a millisecond.
    {
    sleep(5000); //Sleeps for 5 seconds then executes your code below.
    *(char*)0x1786418 = 0x40; //Thanks to mango for the player speed offset, This sets your speed x2 so we'll know if it works or not ^_^
    }
    }


    Reading the Memory
    same concept
    1 byte - *(char*)0x0000000;
    2 bytes - *(short*)0x00000000;
    3 bytes - *(float*)0x00000000;
    4 bytes - *(int*)0x00000000;
    8 bytes - *(double*)0x00000000;

    Example:

    for (;Winky Winky//Since the code practically runs once you'll need to add a loop
    {
    if (InGame())//Detects when it's InGame so it knows when to run and not every half a millisecond.
    {
    sleep(5000); //Sleeps for 5 seconds then executes your code below.
    if (*(char*)0x1786418 == 63)
    {
    *(char*)0x1786418 = 0x40; //Thanks to mango for the player speed offset, This sets your speed x2 so we'll know if it works or not ^_^
    }
    else
    { *(char*)0x1786418 = 0x3F; /*Obviously this wouldn't work because it would turn it on and off every 5 seconds*/ }
    }
    }


    I'll post how to use rpc soon ^_^ enjoy, Also I've probably done something wrong here along the lines so people like SC58 that feel the need to correct me go ahead, plus, I've only been doing C++ for two days.

    Credits:
    Sony - For making the PS3SDK, vs integration and PS3 ^^
    Shark - Big Help with teaching me C++
    Bad Luck Brian - RPC + Other stuff
    Theriftboy - He did magical stuff
    If there's anyone else that needs to be in here let me know lol

    just wonder why you are saying to reinstall prodg? and also you do not state which version of visual studio, express, pro or ultimate. though the ps3 sdk plugin for vs isn't compatible to express (freeware) version from the sdk readme, it does indeed work only with express. i have installed 3.4 sdk and have installed 2010 express later. afterwards i have installed the vs plugin from 4.0 sdk and now everything works fine. i hadn't to reinstall anything.
  13. 07-21-2014, 03:29 PM
    SC58's Avatar
    SC58
    Former Staff
    SC58's Avatar
    SC58
    Former Staff
    4,467
    Posts
    119,243
    Reputation
    Sep 2012
    NextGenUpdate
    Originally Posted by tryme View Post
    just wonder why you are saying to reinstall prodg? and also you do not state which version of visual studio, express, pro or ultimate. though the ps3 sdk plugin for vs isn't compatible to express (freeware) version from the sdk readme, it does indeed work only with express. i have installed 3.4 sdk and have installed 2010 express later. afterwards i have installed the vs plugin from 4.0 sdk and now everything works fine. i hadn't to reinstall anything.


    Microsoft Visual C++ 2010 Express will work