Seite 283 von 340 ErsteErste ... 183 233 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 333 ... LetzteLetzte
Zeige Ergebnis 8.461 bis 8.490 von 10174

C/C++ Programming Help Thread

This is a discussion on C/C++ Programming Help Thread within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; Sry, pspflashsystem. I cannot help you on that. For I have my own question: Ok, I downloaded Super Patrick II ...

  
  1. #8461
    QJ Gamer Bronze
    Points: 3.830, Level: 39
    Level completed: 20%, Points required for next Level: 120
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    12
    Points
    3.830
    Level
    39
    My Mood
    Psychedelic
    Downloads
    0
    Uploads
    0

    Standard ...

    Sry, pspflashsystem. I cannot help you on that. For I have my own question:

    Ok, I downloaded Super Patrick II from here: http://oslib.palib.info/samples/

    I am sorta new but not really to the whole C/C++ Dev thing.
    Anyway I have compiled my own C programs using OSLib, under the same settings I'm using now.


    This is what I get when I try to compile Super Patrick II:
    Zitat Zitat von The "Super Patrick II" sample
    psp-gcc -I. -IC:/pspdev/psp/sdk/include -G0 -Wall -O2 -L. -LC:/pspdev/psp/sdk/
    lib main.o -losl -lmikmod -lpng -lz -lpspsdk -lpspctrl -lpspumd -lpsprtc -lpsp
    power -lpspgu -lpspaudiolib -lpspaudio -lm -lpspmpeg -lpspaudiocodec -lpspdebug
    -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apct
    l -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o maps.elf
    C:/pspdev/psp/sdk/lib/libosl.a(media.o): In function `oslLoadSoundFileAT3':
    audio/media.c:404: undefined reference to `sceAudiocodecCheckNeedMe m'
    audio/media.c:377: undefined reference to `sceAudiocodecCheckNeedMe m'
    C:/pspdev/psp/sdk/lib/libosl.a(media.o): In function `osl_mp3Load':
    audio/media.c:266: undefined reference to `sceAudiocodecCheckNeedMe m'
    C:/pspdev/psp/sdk/lib/libosl.a(media.o): In function `initME':
    audio/media.c:172: undefined reference to `sceUtilityLoadAvModule'
    collect2: ld returned 1 exit status
    make: *** [maps.elf] Error 1
    The above is a C++ program, if that matters.

    I now tryed to compile the other samples and here are the results:
    Zitat Zitat von The "Sprite sample"
    psp-gcc -I. -IC:/pspdev/psp/sdk/include -G4 -Wall -O2 -c -o main.o main.c
    psp-gcc -I. -IC:/pspdev/psp/sdk/include -G4 -Wall -O2 -L. -LC:/pspdev/psp/sdk/
    lib main.o -losl -lpng -lz -lpspsdk -lpspctrl -lpspumd -lpsprtc -lpsppower -lp
    spgu -lpspaudiolib -lpspaudio -lm -lpspdebug -lpspdisplay -lpspge -lpspctrl -lps
    psdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -l
    pspuser -lpspkernel -o sprite.elf
    psp-fixup-imports sprite.elf
    mksfo 'Sprite Sample' PARAM.SFO
    psp-strip sprite.elf -o strip_sprite.elf
    pack-pbp EBOOT.PBP PARAM.SFO ICON0.png \
    NULL NULL NULL \
    NULL strip_sprite.elf NULL
    rm -f strip_sprite.elf
    The above was a success.
    Zitat Zitat von The "Maps and sound sample"
    psp-gcc -I. -IC:/pspdev/psp/sdk/include -G4 -Wall -O2 -c -o main.o main.c
    psp-gcc -I. -IC:/pspdev/psp/sdk/include -G4 -Wall -O2 -L. -LC:/pspdev/psp/sdk/
    lib main.o -losl -lpng -lz -lpspsdk -lpspctrl -lpspumd -lpsprtc -lpsppower -lp
    spgu -lpspaudiolib -lpspaudio -lm -lpspdebug -lpspdisplay -lpspge -lpspctrl -lps
    psdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -l
    pspuser -lpspkernel -o maps.elf
    main.o: In function `Keys':
    main.c:(.text+0x1b8): relocation truncated to fit: R_MIPS_GPREL16 against `key'
    main.o: In function `main':
    main.c:(.text+0x928): relocation truncated to fit: R_MIPS_GPREL16 against `key'
    collect2: ld returned 1 exit status
    make: *** [maps.elf] Error 1
    The above says something I don't really understand.
    Zitat Zitat von The "OSLib splash screen" sample
    psp-gcc -I. -IC:/pspdev/psp/sdk/include -G0 -Wall -O2 -c -o main.o main.c
    psp-gcc -I. -IC:/pspdev/psp/sdk/include -G0 -Wall -O2 -c -o logo.o logo.c
    logo.c: In function 'logoCreeImageFond':
    logo.c(31) : warning: pointer targets in assignment differ in signedness
    psp-gcc -I. -IC:/pspdev/psp/sdk/include -G0 -Wall -O2 -L. -LC:/pspdev/psp/sdk/l
    ib main.o logo.o -losl -lpng -lz -lpspsdk -lpspctrl -lpspumd -lpsprtc -lpsppow
    er -lpspgu -lpspaudiolib -lpspaudio -lm -lpspdebug -lpspdisplay -lpspge -lpspctr
    l -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputil
    ity -lpspuser -lpspkernel -o test.elf
    psp-fixup-imports test.elf
    mksfo 'OSLib splash screen' PARAM.SFO
    psp-strip test.elf -o strip_test.elf
    pack-pbp EBOOT.PBP PARAM.SFO ICON0.png \
    NULL NULL NULL \
    NULL strip_test.elf NULL
    rm -f strip_test.elf
    The above gave a warning but, did compile.

    Any help would be greatly appreciated.
    Thanks for reading this.


    Geändert von CT_Bolt (04-24-2008 um 11:24 AM Uhr)

  2. #8462
    QJ Gamer Silver
    Points: 10.263, Level: 67
    Level completed: 54%, Points required for next Level: 187
    Overall activity: 0%

    Registriert seit
    Jun 2006
    Ort
    UK
    Beiträge
    2.326
    Points
    10.263
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    Super Patrick II: Missing a library / libraries in the wrong order.
    Maps and sound sample: I have to look at the source for the answer, I am guessing bad alignment or cast?
    OSLib splash screen: Need to the see the warning and the code that it is referring to.

    The code for OSLib and the samples are not great and have some seriously bad coding practises that would work in C(?) but not in C++. For the PC port I had to fix a lot of the headers to get it to even compile which was a pain.

  3. #8463
    QJ Gamer Bronze
    Points: 3.830, Level: 39
    Level completed: 20%, Points required for next Level: 120
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    12
    Points
    3.830
    Level
    39
    My Mood
    Psychedelic
    Downloads
    0
    Uploads
    0

    Cool ok

    Oh ok... so OSLib is not that great for coding.

    Could you show me some good places & examples on how to start coding a 2D Game from scratch with out using OSLib? Coding in C.
    Like how to use graphics(*.png), sounds(*.wav), & music(*.mp3).

    Thanks for the reply.

    PS. How would I fix the order of the libraries or update them?
    I currently am using a single pspdev folder with the sdk inside (C:/pspdev/psp/sdk).
    Geändert von CT_Bolt (04-24-2008 um 04:54 PM Uhr)

  4. #8464
    Developer
    Points: 7.577, Level: 58
    Level completed: 14%, Points required for next Level: 173
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Beiträge
    1.026
    Points
    7.577
    Level
    58
    Downloads
    0
    Uploads
    0

    Standard

    Super Patrick II: Update your SDK, you're missing libpspaudiocodec and newer updates to libpsputility.

    Maps and sound sample: Change the -G4 in your CFLAGS line in the makefile to -G0.

    Check out my homebrew & C tutorials at http://insomniac.0x89.org/
    Coder formerly known as Insomniac197

    tshirtz: what is irshell ??
    Atarian_: it's where people who work for the IRS go when they die

  5. #8465
    QJ Gamer Silver
    Points: 10.263, Level: 67
    Level completed: 54%, Points required for next Level: 187
    Overall activity: 0%

    Registriert seit
    Jun 2006
    Ort
    UK
    Beiträge
    2.326
    Points
    10.263
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von CT_Bolt
    Oh ok... so OSLib is not that great for coding.
    It isn't bad, I have seen much worse APIs/libraries that you can use. Just be wary that it is heavily C based.

  6. #8466
    QJ Gamer Bronze
    Points: 3.830, Level: 39
    Level completed: 20%, Points required for next Level: 120
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    12
    Points
    3.830
    Level
    39
    My Mood
    Psychedelic
    Downloads
    0
    Uploads
    0

    Cool Ok...

    Thank you both for replying. I'll try to figure out how to update it.
    Oh I C so it's mostly for C, that's great for me. Cuz that's what I use (for psp, I do C++ on the PC.).

    You guy's(yaustar, Insert_Witty_Name) rule!

    Edit:
    I tryed to compile Maps & Sound Sample after changing G4 to G0 and...
    Zitat Zitat von Maps & Sound sample
    psp-gcc -I. -IC:/pspdev/psp/sdk/include -G0 -Wall -O2 -L. -LC:/pspdev/psp/sdk/l
    ib main.o -losl -lpng -lz -lpspsdk -lpspctrl -lpspumd -lpsprtc -lpsppower -lps
    pgu -lpspaudiolib -lpspaudio -lm -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpsp
    sdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lp
    spuser -lpspkernel -o Map.elf
    main.o: In function `Keys':
    main.c:(.text+0x1b8): relocation truncated to fit: R_MIPS_GPREL16 against `key'
    main.o: In function `main':
    main.c:(.text+0x928): relocation truncated to fit: R_MIPS_GPREL16 against `key'
    collect2: ld returned 1 exit status
    make: *** [Map.elf] Error 1
    Geändert von CT_Bolt (04-25-2008 um 10:27 AM Uhr)

  7. #8467
    QJ Gamer Silver
    Points: 10.921, Level: 69
    Level completed: 18%, Points required for next Level: 329
    Overall activity: 0%

    Registriert seit
    May 2006
    Ort
    Behind you.
    Beiträge
    1.814
    Points
    10.921
    Level
    69
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von yaustar
    It isn't bad, I have seen much worse APIs/libraries that you can use. Just be wary that it is heavily C based.
    Yes...it is heavily C based, but not everyone codes in C++...don't make assumptions now.
    Calypso - Enjoy the excellent 2D space shooter:
    http://dl.qj.net/Calypso-v1-PSP-Home...6542/catid/195

    "Quoting yourself in your signature means you love to masterbate while looking at the mirror." -me (oh, wait...)

  8. #8468
    lol
    Points: 20.859, Level: 91
    Level completed: 2%, Points required for next Level: 491
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    Whittier, CA
    Beiträge
    5.791
    Points
    20.859
    Level
    91
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von SuperBatXS
    Yes...it is heavily C based, but not everyone codes in C++...don't make assumptions now.
    He wasn't.

  9. #8469
    words are stones in my <3
    Points: 35.274, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    Spokane
    Beiträge
    5.008
    Points
    35.274
    Level
    100
    My Mood
    Lonely
    Downloads
    1
    Uploads
    0

    Standard

    Zitat Zitat von SuperBatXS
    Yes...it is heavily C based, but not everyone codes in C++...don't make assumptions now.
    Hypocrite?

    ...at what speed must I live.. to be able to see you again?...

    Projects

    You can support my Open World 3D RPG for PSP by voting for it here


  10. #8470
    QJ Gamer Bronze
    Points: 3.830, Level: 39
    Level completed: 20%, Points required for next Level: 120
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    12
    Points
    3.830
    Level
    39
    My Mood
    Psychedelic
    Downloads
    0
    Uploads
    0

    Cool ...

    Hahaha yeah... he kinda was being a hypocrite.

    Anyway... c'mon people plz tell me how to update my sdk. An easy way perferably.

    Again heres a lil' info on the way I code:
    I'm using a single pspdev folder with the sdk inside (C:/pspdev/psp/sdk).

  11. #8471
    QJ Gamer Bronze
    Points: 5.402, Level: 47
    Level completed: 26%, Points required for next Level: 148
    Overall activity: 0%

    Registriert seit
    Apr 2007
    Beiträge
    468
    Points
    5.402
    Level
    47
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von CT_Bolt
    Anyway... c'mon people plz tell me how to update my sdk. An easy way perferably.

    Again heres a lil' info on the way I code:
    I'm using a single pspdev folder with the sdk inside (C:/pspdev/psp/sdk).
    uninstall it and install this newer version
    http://sourceforge.net/project/showf...roup_id=223830

  12. #8472
    QJ Gamer Bronze
    Points: 3.830, Level: 39
    Level completed: 20%, Points required for next Level: 120
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    12
    Points
    3.830
    Level
    39
    My Mood
    Psychedelic
    Downloads
    0
    Uploads
    0

    Cool Thanx.

    Hey, thank you brethren. I will try this. Let'cha know how it goes when it's done. Again many thanks for replying. :Punk:

  13. #8473
    QJ Gamer Gold
    Points: 17.453, Level: 84
    Level completed: 21%, Points required for next Level: 397
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    everywhere
    Beiträge
    3.526
    Points
    17.453
    Level
    84
    Downloads
    1
    Uploads
    0

    Standard

    hey everone got a question with the oslib, i'm trying to load in mp3's and i'm following the Super Patrick II sample, and i've even attempted to compile the sample and it gives me back the same error:

    Code:
    /usr/local/pspdev/psp/sdk/lib/libosl.a(media.o): In function `oslLoadSoundFileAT
    3':
    audio/media.c:285: undefined reference to `sceAudiocodecCheckNeedMem'
    audio/media.c:258: undefined reference to `sceAudiocodecCheckNeedMem'
    /usr/local/pspdev/psp/sdk/lib/libosl.a(media.o): In function `osl_mp3Load':
    audio/media.c:149: undefined reference to `sceAudiocodecCheckNeedMem'
    collect2: ld returned 1 exit status
    Spoiler for full output:

    Code:
    $ make
    psp-g++ -I. -I/usr/local/pspdev/psp/sdk/include -G4 -Wall -O2 -I. -I/usr/local/p
    spdev/psp/sdk/include -G4 -Wall -O2 -fno-exceptions -fno-rtti -c ./main.cpp -o .
    /main.o
    psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -G4 -Wall -O2  -L. -L/usr/local/
    pspdev/psp/sdk/lib   main.o -losl -lmikmod -lpng -lz -lpspsdk -lpspctrl -lpspumd
     -lpsprtc -lpsppower -lpspgu -lpspaudiolib -lpspaudio -lm -lpspmpeg -lpspaudioco
    dec -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_ine
    t -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o Pixel_A
    ttack.elf
    /usr/local/pspdev/psp/sdk/lib/libosl.a(media.o): In function `oslLoadSoundFileAT
    3':
    audio/media.c:285: undefined reference to `sceAudiocodecCheckNeedMem'
    audio/media.c:258: undefined reference to `sceAudiocodecCheckNeedMem'
    /usr/local/pspdev/psp/sdk/lib/libosl.a(media.o): In function `osl_mp3Load':
    audio/media.c:149: undefined reference to `sceAudiocodecCheckNeedMem'
    collect2: ld returned 1 exit status
    make: *** [Pixel_Attack.elf] Error 1


    am i forgetting a library in the makefile? or.....?
    Geändert von slicer4ever (04-27-2008 um 08:56 AM Uhr)
    1. Failed....again...
    2. http://slicer.gibbocool.com/ stay updated on all my projects
    3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been

  14. #8474
    QJ Gamer Bronze
    Points: 3.830, Level: 39
    Level completed: 20%, Points required for next Level: 120
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    12
    Points
    3.830
    Level
    39
    My Mood
    Psychedelic
    Downloads
    0
    Uploads
    0

    Cool lol...

    lol, look at the few posts above, from the time I started to post. :ROFL:
    I almost had the same exact question.

    Start here:
    http://forums.qj.net/f-psp-developme...4/page847.html

  15. #8475
    QJ Gamer Gold
    Points: 17.453, Level: 84
    Level completed: 21%, Points required for next Level: 397
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    everywhere
    Beiträge
    3.526
    Points
    17.453
    Level
    84
    Downloads
    1
    Uploads
    0

    Standard

    yes well i figured it out, just had to update my sdk...thanks insertwittyname=-)
    1. Failed....again...
    2. http://slicer.gibbocool.com/ stay updated on all my projects
    3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been

  16. #8476
    QJ Gamer Bronze
    Points: 3.830, Level: 39
    Level completed: 20%, Points required for next Level: 120
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    12
    Points
    3.830
    Level
    39
    My Mood
    Psychedelic
    Downloads
    0
    Uploads
    0

    Cool Thank you all!

    YAY! I got it working. Thank's to everyone who helped. Especially brethren for the linkage. You are all so great. :Punk:

  17. #8477
    QJ Gamer Bronze
    Points: 5.402, Level: 47
    Level completed: 26%, Points required for next Level: 148
    Overall activity: 0%

    Registriert seit
    Apr 2007
    Beiträge
    468
    Points
    5.402
    Level
    47
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von CT_Bolt
    YAY! I got it working. Thank's to everyone who helped. Especially brethren for the linkage. You are all so great. :Punk:
    no problem, just make sure you periodically check for updates to keep your sdk up to date;)

    btw the latest version 0.7.3 released yesterday:)

  18. #8478
    QJ Gamer Bronze
    Points: 3.830, Level: 39
    Level completed: 20%, Points required for next Level: 120
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    12
    Points
    3.830
    Level
    39
    My Mood
    Psychedelic
    Downloads
    0
    Uploads
    0

    Cool ok.

    Oh, ok I will keep that in mind. Thanks again.

  19. #8479
    QJ Gamer Gold
    Points: 17.453, Level: 84
    Level completed: 21%, Points required for next Level: 397
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    everywhere
    Beiträge
    3.526
    Points
    17.453
    Level
    84
    Downloads
    1
    Uploads
    0

    Standard

    quick question ppl=-) and i hope sg57 well respond as he's the one that gave me the idea:

    anyway sg57 told me that in order to get 3.xx kernel to work i need to start in user mode and than create a thread that is in kernel mode, load w/e i need from kernel mode than go back to user and i thought the following would work:

    Code:
    int KernelMode(void){
         sceIoChdir(startpath); //unsure if this is needed i'm not to familar with creating threads but it was needed when going from kernel->user mode
         oslInitAudioME(OSL_FMT_ALL);
    
         return 0;
    }
    
    int main(int argc, char**argv){
         
         sceIoGetThreadCwd(sceKernelGetThreadId(), startpath, sizeof(startpath));
         //thus far i've followed exaclty as if creating a user thread but instead set the thread arguments to 0 for kernel
         SceUID thid = sceKernelCreateThread("Kernel Mode Thread", (int (*)(SceSize, void*))KernelMode, 0x12, 256 * 1024, 0, NULL);
         
         sceKernelStartThread(thid, 0, 0);
         
         sceKernelWaitThreadEnd(thid, NULL);
    
         //user code
         return 0;
    }
    anyways this doesn't rly crash my psp, it just kinda stays on, doesn't shut down, but i have to do a full shutdown in order to get off or pull out the battery

    any help would be much appreciated
    1. Failed....again...
    2. http://slicer.gibbocool.com/ stay updated on all my projects
    3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been

  20. #8480
    words are stones in my <3
    Points: 35.274, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    Spokane
    Beiträge
    5.008
    Points
    35.274
    Level
    100
    My Mood
    Lonely
    Downloads
    1
    Uploads
    0

    Standard

    slicer - Threads aren't automatically ended when the pointer to the function they are passed returns, I believe it runs the function again starting at hte top of hte scope (not 100% on that but fairly certain, it'd explain your problem with it hanging (trying to init ME more then once))

    Also, i dont know if you're supposed to end the ME-init thread, but I'm pretty sure oslib's init me function just loads modules and whatnot required,after that it can be used whenever so it should be ok, if not then we'll find a way around it :) (gonna have to myself a little later)
    Geändert von SG57 (05-01-2008 um 09:14 PM Uhr)

    ...at what speed must I live.. to be able to see you again?...

    Projects

    You can support my Open World 3D RPG for PSP by voting for it here


  21. #8481
    Developer
    Points: 7.577, Level: 58
    Level completed: 14%, Points required for next Level: 173
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Beiträge
    1.026
    Points
    7.577
    Level
    58
    Downloads
    0
    Uploads
    0

    Standard

    It's not possible to launch a kernel mode thread from user-mode.

    What do you need the kernel mode thread for exactly?

    Check out my homebrew & C tutorials at http://insomniac.0x89.org/
    Coder formerly known as Insomniac197

    tshirtz: what is irshell ??
    Atarian_: it's where people who work for the IRS go when they die

  22. #8482
    words are stones in my <3
    Points: 35.274, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    Spokane
    Beiträge
    5.008
    Points
    35.274
    Level
    100
    My Mood
    Lonely
    Downloads
    1
    Uploads
    0

    Standard

    To load some modules (atleast assuming that's what OSlib's ME initialization is doing).

    As of now, starting in kernel mode, initializing the ME then starting a user mode thread to be the app/game/w.e.

    ...at what speed must I live.. to be able to see you again?...

    Projects

    You can support my Open World 3D RPG for PSP by voting for it here


  23. #8483
    Developer
    Points: 7.577, Level: 58
    Level completed: 14%, Points required for next Level: 173
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Beiträge
    1.026
    Points
    7.577
    Level
    58
    Downloads
    0
    Uploads
    0

    Standard

    If you have the source to oslib then patch out the un-needed kernel mode module loading and use the user-mode sceUtilityAvLoadModule().

    Check out my homebrew & C tutorials at http://insomniac.0x89.org/
    Coder formerly known as Insomniac197

    tshirtz: what is irshell ??
    Atarian_: it's where people who work for the IRS go when they die

  24. #8484
    words are stones in my <3
    Points: 35.274, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    Spokane
    Beiträge
    5.008
    Points
    35.274
    Level
    100
    My Mood
    Lonely
    Downloads
    1
    Uploads
    0

    Standard

    Code:
    SceUID LoadStartAudioModule(char *modname, int partition){
        SceKernelLMOption option;
        SceUID modid;
    
        memset(&option, 0, sizeof(option));
        option.size = sizeof(option);
        option.mpidtext = partition;
        option.mpiddata = partition;
        option.position = 0;
        option.access = 1;
    
        modid = sceKernelLoadModule(modname, 0, &option);
        if (modid < 0)
            return modid;
    
        return sceKernelStartModule(modid, 0, NULL, NULL, NULL);
    }
    
    ...
    
        if (sceKernelDevkitVersion() == 0x01050001)
        {
            LoadStartAudioModule("flash0:/kd/me_for_vsh.prx", PSP_MEMORY_PARTITION_KERNEL);
            LoadStartAudioModule("flash0:/kd/audiocodec.prx", PSP_MEMORY_PARTITION_KERNEL);
        }
        else
        {
            sceUtilityLoadAvModule(PSP_AV_MODULE_AVCODEC);
        }
    Is the kernel mode you're running in affect the firmware version returned by getDevKitVersion?

    ...at what speed must I live.. to be able to see you again?...

    Projects

    You can support my Open World 3D RPG for PSP by voting for it here


  25. #8485
    Developer
    Points: 7.577, Level: 58
    Level completed: 14%, Points required for next Level: 173
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Beiträge
    1.026
    Points
    7.577
    Level
    58
    Downloads
    0
    Uploads
    0

    Standard

    Of course.

    If you're running under 1.5 under custom firmware, it will return 0x01050001.

    I would remove all the 1.5 support from OSLib if I were you. 1.5 kernel programming is dead, the sooner everyone moves onto 3xx kernel programming the better.

    Check out my homebrew & C tutorials at http://insomniac.0x89.org/
    Coder formerly known as Insomniac197

    tshirtz: what is irshell ??
    Atarian_: it's where people who work for the IRS go when they die

  26. #8486
    words are stones in my <3
    Points: 35.274, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    Spokane
    Beiträge
    5.008
    Points
    35.274
    Level
    100
    My Mood
    Lonely
    Downloads
    1
    Uploads
    0

    Standard

    lol I love you IWN ;) I take it you're an anti-3.51 oe-user (or w/e firmware it was that was that doesn't have 3.xx kernel)

    I'll give that a try, but hey do you have a link to all the user mode equivalent kernel mode functions? Or should I just drop by IRC and question you if anything pops up?

    ...at what speed must I live.. to be able to see you again?...

    Projects

    You can support my Open World 3D RPG for PSP by voting for it here


  27. #8487
    Developer
    Points: 7.577, Level: 58
    Level completed: 14%, Points required for next Level: 173
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Beiträge
    1.026
    Points
    7.577
    Level
    58
    Downloads
    0
    Uploads
    0

    Standard

    Drop by IRC mate, I should be around for a bit tonight.

    Most of the kernel level calls are pretty easy to spot once you know what you're looking for.

    I'm not anti 1.5 either. I programmed under that kernel for a long time.

    The only reason I advocate moving to 3xx is because it works on both slim/fat and doesn't require any add-on installs or anything like that.

    Along with that I can see it will only be a matter of time before there is no 1.5 kernel subset. The 1.5 kernel that comes with custom firmware is just that, a subset. It doesn't contain all needed modules for 100% 1.5 kernel compatibility. For instance the dialogs don't work under the 1.5 subset on custom firmware as the VSH modules aren't included, which the dialogs rely on.

    Finally, 3xx kernel gives you a lot of user mode functions that allow you to do things that would require kernel mode on 1.5, such as module loading etc.

    Everyone should move to 3xx, Jesus would want you to ;)

    Check out my homebrew & C tutorials at http://insomniac.0x89.org/
    Coder formerly known as Insomniac197

    tshirtz: what is irshell ??
    Atarian_: it's where people who work for the IRS go when they die

  28. #8488
    QJ Gamer Bronze
    Points: 3.830, Level: 39
    Level completed: 20%, Points required for next Level: 120
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    12
    Points
    3.830
    Level
    39
    My Mood
    Psychedelic
    Downloads
    0
    Uploads
    0

    Cool

    Zitat Zitat von Insert_Witty_Name
    I would remove all the 1.5 support from OSLib if I were you.
    I was just wondering if there is a good up to date OSLib that doesn't use 1.5 support, like it would use other ways of getting the job done.
    If there is could someone give a link to it. If there isn't, and someone knows how to do it that would be great too. Cuz I know I sure don't know how.
    Zitat Zitat von Insert_Witty_Name
    1.5 kernel programming is dead, the sooner everyone moves onto 3xx kernel programming the better.
    Truer words were never spoken. :)
    .___________.
    |1.50 ... 3.xx |
    |:flame:|
    |___________|

  29. #8489
    QJ Gamer Gold
    Points: 17.453, Level: 84
    Level completed: 21%, Points required for next Level: 397
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    everywhere
    Beiträge
    3.526
    Points
    17.453
    Level
    84
    Downloads
    1
    Uploads
    0

    Standard

    woo back=-)

    also IWN, thanks for the knowledge that you can't do it in reverse order of thread creation, anyways sg57 just told me that the ME init, can be ran from user mode on 3xx fw, so i'll simple release 2 vers, 1 with 1.5 support and 1 with 3xx support, even if 1.5 kernel is dead the few rare users won't miss out

    however i would love to learn more about sceUtilityLoadAvModule and such commands for future refrence but i can't find them anywhere in the sdk documentation, i've checked several times but if anyone could point me to an actual page on the doc that'd be awsome
    Geändert von slicer4ever (05-03-2008 um 04:05 PM Uhr)
    1. Failed....again...
    2. http://slicer.gibbocool.com/ stay updated on all my projects
    3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been

  30. #8490
    words are stones in my <3
    Points: 35.274, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    Spokane
    Beiträge
    5.008
    Points
    35.274
    Level
    100
    My Mood
    Lonely
    Downloads
    1
    Uploads
    0

    Standard

    slicer - I told IWN that i'd just drop by IRC later tonight when ever i run into a kernel function and I don't already know the usermode equivalent, you should consider the same if you need to know them and can't find them whilst googling.

    IWN - Now don't be bringing religion into any of this ;)

    EDIT

    Wow, it would seem Brunni did a sorta pspsdk-stdlib emulator lol. He made stdlib equivalent functions for sceIo, sceKernelDcacheXXXX, etc. etc. He also made it user mode compatible already, it would seem starting in kernel mode under 1.5 is pointless when working with oslib. Just start up in user mode and set your attributes and you're golden :)

    And ya IWN, when i run my game under 1.5, it crashes when trying to load the browser :O I wonder what would happen if i tried to run Bugz under 1.5... Hey do you think it's possible to include the modules with the game? lol I bet there is a huge tree of them required for it to run (and some hex editing of addresses to them) might as well include a subset of the firmware :P)
    Geändert von SG57 (05-04-2008 um 12:24 AM Uhr)

    ...at what speed must I live.. to be able to see you again?...

    Projects

    You can support my Open World 3D RPG for PSP by voting for it here



 

Tags for this Thread

Forumregeln

  • Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
  • Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
  • Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
  • Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.
  •  





Alle Zeitangaben in WEZ -8. Es ist jetzt 09:14 PM Uhr.

Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © , Caputo Media, LLC. All Rights Reserved. Cluster .