Post: sprx scripts thread [POST YOURS HERE]
08-14-2014, 04:58 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); ayyy ngu, so since theres been lots of scripts released for prx modulus i decided to just make a big thread to keep it organized Smile
http[dankz to blb]:
header: You must login or register to view this content.
add libs:
    
$(SCE_PS3_ROOT)\target\ppu\lib\libhttp_stub.a
$(SCE_PS3_ROOT)\target\ppu\lib\libhttp_util_stub.a
$(SCE_PS3_ROOT)\target\ppu\lib\libnet_stub.a

ex:
    
char response[255];
SendRequest("https://www.google.com/", response, 255);

button monitoring:
header: You must login or register to view this content.
init:
    
#inlcude "pad.h"
extern "C" int main(void)//main entry
{
cellPadInit(MAX_PAD);
}



analog monitoring:
step 1:
link the pad library to your project:
    
$(SCE_PS3_ROOT)\target\ppu\lib\libpadfilter.a

step2:
go to the sample of pad utility from sony:
    
$(SCE_PS3_ROOT)\samples\common\padutil

step3:
add padutil.h & padutil.cpp to your project
ex:
    
#include <cell/pad.h>
#include <cell/padfilter.h>
#include "padutil.h"
void ex(uint32_t* Lx,uint32_t* Rx,uint32_t* Ly,uint32_t* Ry)
{
CellPadUtilAxis buffR = cellPadUtilGetAxisValue(0, CELL_UTIL_ANALOG_RIGHT);
CellPadUtilAxis buffL = cellPadUtilGetAxisValue(0, CELL_UTIL_ANALOG_LEFT);
*Lx = buffL.x;
*Rx = buffR.x;
*Ly = buffL.y;
*Ry = buffR.y;
}
uint32_t lel[4];
extern "C" int main()
{
ex(&lel[0],&lel[1],&lel[2],&lel[3]);
if(lel[0] > lel[1])
printf(":P");
return 0;
}



printf:
    void printf(int n,...)
{
void* lol;
va_list a;
va_start(a,n);
lol = va_arg(a,void*);
uint32_t len;
system_call_4(403, 0, (uint64_t)lol, 32, (uint64_t) &len);
va_end(a);
}

va (short version of sprintf) :
    
void* va(int n,...)
{
void* buff;
va_list a;
va_start(a,n);
buff = va_arg(a,void*);
va_end(a);
return buff;
}

dialog[again dankz to blb]:
Header: [C++] You must login or register to view this content.
LIB: $(SCE_PS3_ROOT)\target\ppu\lib\libsysutil_stub.a

HOW TO USE IT

Simple dialog:
    
Dialog::msgdialog_mode = Dialog::MODE_STRING_OK;
Dialog::Show("Hey, this is a dialog");
a YES/NO dialog:

    
Dialog::msgdialog_mode = Dialog::MODE_STRING_YESNO;
Dialog::ShowYESNO("[NGU]: ELITE REJECTED, Want to try again?");
while(!Dialog::Finished){} //wait for it to end
bool ret = Dialog::YESNO; //if true, its YES, else its NO
Dialog::End(); //end the yes/no dialog
The keyboard(still in alpha):

    
char retText[32]; //our buffer
Keyboard:Gaspskdialog_mode = Keyboard::MODE_OPEN;
while(Keyboard:Gaspskdialog_mode != Keyboard::MODE_EXIT)
{ Keyboard::keyboard(retText, "Title", "Preset Text");} //wait for the keyboard to end and run it meanwhile
(adsbygoogle = window.adsbygoogle || []).push({});

The following 20 users say thank you to milky4444 for this useful post:

-JM-, ▶DaOriginal209◀, Bad Luck Brian, BaSs_HaXoR, Cien, Franky, hackeveryone, JLM, Joren, KareraHekku, John, Notorious, OLDSCHOOLMODZHD, QuantumDev, ryu_hayabusa80, seb5594, Shark, Swaqq, Taylor, Tipton_Modz
08-14-2014, 09:32 PM #2
Originally posted by milky4444 View Post
ayyy ngu, so since theres been lots of scripts released for prx modulus i decided to just make a big thread to keep it organized Smile
http[dankz to blb]:
header: You must login or register to view this content.
add libs:
    
$(SCE_PS3_ROOT)\target\ppu\lib\libhttp_stub.a
$(SCE_PS3_ROOT)\target\ppu\lib\libhttp_util_stub.a
$(SCE_PS3_ROOT)\target\ppu\lib\libnet_stub.a

ex:
    
char response[255];
SendRequest("https://www.google.com/", response, 255);

button monitoring:
header: You must login or register to view this content.
init:
    
#inlcude "pad.h"
extern "C" int main(void)//main entry
{
cellPadInit(MAX_PAD);
}



analog monitoring:
step 1:
link the pad library to your project:
    
$(SCE_PS3_ROOT)\target\ppu\lib\libpadfilter.a

step2:
go to the sample of pad utility from sony:
    
$(SCE_PS3_ROOT)\samples\common\padutil

step3:
add padutil.h & padutil.cpp to your project
ex:
    
#include <cell/pad.h>
#include <cell/padfilter.h>
#include "padutil.h"
void ex(uint32_t* Lx,uint32_t* Rx,uint32_t* Ly,uint32_t* Ry)
{
CellPadUtilAxis buffR = cellPadUtilGetAxisValue(0, CELL_UTIL_ANALOG_RIGHT);
CellPadUtilAxis buffL = cellPadUtilGetAxisValue(0, CELL_UTIL_ANALOG_LEFT);
*Lx = buffL.x;
*Rx = buffR.x;
*Ly = buffL.y;
*Ry = buffR.y;
}
uint32_t lel[4];
extern "C" int main()
{
ex(&lel[0],&lel[1],&lel[2],&lel[3]);
if(lel[0] > lel[1])
printf(":P");
return 0;
}



printf:
    void printf(int n,...)
{
void* lol;
va_list a;
va_start(a,n);
lol = va_arg(a,void*);
uint32_t len;
system_call_4(403, 0, (uint64_t)lol, 32, (uint64_t) &len);
va_end(a);
}




Here is another one Smile (WARNING: the keyboard will work but the ps3 will keep stuck when trying to quit the game so you will have to reset/turn off the ps3, can't fix it atm)

Header: You must login or register to view this content.
LIB: $(SCE_PS3_ROOT)\target\ppu\lib\libsysutil_stub.a

HOW TO USE IT

Simple dialog:
    
Dialog::msgdialog_mode = Dialog::MODE_STRING_OK;
Dialog::Show("Hey, this is a dialog");


a YES/NO dialog:
    
Dialog::msgdialog_mode = Dialog::MODE_STRING_YESNO;
Dialog::ShowYESNO("[NGU]: ELITE REJECTED, Want to try again?");
while(!Dialog::Finished){} //wait for it to end
bool ret = Dialog::YESNO; //if true, its YES, else its NO
Dialog::End(); //end the yes/no dialog


The keyboard(still in alpha):
    
char retText[32]; //our buffer
Keyboard:Gaspskdialog_mode = Keyboard::MODE_OPEN;
while(Keyboard:Gaspskdialog_mode != Keyboard::MODE_EXIT)
{ Keyboard::keyboard(retText, "Title", "Preset Text");} //wait for the keyboard to end and run it meanwhile

The following 9 users say thank you to Bad Luck Brian for this useful post:

-JM-, Cien, JLM, KareraHekku, milky4444, John, Notorious, Shark
08-15-2014, 03:47 AM #3
Updated Happy
08-15-2014, 08:25 PM #4
Swaqq
Professional Thanker
Nice Post :3
08-16-2014, 09:45 PM #5
-JM-
Space Ninja
Originally posted by milky4444 View Post
ayyy ngu, so since theres been lots of scripts released for prx modulus i decided to just make a big thread to keep it organized Smile
http[dankz to blb]:
header: You must login or register to view this content.
add libs:
    
$(SCE_PS3_ROOT)\target\ppu\lib\libhttp_stub.a
$(SCE_PS3_ROOT)\target\ppu\lib\libhttp_util_stub.a
$(SCE_PS3_ROOT)\target\ppu\lib\libnet_stub.a

ex:
    
char response[255];
SendRequest("https://www.google.com/", response, 255);

button monitoring:
header: You must login or register to view this content.
init:
    
#inlcude "pad.h"
extern "C" int main(void)//main entry
{
cellPadInit(MAX_PAD);
}



analog monitoring:
step 1:
link the pad library to your project:
    
$(SCE_PS3_ROOT)\target\ppu\lib\libpadfilter.a

step2:
go to the sample of pad utility from sony:
    
$(SCE_PS3_ROOT)\samples\common\padutil

step3:
add padutil.h & padutil.cpp to your project
ex:
    
#include <cell/pad.h>
#include <cell/padfilter.h>
#include "padutil.h"
void ex(uint32_t* Lx,uint32_t* Rx,uint32_t* Ly,uint32_t* Ry)
{
CellPadUtilAxis buffR = cellPadUtilGetAxisValue(0, CELL_UTIL_ANALOG_RIGHT);
CellPadUtilAxis buffL = cellPadUtilGetAxisValue(0, CELL_UTIL_ANALOG_LEFT);
*Lx = buffL.x;
*Rx = buffR.x;
*Ly = buffL.y;
*Ry = buffR.y;
}
uint32_t lel[4];
extern "C" int main()
{
ex(&lel[0],&lel[1],&lel[2],&lel[3]);
if(lel[0] > lel[1])
printf(":P");
return 0;
}



printf:
    void printf(int n,...)
{
void* lol;
va_list a;
va_start(a,n);
lol = va_arg(a,void*);
uint32_t len;
system_call_4(403, 0, (uint64_t)lol, 32, (uint64_t) &len);
va_end(a);
}

va (short version of sprintf) :
    
void* va(int n,...)
{
void* buff;
va_list a;
va_start(a,n);
buff = va_arg(a,void*);
va_end(a);
return buff;
}

dialog[again dankz to blb]:
Header: [C++] You must login or register to view this content.
LIB: $(SCE_PS3_ROOT)\target\ppu\lib\libsysutil_stub.a

HOW TO USE IT

Simple dialog:
    
Dialog::msgdialog_mode = Dialog::MODE_STRING_OK;
Dialog::Show("Hey, this is a dialog");
a YES/NO dialog:

    
Dialog::msgdialog_mode = Dialog::MODE_STRING_YESNO;
Dialog::ShowYESNO("[NGU]: ELITE REJECTED, Want to try again?");
while(!Dialog::Finished){} //wait for it to end
bool ret = Dialog::YESNO; //if true, its YES, else its NO
Dialog::End(); //end the yes/no dialog
The keyboard(still in alpha):

    
char retText[32]; //our buffer
Keyboard:Gaspskdialog_mode = Keyboard::MODE_OPEN;
while(Keyboard:Gaspskdialog_mode != Keyboard::MODE_EXIT)
{ Keyboard::keyboard(retText, "Title", "Preset Text");} //wait for the keyboard to end and run it meanwhile


I had trouble with the stdlib so Idk if it could help any one
    
void strcat(char s[], char t[]) {
int i, j;

i = j = 0;
while(s[i] != '\0'Winky Winky /* find the end of s */
i++;

while((s[i++] = t[j++]) != '\0'Winky Winky /* copy t */
;
}

    

int strlen(char* buff)
{
int i = 0;
while(buff[i] != 0)
i++;
return i;
}



    
int cstrcmp(const char* s1, const char* s2)//Please note if its equal to zero the strings are equal
{
while(*s1 && (*s1==*s2))
s1++,s2++;
return *(const unsigned char*)s1-*(const unsigned char*)s2;
}

The following user thanked -JM- for this useful post:

Joren
08-18-2014, 04:26 AM #6
Originally posted by JM
I had trouble with the stdlib so Idk if it could help any one
~snip~

That's weird it worked fine for me :p

The following user thanked OLDSCHOOLMODZHD for this useful post:

MemoryPointers
08-18-2014, 02:11 PM #7
-JM-
Space Ninja
Originally posted by OLDSCHOOLMODZHD View Post
That's weird it worked fine for me :p


my stupid std's get unreferenced 'strcat' so i got to get each function by my self
08-27-2014, 10:46 PM #8
xballox
Pokemon Trainer
Originally posted by Bad
Here is another one Smile (WARNING: the keyboard will work but the ps3 will keep stuck when trying to quit the game so you will have to reset/turn off the ps3, can't fix it atm)

Header: You must login or register to view this content.
LIB: $(SCE_PS3_ROOT)\target\ppu\lib\libsysutil_stub.a

HOW TO USE IT

Simple dialog:
    
Dialog::msgdialog_mode = Dialog::MODE_STRING_OK;
Dialog::Show("Hey, this is a dialog");


a YES/NO dialog:
    
Dialog::msgdialog_mode = Dialog::MODE_STRING_YESNO;
Dialog::ShowYESNO("[NGU]: ELITE REJECTED, Want to try again?");
while(!Dialog::Finished){} //wait for it to end
bool ret = Dialog::YESNO; //if true, its YES, else its NO
Dialog::End(); //end the yes/no dialog


The keyboard(still in alpha):
    
char retText[32]; //our buffer
Keyboard:Gaspskdialog_mode = Keyboard::MODE_OPEN;
while(Keyboard:Gaspskdialog_mode != Keyboard::MODE_EXIT)
{ Keyboard::keyboard(retText, "Title", "Preset Text");} //wait for the keyboard to end and run it meanwhile


For me the keyboard isn't working, ps3 freeze :/

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo