![]() |
| Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact |
| ||||||
This is a discussion on [RELEASE] RemotePower within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; Hi, If you ever messed with the remote control you probaly noticed the power will go off after a few ...
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 | |||
![]() |
Hi,
If you ever messed with the remote control you probaly noticed the power will go off after a few seconds the reason why is: the psp sends a query if he gets an answer he will doe nothing if nothing is sent back he will put the power off. With my plugin you can control the power with L+R. Please remember im still a 13 years old boy from the Netherlands, so my voice is childish and i cant speak english that good.
Code:
#include <pspctrl.h>
#include <pspsyscon.h>
#include <pspkernel.h>
PSP_MODULE_INFO("RemotePower", 0x1000, 1, 0);
PSP_MAIN_THREAD_ATTR(0);
#define ON 1
#define OFF 0
#define RUNNING 1
#define EXIT 0
int currentState = RUNNING;
int powerState = OFF;
int main_thread(SceSize args, void *argp) {
SceCtrlData pad;
while(currentState == RUNNING) {
sceCtrlPeekBufferPositive(&pad, 1);
if(pad.Buttons & PSP_CTRL_LTRIGGER && pad.Buttons & PSP_CTRL_LTRIGGER) {
if(powerState == ON) {
if(sceSysconCtrlHRPower(OFF) < 0) {
currentState = EXIT;
}
powerState = OFF;
} else {
if(sceSysconCtrlHRPower(ON) < 0) {
currentState = EXIT;
}
powerState = ON;
}
} sceKernelDelayThread(100000);
}
return 0;
}
int module_start(SceSize argc, void *argp) {
u32 func = 0x80000000 | (u32)main_thread;
SceUID thread = sceKernelCreateThread("main_thread",(void*)func, 0x30, 0x10000, 0, NULL);
if (thread >= 0) {
sceKernelStartThread(thread, argc, argp);
}
return 0;
}
Code:
TARGET = RemotePower OBJS = main.o CFLAGS = -O2 -G0 -Wall CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti ASFLAGS = $(CFLAGS) BUILD_PRX = 1 PSP_FW_VERSION = 401 USE_PSPSDK_LIBC = 1 LIBDIR = LDFLAGS = -mno-crt0 -nostartfiles STDLIBS= -lpspsdk -lpspctrl -lpsppower LIBS=$(STDLIBS)$(YOURLIBS) PSPSDK=$(shell psp-config --pspsdk-path) include $(PSPSDK)/lib/build.mak Last edited by basfreak; 09-23-2008 at 06:00 AM.. |
|||
|
|
|
|
|
#3 |
![]() ![]() |
He is saying, that be SONY default, the headphone remote will actually power down after a few seconds of inactivity until it is given another request...
This plugin keeps the signal from the headphone remote on at all times. Thus, giving you faster response times when using it. A+ for originality. (I first thought it was another power off plugin by reading the title...) No one has ever released anything like this before. And hey, this kid is very intelligent. He is only 13 years old, is multi-lingual, and can program in C. He even built a home made head phone power indicator... So really he deserves a lot of credit. ![]() ~Mr. Shizzy
__________________
![]() PSP MODEL: PSP SLIM 2000 TA-085v2 Custom Firmware: 5.50 GEN-D2
|
|
|
|
|
|
#7 |
![]() ![]() Avada Kedavra
|
I agree.Keep it up.
__________________
|
|
|
|
|
|
#8 | |
![]() |
Quote:
But maybe someone who cant code need it. Oh, btw. this isn't my first homebrew, and im working on a new game, but thats still sercret. |
|
|
|
|
|
|
#9 |
![]() Enter Custom Title
Join Date: Sep 2006
Real First Name: Davee
Location: Perth, Scotland
Posts: 1,041
Trader Feedback: 0
|
Nice release. I don't think everyone should be hyped up about his age... There is many more young developers.
__________________
VSH Scramble Patcher || VSH Module Descrambler || Unlimted Character Version Changer (5.00) |
|
|
|
|
|
#10 | |
![]() ![]() Avada Kedavra
|
Quote:
__________________
|
|
|
|
|
![]() |
| Tags |
| release , remotepower |
| Thread Tools | |
|
|