Seite 188 von 340 ErsteErste ... 88 138 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 238 288 ... LetzteLetzte
Zeige Ergebnis 5.611 bis 5.640 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; Zitat von Archaemic And FPU exception means that something bad happened inside of the floating point unit. Generally, this is ...

  
  1. #5611
    I'm back!
    Points: 8.236, Level: 61
    Level completed: 29%, Points required for next Level: 214
    Overall activity: 99,0%

    Registriert seit
    Feb 2007
    Ort
    England
    Beiträge
    902
    Points
    8.236
    Level
    61
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Archaemic
    And FPU exception means that something bad happened inside of the floating point unit. Generally, this is something like 1.0f/0.0f (division by zero error), which is of course impossible, but it can be other things, too.
    Well, by the fact it loads prefectly if the menu loads before the game, but not during the game, I'm guessing its not something to do with a divison... so... what are the "other things" that it could be?

    Cheers.
    -Aura


    Last.fm | Deviant Art | First working OS picture

    Zitat Zitat von nickxab Beitrag anzeigen
    I will beat myself. :p

  2. #5612
    QJ Gamer Green
    Points: 9.165, Level: 64
    Level completed: 39%, Points required for next Level: 185
    Overall activity: 0%

    Registriert seit
    Apr 2006
    Ort
    England ~¦¦¦|+|¦¦¦~
    Beiträge
    1.112
    Points
    9.165
    Level
    64
    My Mood
    Bored
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von vodkkaa
    can some1 up umd.h. i dont want to download the new toolchain just to get on header so can someone hook me up
    the libs have to be installed with it, you cant just use UMD.h

    then again, if youve just LOST it, heres the code for pspumd.h:

    Spoiler for pspumd.h:
    Code:
    /*
     * PSP Software Development Kit - http://www.pspdev.org
     * -----------------------------------------------------------------------
     * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
     *
     * pspumd.h - Prototypes for the sceUmd library.
     *
     * Copyright (c) 2005 Marcus R. Brown <[email protected]>
     * Copyright (c) 2005 James Forshaw <[email protected]>
     * Copyright (c) 2005 John Kelley <[email protected]>
     *
     * $Id: pspumd.h 540 2005-07-08 19:35:10Z warren $
     */
    #ifndef __UMD_H__
    #define __UMD_H__
    
    #ifdef __cplusplus
    extern "C" {
    #endif
    
    /** @addtogroup UMD UMD Kernel Library */
    /*@{*/
    
    /** Enumeration for UMD stats */
    enum UmdDriveStat
    {
    	/** Wait for disc to be inserted */
    	UMD_WAITFORDISC = 2,
    	/** Wait for the UMD to be initialised so it can be accessed from the mapped drive */
    	UMD_WAITFORINIT		= 0x20
    };
    
    /** UMD Callback function */
    typedef int (*UmdCallback)(int unknown, int event);
    
    /** 
      * Check whether there is a disc in the UMD drive
      *
      * @param a - Unknown function, set to 0
      * @return Returns 0 if no disc present, anything else indicates a disc is inserted.
      */
    int sceUmdCheckMedium(int a);
    
    /** 
      * Activates the UMD drive
      * 
      * @param unit - The unit to initialise (probably). Should be set to 1.
      * @param drive - A prefix string for the fs device to mount the UMD on (e.g. "disc0:")
      * @return < 0 on error
      *
      * @par Example:
      * @code
      * // Wait for disc and mount to filesystem
      * int i;
      * i = sceUmdCheckMedium(0);
      * if(i == 0)
      * {
      *    sceUmdWaitDriveStat(UMD_WAITFORDISC);
      * }
      * sceUmdActivate(1, "disc0:"); // Mount UMD to disc0: file system
      * sceUmdWaitDriveStat(UMD_WAITFORINIT);
      * // Now you can access the UMD using standard sceIo functions
      * @endcode
      *
      */
    int sceUmdActivate(int unit, const char *drive);
    
    /** 
      * Wait for a drive to reach a certain state
      *
      * @param stat - The drive stat to wait for.
      * @return < 0 on error
      *
      */
    int sceUmdWaitDriveStat(int stat);
    
    /** 
      * Register a callback for the UMD drive.
      * @note Callback is of type UmdCallback
      *
      * @param cbid - A callback ID created from sceKernelCreateCallback
      * @return < 0 on error
      * @par Example:
      * @code
      * cbid = sceKernelCreateCallback("UMD Callback", umd_callback);
      * sceUmdRegisterUMDCallback(cbid);
      * @endcode
      */
    int sceUmdRegisterUMDCallBack(int cbid);
    
    /*@}*/
    
    #ifdef __cplusplus
    }
    #endif
    
    #endif
    ...Just Returned To The Scene...

  3. #5613
    QJ Gamer Green
    Points: 5.795, Level: 49
    Level completed: 23%, Points required for next Level: 155
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    Cape Town, South Africa
    Beiträge
    714
    Points
    5.795
    Level
    49
    Downloads
    0
    Uploads
    0

    Standard

    I have an idea for a plugin. I'm assuming there's some function the VSH uses to get some sort of list of eboots to display in the game list (which dark_alex hooks to return eboots from GAME, GAME150, GAME3XX and the iso's in the ISO folder, as well as leaving out corrupt eboots). My idea is to hook this function so you you can get eboots from folders of the user's choice. When you press some button in the XMB you get an interface that lets you show/hide folders. That way, you could sort homebrew into folders (like "Games", "Applications" and "Emulators") and show/hide them at will, making a large amount of eboots easier to manage. Of course, once you change which folders are hidden you have to re-enter game->memorystick for it to refresh. Is this feasible?

    Although I don't have nearly enough experience to actually do it myself...

  4. #5614
    QJ Gamer Gold
    Points: 14.678, Level: 78
    Level completed: 57%, Points required for next Level: 172
    Overall activity: 0%

    Registriert seit
    Nov 2006
    Beiträge
    1.523
    Points
    14.678
    Level
    78
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von coolguy5678
    When you press some button in the XMB you get an interface that lets you show/hide folders.
    coincidentally, i've already planned on it.
    -= Double Post =-
    it also requires a total rewrite of the prx. upd: develop't wont begn for quite some time from my part.
    Geändert von Mr305 (07-22-2007 um 11:05 AM Uhr) Grund: Automerged Doublepost

  5. #5615
    QJ Gamer Green
    Points: 9.165, Level: 64
    Level completed: 39%, Points required for next Level: 185
    Overall activity: 0%

    Registriert seit
    Apr 2006
    Ort
    England ~¦¦¦|+|¦¦¦~
    Beiträge
    1.112
    Points
    9.165
    Level
    64
    My Mood
    Bored
    Downloads
    0
    Uploads
    0

    Standard

    When i try to install SDL_mixer, afetr i type this:

    Code:
    LDFLAGS="-L$(psp-config --pspsdk-path)/lib -lc -lpspuser" 
    
    ./configure --host psp --with-sdl-prefix=$(psp-config --psp-prefix) --disable-music-mp3 --prefix=$(psp-config --psp-prefix) --disable-music-libmikmod --enable-music-mod
    it goes through some lines then trys to detect SDL, ive installed SDL already with no errors but it comes up '***SDL Version 1.2.4 not found!' How do i resolve this?
    ...Just Returned To The Scene...

  6. #5616
    It's good to be free...
    Points: 10.420, Level: 67
    Level completed: 93%, Points required for next Level: 30
    Overall activity: 0%

    Registriert seit
    Feb 2007
    Beiträge
    2.440
    Points
    10.420
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    You probably have SDL installed in the wrong place.
    pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ

  7. #5617
    QJ Gamer Green
    Points: 9.165, Level: 64
    Level completed: 39%, Points required for next Level: 185
    Overall activity: 0%

    Registriert seit
    Apr 2006
    Ort
    England ~¦¦¦|+|¦¦¦~
    Beiträge
    1.112
    Points
    9.165
    Level
    64
    My Mood
    Bored
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Archaemic
    You probably have SDL installed in the wrong place.
    i followed exactly what it said here Unless, theres a specific location that you can tell me about? Scroll down to the bottom to see the SDL libs. Should i re-install SDL changing some of those lines??
    ...Just Returned To The Scene...

  8. #5618
    It's good to be free...
    Points: 10.420, Level: 67
    Level completed: 93%, Points required for next Level: 30
    Overall activity: 0%

    Registriert seit
    Feb 2007
    Beiträge
    2.440
    Points
    10.420
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    Wait, ignore what this post used to say. The navigation on that page is funky. Anyway, if you typed everything in properly, it should work.
    pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ

  9. #5619
    QJ Gamer Green
    Points: 9.165, Level: 64
    Level completed: 39%, Points required for next Level: 185
    Overall activity: 0%

    Registriert seit
    Apr 2006
    Ort
    England ~¦¦¦|+|¦¦¦~
    Beiträge
    1.112
    Points
    9.165
    Level
    64
    My Mood
    Bored
    Downloads
    0
    Uploads
    0

    Standard

    i copied it, even better precision, and anyway, i just found out what was wrong, i hadnt set the environmental variables when installing SDL
    ...Just Returned To The Scene...

  10. #5620
    QJ Gamer Blue
    Points: 4.031, Level: 40
    Level completed: 41%, Points required for next Level: 119
    Overall activity: 91,0%

    Registriert seit
    Feb 2007
    Ort
    Florida
    Beiträge
    214
    Points
    4.031
    Level
    40
    Downloads
    0
    Uploads
    0

    Standard

    I'm back with another LTE 2.2 question.

    How do I add an image to a button?

    (Like make the button an image).

    EDIT: Omg, I figured it out..I'll edit again if I get a problem.
    EDIT2: Yep...Problem:

    setImage(video::ITexture *image);

    Ther's the code I need.

    What do I use for the *image?
    Geändert von MrChaos (07-22-2007 um 04:25 PM Uhr)

  11. #5621
    I'm back!
    Points: 8.236, Level: 61
    Level completed: 29%, Points required for next Level: 214
    Overall activity: 99,0%

    Registriert seit
    Feb 2007
    Ort
    England
    Beiträge
    902
    Points
    8.236
    Level
    61
    Downloads
    0
    Uploads
    0

    Standard

    I was wondering if I could use sceIoAssign to be able to run certain bits of flash0 from ms0/flash0 without hex editing. I found a post a while back on ps2dev.org, but I can't find it anymore, so if it can be done like this, could someone explain to me how I would go about it?

    Cheers
    -Aura
    Last.fm | Deviant Art | First working OS picture

    Zitat Zitat von nickxab Beitrag anzeigen
    I will beat myself. :p

  12. #5622
    QJ Gamer Green
    Points: 8.459, Level: 62
    Level completed: 3%, Points required for next Level: 291
    Overall activity: 32,0%

    Registriert seit
    Apr 2007
    Beiträge
    886
    Points
    8.459
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    nevermind

  13. #5623
    QJ Gamer Green
    Points: 9.165, Level: 64
    Level completed: 39%, Points required for next Level: 185
    Overall activity: 0%

    Registriert seit
    Apr 2006
    Ort
    England ~¦¦¦|+|¦¦¦~
    Beiträge
    1.112
    Points
    9.165
    Level
    64
    My Mood
    Bored
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von MrChaos
    I'm back with another LTE 2.2 question.

    How do I add an image to a button?

    (Like make the button an image).

    EDIT: Omg, I figured it out..I'll edit again if I get a problem.
    EDIT2: Yep...Problem:

    setImage(video::ITexture *image);

    Ther's the code I need.

    What do I use for the *image?
    A pointer to a video::ITexture struct/class?

    EDIT: Here we go:
    Code:
    class ITexture : public IUnknown
    {
    public:
    	virtual ~ITexture() {};
    
    	virtual void* lock() = 0;
    
    	virtual void unlock() = 0;
    
    	virtual const core::dimension2d<s32>& getOriginalSize() = 0;
    
    	virtual const core::dimension2d<s32>& getSize() = 0;
    
    	virtual E_DRIVER_TYPE getDriverType() = 0;
    
    	virtual ECOLOR_FORMAT getColorFormat() = 0;
    
    	virtual s32 getPitch() = 0;
    
    	virtual void regenerateMipMapLevels() = 0;
    };
    If that isn't relevant, i'll eat my hat.
    Geändert von JaSo PsP (07-23-2007 um 08:30 AM Uhr)
    ...Just Returned To The Scene...

  14. #5624
    I'm back!
    Points: 8.236, Level: 61
    Level completed: 29%, Points required for next Level: 214
    Overall activity: 99,0%

    Registriert seit
    Feb 2007
    Ort
    England
    Beiträge
    902
    Points
    8.236
    Level
    61
    Downloads
    0
    Uploads
    0

    Standard

    I don't know if anyone here has tested PSPLock, but I'm having a problem with it that I can't seem to flush out.

    I've replaced vshmain.prx, and made it load vshmain_real.prx, but by doing so, I can't get plugins to load properly. CXMB and SCEP and a couple of plugins of my own don't function correctly. I've not actually tested other plugins yet, but I'm assuming they are likely to be the same.

    My question is, is there a prx I have to load in flash0 that activates the plugins? And if so what is it?

    Thanks.
    -Aura

    -= Double Post =-
    Just been scouring my flash0 backups and google, and I've had a thought... would I be able to solve all my problems by editing the pspbtcnf.txt file in the KN folder?

    -Aura
    Geändert von Auraomega (07-23-2007 um 03:32 PM Uhr) Grund: Automerged Doublepost
    Last.fm | Deviant Art | First working OS picture

    Zitat Zitat von nickxab Beitrag anzeigen
    I will beat myself. :p

  15. #5625
    Heroes never die
    Points: 8.645, Level: 62
    Level completed: 65%, Points required for next Level: 105
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    ...........
    Beiträge
    1.323
    Points
    8.645
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    Spoiler for origenal:
    #include <assert.h>
    #include <stdlib.h>
    #include <string.h>

    #include <pspuser.h>
    #include <pspdebug.h>
    #include <pspnand_driver.h>

    /* Define the module info section */
    PSP_MODULE_INFO("dumpipl" , 0x1000, 1, 1);
    PSP_MAIN_THREAD_ATTR(0);

    /* Define printf, just to make typing easier */
    #define printf pspDebugScreenPrintf

    int g_iPageSize, g_iPagesPerBlock, g_iBlockSize;
    int g_bFlashLocked = 0;

    void LockFlash();
    void UnlockFlash();
    void die(const char *msg);
    int ReadIPLBlockTable(void *pBlockBuf);

    /* Exit callback */
    int exit_callback(void)
    {
    UnlockFlash();
    sceKernelExitGame();
    return 0;
    }

    /* Callback thread */
    int CallbackThread(SceSize args, void *argp)
    {
    int cbid;

    cbid = sceKernelCreateCallback(" Exit Callback", (SceKernelCallbackFunctio n) exit_callback, NULL);
    sceKernelRegisterExitCall back(cbid);

    sceKernelSleepThreadCB();
    return 0;
    }

    /* Sets up the callback thread and returns its thread id */
    int SetupCallbacks(void)
    {
    int thid = 0;

    thid = sceKernelCreateThread("up date_thread", CallbackThread, 0x11, 0xFA0, PSP_THREAD_ATTR_USER, 0);
    if(thid >= 0)
    {
    sceKernelStartThread(thid , 0, 0);
    }

    return thid;
    }

    void LockFlash()
    {
    if (!g_bFlashLocked)
    sceNandLock(0);

    g_bFlashLocked = 1;
    }

    void UnlockFlash()
    {
    if (g_bFlashLocked)
    sceNandUnlock();

    g_bFlashLocked = 0;
    }

    void die(const char *msg)
    {
    UnlockFlash();

    printf("Fatal error: %s\n", msg);

    while (1)
    sceKernelSleepThread();
    }

    int ReadIPLBlockTable(void *pBlockBuf)
    {
    u16 *pBlockTable;
    u32 uiBlockNum = 4;
    u32 uiSearchCount = 8;
    int iBlockCount;

    /* You must always get exclusive access to the flash device before reading
    from it or writing to it. */
    LockFlash();
    memset(pBlockBuf, 0, g_iBlockSize);

    while (uiSearchCount > 0)
    {
    u32 uiPPN = uiBlockNum * g_iPagesPerBlock;

    if (!sceNandIsBadBlock(uiPPN ))
    {
    if (sceNandReadBlockWithRetr y(uiPPN, pBlockBuf, NULL) < 0)
    {
    die("can't read IPL block table!");
    }

    printf("Found IPL block table at block %d\n", uiBlockNum);
    break;
    }

    uiBlockNum++;
    uiSearchCount--;
    }

    /* Count the number of blocks used by the IPL. */
    pBlockTable = (u16 *) pBlockBuf;
    iBlockCount = 0;

    while (*pBlockTable != 0)
    {
    iBlockCount++;
    pBlockTable++;
    }

    if (iBlockCount)
    printf("IPL spans a total of %d blocks.\n", iBlockCount);

    UnlockFlash();
    return iBlockCount;
    }

    int main(int argc, char *argv[])
    {
    void *pBlockBuf;
    u16 *pBlockTable;
    int iBlockCount, iBlock;
    int fd;

    pspDebugScreenInit();
    SetupCallbacks();

    g_iPageSize = sceNandGetPageSize();
    g_iPagesPerBlock = sceNandGetPagesPerBlock() ;
    g_iBlockSize = g_iPageSize * g_iPagesPerBlock;

    /* Read buffer for blocks. */
    pBlockBuf = malloc(g_iBlockSize);
    assert(pBlockBuf);

    iBlockCount = ReadIPLBlockTable(pBlockB uf);
    if (!iBlockCount)
    die("IPL block count is 0!");

    pBlockTable = (u16 *) malloc(iBlockCount * sizeof(u16));
    memcpy(pBlockTable, pBlockBuf, iBlockCount * sizeof(u16));

    fd = sceIoOpen("ms0:/ipl.bin", PSP_O_WRONLY | PSP_O_CREAT, 0777);
    if (fd < 0)
    die("can't open ms0:/ipl.bin for writing!");

    /* Write out each block of the IPL. */
    for (iBlock = 0; iBlock < iBlockCount; iBlock++)
    {
    u32 uiPPN = pBlockTable[iBlock] * g_iPagesPerBlock;

    LockFlash();

    if (sceNandReadBlockWithRetr y(uiPPN, pBlockBuf, NULL) < 0)
    {
    sceIoClose(fd);
    die("can't read block from IPL!\n");
    }

    UnlockFlash();

    if (sceIoWrite(fd, pBlockBuf, g_iBlockSize) < 0)
    {
    sceIoClose(fd);
    die("can't write data to file!\n");
    }
    }

    sceIoClose(fd);
    free(pBlockTable);
    free(pBlockBuf);

    printf("\nFinished writing IPL to ms0:/ipl.bin. Use [HOME] to exit.\n");
    sceKernelSleepThread();
    return 0;
    }

    Spoiler for rewritten:

    /*made by * Copyright (c) 2005 Marcus R. Brown <[email protected]>
    * Copyright (c) 2005 James Forshaw <[email protected]>
    * Copyright (c) 2005 John Kelley <[email protected]>*/
    #include <assert.h>
    #include <pspdebug.h>
    #include <pspuser.h>
    #include <pspnand_driver.h>
    #include <stdlib.h>
    #include <string.h>

    #include "mainMenu.h"

    int nandPageSize, nandPagesPerBlock, nandBlockSize;
    int flashLocked = 0;

    void lockFlash();
    void unLockFlash();
    void die(const char *msg);
    int readIplBlockTable(void *pBlockBuf);

    void lockFlash()
    {
    if (!flashLocked)
    sceNandLock(0);

    flashLocked = 1;
    }

    void unLockFlash()
    {
    if (flashLocked)
    sceNandUnlock();

    flashLocked = 0;
    }

    void die(const char *msg)
    {
    unLockFlash();

    pspDebugScreenPrintf("Fat al error: %s\n", msg);
    faExit();
    }

    int readIplBlockTable(void *pBlockBuf)
    {
    u16 *pBlockTable;
    u32 uiBlockNum = 4;
    u32 uiSearchCount = 8;
    int iBlockCount;
    /* You must always get exclusive access to the flash device before reading
    from it or writing to it. */
    lockFlash();
    memset(pBlockBuf, 0, nandBlockSize);

    while (uiSearchCount > 0)
    {
    u32 uiPPN = uiBlockNum * nandPagesPerBlock;
    if (!sceNandIsBadBlock(uiPPN ))
    {
    if (sceNandReadBlockWithRetr y(uiPPN, pBlockBuf, NULL) < 0)
    die("can't read IPL block table!");
    pspDebugScreenPrintf("Fou nd IPL block table at block %d\n", uiBlockNum);
    break;
    }

    uiBlockNum++;
    uiSearchCount--;
    }

    /* Count the number of blocks used by the IPL. */
    pBlockTable = (u16 *) pBlockBuf;
    iBlockCount = 0;

    while (*pBlockTable != 0)
    {
    iBlockCount++;
    pBlockTable++;
    }

    if (iBlockCount)
    pspDebugScreenPrintf("IPL spans a total of %d blocks.\n", iBlockCount);

    unLockFlash();
    return iBlockCount;
    }

    int dumpIpl(const char *dst)
    {
    void *pBlockBuf;
    u16 *pBlockTable;
    int iBlockCount, iBlock;
    int fd;

    pspDebugScreenClear();

    nandPageSize = sceNandGetPageSize();
    nandPagesPerBlock = sceNandGetPagesPerBlock() ;
    nandBlockSize = (nandPageSize * nandPagesPerBlock);


    /* Read buffer for blocks. */
    pBlockBuf = malloc(nandBlockSize);
    assert(pBlockBuf);

    iBlockCount = readIplBlockTable(pBlockB uf);
    if (!iBlockCount)
    die("IPL block count is 0!");



    pBlockTable = (u16 *) malloc(iBlockCount * sizeof(u16));
    memcpy(pBlockTable, pBlockBuf, iBlockCount * sizeof(u16));



    fd = sceIoOpen(dst, PSP_O_WRONLY | PSP_O_CREAT, 0777);
    if (fd < 0)
    die("can't open dst for writing!");

    /* Write out each block of the IPL. */
    for (iBlock = 0; iBlock < iBlockCount; iBlock++)
    {
    u32 uiPPN = pBlockTable[iBlock] * nandPagesPerBlock;
    lockFlash();
    if (sceNandReadBlockWithRetr y(uiPPN, pBlockBuf, NULL) < 0)
    {
    sceIoClose(fd);
    die("can't read block from IPL!\n");
    }
    unLockFlash();
    if (sceIoWrite(fd, pBlockBuf, nandBlockSize) < 0)
    {
    sceIoClose(fd);
    die("can't write data to file!\n");
    }
    }
    sceIoClose(fd);
    free(pBlockTable);
    free(pBlockBuf);

    pspDebugScreenPrintf("\nF inished writing IPL to %s. \nGOING BACK IN 2 SECONDS" , dst);
    faWait(2);
    dumpMenu();
    return 0;
    }


    someone sees what i doe wrong?
    -= Double Post =-
    it crashes at
    nandPageSize = sceNandGetPageSize();
    Geändert von hallo007 (07-24-2007 um 12:35 PM Uhr) Grund: Automerged Doublepost

  16. #5626
    Developer
    Points: 4.171, Level: 41
    Level completed: 11%, Points required for next Level: 179
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    28
    Points
    4.171
    Level
    41
    Downloads
    0
    Uploads
    0

    Standard

    anyone figure out how to make vshex load up image files like png format?

    i know bmp files are possible because someone did it before but i lost all my old source code to dig that up. but it would be nice if png in vshex was possible too

  17. #5627
    Points: 3.139, Level: 34
    Level completed: 60%, Points required for next Level: 61
    Overall activity: 0%

    Registriert seit
    Jul 2007
    Ort
    Toronto
    Beiträge
    3
    Points
    3.139
    Level
    34
    Downloads
    0
    Uploads
    0

    Standard

    i know this is really basic aura but did you add it to vsh.txt
    :) :P iono otherwise i don't think there is a plugin you have to load

  18. #5628
    I'm back!
    Points: 8.236, Level: 61
    Level completed: 29%, Points required for next Level: 214
    Overall activity: 99,0%

    Registriert seit
    Feb 2007
    Ort
    England
    Beiträge
    902
    Points
    8.236
    Level
    61
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von A-Sylum
    i know this is really basic aura but did you add it to vsh.txt
    :) :P iono otherwise i don't think there is a plugin you have to load

    PSPLock isn't a plugin, it replaces vshmain.prx, and because of this plugins don't load correclty... or at least didn't load correctly... my above post can now be ignored because of solved that problem :Jump:

    My only problem now is that I can't get cxmb to load correctly, after that, everything should be working correctly.

    -Aura
    Last.fm | Deviant Art | First working OS picture

    Zitat Zitat von nickxab Beitrag anzeigen
    I will beat myself. :p

  19. #5629
    QJ Gamer Green
    Points: 9.165, Level: 64
    Level completed: 39%, Points required for next Level: 185
    Overall activity: 0%

    Registriert seit
    Apr 2006
    Ort
    England ~¦¦¦|+|¦¦¦~
    Beiträge
    1.112
    Points
    9.165
    Level
    64
    My Mood
    Bored
    Downloads
    0
    Uploads
    0

    Standard Directory Problems...

    This is my first try at using dirents. But my application freezes, nothing gets printed on the screen either. Anyone know why? :

    Code:
    #include <pspdisplay.h>
    #include <pspctrl.h>
    #include <pspkernel.h>
    #include <pspdebug.h>
    #include <pspiofilemgr.h>
    #include "callbacks.h"
    
    #define printf pspDebugScreenPrintf
    #define MAX_DIRS 256
    
    PSP_MODULE_INFO( "File Mgr", 0, 1, 1 );
    
    int main()
    {
        pspDebugScreenInit();
        SetupCallbacks();
        
        SceUID directoryID;
        SceIoDirent directoryEntry[MAX_DIRS];
        int DirLeft = 1;
        int DirCount = 0;
        int i;
        
        directoryID = sceIoDopen( "ms0:/" );
        if( directoryID < 0 )
        {
            printf( "Error opening directory\n" );
            sceKernelExitGame();
        }
        
        while( DirLeft != 0 )
        {
               DirLeft = sceIoDread( directoryID, &directoryEntry[DirCount] );
               if( DirLeft == 0 )
               {
                   break;
               }
               if( DirLeft < 0 )
               {
                   printf( "Error reading directory entries\n" );
                   sceKernelExitGame();
               }
               DirCount++;
        }
        
        for( i = 0; i <= DirCount; i++ )
        {
               printf( "%s\n", directoryEntry[DirCount].d_name );
        }
        
        sceIoDclose( directoryID );
        printf( "There is a total of %d directory entries", (DirCount + 1) );
    
        sceKernelSleepThread();
        return 0;
    }
    ...Just Returned To The Scene...

  20. #5630
    Banned for LIFE
    Points: 18.744, Level: 86
    Level completed: 79%, Points required for next Level: 106
    Overall activity: 0%

    Registriert seit
    Oct 2006
    Ort
    East London, England
    Beiträge
    2
    Points
    18.744
    Level
    86
    Downloads
    0
    Uploads
    0

    Standard

    :Argh:

    What do you have to put in your makefile if you're using c++ ?

    Been searching for an hour and havent found it.

    Or dont you actually need to add anything to your makefile ?

  21. #5631
    It's good to be free...
    Points: 10.420, Level: 67
    Level completed: 93%, Points required for next Level: 30
    Overall activity: 0%

    Registriert seit
    Feb 2007
    Beiträge
    2.440
    Points
    10.420
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    Code:
    #include <pspdisplay.h>
    #include <pspctrl.h>
    #include <pspkernel.h>
    #include <pspdebug.h>
    #include <pspiofilemgr.h>
    #include "callbacks.h"
    
    #define printf pspDebugScreenPrintf
    
    PSP_MODULE_INFO( "File Mgr", 0, 1, 1 );
    
    int main()
    {
        pspDebugScreenInit();
        SetupCallbacks();
        
        SceUID directoryID;
        SceIoDirent directoryEntry;
        int DirLeft = 1;
        int DirCount = 0;
        int i;
        
        directoryID = sceIoDopen( "ms0:/" );
        if( directoryID < 0 )
        {
            printf( "Error opening directory\n" );
            sceKernelExitGame();
        }
        
        while( DirLeft != 0 )
        {
               DirLeft = sceIoDread( directoryID, &directoryEntry);
               if( DirLeft == 0 )
               {
                   break;
               }
               if( DirLeft < 0 )
               {
                   printf( "Error reading directory entries\n" );
                   sceKernelExitGame();
               }
               printf( "%s\n", directoryEntry.d_name );
               DirCount++;
        }
        
        sceIoDclose( directoryID );
        printf( "There is a total of %d directory entries", (DirCount + 1) );
    
        sceKernelSleepThread();
        return 0;
    }
    Try that instead. Not only is it hugely more efficient, it should work now. If it doesn't, insert traces or use PSPLink. That way you won't have to ask all the time for help. C'mon, basic debugging skills here.
    pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ

  22. #5632
    QJ Gamer Green
    Points: 9.165, Level: 64
    Level completed: 39%, Points required for next Level: 185
    Overall activity: 0%

    Registriert seit
    Apr 2006
    Ort
    England ~¦¦¦|+|¦¦¦~
    Beiträge
    1.112
    Points
    9.165
    Level
    64
    My Mood
    Bored
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Archaemic
    Try that instead. Not only is it hugely more efficient, it should work now. If it doesn't, insert traces or use PSPLink. That way you won't have to ask all the time for help. C'mon, basic debugging skills here.
    But the struct only holds information for ONE Dirent, i want more than one Dirent to be listed on the screen :|
    ...Just Returned To The Scene...

  23. #5633
    Banned for LIFE
    Points: 18.744, Level: 86
    Level completed: 79%, Points required for next Level: 106
    Overall activity: 0%

    Registriert seit
    Oct 2006
    Ort
    East London, England
    Beiträge
    2
    Points
    18.744
    Level
    86
    Downloads
    0
    Uploads
    0

    Standard

    do you have to put anything in your makefile if you're using c++ ?

  24. #5634
    It's good to be free...
    Points: 10.420, Level: 67
    Level completed: 93%, Points required for next Level: 30
    Overall activity: 0%

    Registriert seit
    Feb 2007
    Beiträge
    2.440
    Points
    10.420
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von JaSo PsP
    But the struct only holds information for ONE Dirent, i want more than one Dirent to be listed on the screen :|
    That WILL list more than one Dirent on the screen
    pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ

  25. #5635
    QJ Gamer Green
    Points: 9.165, Level: 64
    Level completed: 39%, Points required for next Level: 185
    Overall activity: 0%

    Registriert seit
    Apr 2006
    Ort
    England ~¦¦¦|+|¦¦¦~
    Beiträge
    1.112
    Points
    9.165
    Level
    64
    My Mood
    Bored
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von eldiablov
    do you have to put anything in your makefile if you're using c++ ?
    -lstdc++ under libs, i think...
    ...Just Returned To The Scene...

  26. #5636
    Banned for LIFE
    Points: 18.744, Level: 86
    Level completed: 79%, Points required for next Level: 106
    Overall activity: 0%

    Registriert seit
    Oct 2006
    Ort
    East London, England
    Beiträge
    2
    Points
    18.744
    Level
    86
    Downloads
    0
    Uploads
    0

    Standard

    i love you. In a non homosexual way

  27. #5637
    QJ Gamer Green
    Points: 9.165, Level: 64
    Level completed: 39%, Points required for next Level: 185
    Overall activity: 0%

    Registriert seit
    Apr 2006
    Ort
    England ~¦¦¦|+|¦¦¦~
    Beiträge
    1.112
    Points
    9.165
    Level
    64
    My Mood
    Bored
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Archaemic
    That WILL list more than one Dirent on the screen
    Yeh, but say i wanted to enter one of the directories listed, what do i do then, 'int sceIoChdir(const char *path);' Then how would i list the directories inside that? use sceIoDopen again?
    ...Just Returned To The Scene...

  28. #5638
    It's good to be free...
    Points: 10.420, Level: 67
    Level completed: 93%, Points required for next Level: 30
    Overall activity: 0%

    Registriert seit
    Feb 2007
    Beiträge
    2.440
    Points
    10.420
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    Okay, so copy the d_name members into an array of char*s.
    (Make sure to allocate a new char* with the same length as d_name, because the pointer contained in d_name will become invalid.)
    pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ

  29. #5639
    QJ Gamer Green
    Points: 9.165, Level: 64
    Level completed: 39%, Points required for next Level: 185
    Overall activity: 0%

    Registriert seit
    Apr 2006
    Ort
    England ~¦¦¦|+|¦¦¦~
    Beiträge
    1.112
    Points
    9.165
    Level
    64
    My Mood
    Bored
    Downloads
    0
    Uploads
    0

    Standard

    ok, the code above still freezes? how do i trace, i haven done it before. :P
    ...Just Returned To The Scene...

  30. #5640
    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

    you have to create your own trace function i believe as i haven't seen any function on the psp that does this, although it's fairly simple just create a function that well write text to a file
    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


 

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:28 PM Uhr.

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