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 ...
-
07-22-2007, 05:46 AM #5611I'm back!

- Registriert seit
- Feb 2007
- Ort
- England
- Beiträge
- 902
- Points
- 8.236
- Level
- 61
- Downloads
- 0
- Uploads
- 0
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?
Zitat von Archaemic
Cheers.
-Aura
-
07-22-2007, 06:15 AM #5612QJ Gamer Green
- Registriert seit
- Apr 2006
- Ort
- England ~¦¦¦|+|¦¦¦~
- Beiträge
- 1.112
- Points
- 9.165
- Level
- 64
- My Mood
-
- Downloads
- 0
- Uploads
- 0
the libs have to be installed with it, you cant just use UMD.h
Zitat von vodkkaa
then again, if youve just LOST it, heres the code for pspumd.h:
Spoiler for pspumd.h:...Just Returned To The Scene...
-
07-22-2007, 10:52 AM #5613QJ Gamer Green
- Registriert seit
- Sep 2006
- Ort
- Cape Town, South Africa
- Beiträge
- 714
- Points
- 5.795
- Level
- 49
- Downloads
- 0
- Uploads
- 0
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...
-
07-22-2007, 10:59 AM #5614
coincidentally, i've already planned on it.
Zitat von coolguy5678
-= 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
-
07-22-2007, 12:10 PM #5615QJ Gamer Green
- Registriert seit
- Apr 2006
- Ort
- England ~¦¦¦|+|¦¦¦~
- Beiträge
- 1.112
- Points
- 9.165
- Level
- 64
- My Mood
-
- Downloads
- 0
- Uploads
- 0
When i try to install SDL_mixer, afetr i type this:
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?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
...Just Returned To The Scene...
-
07-22-2007, 12:19 PM #5616It's good to be free...

- Registriert seit
- Feb 2007
- Beiträge
- 2.440
- Points
- 10.420
- Level
- 67
- Downloads
- 0
- Uploads
- 0
You probably have SDL installed in the wrong place.
pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ
-
07-22-2007, 01:58 PM #5617QJ Gamer Green
- Registriert seit
- Apr 2006
- Ort
- England ~¦¦¦|+|¦¦¦~
- Beiträge
- 1.112
- Points
- 9.165
- Level
- 64
- My Mood
-
- Downloads
- 0
- Uploads
- 0
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??
Zitat von Archaemic
...Just Returned To The Scene...
-
07-22-2007, 02:11 PM #5618It's good to be free...

- Registriert seit
- Feb 2007
- Beiträge
- 2.440
- Points
- 10.420
- Level
- 67
- Downloads
- 0
- Uploads
- 0
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 əʞɒʇ
-
07-22-2007, 02:42 PM #5619QJ Gamer Green
- Registriert seit
- Apr 2006
- Ort
- England ~¦¦¦|+|¦¦¦~
- Beiträge
- 1.112
- Points
- 9.165
- Level
- 64
- My Mood
-
- Downloads
- 0
- Uploads
- 0
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...
-
07-22-2007, 03:43 PM #5620QJ Gamer Blue
- Registriert seit
- Feb 2007
- Ort
- Florida
- Beiträge
- 214
- Points
- 4.031
- Level
- 40
- Downloads
- 0
- Uploads
- 0
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)
-
07-22-2007, 05:20 PM #5621I'm back!

- Registriert seit
- Feb 2007
- Ort
- England
- Beiträge
- 902
- Points
- 8.236
- Level
- 61
- Downloads
- 0
- Uploads
- 0
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
-
07-22-2007, 07:23 PM #5622
nevermind
-
07-23-2007, 01:08 AM #5623QJ Gamer Green
- Registriert seit
- Apr 2006
- Ort
- England ~¦¦¦|+|¦¦¦~
- Beiträge
- 1.112
- Points
- 9.165
- Level
- 64
- My Mood
-
- Downloads
- 0
- Uploads
- 0
A pointer to a video::ITexture struct/class?
Zitat von MrChaos
EDIT: Here we go:
If that isn't relevant, i'll eat my hat.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; };Geändert von JaSo PsP (07-23-2007 um 08:30 AM Uhr)
...Just Returned To The Scene...
-
07-23-2007, 10:52 AM #5624I'm back!

- Registriert seit
- Feb 2007
- Ort
- England
- Beiträge
- 902
- Points
- 8.236
- Level
- 61
- Downloads
- 0
- Uploads
- 0
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?
-AuraGeändert von Auraomega (07-23-2007 um 03:32 PM Uhr) Grund: Automerged Doublepost
-
07-24-2007, 11:45 AM #5625Heroes never die

- Registriert seit
- Aug 2006
- Ort
- ...........
- Beiträge
- 1.323
- Points
- 8.645
- Level
- 62
- Downloads
- 0
- Uploads
- 0
Spoiler for origenal:
Spoiler for rewritten:
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
-
07-24-2007, 12:43 PM #5626Developer

- Registriert seit
- Jul 2006
- Beiträge
- 28
- Points
- 4.171
- Level
- 41
- Downloads
- 0
- Uploads
- 0
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
-
07-24-2007, 01:35 PM #5627
- Registriert seit
- Jul 2007
- Ort
- Toronto
- Beiträge
- 3
- Points
- 3.139
- Level
- 34
- Downloads
- 0
- Uploads
- 0
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
-
07-24-2007, 03:52 PM #5628I'm back!

- Registriert seit
- Feb 2007
- Ort
- England
- Beiträge
- 902
- Points
- 8.236
- Level
- 61
- Downloads
- 0
- Uploads
- 0
Zitat von A-Sylum
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
-
07-25-2007, 02:31 AM #5629QJ Gamer Green
- Registriert seit
- Apr 2006
- Ort
- England ~¦¦¦|+|¦¦¦~
- Beiträge
- 1.112
- Points
- 9.165
- Level
- 64
- My Mood
-
- Downloads
- 0
- Uploads
- 0
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...
-
07-25-2007, 05:30 AM #5630Banned for LIFE
- Registriert seit
- Oct 2006
- Ort
- East London, England
- Beiträge
- 2
- Points
- 18.744
- Level
- 86
- Downloads
- 0
- Uploads
- 0
: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 ?
-
07-25-2007, 05:37 AM #5631It's good to be free...

- Registriert seit
- Feb 2007
- Beiträge
- 2.440
- Points
- 10.420
- Level
- 67
- Downloads
- 0
- Uploads
- 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.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; }pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ
-
07-25-2007, 06:15 AM #5632QJ Gamer Green
- Registriert seit
- Apr 2006
- Ort
- England ~¦¦¦|+|¦¦¦~
- Beiträge
- 1.112
- Points
- 9.165
- Level
- 64
- My Mood
-
- Downloads
- 0
- Uploads
- 0
But the struct only holds information for ONE Dirent, i want more than one Dirent to be listed on the screen :|
Zitat von Archaemic
...Just Returned To The Scene...
-
07-25-2007, 06:17 AM #5633Banned for LIFE
- Registriert seit
- Oct 2006
- Ort
- East London, England
- Beiträge
- 2
- Points
- 18.744
- Level
- 86
- Downloads
- 0
- Uploads
- 0
do you have to put anything in your makefile if you're using c++ ?
-
07-25-2007, 06:22 AM #5634It's good to be free...

- Registriert seit
- Feb 2007
- Beiträge
- 2.440
- Points
- 10.420
- Level
- 67
- Downloads
- 0
- Uploads
- 0
That WILL list more than one Dirent on the screen
Zitat von JaSo PsP
pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ
-
07-25-2007, 06:22 AM #5635QJ Gamer Green
- Registriert seit
- Apr 2006
- Ort
- England ~¦¦¦|+|¦¦¦~
- Beiträge
- 1.112
- Points
- 9.165
- Level
- 64
- My Mood
-
- Downloads
- 0
- Uploads
- 0
-lstdc++ under libs, i think...
Zitat von eldiablov
...Just Returned To The Scene...
-
07-25-2007, 06:23 AM #5636Banned for LIFE
- Registriert seit
- Oct 2006
- Ort
- East London, England
- Beiträge
- 2
- Points
- 18.744
- Level
- 86
- Downloads
- 0
- Uploads
- 0
i love you. In a non homosexual way
-
07-25-2007, 06:24 AM #5637QJ Gamer Green
- Registriert seit
- Apr 2006
- Ort
- England ~¦¦¦|+|¦¦¦~
- Beiträge
- 1.112
- Points
- 9.165
- Level
- 64
- My Mood
-
- Downloads
- 0
- Uploads
- 0
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?
Zitat von Archaemic
...Just Returned To The Scene...
-
07-25-2007, 06:26 AM #5638It's good to be free...

- Registriert seit
- Feb 2007
- Beiträge
- 2.440
- Points
- 10.420
- Level
- 67
- Downloads
- 0
- Uploads
- 0
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 əʞɒʇ
-
07-25-2007, 06:32 AM #5639QJ Gamer Green
- Registriert seit
- Apr 2006
- Ort
- England ~¦¦¦|+|¦¦¦~
- Beiträge
- 1.112
- Points
- 9.165
- Level
- 64
- My Mood
-
- Downloads
- 0
- Uploads
- 0
ok, the code above still freezes? how do i trace, i haven done it before. :P
...Just Returned To The Scene...
-
07-25-2007, 06:58 AM #5640QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
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


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