forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

2.60 syscalls

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
jas0nuk



Joined: 27 Apr 2006
Posts: 137

PostPosted: Tue Jul 11, 2006 1:57 am    Post subject: 2.60 syscalls Reply with quote

Is there a list of 2.60 syscalls available?

Thanks in advance, although I doubt that this firmware is well-documented...
Back to top
View user's profile Send private message
groepaz



Joined: 01 Sep 2005
Posts: 305

PostPosted: Tue Jul 11, 2006 3:29 am    Post subject: Reply with quote

i dont think so...why would you want one anyway? :)
_________________
http://www.hitmen-console.org
http://hitmen.c02.at/files/yapspd/
Back to top
View user's profile Send private message Visit poster's website
jas0nuk



Joined: 27 Apr 2006
Posts: 137

PostPosted: Tue Jul 11, 2006 3:33 am    Post subject: Reply with quote

I'm trying to add some stuff to DevHook's VSHExtender which runs in emulated 2.60 (no, not ISO-related stuff :))

Thanks anyway.
Back to top
View user's profile Send private message
moonlight



Joined: 26 Oct 2005
Posts: 567

PostPosted: Tue Jul 11, 2006 3:38 am    Post subject: Reply with quote

The code i gave you the other day should work.
NIDS don't change between firmware revisions.

The only reasons why it shouldn't work is the function being removed, or the library containing the function being changed of module.
Back to top
View user's profile Send private message
jas0nuk



Joined: 27 Apr 2006
Posts: 137

PostPosted: Tue Jul 11, 2006 3:42 am    Post subject: Reply with quote

That code causes a crash. It could be that scePower_service/scePower_driver no longer applies, or the function has been entirely removed, as you said.

I will try to use asm("syscall 0x2198"); instead as this is the same function.

(btw, for anyone who doesn't know what I'm on about, I'm talking about using scePower_0442D852)
Back to top
View user's profile Send private message
moonlight



Joined: 26 Oct 2005
Posts: 567

PostPosted: Tue Jul 11, 2006 3:46 am    Post subject: Reply with quote

I have checked it. The function still exists and in the same place.
Back to top
View user's profile Send private message
jas0nuk



Joined: 27 Apr 2006
Posts: 137

PostPosted: Tue Jul 11, 2006 3:51 am    Post subject: Reply with quote

Okay, well it's definitely crashing. I'll try some more stuff :)
Back to top
View user's profile Send private message
jas0nuk



Joined: 27 Apr 2006
Posts: 137

PostPosted: Tue Jul 11, 2006 5:01 am    Post subject: Reply with quote

Tried the following:

static void reboot(int blah)
{
__asm__ volatile("syscall 0x2198");
}

When I called reboot(0); the PSP crashed.



static void reboot(int blah)
{
asm("syscall 0x2198");
}

When I called reboot(0); it ignored it.
Back to top
View user's profile Send private message
bradskins



Joined: 20 Dec 2005
Posts: 25

PostPosted: Tue Jul 11, 2006 12:57 pm    Post subject: Reply with quote

Could you forward the same info my way?

bradskins (underscore) 28@hotmail.....

thanks!
_________________
...
Back to top
View user's profile Send private message
Fanjita



Joined: 28 Sep 2005
Posts: 217

PostPosted: Tue Jul 11, 2006 6:23 pm    Post subject: Reply with quote

You can't use fixed syscall IDs on 2.5 or 2.6.

See the older thread about coding for the GTA exploit, but basically there's a random offset applied to the syscall ID (not entirely sure when it changes, probably at each reboot).

You need to find some way of calibrating the syscall IDs. The typical way is to find the link table in some preloaded module elsewhere in RAM, and to determine the ID of a known NID from there.

BTW there's a simple syscall list in that thread, with all the syscalls that are used by GTA.
_________________
Got a v2.0-v2.80 firmware PSP? Download the eLoader here to run homebrew on it!
The PSP Homebrew Database needs you!
Back to top
View user's profile Send private message
jas0nuk



Joined: 27 Apr 2006
Posts: 137

PostPosted: Sun Jul 16, 2006 11:52 pm    Post subject: Reply with quote

Thanks for the list. BTW, this code is to be used within a PRX which is loaded by DevHook on top of the 2.60/2.71 VSH, so we're in kernel mode and not restrained by the GTA eLoader environment :)

After looking at the list I realised that the syscall for the scePower_0442D852 function is 0x2197 and not 0x2198.. I must have been looking at the wrong row :/

Anyway, I changed my code to
Code:
__asm__ volatile("syscall 0x2197");
yet it still crashes.

However, scePower_0442D852 needs to be called as "scePower_0442D852(0);" but I'm not sure how to do this using inline asm.

Hope someone can help me with this :s
Back to top
View user's profile Send private message
Fanjita



Joined: 28 Sep 2005
Posts: 217

PostPosted: Mon Jul 31, 2006 5:02 am    Post subject: Reply with quote

If you're in kernel mode then you can use a kernel mode function (sorry, I forget the name, I've never used it personally) to retrieve the syscall ID for a given NID.

On 2.5+, the syscalls are not constant - so as I said before, you can't rely on using a fixed syscall number every time.
_________________
Got a v2.0-v2.80 firmware PSP? Download the eLoader here to run homebrew on it!
The PSP Homebrew Database needs you!
Back to top
View user's profile Send private message
PspPet



Joined: 30 Mar 2005
Posts: 210

PostPosted: Wed Aug 02, 2006 2:14 am    Post subject: Reply with quote

sceKernelQuerySystemCall and related sceKernelRegisterSystemCallTable

IIRC 'sceKernelQuerySystemCall' takes a pointer to the real function in (kernel) memory
Anyway not very useful in most cases for the reasons stated.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Fanjita



Joined: 28 Sep 2005
Posts: 217

PostPosted: Wed Aug 02, 2006 5:02 am    Post subject: Reply with quote

PspPet wrote:
sceKernelQuerySystemCall and related sceKernelRegisterSystemCallTable

IIRC 'sceKernelQuerySystemCall' takes a pointer to the real function in (kernel) memory
Anyway not very useful in most cases for the reasons stated.


Hmm, that's unfortunate, I was hoping to look into using that function at some point in the near future.

Still, I guess it's possible to RE the table in kmem and retrieve the syscall from there. Or perhaps to use QueryModuleInfo to look through the export info of the module concerned.
_________________
Got a v2.0-v2.80 firmware PSP? Download the eLoader here to run homebrew on it!
The PSP Homebrew Database needs you!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group