This repository has been archived on 2022-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
Luma3DS-3GX/injector/source/patcher.h

36 lines
760 B
C
Raw Normal View History

#pragma once
#include <3ds/types.h>
#define CONFIG(a) (((info.config >> (a + 21)) & 1) != 0)
#define MULTICONFIG(a) ((info.config >> (a * 2 + 9)) & 3)
#define BOOTCONFIG(a, b) ((info.config >> a) & b)
2016-09-11 19:17:56 +02:00
#define BOOTCFG_NAND BOOTCONFIG(0, 7)
#define BOOTCFG_FIRM BOOTCONFIG(3, 7)
#define BOOTCFG_A9LH BOOTCONFIG(6, 1)
#define BOOTCFG_NOFORCEFLAG BOOTCONFIG(7, 1)
#define BOOTCFG_SAFEMODE BOOTCONFIG(8, 1)
2016-09-11 19:17:56 +02:00
enum multiOptions
{
DEFAULTEMU = 0,
BRIGHTNESS,
2016-09-19 14:03:55 +02:00
SPLASH,
2016-09-11 19:17:56 +02:00
PIN,
2016-09-19 14:03:55 +02:00
NEWCPU,
DEVOPTIONS
2016-09-11 19:17:56 +02:00
};
2016-09-11 19:17:56 +02:00
enum singleOptions
{
AUTOBOOTSYS = 0,
USESYSFIRM,
2016-09-19 14:03:55 +02:00
SDFIRMSANDMODULES,
2016-09-11 19:17:56 +02:00
USELANGEMUANDCODE,
PATCHVERSTRING,
2016-09-11 19:17:56 +02:00
SHOWGBABOOT,
2016-09-19 14:03:55 +02:00
PATCHACCESS
2016-09-11 19:17:56 +02:00
};
2016-09-08 18:53:21 +02:00
2016-04-04 18:19:00 +02:00
void patchCode(u64 progId, u8 *code, u32 size);