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 

api hook

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



Joined: 04 Jul 2005
Posts: 3

PostPosted: Fri Jul 22, 2005 2:06 am    Post subject: api hook Reply with quote

As you may know there is a undocumented (without sources) api hooking loader. Beside the ilegal use of this tool, there might be a legal use as well.
I wondered if it is possible to hook the api call(s) responsible for checking wether a video is loaded from ms or disc0.

If hooked successfully there migth be a chance to increase the resolution as well as a change to the AVC codec. Sony already promotes the AVC ms solution for Firmware version 2.0. Can we do that for 1.50?

Any comments will be appreciated :-)
Back to top
View user's profile Send private message
madc



Joined: 27 Jun 2005
Posts: 17
Location: Nanking,China

PostPosted: Fri Jul 22, 2005 11:41 am    Post subject: Reply with quote

That's what I'm thinking about recently. It's possible, with the similar method of loading PRX. Then we can analyze how the APIs are called.
Back to top
View user's profile Send private message Visit poster's website
PspPet



Joined: 30 Mar 2005
Posts: 210

PostPosted: Sat Jul 23, 2005 4:03 am    Post subject: Reply with quote

Hooking and analysing the running system is a complicated issue, with many different alternatives.
One way is to hook all the calls of a program/game to the system, and provide loging (as "hooking loader" does). This is useful if you don't know what the program is doing. Legal for educational uses, but unfortunately more often used for "cracking".

This doesn't help understanding what is going on inside the system (ie. between the time the game calls a system API and when it returns).
Fortunately with the Kernel memory access, you can patch any function you want (including those in the bowels of the system). Patch it to jump to your code before and after it does the real work. Your patch can log what is going on, or muck around with the parameters.
This is often done driven by your own test program (ie. you already know what system calls are being called, you are trying to find out what the system is doing under the covers).
----
re: improving video playing
It gets more complicated -- many of the standalone feature (like movie playing, or photo viewing) are done in the "VSH" modules. They are not loaded like normal games. Other similar fake loading tricks are possible.
The video/audio codec libraries can be loaded by your program, but the interface hasn't been worked out (yet?)

That's my advice where to start: write a stand alone program that loads and plays a video (using the "sce*codec" and "sceMpeg*" system libraries). Take a gander at the VSH "msvideo_plugin.prx".

------
Bottom line: it depends on your approach. Adding new features to the core operating system can be a lot of reverse engineering work, hooking tricks, and may not be possible afterall (without reflashing -- because the way the system restarts between programs)
The other approach is to find an open-source player that does what you want, and port it directly [requires much less reverse engineering, but won't exploit the hardware as well]
BTW: CLIE owners have a similar tradeoff (using the built-in but format limited movie/audio player which is optimized to the hardware, or a 3rd party player like TCMP which is more general but less optimized)
Back to top
View user's profile Send private message Send e-mail Visit poster's website
forumimp



Joined: 04 Jul 2005
Posts: 3

PostPosted: Sat Jul 23, 2005 4:32 am    Post subject: Reply with quote

Thx for sharing your wisdom. I guess IŽll try to build my own mediaplayer first. Who knows, maybe I can contribute to the psp mediaplayer project.
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