-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
85 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
cmake_minimum_required(VERSION 2.8) | ||
|
||
if(NOT DEFINED CMAKE_TOOLCHAIN_FILE) | ||
if(DEFINED ENV{VITASDK}) | ||
set(CMAKE_TOOLCHAIN_FILE "$ENV{VITASDK}/share/vita.toolchain.cmake" CACHE PATH "toolchain file") | ||
else() | ||
message(FATAL_ERROR "Please define VITASDK to point to your SDK path!") | ||
endif() | ||
endif() | ||
|
||
project(itls) | ||
include("${VITASDK}/share/vita.cmake" REQUIRED) | ||
|
||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wl,-q -Wall -O3 -nostdlib") | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti -fno-exceptions") | ||
|
||
add_executable(itls | ||
src/main.c | ||
) | ||
|
||
target_link_libraries(itls | ||
|
||
k | ||
gcc | ||
taihen_stub | ||
SceLibKernel_stub | ||
|
||
) | ||
|
||
vita_create_self(itls.suprx itls | ||
CONFIG ${CMAKE_SOURCE_DIR}/exports.yml | ||
UNSAFE | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
itls: | ||
attributes: 0 | ||
version: | ||
major: 1 | ||
minor: 0 | ||
main: | ||
start: module_start | ||
stop: module_stop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
iTLS-Enso v2.0 by SKGleba | ||
All Rights Reserved | ||
*/ | ||
// Requires ioplus v0.1 or higher | ||
#include <psp2/kernel/modulemgr.h> | ||
#include <stdio.h> | ||
#include <string.h> | ||
#include <stdarg.h> | ||
#include <taihen.h> | ||
|
||
static int hk; | ||
static tai_hook_ref_t lum_hook; | ||
static SceUID lum_patch(char *path, SceSize args, void *argp, int flags, SceKernelLMOption *option, int *status) { | ||
int pathlen = strlen(path); | ||
if (path[pathlen - 14] == 0x70 && path[pathlen - 13] == 0x32 && path[pathlen - 12] == 0x43) path = "ur0:itls/compat.suprx"; | ||
SceUID ret = TAI_CONTINUE(SceUID, lum_hook, path, args, argp, flags, option, status); | ||
return ret; | ||
} | ||
|
||
void _start() __attribute__ ((weak, alias("module_start"))); | ||
int module_start(SceSize args, void *argp) { | ||
hk = taiHookFunctionImport(&lum_hook, TAI_MAIN_MODULE, TAI_ANY_LIBRARY, 0x2DCC4AFA, lum_patch); | ||
return 0; | ||
} | ||
|
||
int module_stop(SceSize args, void *argp) { | ||
if(hk >= 0)taiHookRelease(hk, lum_hook); | ||
return SCE_KERNEL_STOP_SUCCESS; | ||
} |