I decided to reverse the simple led.prx module.
Since the current sdk doesn't have prototypes for that library, i prepared the header file.
I would have made a patch but i don't know how to insert a new library... i think that the whole makefile has to be changes, so... i don't know.
here is the header http://www.megaupload.com/?d=8VDYUYIJ
I want also to say that in this topic
http://forums.ps2dev.org/viewtopic.php?t=9485
the param structure is defined as a 4 int elements structure, but is is five elements structure and the first element may be an array of four chars, i have to investigate it.
the main function, sceLedSetMode has the second arg called mode. modes available are 4 (0, 1, 2, 3) but i discovered how to use mode 2 (modes 0 and 1 were already known), but i'm working on mode 3 (called in the other thread DELAY).
mode 3 use is difficult to find out because it's not used in any of sce modules!.. (afaik)
hope to have been useful!
bye
pspLed library
I can downlaod it so you can do it too.
Code: Select all
/*
* PSP Software Development Kit - http://www.pspdev.org
* -----------------------------------------------------------------------
* Licensed under the BSD license, see LICENSE in PSPSDK root for details.
*
* pspled.h - Prototypes for the sceLed_driver library.
*
* Copyright (c) 2009 Phobox
*/
#ifndef __LED_H
#define __LED_H
#ifdef __cplusplus
extern "C" {
#endif
#define SCE_LED_MS 0
#define SCE_LED_WLAN 1
#define SCE_LED_MODE_OFF 0
#define SCE_LED_MODE_ON 1
#define SCE_LED_MODE_BLINK 2
#define SCE_LED_MODE_UNK 3
typedef struct{
/** Unknown, used only in SCE_LED_MODE_UNK */
int param_unk0;
/** Used in SCE_LED_MODE_BLINK. The time for the led to stay ON during the blink */
int onTime;
/** Used in SCE_LED_MODE_BLINK. The time for the led to stay OFF during the blink */
int offTime;
/** Used in SCE_LED_MODE_BLINK. The time the blink has to last. After this time the led is set in the status specified in statusAfterBlink. Set -1 for an inifite time */
int blinkTime;
/** Used in SCE_LED_MODE_BLINK. The status (1 = on, 0 = off) of the led after the blink */
int statusAfterBlink;
} SceLedParam;
/**
* Sets the mode of a led.
* @param led - the led id.
* @param mode - one of SCE_LED_MODE_*
* @param param - used only with modes 2 and 3
*
* @ return 0 on success
* 0x80000102 if "led" argument was not correct (< 0 or >= 2)
* 0x80000107 if "mode" argument was not correct
*/
int sceLedSetMode(int led, int mode, SceLedParam *param);
/**
* Turns off both leds and saves their state.
* The state can be restored using sceLedResume
*/
void sceLedSuspend();
/**
* Resumes the status of leds as it was before sceLedSuspend was called
*/
void sceLedResume();
/**
* Inits the sceLed library
* This is the same as calling module_start, so it is called when the module is started
*/
void sceLedInit();
/**
* Terms the sceLed library
* This is the same as calling module_reboot_before, so is called when there is a kernel reset
*/
void sceLedEnd();
#ifdef __cplusplus
}
#endif
#endif
Code: Select all
int main(){
SetupCallbacks();
makeNiceGame();
sceKernelExitGame();
}