Seite 322 von 340 ErsteErste ... 222 272 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 ... LetzteLetzte
Zeige Ergebnis 9.631 bis 9.660 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 vodkkaa whats the function to hard reset?? and how do you put the psp into suspend mode through ...

  
  1. #9631
    QJ Gamer Gold
    Points: 13.727, Level: 76
    Level completed: 20%, Points required for next Level: 323
    Overall activity: 0%

    Registriert seit
    Apr 2007
    Beiträge
    1.493
    Points
    13.727
    Level
    76
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von vodkkaa Beitrag anzeigen
    whats the function to hard reset?? and how do you put the psp into suspend mode through software.
    0x0442D852 scePowerRequestColdReset
    0xAC32C9CC scePowerRequestSuspend



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

    whats the equivalent of pspSdkLoadStartModule for 3.xx user mode

  3. #9633
    xMod.
    Points: 4.576, Level: 43
    Level completed: 13%, Points required for next Level: 174
    Overall activity: 0%

    Registriert seit
    Oct 2008
    Ort
    Melbourne, Australia
    Beiträge
    675
    Points
    4.576
    Level
    43
    My Mood
    Daring
    Downloads
    0
    Uploads
    0

    Standard

    whats the equivalent of pspSdkLoadStartModule for 3.xx user mode
    pspKernelLoadStartModule



    Any1 got any examples of using CURL? i cant get any of the C++ examples to work on my psp.

    ~!SlasheR!~

  4. #9634
    QJ Gamer Blue
    Points: 2.902, Level: 33
    Level completed: 2%, Points required for next Level: 148
    Overall activity: 0%

    Registriert seit
    Jan 2008
    Beiträge
    33
    Points
    2.902
    Level
    33
    Downloads
    0
    Uploads
    0

    Standard

    Is there a psp emu for windows that can run homebrew?

    I want to test my homebrew before putting it in my psp...

  5. #9635
    QJ Gamer Bronze
    Points: 8.045, Level: 60
    Level completed: 48%, Points required for next Level: 105
    Overall activity: 0%

    Registriert seit
    Aug 2007
    Ort
    Australia
    Beiträge
    659
    Points
    8.045
    Level
    60
    Downloads
    0
    Uploads
    0

    Standard

    Not a decent one, no.

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

    Zitat Zitat von slasher2661996 Beitrag anzeigen
    pspKernelLoadStartModule
    I keep getting "undefined reference to pspKernelLoadStartModule" when i try to compile.

  7. #9637
    QJ Gamer Silver
    Points: 8.475, Level: 62
    Level completed: 9%, Points required for next Level: 275
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    Perth, Scotland
    Beiträge
    1.094
    Points
    8.475
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von vodkkaa Beitrag anzeigen
    I keep getting "undefined reference to pspKernelLoadStartModule" when i try to compile.
    That's because it doesn't exist.

    sceKernelLoadModule (if usermode, you can also use kuKernelLoadStartModule)
    sceKernelStartModule

    Use them.

  8. #9638
    xMod.
    Points: 4.576, Level: 43
    Level completed: 13%, Points required for next Level: 174
    Overall activity: 0%

    Registriert seit
    Oct 2008
    Ort
    Melbourne, Australia
    Beiträge
    675
    Points
    4.576
    Level
    43
    My Mood
    Daring
    Downloads
    0
    Uploads
    0

    Standard

    Any1 got any examples of using CURL? i cant get any of the C++ examples to work on my psp.

    ~!SlasheR!~

  9. #9639
    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've freshly installed Ubuntu on my new laptop, and compiled a new toolchain, SDK, etc.

    Anyway, I'm trying to compile soime code that previously work fine without warnings or errors, but now is giving me some annoying warnings.

    They all follow the same basic thing:
    main.cpp:372: warning: deprecated conversion from string constant to ‘char*’

    Code:
    about.loadIcon("icon.bmp");
    the function is actually:
    Code:
    void loadIcon(char *fileName);
    Its something glaringly obvious, but its just not coming to me. It works if I use a string and sprint the stuff, then pass it... but I don't want to have to do that for the many icons I'm loading.

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

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

  10. #9640
    QJ Gamer Blue
    Points: 4.980, Level: 45
    Level completed: 15%, Points required for next Level: 170
    Overall activity: 0%

    Registriert seit
    Sep 2005
    Ort
    Chigasaki, Japan
    Beiträge
    226
    Points
    4.980
    Level
    45
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Auraomega Beitrag anzeigen
    They all follow the same basic thing:
    main.cpp:372: warning: deprecated conversion from string constant to ‘char*’
    Ah, the joys of compiler updates :)

    This should do the job:

    Code:
    void loadIcon(const char *fileName);
    HTH

  11. #9641
    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

    See, I knew it was something glaringly obvious I normally use const char* if I'm not changing modifying the string, I have no idea why I didn't this time around so thanks

    -Aura


    EDIT:

    #####
    Is there any good guides online on data encryption? I want to use standard libraries if possible. I've done rot13 stuff but I've heard that bitwise operators can be used and I'm assuming theres other methods such as hashing, but I can't find any really good guides online.
    Geändert von Auraomega (02-04-2009 um 09:46 AM Uhr)
    Last.fm | Deviant Art | First working OS picture

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

  12. #9642
    QJ Gamer Blue
    Points: 4.111, Level: 40
    Level completed: 81%, Points required for next Level: 39
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Beiträge
    30
    Points
    4.111
    Level
    40
    Downloads
    0
    Uploads
    0

    Standard open hidden files in flash0

    I'm trying to read in the contents of "flash0:/kd/resource/big5_table.dat", but fd = sceIoOpen(filename, PSP_O_RDONLY, 0777); fails with fd = -2147418099.

    Any clue why e.g. "flash0:/font/jpn0.pgf" can be opened and read without problems, but the above file cannot? Is it because it's hidden / in a hidden directory? Is there a workaround?

    Thanks for the help, BenHur

    PS: Sorry, if this was asked before - I searched for sceIoOpen failure reasons, but found nothing...

  13. #9643
    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 believe I've seen a post elsewhere on hidden folders/files causing a problem, I'm not 100% sure though. As for the error, could you supply it in hex format? It'd make debugging easier that way.

    Also... weird question but have you tried re-mounting flash0? I know this works when modifying flash2 and flash3, so give that a shot too.

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

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

  14. #9644
    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

    Zitat Zitat von Auraomega Beitrag anzeigen
    Is there any good guides online on data encryption? I want to use standard libraries if possible. I've done rot13 stuff but I've heard that bitwise operators can be used and I'm assuming theres other methods such as hashing, but I can't find any really good guides online.
    i don't know about librarys(seems kindof pointless as any could create a program which runs encrypted data though decrypters that use these librarys as a base point, and would immidiatly decrypt data encrypted with the library), i'd suggest building your own way to encrypt and decrypt data, isn't a hard thing to do, i've created an algorithm which scrambles/encrypts text based on offsetting, and the length of the string and it's position in the string
    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

  15. #9645
    QJ Gamer Silver
    Points: 8.475, Level: 62
    Level completed: 9%, Points required for next Level: 275
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    Perth, Scotland
    Beiträge
    1.094
    Points
    8.475
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    You sure you have correct file permissions? I think that error is 0x8001000D which IIRC, means invalid file permissions.

  16. #9646
    QJ Gamer Blue
    Points: 4.111, Level: 40
    Level completed: 81%, Points required for next Level: 39
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Beiträge
    30
    Points
    4.111
    Level
    40
    Downloads
    0
    Uploads
    0

    Standard

    Thanks for the replies. Yes it's error 0x8001000D (No file access permission). However, how do I change the permission (I only want to read the contents)?
    I tried reassigning with
    Code:
    sceIoUnassign("flash0:");
    sceIoAssign("flash0:", "lflash0:0,0", "flashfat0:", IOASSIGN_RDWR, NULL, 0);
    but no luck...

    Any other suggestions?

  17. #9647
    QJ Gamer Silver
    Points: 8.475, Level: 62
    Level completed: 9%, Points required for next Level: 275
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    Perth, Scotland
    Beiträge
    1.094
    Points
    8.475
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    Use vsh mode (0x0800) or load Alex's IOP.prx

    It is included in many of his applications such as VLF.

  18. #9648
    QJ Gamer Blue
    Points: 4.111, Level: 40
    Level completed: 81%, Points required for next Level: 39
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Beiträge
    30
    Points
    4.111
    Level
    40
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Davee Beitrag anzeigen
    Use vsh mode (0x0800) or load Alex's IOP.prx

    It is included in many of his applications such as VLF.
    I'll give it a try. Thanks a lot for your help!

  19. #9649
    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 slicer4ever Beitrag anzeigen
    i don't know about librarys(seems kindof pointless as any could create a program which runs encrypted data though decrypters that use these librarys as a base point, and would immidiatly decrypt data encrypted with the library), i'd suggest building your own way to encrypt and decrypt data, isn't a hard thing to do, i've created an algorithm which scrambles/encrypts text based on offsetting, and the length of the string and it's position in the string
    What I meant by standard libraries is not having to download a tun of Windoze only or Linux only libraries, I want to use whatever is usable by all C++ (so I could write an encryption method on the PC, use it on Linux and run it on the PSP).

    So, how do I go about making an encryption algorithm, which was the question at hand, the only info I've found on encryption is rot13 (which is both easy and pointles) and XOR.

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

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

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

    well as long as you don't use anything api specific, creating encryption is rather easy, just use your imagination on how to modify your data and bring it back from modification, use offsets, break int's down into unsigned char's, etc, etc, but like i said using an library for encryption makes it rather easy to decrypt your data
    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

  21. #9651
    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

    Ok thanks, so basically evolve it from an XOR, and make sure everything is revsersable (so divisions aren't a good plan).

    And as I said, I wanted to avoid using libraries aimed at encrpytion, by normal libraries I meant stdlib or fopen, something innocuous that could be used to aid encryption.

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

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

  22. #9652
    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

    ah, yes, exactly what you said, and division can be used, just make certain all the math you do in one direction for encryption you do in reverse for decryption properly

    edit: i just re-read your first post about encryption, i thought u said u were looking for a good library, after re-reading i noticed u said guide, idk what i was thinking, my bad
    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

  23. #9653
    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

    No problem, easily done.

    Using division, wouldn't it be best to be avoided though? I mean something like 10/3 would return 3.33... but when you reverse it you'll get 9.99... instead of 10. A minor formality as you could get it to round up (but by default it would round down I believe) but surely the same problem could arrise but in such a way it transforms parts of the output?

    Also, another random question. Is there a cross-platform graphics library that will allow me to put text on the screen? The only ones I've come across are for Windoze, and I split my time roughly half between my PC and my Linux box so I need something cross platform ideally.

    -Aura

    EDIT:
    Nevermind found a good tutorial using SDL to get fonts.

    EDIT2:

    Is there a cross platform method of making a frontend to my encryption? Something where I can select check boxes, type file addresses for the files in and out, and see a progress bar? Something tells me that'd be hard to get away with in SDL...
    Geändert von Auraomega (02-05-2009 um 08:28 AM Uhr)
    Last.fm | Deviant Art | First working OS picture

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

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

    Zitat Zitat von Auraomega Beitrag anzeigen
    EDIT2:

    Is there a cross platform method of making a frontend to my encryption? Something where I can select check boxes, type file addresses for the files in and out, and see a progress bar? Something tells me that'd be hard to get away with in SDL...
    using visual c# 2005 could make it easy for you to design such a thing

    edit: however i don't believe it's cross platform
    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

  25. #9655
    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

    Qt: http://www.qtsoftware.com/ (This is what I used to write FANG)

    Note that you'll need to open-source it (probably under GPL) unless you wait for 4.5.0 (which should be out fairly soon)
    pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ

  26. #9656
    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

    Thanks, that looks good and I'm not too fussed about making stuff open source anymore, I actually make readable stuff now.

    I've having a strange problem with some code I've written on Vista. When I compile and run everything works as expected, when I compiled and ran it on Ubuntu things started playing up, I've spent the past couple of hours trying to figure out why it runs on one system and not the other. I think I've worked out where the code goes up the spout, but I can't see a logical reason why it'd happen, so could you lend assistance?

    Spoiler for Code:
    Code:
    bool mapRead(const char* fileName, int* xDim, int* yDim, int* map)
    {
    	FILE* mapFile;
    	printf("%s", fileName);
    	
    	//flushArray((char*)map);
    	
    	mapFile = fopen(fileName, "rb");
    	if(!mapFile)
    	{
    		return 0;
    	}
    	
    	fscanf(mapFile, "%ix%i", xDim, yDim);
    	//{
    		int c = 0;
    		int loop = 0;
    		do
    		{
    			c = fgetc(mapFile);
    			map[loop] = c;
    			loop++;
    		}while(c != EOF);
    		
    		//map[loop - 1] = 0;
    	//}
    
    	fclose(mapFile);
    	
    	FILE* dump;
    	
    	dump = fopen("dump.txt", "ab");
    	
    	fprintf(dump, "%i%i", *xDim, *yDim);
    	
    	for(int loop2 = 0; loop2 < loop; loop2++)
    	{
    		fprintf(dump, "%i", map[loop2]);
    	}
    	
    	fclose(dump);
    	
    	if((*xDim > 48) || (*yDim > 27))
    	{
    		xDim = yDim = 0;
    		return 0;
    	}
    	else
    	{
    		return 1;
    	}
    }


    I've attached the map and dump files, the map files you'll need a hex editor to read, the dump is integers. From what I can see, the map dimensions are read correctly the first time, but after it goes haywire. The first map reads perfectly but every map afterwards fails to load.

    -Aura
    Angehängte Dateien Angehängte Dateien
    Last.fm | Deviant Art | First working OS picture

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

  27. #9657
    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

    Have you stepped through it with a debugger?

  28. #9658
    xMod.
    Points: 4.576, Level: 43
    Level completed: 13%, Points required for next Level: 174
    Overall activity: 0%

    Registriert seit
    Oct 2008
    Ort
    Melbourne, Australia
    Beiträge
    675
    Points
    4.576
    Level
    43
    My Mood
    Daring
    Downloads
    0
    Uploads
    0

    Standard

    any1 have any working libcurl examples on psp?

    i cant get any to work!

    ~!SlasheR!~

  29. #9659
    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 what debuggers are open to me on Linux. From what I can see its purely problems with handling 2 digit numbers as all maps under 10x10 run fine, but when I use fscanf on anything above that, the errors occur. I'll take a look and see what there is in the way of debuggers.

    -Aura

    EDIT:
    Confirmed - hard coding the dimensions fixes the problem on those maps, so something with the fscanf is failing. I'm going to slightly modify the map files and see if that fixes it.
    Nope, changing the map files didn't work still having the same problem, downloading a debugger now hopefully that'll give some indication of whats going on.
    Geändert von Auraomega (02-05-2009 um 03:55 PM Uhr)
    Last.fm | Deviant Art | First working OS picture

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

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

    What IDE are you using?
    Are you reading in binary files or text files? If the latter, don't forget that Windows and Linux have different line endings. Also, don't forget that Linux has a case sensitive filesystem.
    Try the InsightGDB debugger: http://sources.redhat.com/insight/


 

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

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