Added L+A payload
This commit is contained in:
parent
c928b3b68b
commit
ada3e09784
@ -7,6 +7,7 @@
|
||||
#define BUTTON_LEFT (1 << 5)
|
||||
#define BUTTON_UP (1 << 6)
|
||||
#define BUTTON_DOWN (1 << 7)
|
||||
#define BUTTON_A 1
|
||||
#define BUTTON_X (1 << 10)
|
||||
#define BUTTON_Y (1 << 11)
|
||||
#define BUTTON_R1 (1 << 8)
|
||||
|
@ -51,6 +51,7 @@ void main(void)
|
||||
((pressed & BUTTON_X) && LOAD_PAYLOAD("x")) ||
|
||||
((pressed & BUTTON_Y) && LOAD_PAYLOAD("y")) ||
|
||||
((pressed & BUTTON_R1) && LOAD_PAYLOAD("r")) ||
|
||||
((pressed & BUTTON_A) && LOAD_PAYLOAD("a")) ||
|
||||
((pressed & BUTTON_SELECT) && LOAD_PAYLOAD("sel")) ||
|
||||
LOAD_PAYLOAD("def"))
|
||||
((void (*)())PAYLOAD_ADDRESS)();
|
||||
|
@ -19,9 +19,8 @@
|
||||
#define BUTTON_LEFT (1 << 5)
|
||||
#define BUTTON_UP (1 << 6)
|
||||
#define BUTTON_DOWN (1 << 7)
|
||||
#define BUTTON_L1R1 (BUTTON_R1 | BUTTON_L1)
|
||||
#define SAFE_MODE (BUTTON_L1R1 | BUTTON_A | BUTTON_UP)
|
||||
#define SAFE_MODE (BUTTON_R1 | BUTTON_L1 | BUTTON_A | BUTTON_UP)
|
||||
#define OVERRIDE_BUTTONS (BUTTON_B ^ 0xFFF)
|
||||
#define SINGLE_PAYLOAD_BUTTONS (BUTTON_LEFT | BUTTON_RIGHT | BUTTON_UP | BUTTON_DOWN | BUTTON_START | BUTTON_X | BUTTON_Y)
|
||||
#define L_PAYLOAD_BUTTONS (BUTTON_R1 | BUTTON_SELECT)
|
||||
#define L_PAYLOAD_BUTTONS (BUTTON_R1 | BUTTON_A | BUTTON_SELECT)
|
||||
#define MENU_BUTTONS (BUTTON_LEFT | BUTTON_RIGHT | BUTTON_UP | BUTTON_DOWN | BUTTON_A | BUTTON_START)
|
@ -406,6 +406,6 @@ static inline void launchFirm(u32 bootType)
|
||||
//Set ARM11 kernel entrypoint
|
||||
*arm11 = (u32)firm->arm11Entry;
|
||||
|
||||
//Final jump to arm9 kernel
|
||||
//Final jump to ARM9 kernel
|
||||
((void (*)())firm->arm9Entry)();
|
||||
}
|
@ -96,12 +96,12 @@ void firmRead(void *dest, const char *firmFolder)
|
||||
//Complete the string with the .app name
|
||||
memcpy(&path[34], "/00000000.app", 14);
|
||||
|
||||
//Last digit of the .app
|
||||
u32 i = 42;
|
||||
|
||||
//Convert back the .app name from integer to array
|
||||
while(id > 0)
|
||||
{
|
||||
//Last digit of the .app
|
||||
static const char hexDigits[] = "0123456789ABCDEF";
|
||||
path[i--] = hexDigits[id & 0xF];
|
||||
id >>= 4;
|
||||
|
Reference in New Issue
Block a user