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 ...
-
01-31-2009, 04:33 AM #9631
-
01-31-2009, 08:49 PM #9632
whats the equivalent of pspSdkLoadStartModule for 3.xx user mode
-
01-31-2009, 11:24 PM #9633xMod.
- Registriert seit
- Oct 2008
- Ort
- Melbourne, Australia
- Beiträge
- 675
- Points
- 4.576
- Level
- 43
- My Mood
-
- Downloads
- 0
- Uploads
- 0
pspKernelLoadStartModulewhats the equivalent of pspSdkLoadStartModule for 3.xx user mode
Any1 got any examples of using CURL? i cant get any of the C++ examples to work on my psp.
~!SlasheR!~
-
02-01-2009, 02:31 AM #9634
Is there a psp emu for windows that can run homebrew?
I want to test my homebrew before putting it in my psp...
-
02-01-2009, 03:21 AM #9635QJ Gamer Bronze

- Registriert seit
- Aug 2007
- Ort
- Australia
- Beiträge
- 659
- Points
- 8.045
- Level
- 60
- Downloads
- 0
- Uploads
- 0
Not a decent one, no.
-
02-01-2009, 03:34 AM #9636
-
02-01-2009, 04:04 AM #9637QJ Gamer Silver
- Registriert seit
- Sep 2006
- Ort
- Perth, Scotland
- Beiträge
- 1.094
- Points
- 8.475
- Level
- 62
- Downloads
- 0
- Uploads
- 0
-
02-02-2009, 12:26 AM #9638xMod.
- Registriert seit
- Oct 2008
- Ort
- Melbourne, Australia
- Beiträge
- 675
- Points
- 4.576
- Level
- 43
- My Mood
-
- Downloads
- 0
- Uploads
- 0
Any1 got any examples of using CURL? i cant get any of the C++ examples to work on my psp.
~!SlasheR!~
-
02-02-2009, 05:28 PM #9639I'm back!

- Registriert seit
- Feb 2007
- Ort
- England
- Beiträge
- 902
- Points
- 8.236
- Level
- 61
- Downloads
- 0
- Uploads
- 0
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*’
the function is actually:Code:about.loadIcon("icon.bmp");
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.Code:void loadIcon(char *fileName);
-Aura
-
02-02-2009, 07:41 PM #9640QJ Gamer Blue
- Registriert seit
- Sep 2005
- Ort
- Chigasaki, Japan
- Beiträge
- 226
- Points
- 4.980
- Level
- 45
- Downloads
- 0
- Uploads
- 0
-
02-03-2009, 06:28 AM #9641I'm back!

- Registriert seit
- Feb 2007
- Ort
- England
- Beiträge
- 902
- Points
- 8.236
- Level
- 61
- Downloads
- 0
- Uploads
- 0
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)
-
02-04-2009, 12:44 PM #9642QJ Gamer Blue
- Registriert seit
- Aug 2006
- Beiträge
- 30
- Points
- 4.111
- Level
- 40
- Downloads
- 0
- Uploads
- 0
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...
-
02-04-2009, 01:10 PM #9643I'm back!

- Registriert seit
- Feb 2007
- Ort
- England
- Beiträge
- 902
- Points
- 8.236
- Level
- 61
- Downloads
- 0
- Uploads
- 0
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
-
02-04-2009, 01:11 PM #9644QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
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
-
02-04-2009, 01:11 PM #9645QJ Gamer Silver
- Registriert seit
- Sep 2006
- Ort
- Perth, Scotland
- Beiträge
- 1.094
- Points
- 8.475
- Level
- 62
- Downloads
- 0
- Uploads
- 0
You sure you have correct file permissions? I think that error is 0x8001000D which IIRC, means invalid file permissions.
-
02-04-2009, 01:21 PM #9646QJ Gamer Blue
- Registriert seit
- Aug 2006
- Beiträge
- 30
- Points
- 4.111
- Level
- 40
- Downloads
- 0
- Uploads
- 0
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
but no luck...Code:sceIoUnassign("flash0:"); sceIoAssign("flash0:", "lflash0:0,0", "flashfat0:", IOASSIGN_RDWR, NULL, 0);
Any other suggestions?
-
02-04-2009, 01:34 PM #9647QJ Gamer Silver
- Registriert seit
- Sep 2006
- Ort
- Perth, Scotland
- Beiträge
- 1.094
- Points
- 8.475
- Level
- 62
- Downloads
- 0
- Uploads
- 0
Use vsh mode (0x0800) or load Alex's IOP.prx
It is included in many of his applications such as VLF.
-
02-04-2009, 01:39 PM #9648QJ Gamer Blue
- Registriert seit
- Aug 2006
- Beiträge
- 30
- Points
- 4.111
- Level
- 40
- Downloads
- 0
- Uploads
- 0
-
02-04-2009, 03:01 PM #9649I'm back!

- Registriert seit
- Feb 2007
- Ort
- England
- Beiträge
- 902
- Points
- 8.236
- Level
- 61
- Downloads
- 0
- Uploads
- 0
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
-
02-04-2009, 03:12 PM #9650QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
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
-
02-04-2009, 04:15 PM #9651I'm back!

- Registriert seit
- Feb 2007
- Ort
- England
- Beiträge
- 902
- Points
- 8.236
- Level
- 61
- Downloads
- 0
- Uploads
- 0
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
-
02-04-2009, 04:20 PM #9652QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
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 bad1. 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
-
02-04-2009, 04:49 PM #9653I'm back!

- Registriert seit
- Feb 2007
- Ort
- England
- Beiträge
- 902
- Points
- 8.236
- Level
- 61
- Downloads
- 0
- Uploads
- 0
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)
-
02-05-2009, 08:40 AM #9654QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
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
-
02-05-2009, 11:14 AM #9655It's good to be free...

- Registriert seit
- Feb 2007
- Beiträge
- 2.440
- Points
- 10.420
- Level
- 67
- Downloads
- 0
- Uploads
- 0
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 əʞɒʇ
-
02-05-2009, 11:39 AM #9656I'm back!

- Registriert seit
- Feb 2007
- Ort
- England
- Beiträge
- 902
- Points
- 8.236
- Level
- 61
- Downloads
- 0
- Uploads
- 0
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:
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
-
02-05-2009, 02:26 PM #9657QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
Have you stepped through it with a debugger?
[Blog] [Portfolio]
[Homebrew Illuminati - Serious Homebrew Development Forums]
[I want to make Homebrew FAQ] [How I broke into the Games Industry]
[Programming Book List] [Programming Article List]
-
02-05-2009, 02:50 PM #9658xMod.
- Registriert seit
- Oct 2008
- Ort
- Melbourne, Australia
- Beiträge
- 675
- Points
- 4.576
- Level
- 43
- My Mood
-
- Downloads
- 0
- Uploads
- 0
any1 have any working libcurl examples on psp?
i cant get any to work!
~!SlasheR!~
-
02-05-2009, 03:37 PM #9659I'm back!

- Registriert seit
- Feb 2007
- Ort
- England
- Beiträge
- 902
- Points
- 8.236
- Level
- 61
- Downloads
- 0
- Uploads
- 0
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)
-
02-05-2009, 04:12 PM #9660QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
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/[Blog] [Portfolio]
[Homebrew Illuminati - Serious Homebrew Development Forums]
[I want to make Homebrew FAQ] [How I broke into the Games Industry]
[Programming Book List] [Programming Article List]


LinkBack URL
About LinkBacks
Mit Zitat antworten

Hello everyone I am new here and I am glad to be part of this amazing community and I think there...
New to forum