Note, Vol Up, Vol Down Button Input?
- darksaboteur
- Posts: 18
- Joined: Tue Dec 11, 2007 8:44 pm
- Location: Australia
- Contact:
Note, Vol Up, Vol Down Button Input?
Hi,
I was wondering how to get Note, Vol Up, Vol Down input.
In pspctrl.h I noticed "@note PSP_CTRL_HOME, PSP_CTRL_NOTE, PSP_CTRL_SCREEN, PSP_CTRL_VOLUP, PSP_CTRL_VOLDOWN, PSP_CTRL_DISC, PSP_CTRL_WLAN_UP, PSP_CTRL_REMOTE, PSP_CTRL_MS can only be read in kernel mode"
I have no idea how to achieve this so I was hoping someone would take pity on me and post an example?
The code for my application can be found at svn://nicksplace.com.au/public/UniMote
Thanks,
Darky
I was wondering how to get Note, Vol Up, Vol Down input.
In pspctrl.h I noticed "@note PSP_CTRL_HOME, PSP_CTRL_NOTE, PSP_CTRL_SCREEN, PSP_CTRL_VOLUP, PSP_CTRL_VOLDOWN, PSP_CTRL_DISC, PSP_CTRL_WLAN_UP, PSP_CTRL_REMOTE, PSP_CTRL_MS can only be read in kernel mode"
I have no idea how to achieve this so I was hoping someone would take pity on me and post an example?
The code for my application can be found at svn://nicksplace.com.au/public/UniMote
Thanks,
Darky
You need to run your app in kernel mode.
Code: Select all
int main(){
SetupCallbacks();
makeNiceGame();
sceKernelExitGame();
}
- darksaboteur
- Posts: 18
- Joined: Tue Dec 11, 2007 8:44 pm
- Location: Australia
- Contact:
Ok
I figured that would be the case.
Is there any disadvantages to this? The application is not designed for 1.5, I use it under a 5.xx kernel. It won't affect any of the my existing code?
Would you be able to point me to some examples of how to do this?
Sorry for the all the questions
Thanks,
Darky
Is there any disadvantages to this? The application is not designed for 1.5, I use it under a 5.xx kernel. It won't affect any of the my existing code?
Would you be able to point me to some examples of how to do this?
Sorry for the all the questions
Thanks,
Darky
- darksaboteur
- Posts: 18
- Joined: Tue Dec 11, 2007 8:44 pm
- Location: Australia
- Contact:
Doesn't Work
After adding 0x800 to PSP_MODULE_INFO("UniMote", 0x800, 1, 1);
I get "The game could not be started (80020148)"
Thanks,
Darky
I get "The game could not be started (80020148)"
Thanks,
Darky
Hi! :)
To use a kernel function in 3.x code you need to put the kernel calls in a prx.
See here for a sample:
http://forums.ps2dev.org/viewtopic.php?t=12441
Ciaooo
Sakya
To use a kernel function in 3.x code you need to put the kernel calls in a prx.
See here for a sample:
http://forums.ps2dev.org/viewtopic.php?t=12441
Ciaooo
Sakya
- darksaboteur
- Posts: 18
- Joined: Tue Dec 11, 2007 8:44 pm
- Location: Australia
- Contact:
Having A Few Troubles...
Ok, I have tried to make a prx and am failing :(
I get 'main.cpp:(.text+0x1064): undefined reference to `setSamplingCycle(int)'
setSamplingCycle(int) is the function I created the in prx.
I have followed the samples and looked around on the net to no avail.
I can post full source if anyone is interested...
Thanks again,
Darky
I get 'main.cpp:(.text+0x1064): undefined reference to `setSamplingCycle(int)'
setSamplingCycle(int) is the function I created the in prx.
I have followed the samples and looked around on the net to no avail.
I can post full source if anyone is interested...
Thanks again,
Darky
This is the clearest example of making a kernel mode PRX for a user mode application. If you can't figure it out from this, you aren't ready to work on this yourself.
http://forums.ps2dev.org/viewtopic.php?p=58653#58653
http://forums.ps2dev.org/viewtopic.php?p=58653#58653
- darksaboteur
- Posts: 18
- Joined: Tue Dec 11, 2007 8:44 pm
- Location: Australia
- Contact:
I have read many samples and tutorials and they all work.
Interestingly if I rename main.c to main.cpp in the samples they get the same error my application gets during compilation. (mine is cpp).
So it seems to be related to it being a cpp application?
Does it need something different in the makefile or something along those lines?
Thanks again,
Darky
Interestingly if I rename main.c to main.cpp in the samples they get the same error my application gets during compilation. (mine is cpp).
So it seems to be related to it being a cpp application?
Does it need something different in the makefile or something along those lines?
Thanks again,
Darky