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 MiKeY188 Well then buy some books. If you want a basic website use .html if you want a ...
-
08-04-2008, 01:09 PM #8821banned 4 LIFE
- Registriert seit
- Apr 2007
- Ort
- Jupiter
- Beiträge
- 3
- Points
- 14.513
- Level
- 78
- Downloads
- 0
- Uploads
- 0
-
08-04-2008, 01:10 PM #8822Oppressed by the man
- Registriert seit
- Jul 2008
- Ort
- So Cal
- Beiträge
- 323
- Points
- 5.684
- Level
- 48
- Downloads
- 0
- Uploads
- 0
Ok I know simple .html gotta lear advanvced and move my way up
welll thanks anyways guys...=]
-
08-04-2008, 01:18 PM #8823
So how can I tell how many threads are being run in-game? That way I can stop all working threads except my PRX.
Atheist, because I just won't believe in what doesn't show itself to me.
-
08-04-2008, 01:22 PM #8824QJ Gamer Bronze
- Registriert seit
- Apr 2008
- Ort
- Ireland
- Beiträge
- 978
- Points
- 6.517
- Level
- 52
- Downloads
- 0
- Uploads
- 0
-
08-04-2008, 01:36 PM #8825banned 4 LIFE
- Registriert seit
- Apr 2007
- Ort
- Jupiter
- Beiträge
- 3
- Points
- 14.513
- Level
- 78
- Downloads
- 0
- Uploads
- 0
-
08-04-2008, 01:48 PM #8826QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
We just been through this with another user.
C or LUA
how to make an obstacle?[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]
-
08-04-2008, 02:01 PM #8827QJ Gamer Bronze
- Registriert seit
- Apr 2008
- Ort
- Ireland
- Beiträge
- 978
- Points
- 6.517
- Level
- 52
- Downloads
- 0
- Uploads
- 0
-
08-04-2008, 05:43 PM #8828QJ Gamer Blue
- Registriert seit
- Apr 2008
- Beiträge
- 497
- Points
- 4.268
- Level
- 41
- Downloads
- 0
- Uploads
- 0
hey question, I just learning C++ and I was wondering how to do button input for PSP, is it kinda like cin >> cross?? I know there is more to it as you need to define cross, but please explain, or give me a tut for C++ specifically for PSP :)
-
08-04-2008, 06:10 PM #8829
Can someone explain how to unsuspend user threads after calling this function:
sceKernelSuspendAllUserTh reads();
Thanks.
-=Double Post Merge =-
http://www.psp-programming.com/tutorials/c/lesson03.htm
Hope that helps. There are other tutorials there, as well.Geändert von Durka Durka Mahn (08-04-2008 um 06:11 PM Uhr) Grund: Automerged Doublepost
Atheist, because I just won't believe in what doesn't show itself to me.
-
08-04-2008, 06:49 PM #8830lol

- Registriert seit
- Aug 2006
- Ort
- Whittier, CA
- Beiträge
- 5.791
- Points
- 20.859
- Level
- 91
- Downloads
- 0
- Uploads
- 0
sceKernelResumeThread();
EDIT: nvm, this only works with sceKernelSuspendThread
Anyways, I know 0x1000 is kernel mode, but what other modes are there besides kernel and user?
I think I've seen something like 0x0800 is vsh or something similar.Geändert von Anti-QuickJay (08-04-2008 um 08:36 PM Uhr)
-
08-04-2008, 07:44 PM #8831
- Registriert seit
- Apr 2008
- Beiträge
- 47
- Points
- 2.658
- Level
- 31
- Downloads
- 0
- Uploads
- 0
@PSProgrammer:
Go thorugh the C tutorials at psp-programming.com. There's a function in pspctrl.h that fetches a btimask of the currently pressed keys. I think it's 'pspCtrlReadBufferPositiv e(PspCtrlData*, 1)'. Then you use the enumerated constants in pspctrl.h and compare them to the PspCtrlData by using & (bitwise and).
example:
You should check the lib, though, to make sure I got the function and struct names right, but really you should read the tutorials. They go over all that stuff.Code:PspCtrlData pad; pspCtrlReadBufferPositive(&pad, 1); if(pad & PSP_CTRL_CROSS) { //do something }
-
08-04-2008, 08:01 PM #8832
What is user mode then? I really need to know to get my program working... :/
Atheist, because I just won't believe in what doesn't show itself to me.
-
08-04-2008, 10:22 PM #8833QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
user mode is simple that, "user mode" it doesn't allow direct access to the hardware(all be it that their are now user functions to allow most access to the hardware), where's their's also "kernel mode", which allows direct access to the hardware, however any 3xx kernel can not be started in this mode
kernel mode:
PSP_MODULE_INFO("Kernel mode", 0x1000, 0, 1); //the 0x1000 tells the psp it's a kernel app and can not be started in any 3xx fw
user mode:
PSP_MODULE_INFO("user moder", 0, 0, 1); //the first 0 denotes user mode and is what can only be started in 3xx fw atm
now than1. 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
-
08-04-2008, 11:11 PM #8834QJ Gamer Green
- Registriert seit
- Jul 2006
- Ort
- USA SC/NC
- Beiträge
- 699
- Points
- 5.712
- Level
- 48
- Downloads
- 0
- Uploads
- 0
[CODE]Random Facts:
irc://irc.malloc.us #wtf #**********
[/CODE]
[SIZE="6"][FONT="Century Gothic"][COLOR="Blue"][URL="http://forums.**********.net"]http://forums.**********.net[/URL][/COLOR][/FONT][/SIZE]
-
08-04-2008, 11:41 PM #8835QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
than do explain it
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
-
08-05-2008, 02:02 AM #8836words are stones in my <3

- Registriert seit
- Jul 2005
- Ort
- Spokane
- Beiträge
- 5.008
- Points
- 35.274
- Level
- 100
- My Mood
-
- Downloads
- 1
- Uploads
- 0
Yes either Moca is incredibly ignorant to not explain it after disagreeing with you or he is describing himself.
I wrote up a relatively long post at psp-hacks to someone asking a very similar question, I don't want to type it all out again so i'll try to search for it
...at what speed must I live.. to be able to see you again?...
Projects
You can support my Open World 3D RPG for PSP by voting for it here
-
08-05-2008, 08:46 AM #8837
No, no, I'm not asking WHAT user mode is, I'm asking for the code. He said kernel was 0x1000 and that he thought VSH was 0x800..
Atheist, because I just won't believe in what doesn't show itself to me.
-
08-05-2008, 10:09 AM #8838QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
=-)
Zitat von slicer4ever
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
-
08-05-2008, 10:44 AM #8839
No, no, I need to resume user mode after calling this function:
sceKernelSuspendAllUserTh reads();
Anti-QJ said to use sceKernelResumeThread(); but that doesn't work with user mode...Atheist, because I just won't believe in what doesn't show itself to me.
-
08-05-2008, 11:06 AM #8840QJ Gamer Gold

- Registriert seit
- Jul 2005
- Ort
- everywhere
- Beiträge
- 3.526
- Points
- 17.453
- Level
- 84
- Downloads
- 1
- Uploads
- 0
ahh, i'm sorry i didn't realize there was a conversation on the prior page, my bad, anywho it appears after a quick look at the documentation that sceKernelResumeThread resumes when used with sceKernelSuspendThread() function, however it appears that you can pass an thid parameter to sceKernelResumeThread, so that's as much as i know
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
-
08-05-2008, 11:32 AM #8841Developer

- Registriert seit
- Mar 2006
- Beiträge
- 1.026
- Points
- 7.577
- Level
- 58
- Downloads
- 0
- Uploads
- 0

Check out my homebrew & C tutorials at http://insomniac.0x89.org/
Coder formerly known as Insomniac197
tshirtz: what is irshell ??
Atarian_: it's where people who work for the IRS go when they die
-
08-05-2008, 11:33 AM #8842
Yes, but there is no way to resume the user threads using that function..
I even tried using sceKernelSuspendThread but it didn't freeze the game like I need it to.Atheist, because I just won't believe in what doesn't show itself to me.
-
08-05-2008, 11:50 AM #8843Developer

- Registriert seit
- Mar 2006
- Beiträge
- 1.026
- Points
- 7.577
- Level
- 58
- Downloads
- 0
- Uploads
- 0
Here is the source for taking a screenshot as a BMP file. It uses the functions I listed.
I'm not sure where the code is from, I know it isn't mine - so credit to whoever the author is.
Spoiler for Code:
Check out my homebrew & C tutorials at http://insomniac.0x89.org/
Coder formerly known as Insomniac197
tshirtz: what is irshell ??
Atarian_: it's where people who work for the IRS go when they die
-
08-05-2008, 11:51 AM #8844QJ Gamer Bronze
- Registriert seit
- Apr 2008
- Ort
- Ireland
- Beiträge
- 978
- Points
- 6.517
- Level
- 52
- Downloads
- 0
- Uploads
- 0
Dude the spolier thing doesn't work any more
its a problem which they need to fix xD
I think its firefox.
-
08-05-2008, 11:52 AM #8845Developer

- Registriert seit
- Mar 2006
- Beiträge
- 1.026
- Points
- 7.577
- Level
- 58
- Downloads
- 0
- Uploads
- 0
Works fine for me in Safari and Firefox.

Check out my homebrew & C tutorials at http://insomniac.0x89.org/
Coder formerly known as Insomniac197
tshirtz: what is irshell ??
Atarian_: it's where people who work for the IRS go when they die
-
08-05-2008, 12:13 PM #8846
IWN, I tried doing it last night, but instead of freezing the game all it did was shut off the audio and disabled the gamesave menu and some other things.. :/
Atheist, because I just won't believe in what doesn't show itself to me.
-
08-05-2008, 12:14 PM #8847Developer

- Registriert seit
- Mar 2006
- Beiträge
- 1.026
- Points
- 7.577
- Level
- 58
- Downloads
- 0
- Uploads
- 0
That code I supplied works.
It freezes every thread running except it's own.
Check out my homebrew & C tutorials at http://insomniac.0x89.org/
Coder formerly known as Insomniac197
tshirtz: what is irshell ??
Atarian_: it's where people who work for the IRS go when they die
-
08-05-2008, 02:20 PM #8848QJ Gamer Bronze
- Registriert seit
- Apr 2008
- Ort
- Ireland
- Beiträge
- 978
- Points
- 6.517
- Level
- 52
- Downloads
- 0
- Uploads
- 0
-
08-05-2008, 02:42 PM #8849Avada Kedavra

- Registriert seit
- May 2007
- Ort
- Spain
- Beiträge
- 703
- Points
- 6.813
- Level
- 54
- Downloads
- 0
- Uploads
- 0
-
08-05-2008, 06:48 PM #8850
How would one remap something (ex. if analog is in desired area[if(pad.Lx < 50) pad.Buttons=pad.Buttons & PSP_CTRL_SQUARE]). At the moment, that does not work, which is why I need some help.


LinkBack URL
About LinkBacks
Mit Zitat antworten
yeah....

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