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 

Stub syntax

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



Joined: 29 Sep 2005
Posts: 339

PostPosted: Tue Jan 30, 2007 11:52 pm    Post subject: Stub syntax Reply with quote

My 3.03OE app requires network and avc support and I linked it with sceUtility.S which looks like:
Code:
   .set noreorder

#include "pspstub.s"

    STUB_START  "sceUtility",0x40010000,0x00010005
    STUB_FUNC   0x1579A159,sceUtilityLoadNetModule
    STUB_FUNC   0xC629AF26,sceUtilityLoadAvModule
    STUB_END


Network works fine, but avc_open() fails ("sceMpegInit failed"). I found the solution by linking to two separate files sceUtility1.S and sceUtility2.S. In that case both network and avc work fine.

sceUtility1.S:
Code:
   .set noreorder

#include "pspstub.s"

    STUB_START  "sceUtility",0x40010000,0x00010005
    STUB_FUNC   0x1579A159,sceUtilityLoadNetModule
    STUB_END


sceUtility2.S:
Code:
  .set noreorder

#include "pspstub.s"

    STUB_START  "sceUtility",0x40010000,0x00010005
    STUB_FUNC   0xC629AF26,sceUtilityLoadAvModule
    STUB_END


My question is, what's wrong with the combined file sceUtility.S ?
Back to top
View user's profile Send private message
0okm0000



Joined: 13 Jan 2006
Posts: 116

PostPosted: Wed Jan 31, 2007 1:50 am    Post subject: Reply with quote

Code:
   .set noreorder

#include "pspstub.s"

    STUB_START  "sceUtility",0x40010000,0x00020005
    STUB_FUNC   0x1579A159,sceUtilityLoadNetModule
    STUB_FUNC   0xC629AF26,sceUtilityLoadAvModule
    STUB_END


STUB_START name, flag*0x10000, nums*0x10000+type
:)
_________________
PSP hardware hack
http://0okm.blogspot.com/
Back to top
View user's profile Send private message Visit poster's website
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