Stub syntax

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
jockyw2001
Posts: 339
Joined: Thu Sep 29, 2005 4:19 pm

Stub syntax

Post by jockyw2001 »

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

Code: Select all

   .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: Select all

   .set noreorder 

#include "pspstub.s" 

    STUB_START  "sceUtility",0x40010000,0x00010005 
    STUB_FUNC   0x1579A159,sceUtilityLoadNetModule 
    STUB_END
sceUtility2.S:

Code: Select all

  .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 ?
User avatar
0okm0000
Posts: 116
Joined: Fri Jan 13, 2006 9:51 am
Contact:

Post by 0okm0000 »

Code: Select all

   .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/
Post Reply