The above video goes away if you are a member and logged in, so log in now!

 Would you like to get all the newest Gaming News fromQJ.NET in your email each day? Want to learn more about the team who brings you the QJ news?

This is a discussion on C/C++ Programming Help Thread within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; i know, any assembly tutorials tho, not reversing ones... anyways is that output from prxtool right? ~!SlasheR!~...

 Tweet
1. i know, any assembly tutorials tho, not reversing ones...

anyways is that output from prxtool right?

~!SlasheR!~

2. Originally Posted by slasher2661996
i know, any assembly tutorials tho, not reversing ones...

anyways is that output from prxtool right?

~!SlasheR!~
There are a number of outputs.

Off the top of my head, the main ones for reversing are

--elfout your_.prx > your_.elf

and

-w your_.prx > your_.xml

the -w is mainly for people like me who don't have any good mips disassemblers, while elf works best with people who can use things like ps2dis.

3. Originally Posted by NoEffex
There are a number of outputs.

Off the top of my head, the main ones for reversing are

--elfout your_.prx > your_.elf

and

-w your_.prx > your_.xml

the -w is mainly for people like me who don't have any good mips disassemblers, while elf works best with people who can use things like ps2dis.
whats the best mips desassembler?

~!SlasheR!~

4. Originally Posted by slasher2661996
whats the best mips desassembler?

~!SlasheR!~
I prefer ps2dis, but it uses some weird syntax on occasion. I don't know the best, as that's what I used for forever before I took up C.

could u post one plz

~!SlasheR!~

6. it says its only for ps1 & ps2
can i still use it 4 psp ?

~!SlasheR!~

7. Originally Posted by slasher2661996
it says its only for ps1 & ps2
can i still use it 4 psp ?

~!SlasheR!~
Yes, they pretty much have the same processor. I used it all the time successfully making game ram patches.

8. so ive got the *.elf from my *.prx that i coded,

now what do i look 4 if i want to change something in it,

~!SlasheR!~

9. Originally Posted by slasher2661996
so ive got the *.elf from my *.prx that i coded,

now what do i look 4 if i want to change something in it,

~!SlasheR!~
You read it and use asm knowledge to write a C/C++/D/Etc program out of it.

10. i want to patch it so it changes "Hello World" to "Hello something"

can i do that?

~!SlasheR!~

11. Originally Posted by slasher2661996
i want to patch it so it changes "Hello World" to "Hello something"

can i do that?

~!SlasheR!~
You generally don't need to convert it to elf to do that, you'd just need to use a hex editor, and make sure it's in overwrite mode, not insert.

It's what ps3news did to everyone way back, he changed the credits on everything.

Anyhow, I don't think this little topic is really C/C++ help anymore, so I think we should get back to that :).

12. is it possible to allign text to the right

13. %[-][+][0-9][.0-9][lL][dxXuofeEgGcs]
|| | | | | |
|| | | | | +- format char, see below
|| | | | +----- long modifier, ignored
|| | | +----------- decimals
|| | +---------------- field length
|| +------------------- plus sign
|+---------------------- leftalign
+----------------------- percent sign, starts format specifier

• The percent sign always starts the format specifiert. Two consecutive %'s could be used to literally generate a single %
• A "-" aligns output left (usually, it's right-aligned).
• A "+" outputs a plus sign for positive numbers (usually, it is suppressed).
• The field length specifies the overall field length. If the formatted value is shorter, it will be padded with blanks, if it longer, it will remain unchanged.
• The number of decimals specifies the length of the fractional part for
• "d": integer value in decimal format.
• "x": integer value in hexadecimal format (letters in lowercase).
• "X": integer value in hexadecimal format (letters in uppercase).
• "u": absolute integer value in decimal format. Result will always be positive.
• "o": integer value in octal format.
• "f": floating point value in fixed format (xxx.yyyyyy).
• "e": floating point value in scientific format (0.yyyyyye+zzz).
• "E": floating point value in scientific format (0.yyyyyyE+zzz).
• "g": same as "f" for absolute values not smaller than 0.001 and not greater or equal than 1000. Otherwise, same as "e".
• "G": same as "f" for absolute values not smaller than 0.001 and not greater or equal than 1000. Otherwise, same as "E".
• "c": single character.
• "s": String.

14. Originally Posted by vodkkaa
is it possible to allign text to the right
Yes, it definitely is.

(We'll need a little more information to tell you how to do it)

15. I just realised that i cant just fcopy from ms0:/ to flash0:/

Soo how do i go about putting files from the ms0: to the f0.

16. How would I go about building a makefile to compile an entire project spread over multiple modules? Sort of like:

Compile module 1.
Build exports for module 1.
Compile module 2.
Build exports for module 2.
Compile main app.
Move main app to folder "app".
Move modules 1 and 2 to "app/modules".
Leave a nice message for the hell of it

Would it also redo the exports every cycle (as there doesn't appear to be any checking on export building), in which case should I do something like:

Code:
make release:
#build entire project and build release folder

make project:
#build entire project

make modules:
#build only the modules

make main:
#build only the main

make exports:
#Re-create all exports
-Aura

EDIT:
@BlackBurd:

Write your own copying function, its what I had to do for Project4, simply open the file on ms0:/ and create the file on flash0:/ then malloc about a mb, and stream the content from ms0:/ to flash0:/

17. Auraomega, something along the lines of this.

Code:
all:     src-folder/project.prx src-folderB/eboot.pbp
mkdir -p release
cp src-folder/project.prx release/project
cp src-folder/eboot.pbp release/project
prx:
make -C src-folder -f makefile_prx

eboot:
make -C src-folder -f makefile_pbp

clean:
make -C src-folder clean

echo "all done, Have fun."

18. tinmanx, my makefile knowledge is limited to single builds, but from what I can see that calls on other makefiles as well (correct me if I'm wrong)? I'm looking for a way to keep everything in a single makefile, if this is the only method available then I'll use this by all means, but it would be nice to only have to change 1 file if instead of 2 (,or 3, or more).

Thanks again.
-Aura

19. I have a problem to hook sceKernelExitVSHVSH.
My code doesn't work.
Code:
int patchexit()
{
if(sceKernelFindModuleByName("Recovery mode"))
{
sctrlHENPatchSyscall(patch , exit);
sceKernelDcacheWritebackAll();
sceKernelIcacheClearAll();
}
}

I hope you can help me
TN

20. Yeah, Kernel->kernel doesn't use syscalls, they jump directly.

21. How do I make it?
Thanks
TN

22. Press Alt + F4

23. Originally Posted by Total_Noob
How do I make it?
Thanks
TN
By hooking it. There is too many ways you can. You patch imports, exports, the function itself, etc.

24. Originally Posted by Davee
By hooking it. There is too many ways you can. You patch imports, exports, the function itself, etc.
ive looked at the SDK docs, but cant find anything about patching things,

any help?

~!SlasheR!~

25. Originally Posted by Total_Noob
I have a problem to hook sceKernelExitVSHVSH.
My code doesn't work.
Code:
int patchexit()
{
if(sceKernelFindModuleByName("Recovery mode"))
{
sctrlHENPatchSyscall(patch , exit);
sceKernelDcacheWritebackAll();
sceKernelIcacheClearAll();
}
}

I hope you can help me
TN
I don't think recovery mode is the name of the module.

Also, on the 4.01 SDK, it looks like you have to add "&" before exit, ex.

sctrlHENPatchSyscall(patc h, &exit);

It's not in the SDK docs, and not on google(I looked), so I thought I'd be nice.

26. Originally Posted by NoEffex
I don't think recovery mode is the name of the module.

Also, on the 4.01 SDK, it looks like you have to add "&" before exit, ex.

sctrlHENPatchSyscall(patc h, &exit);

It's not in the SDK docs, and not on google(I looked), so I thought I'd be nice.
He is trying to patch a kernel->kernel syscall, which doesn't exist. Syscalls are used for usermode to call a function that resides in kernel memory. The information for these syscalls is stored in vector memory, where they are changed by sctrlHENPatchSyscall to redirect to another function. That's why when you call the same function in your kernel app, it works correctly; as it is not linked by syscall but by a direct jump.

You won't find patching in the SDK and if you do, it will be outdated.

27. Except that recovery is usermode, and that that function is only exported to kernel mode. Hence, it isn't even importing that function at all. It imports the bridged function contained in SystemControl, sctrlKernelExitVSHVSH. You should be able to syscall patch that one.

28. really?, i learn something everday!

~!SlasheR!~

29. whats the function to hard reset??

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•

All times are GMT -8. The time now is 12:50 AM.

Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY