Seite 230 von 340 ErsteErste ... 130 180 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 280 330 ... LetzteLetzte
Zeige Ergebnis 6.871 bis 6.900 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 Auraomega Where did you find that error? The only errors I know of start 0x800 2 ... Anyway, ...

  
  1. #6871
    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 Auraomega
    Where did you find that error? The only errors I know of start 0x8002...

    Anyway, I changed the 2nd argument to just XMB.prx, but same error as before.
    Errors that start with 0x8002 are sce errors, whereas errors that start with 0x8001 are libc errors. I just looked through sys/errno.h. Take away the 0x8001 and then convert to decimal, and you'll see a lot of defines there. Just match them up.

    By the way, now that you have dev status, I think you can change the default color of your post in your cp so you don't have to do it with every post.


    pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ

  2. #6872
    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

    Odd, I don't appear to have that, which is a pain. Oh well, and its a matter of habit to still colour my font

    But seriously, my code still isn't working and I'm just wondering if its because I'm trying to rename something in flash0? I could copy, the file and then delete the original, but that would be long winded, and its easy to run into problems I believe.

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

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

  3. #6873
    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 were probably looking in the wrong place for the color options. It's here: http://forums.qj.net/profile.php?do=editoptions near the bottom.
    pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ

  4. #6874
    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

    Sorry, I know about that, I mean I couldn't find the errno.h file, infact I don't appear to have the sys folder

    -Aura
    -= Double Post =-
    Ignore that, I've actually found it, it wasn't with the includes in the libc folder as I assumed.
    Geändert von Auraomega (11-15-2007 um 01:01 PM Uhr) Grund: Automerged Doublepost
    Last.fm | Deviant Art | First working OS picture

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

  5. #6875
    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

    There are a mess of include folders. Specifically, it's /usr/local/pspdev/psp/include/sys/errno.h
    pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ

  6. #6876
    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

    Would anyone happen to know the maxium heigth (spelling?) and width possible for an .png image using Oslib?

  7. #6877
    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

    512 x 512 i would say

  8. #6878
    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

    Trying to load a module with my KMode stuff in, but I'm getting error 0x8002013B - SCE_KERNEL_ERROR_LIBRARY_ FOUND - what normally causes this error?

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

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

  9. #6879
    Developer
    Points: 5.085, Level: 45
    Level completed: 68%, Points required for next Level: 65
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Beiträge
    206
    Points
    5.085
    Level
    45
    Downloads
    0
    Uploads
    0

    Standard

    How do you set flags with preprocessor macros so that you can choose which version of the code you want to compile?

    For example:

    Code:
    #ifdef PSP
    // PSP-specific code here
    #endif
    #ifdef WIN32
    // Windows specific code here
    #endif
    I could just use #define and replace it with either PSP or WIN32, but does that need to be set to a specific value, or does that not matter?
    GameSnooper - Random drawing of gaming news

    The 32 Bit Shell - My development blog (also includes gaming oddities)

  10. #6880
    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

    The value doesn't matter. In fact, you don't even have to give it a value. You can just say "#define PSP", for example.

  11. #6881
    Your Fate is Grim...
    Points: 11.640, Level: 70
    Level completed: 98%, Points required for next Level: 10
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Beiträge
    2.269
    Points
    11.640
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    i have a quick question. in OpenGL, is a negative z value mean youre moving into or backwards in the screen? my frustum culling may be screwing up cause of this..
    --------------------------------------------------------------------------------------

  12. #6882
    QJ Gamer Silver
    Points: 8.717, Level: 62
    Level completed: 89%, Points required for next Level: 33
    Overall activity: 0%

    Registriert seit
    Feb 2007
    Ort
    Melbourne, Australia
    Beiträge
    1.773
    Points
    8.717
    Level
    62
    My Mood
    Amused
    Downloads
    0
    Uploads
    0

    Standard

    i would think backwards...
    WHA!?

  13. #6883
    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

    Is it possible to load a module from a buffer in usermode?

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

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

  14. #6884
    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 am trying to read through the user memory and find out which addresses are equal to '140', then write the memory addresses to a file. This is within a PRX that is run during a game.

    Code:
    int main_thread(SceSize args, void *argp) 
    {
        sceKernelDelayThread(3000000);
        SceUID fd;
        SceCtrlData pad;
        int i;
        int health = 140;
        int *address;
        
        while(1)
        {
            sceCtrlPeekBufferPositive(&pad, 1);
            
            if(pad.Buttons & PSP_CTRL_LTRIGGER)
            {
                if(pad.Buttons & PSP_CTRL_RTRIGGER)
                {
                    break;
                }
            }
            sceDisplayWaitVblankStart();
        }
        
        fd = sceIoOpen("ms0:/output.txt", PSP_O_CREAT|PSP_O_WRONLY|PSP_O_TRUNC, 0777);
        
        for(i = 0x08800000; i <= 0x0A000000; i += 0x00000001)
        {
             address = (void*)i;
             if(*address == health)
             {
                 sceIoWrite(fd, (int*)address, (SceSize)sizeof(int*));
             }
             sceDisplayWaitVblankStart();
        }
        
        sceIoClose(fd);
        
        sceKernelSleepThread();
        return 0;
    }
    I know there's something wrong because it freezes the game but what is the problem?
    ...Just Returned To The Scene...

  15. #6885
    Developer
    Points: 12.055, Level: 72
    Level completed: 2%, Points required for next Level: 395
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    Germany
    Beiträge
    237
    Points
    12.055
    Level
    72
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Grimfate126
    i have a quick question. in OpenGL, is a negative z value mean youre moving into or backwards in the screen? my frustum culling may be screwing up cause of this..
    http://www.evl.uic.edu/ralph/508S98/coordinates.html

  16. #6886
    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
    I am trying to read through the user memory and find out which addresses are equal to '140', then write the memory addresses to a file. This is within a PRX that is run during a game.

    Code:
    int main_thread(SceSize args, void *argp) 
    {
        sceKernelDelayThread(3000000);
        SceUID fd;
        SceCtrlData pad;
        int i;
        int health = 140;
        int *address;
        
        while(1)
        {
            sceCtrlPeekBufferPositive(&pad, 1);
            
            if(pad.Buttons & PSP_CTRL_LTRIGGER)
            {
                if(pad.Buttons & PSP_CTRL_RTRIGGER)
                {
                    break;
                }
            }
            sceDisplayWaitVblankStart();
        }
        
        fd = sceIoOpen("ms0:/output.txt", PSP_O_CREAT|PSP_O_WRONLY|PSP_O_TRUNC, 0777);
        
        for(i = 0x08800000; i <= 0x0A000000; i += 0x00000001)
        {
             address = (void*)i;
             if(*address == health)
             {
                 sceIoWrite(fd, (int*)address, (SceSize)sizeof(int*));
             }
             sceDisplayWaitVblankStart();
        }
        
        sceIoClose(fd);
        
        sceKernelSleepThread();
        return 0;
    }
    I know there's something wrong because it freezes the game but what is the problem?
    Bus error. Replace += 0x00000001 with += 0x00000004
    pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ

  17. #6887
    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

    still, it's not finding any memory locations that hold the value 140
    ...Just Returned To The Scene...

  18. #6888
    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

    .set noreorder

    #include "pspstub.s"

    STUB_START "NandDumper",0x40090000,0 x00010005
    STUB_FUNC 0x9EDD6EE1,readBlock
    STUB_END

    what's wrong with this?

    Code:
    psp-g++ -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -fno-exceptions -fno-rtti   -c -o main.o main.cpp
    psp-g++ -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -fno-exceptions -fno-rtti   -c -o io.o io.cpp
    psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall   -c -o NandDumper.o NandDumper.S
    psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_VERSION=150  -L. -L/usr/local/pspdev/psp/sdk/lib   main.o io.o NandDumper.o -lpsppower -lstdc++ -lpsprtc -lpspnand_driver -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o powersample.elf
    io.o: In function `dumpNand()':
    io.cpp:(.text+0x1b8): undefined reference to `readBlock(unsigned long, unsigned char*)'

  19. #6889
    The Unique Developer
    Points: 7.101, Level: 55
    Level completed: 76%, Points required for next Level: 49
    Overall activity: 0%

    Registriert seit
    Oct 2006
    Ort
    Canada
    Beiträge
    1.059
    Points
    7.101
    Level
    55
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von hallo007
    .set noreorder

    #include "pspstub.s"

    STUB_START "NandDumper",0x40090000,0 x00010005
    STUB_FUNC 0x9EDD6EE1,readBlock
    STUB_END

    what's wrong with this?

    Code:
    psp-g++ -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -fno-exceptions -fno-rtti   -c -o main.o main.cpp
    psp-g++ -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -fno-exceptions -fno-rtti   -c -o io.o io.cpp
    psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall   -c -o NandDumper.o NandDumper.S
    psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_VERSION=150  -L. -L/usr/local/pspdev/psp/sdk/lib   main.o io.o NandDumper.o -lpsppower -lstdc++ -lpsprtc -lpspnand_driver -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o powersample.elf
    io.o: In function `dumpNand()':
    io.cpp:(.text+0x1b8): undefined reference to `readBlock(unsigned long, unsigned char*)'
    Would you mind, uh making a .h header file for you function? :|
    Malloc.Us Network Administrator

    Decryption of the Encrypted


    You are the unseen, the unstoppable and in power of your code. The God of your software.

  20. #6890
    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

    I did that
    Code:
    #ifndef IO_H
    #define IO_H
    ...
    
    extern int readBlock(u32 page, u8 *buffer);
    
    ...
    #endif

  21. #6891
    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
    still, it's not finding any memory locations that hold the value 140
    Are you sure it's stored as a word and not something shorter, like a halfword or byte?

    Try putting it back to +=1 (or ++) and changing int* to char*
    pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ

  22. #6892
    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
    Are you sure it's stored as a word and not something shorter, like a halfword or byte?

    Try putting it back to +=1 (or ++) and changing int* to char*
    Hmm, so I could search for 4 chars at once to make an integer? I don't think the health in Coded Arms Contagion is going to be stored in 1 byte?
    ...Just Returned To The Scene...

  23. #6893
    Developer
    Points: 5.157, Level: 46
    Level completed: 4%, Points required for next Level: 193
    Overall activity: 0%

    Registriert seit
    Aug 2007
    Beiträge
    726
    Points
    5.157
    Level
    46
    Downloads
    0
    Uploads
    0

    Standard DSX Help

    Hi, is somebody here using DSX to display stuff on the XMB?

    I'm currently working on a plugin, and am finding that it's flickering a bit. Also, it's conflicting with some items on the XMB, such as video and browser.

    Does anyone know how to fix that?

    Cheers
    Placo23

    Spoiler for Wanna see my Apps?:
    Why not donate and become part of this selected list?
    Spoiler for Donators:
    DarkSeveN - 5.100.000
    --DylanDangles--2.000.000
    Zuiver - 100.000
    AlwaysAmiYumi - 10.338.63

  24. #6894
    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

    Zitat Zitat von hallo007
    .set noreorder

    #include "pspstub.s"

    STUB_START "NandDumper",0x40090000,0 x00010005
    STUB_FUNC 0x9EDD6EE1,readBlock
    STUB_END

    what's wrong with this?

    Code:
    psp-g++ -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -fno-exceptions -fno-rtti   -c -o main.o main.cpp
    psp-g++ -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -fno-exceptions -fno-rtti   -c -o io.o io.cpp
    psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall   -c -o NandDumper.o NandDumper.S
    psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_VERSION=150  -L. -L/usr/local/pspdev/psp/sdk/lib   main.o io.o NandDumper.o -lpsppower -lstdc++ -lpsprtc -lpspnand_driver -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o powersample.elf
    io.o: In function `dumpNand()':
    io.cpp:(.text+0x1b8): undefined reference to `readBlock(unsigned long, unsigned char*)'
    I am still stuck here:s

  25. #6895
    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
    Hmm, so I could search for 4 chars at once to make an integer? I don't think the health in Coded Arms Contagion is going to be stored in 1 byte?
    Well, try a halfword search then.
    Code:
    int main_thread(SceSize args, void *argp) 
    {
        sceKernelDelayThread(3000000);
        SceUID fd;
        SceCtrlData pad;
        int i;
        u16 health = 140;
        u16 *address;
        
        while(1)
        {
            sceCtrlReadBufferPositive(&pad, 1);
            
            if(pad.Buttons & PSP_CTRL_LTRIGGER)
            {
                if(pad.Buttons & PSP_CTRL_RTRIGGER)
                {
                    break;
                }
            }
        }
        
        fd = sceIoOpen("ms0:/output.txt", PSP_O_CREAT|PSP_O_WRONLY|PSP_O_TRUNC, 0777);
        
        for(i = 0x08800000; i < 0x0A000000; i += sizeof(health))
        {
             address = (u16*)i;
             if(*address == health)
             {
                 sceIoWriteAsync(fd, i, (SceSize)sizeof(i));
             }
        }
    
        sceIoWaitAsync(fd, 0);
        sceIoClose(fd);
        
        sceKernelSleepThread();
        return 0;
    }
    (Notice the optimizations I made; it'll take forever if you are constantly waiting for VBlank--that is, it'll take 38 hours to search through all of your memory. Suboptimal. I also removed the = in the <= as that would still be causing a crash. Also, asynchronous writing will speed it up too. I don't know if this is how async works on the PSP, though)
    pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ

  26. #6896
    Points: 2.935, Level: 33
    Level completed: 24%, Points required for next Level: 115
    Overall activity: 0%

    Registriert seit
    Nov 2007
    Ort
    PSP-Development
    Beiträge
    11
    Points
    2.935
    Level
    33
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von placo23
    Hi, is somebody here using DSX to display stuff on the XMB?

    I'm currently working on a plugin, and am finding that it's flickering a bit. Also, it's conflicting with some items on the XMB, such as video and browser.

    Does anyone know how to fix that?

    Cheers

    using dsx and no flickering here.
    and yeh in 3.52 the browser is broken while running a vsh dsx prx. on 3.71 it kills the video function here.

    you could end your prx with 0 or unload the prx while loading the net modules. i just added a button press to end my dsx prx before using the browser. not the best way but it works fine for me.

  27. #6897
    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
    Well, try a halfword search then.
    Code:
    int main_thread(SceSize args, void *argp) 
    {
        sceKernelDelayThread(3000000);
        SceUID fd;
        SceCtrlData pad;
        int i;
        u16 health = 140;
        u16 *address;
        
        while(1)
        {
            sceCtrlReadBufferPositive(&pad, 1);
            
            if(pad.Buttons & PSP_CTRL_LTRIGGER)
            {
                if(pad.Buttons & PSP_CTRL_RTRIGGER)
                {
                    break;
                }
            }
        }
        
        fd = sceIoOpen("ms0:/output.txt", PSP_O_CREAT|PSP_O_WRONLY|PSP_O_TRUNC, 0777);
        
        for(i = 0x08800000; i < 0x0A000000; i += sizeof(health))
        {
             address = (u16*)i;
             if(*address == health)
             {
                 sceIoWriteAsync(fd, i, (SceSize)sizeof(i));
             }
        }
    
        sceIoWaitAsync(fd, 0);
        sceIoClose(fd);
        
        sceKernelSleepThread();
        return 0;
    }
    (Notice the optimizations I made; it'll take forever if you are constantly waiting for VBlank--that is, it'll take 38 hours to search through all of your memory. Suboptimal. I also removed the = in the <= as that would still be causing a crash. Also, asynchronous writing will speed it up too. I don't know if this is how async works on the PSP, though)
    That totally crashes it as apposed to just not doing anything like before..
    ...Just Returned To The Scene...

  28. #6898
    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...that probably means that I got the alignment of a halfword wrong. Try running it in PSPLink or something to see what errors.
    pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ

  29. #6899
    QJ Gamer Silver
    Points: 14.087, Level: 77
    Level completed: 10%, Points required for next Level: 363
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Ort
    Germany
    Beiträge
    926
    Points
    14.087
    Level
    77
    Downloads
    0
    Uploads
    0

    Standard

    sceIoWriteAsync(fd, i, (SceSize)sizeof(i));
    Actually reflecting on the code given rather than stupid copy&pasting would be a wise choice sometimes.

    PS: Async IO on PSP only allows one async op at a time, so a second sceIoWrite call will just fail if the first one is still pending.
    Raphs board rules #31: Excessive use of punctuation is either a sign of a lesser ego or a small mind. Avoid it if you don't want to look like a total moron.
    Raphs board rules #17: When you need to ask whether you are capable of doing something, you are not.
    Raphs board rules #2: Exploits aren't found by changing version numbers, blindly merging data into a file or turning your PSP upside down.
    Raphs board rules #1: If you have no clue how exploits work, don't come up with ideas about them.

  30. #6900
    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 Raphael
    Actually reflecting on the code given rather than stupid copy&pasting would be a wise choice sometimes.
    Okay, already did that with that post. All I copied and pasted was the function names, NOT the arguments. You'll see I changed a lot of things. All I did wrong was forget what arguments sceIoWriteAsync took. I thought he was trying to write the address, and I momentarily forgot that it took a pointer and not something like printf takes. Writing the contents of the address would be pretty pointless because we already know it would be 140 if the match succeeds.

    Anyway, I didn't know how the PSP's async worked, so here's the fixed code:

    Code:
    int main_thread(SceSize args, void *argp) 
    {
        sceKernelDelayThread(3000000);
        SceUID fd;
        SceCtrlData pad;
        int i;
        u8 health = 140;
        u8 *address;
        
        while(1)
        {
            sceCtrlReadBufferPositive(&pad, 1);
            
            if(pad.Buttons & PSP_CTRL_LTRIGGER)
            {
                if(pad.Buttons & PSP_CTRL_RTRIGGER)
                {
                    break;
                }
            }
        }
        
        fd = sceIoOpen("ms0:/output.txt", PSP_O_CREAT|PSP_O_WRONLY|PSP_O_TRUNC, 0777);
        
        for(i = 0x08800000; i < 0x0A000000; ++i)
        {
             address = (u8*)i;
             if(*address == health)
             {
                 sceIoWrite(fd, &i, (SceSize)sizeof(i));
             }
        }
    
        sceIoClose(fd);
        
        sceKernelSleepThread();
        return 0;
    }
    Geändert von Archaemic (11-19-2007 um 05:08 PM Uhr)
    pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ


 

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

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