Forum: PS2 Homebrew/Dev & Emu Scene - Topics relating to homebrew PS2 development and emulation. Stay current and up to date on the latest homebrew releases from the best devs on the scene.


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




 
Would you like to get all the new info from
PSX-Scene in your email each day?




Want to learn more about the team keeping you up to date with the latest scene news?

Read about them now!

Check out our Developer bios, too!

 


User Tag List

Thread: AUDSRV from cdrom problem.
  

Results 1 to 6 of 6
  1. #1 AUDSRV from cdrom problem. 
    OzzyyzzO is offline Registered User
    Join Date
    Nov 2010
    Posts
    3
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    0
    Likes Received
    0
    Hello,

    I'm working on a homebrew which will boot as an iso.

    Using SifLoadModule(..) i'm unable to load properly the AUDSRV.IRX (which is located into the CD root directory.

    i've tried many combinations ->

    SifLoadModule("cdrom0:/AUDSRV.IRX"
    SifLoadModule("cdrom0:AUDSRV.IRX"
    SifLoadModule("cdrom0:\AUDSRV.IRX"
    SifLoadModule("cdrom:AUDSRV.IRX"

    etc..

    Please note that the elf and other data files are opened and read properly.
    moreover i have only seen examples using host:audsrv .. any limitation?

    thx for any help / hint
    Last edited by OzzyyzzO; 11-21-2010 at 08:15 AM.
    Reply With Quote  

  2. #2  
    belek666 is online now Member
    Join Date
    Apr 2008
    Posts
    53
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    0
    Likes Received
    11
    Hi
    Just use these functions before loading irx from cd:

    sbv_patch_enable_lmb();
    sbv_patch_disable_prefix_check();

    from sbv_patches.h and add -lpatches to makefile
    Reply With Quote  

  3. #3  
    SP193's Avatar
    SP193 is offline The fallen spartan...
    Join Date
    May 2009
    Location
    シンガポール
    Posts
    1,950
    Downloads
    0
    Uploads
    0
    Mentioned
    14 Post(s)
    Tagged
    3 Thread(s)
    Likes Given
    33
    Likes Received
    209
    Quote Originally Posted by belek666 View Post
    Hi
    Just use these functions before loading irx from cd:

    sbv_patch_enable_lmb();
    sbv_patch_disable_prefix_check();

    from sbv_patches.h and add -lpatches to makefile
    No.

    Functions:

    sbv_patch_enable_lmb() <- Enables "LoadModuleBuffer()" on the RPC server
    sbv_patch_disable_prefix_check() <- Disables the check that prevents the loading of IRX modules from certain locations (E.g. a Memory Card).

    Loading modules from rom0: and cdrom: should work without any patches.

    Quote Originally Posted by OzzyyzzO
    Hello,

    I'm working on a homebrew which will boot as an iso.

    Using SifLoadModule(..) i'm unable to load properly the AUDSRV.IRX (which is located into the CD root directory.

    i've tried many combinations ->

    SifLoadModule("cdrom0:/AUDSRV.IRX"
    SifLoadModule("cdrom0:AUDSRV.IRX"
    SifLoadModule("cdrom0:\AUDSRV.IRX"
    SifLoadModule("cdrom:AUDSRV.IRX"

    etc..

    Please note that the elf and other data files are opened and read properly.
    moreover i have only seen examples using host:audsrv .. any limitation?

    thx for any help / hint
    Did you load LIBSD before use? It seems like FREESD might not work.... so you might want to try to load rom0:LIBSD instead if your console has it (Only the SCPH-10000 and SCPH-15000 consoles lack this).
    I don't know much about AUDSRV because I haven't really worked with it a lot.

    It should be like this:

    SifLoadModule("cdrom0:AUDSRV.IRX;1", <argc and argv>);

    Please take note that the path is case sensitive.

    What's the return value of SifLoadModule()?
    Did you reset the IOP before loading any modules?
    Last edited by SP193; 11-21-2010 at 06:13 AM.
    Unmodified SCPH-77006 with SM 3.6
    SCPH-39006 with M-chip modchip, SCPH-10281 NA and refurb Seagate 80GB HDD
    SCPH-10000 v1.00 with SCPH-10190 PCMCIA NA and SCPH-20400 HDD unit
    PS2ESDL v0.823B

    やっほー 汗がひかる♪
    Reply With Quote  

  4. #4  
    OzzyyzzO is offline Registered User
    Join Date
    Nov 2010
    Posts
    3
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    0
    Likes Received
    0
    I need audsrv or freesd to initialise ps2 mikmod driver from evilo.

    Here are the modules that are successfully opened at the very begining of my prg:

    SifInitRpc(0);

    SifLoadModule("rom0:SIO2MAN", 0, NULL);
    SifLoadModule("rom0:PADMAN", 0, NULL);

    later from the spu init of the mikmod driver:

    static int spu2_init()
    {
    int error;

    #ifdef USE_FREESD
    // load freesd (libsd replacement)
    error = SifLoadModule("cdrom0:FREESD.IRX", 0, NULL);
    if (error < 0){
    printf("libmikmod: Failed to open FREESD module %d,error");
    return -1;
    }
    #else
    error = SifLoadModule("rom0:LIBSD", 0, NULL);
    if (error < 0)
    {
    printf("libmikmod: Failed to open LIBSD module");
    return -1;
    }


    //sbv_patch_enable_lmb();
    //sbv_patch_disable_prefix_check();

    error = SifLoadModule("cdrom0:AUDSRV.IRX", 0, NULL);
    if (error < 0){
    printf("libmikmod: Failed to open AUDSRV module err:%d",error);
    return -1;
    }

    // init audsrv
    audsrv_init();
    #endif

    return 0;
    }

    ;--------------------
    The results:

    sbv_patch functions doesn't help.
    irx loaded from rom0 are sucessfully opened, in case we are using audsrv, rom0:LIBSD can be opened properly.


    every other irx located into the CD root directoy (as is) are returning error: -203. (FREESD.IRX, AUDSRV.IRX)

    Of course, i 've again tried other combinations like cdrom0:AUDSRV.IRX;1 or whatever i get the same error. I must be missing something really silly somewhere..?

    below the output log from pcsx2:

    PlayStation 2 ======== Hard reset boot
    ROMGEN=2002-0207, IOP info (CPUID=1f, CACH_CONFIG=0, 2MB, IOP mode)
    <20020207-164243,ROMconf,PS20160AC20020207.bin:11552>
    (IsoFS) Block 0x10: Primary partition info.
    (SYSTEM.CNF) Detected PS2 Disc = cdrom0:\TEST.ELF;1
    (SYSTEM.CNF) Software version = 1.0
    (SYSTEM.CNF) Disc region type = PAL
    (IsoFS) Block 0x10: Primary partition info.
    Initializing Elf: 2470800 bytes
    ELF (cdrom0:\TEST.ELF;1) CRC=0x50E5C32E, EntryPoint=0x001000E0
    (IsoFS) Block 0x10: Primary partition info.
    (SYSTEM.CNF) Detected PS2 Disc = cdrom0:\TEST.ELF;1
    (SYSTEM.CNF) Software version = 1.0
    (SYSTEM.CNF) Disc region type = PAL


    IOP Realtime Kernel Ver.0.9.1

    Copyright 1999 (C) Sony Computer Entertainment Inc.

    Reboot service module.(99/11/10)
    cdvd driver module version 0.1.1 (C)SCEI
    Load File service.(99/11/05)
    Multi Threaded Fileio module.(99/11/15)
    iop heap service (99/11/03)
    loadelf: fname cdrom0:¥TEST.ELF;1 secname all
    loadelf version 3.30
    Input ELF format filename = cdrom0:¥TEST.ELF;1
    0 00100000 00258728 ......................................
    Loaded, cdrom0:¥TEST.ELF;1
    start address 0x1000e0
    gp address 00000000
    read/write allocate memory 4000

    loadmodule: fname rom0:SIO2MAN args 0 arg
    loadmodule: id 25, ret 0
    loadmodule: fname rom0:PADMAN args 0 arg
    Pad driver. (99/11/22)
    loadmodule: id 26, ret 0

    SETUP PATHopen name cdrom0:¥ARKRITZ.INI flag 1 data 41378
    open fd = 2
    DAT File : RESOURCE.DATopen name cdrom0:¥RESOURCE.DAT flag 1 data 41378
    open fd = 2
    OK

    INIT LANG
    INIT VSYNC
    loadmodule: fname rom0:LIBSD args 0 arg
    loadmodule: id 27, ret 0
    loadmodule: fname cdrom0:AUDSRV.IRX args 0 arg
    open fail name AUDSRV.IRX;1
    loadmodule: id -203, ret 0
    libmikmod: Failed to open AUDSRV module err:-203
    Reply With Quote  

  5. #5  
    SP193's Avatar
    SP193 is offline The fallen spartan...
    Join Date
    May 2009
    Location
    シンガポール
    Posts
    1,950
    Downloads
    0
    Uploads
    0
    Mentioned
    14 Post(s)
    Tagged
    3 Thread(s)
    Likes Given
    33
    Likes Received
    209
    Quote Originally Posted by OzzyyzzO View Post
    I need audsrv or freesd to initialise ps2 mikmod driver from evilo.

    Here are the modules that are successfully opened at the very begining of my prg:

    SifInitRpc(0);

    SifLoadModule("rom0:SIO2MAN", 0, NULL);
    SifLoadModule("rom0:PADMAN", 0, NULL);
    You might want to reset the IOP, and initialize the SIF services properly before loading any modules by using something like these lines:

    Code:
    SifIopReset(NULL, 0);
    while(!SifIopSync()){};
    
    SifInitRpc(0);
    SifInitIopHeap();
    SifLoadFileInit();
    fioInit(); /* Only needed if you use fio*() functions. */
    every other irx located into the CD root directoy (as is) are returning error: -203. (FREESD.IRX, AUDSRV.IRX)
    That's the SCE error code for "File not found".

    Of course, i 've again tried other combinations like cdrom0:AUDSRV.IRX;1 or whatever i get the same error. I must be missing something really silly somewhere..?
    You could access other files on the disc right?
    I know that you've already tried several variations of the file name, but have you tried this: "cdrom0:\\AUDSRV.IRX;1"?

    The double backslashes once tricked me too (The backslash character in C is an escape character).
    Unmodified SCPH-77006 with SM 3.6
    SCPH-39006 with M-chip modchip, SCPH-10281 NA and refurb Seagate 80GB HDD
    SCPH-10000 v1.00 with SCPH-10190 PCMCIA NA and SCPH-20400 HDD unit
    PS2ESDL v0.823B

    やっほー 汗がひかる♪
    Reply With Quote  

  6. #6  
    OzzyyzzO is offline Registered User
    Join Date
    Nov 2010
    Posts
    3
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    0
    Likes Received
    0
    audsrv: greetings from version 0.90 !

    Thank you very much guys!

    Thus the trick was the double \\ as SifLoadModule("cdrom0:\\AUDSRV.IRX", 0, NULL); is just working fine.

    Even if it wasn't helpful in my case I'll keep the IOP & SIF services reset sequence but hey, it's completely voodoo to me ^^
    Reply With Quote  

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