-
Notifications
You must be signed in to change notification settings - Fork 18
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
0 parents
commit a3ded5f
Showing
6 changed files
with
773 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
build |
Large diffs are not rendered by default.
Oops, something went wrong.
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,25 @@ | ||
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(nolockscreen) | ||
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(nolockscreen | ||
main.c | ||
) | ||
|
||
target_link_libraries(nolockscreen | ||
taiHEN_stub | ||
) | ||
|
||
vita_create_self(nolockscreen.suprx nolockscreen CONFIG 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 @@ | ||
NoLockScreen: | ||
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,52 @@ | ||
/* | ||
VitaTweaks: NoLockScreen | ||
Copyright (C) 2018, TheFloW | ||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#include <psp2/kernel/modulemgr.h> | ||
#include <taihen.h> | ||
|
||
static SceUID hookid = -1; | ||
|
||
void _start() __attribute__ ((weak, alias("module_start"))); | ||
int module_start(SceSize args, void *argp) { | ||
tai_module_info_t info; | ||
info.size = sizeof(info); | ||
if (taiGetModuleInfo("SceShell", &info) >= 0) { | ||
uint32_t movs_a1_1_nop_opcode = 0xBF002001; | ||
|
||
switch (info.module_nid) { | ||
case 0x0552F692: // 3.60 retail | ||
hookid = taiInjectData(info.modid, 0, 0x2361D2, &movs_a1_1_nop_opcode, sizeof(movs_a1_1_nop_opcode)); | ||
break; | ||
|
||
case 0x5549BF1F: // 3.65 retail | ||
case 0x34B4D82E: // 3.67 retail | ||
case 0x12DAC0F3: // 3.68 retail | ||
hookid = taiInjectData(info.modid, 0, 0x23626E, &movs_a1_1_nop_opcode, sizeof(movs_a1_1_nop_opcode)); | ||
break; | ||
} | ||
} | ||
|
||
return SCE_KERNEL_START_SUCCESS; | ||
} | ||
|
||
int module_stop(SceSize args, void *argp) { | ||
if (hookid >= 0) | ||
taiInjectRelease(hookid); | ||
|
||
return SCE_KERNEL_STOP_SUCCESS; | ||
} |
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,13 @@ | ||
# VitaTweaks | ||
|
||
A collection of small tweaks for the PS Vita | ||
|
||
## 1. NoLockScreen | ||
|
||
Enable it in `*main` | ||
|
||
``` | ||
*main | ||
ux0:tai/nolockscreen.suprx | ||
``` | ||
|