├── oclockvitaminimal.suprx ├── oclockvitaminimal.yml ├── LICENSE.md ├── CMakeLists.txt ├── README.md └── oclockvitaminimal.c /oclockvitaminimal.suprx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rereprep/oclockvitaminimal/HEAD/oclockvitaminimal.suprx -------------------------------------------------------------------------------- /oclockvitaminimal.yml: -------------------------------------------------------------------------------- 1 | oclockvita: 2 | attributes: 0 3 | version: 4 | major: 1 5 | minor: 2 6 | main: 7 | start: module_start 8 | stop: module_stop 9 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | 3 | if(NOT DEFINED CMAKE_TOOLCHAIN_FILE) 4 | if(DEFINED ENV{VITASDK}) 5 | set(CMAKE_TOOLCHAIN_FILE "$ENV{VITASDK}/share/vita.toolchain.cmake" CACHE PATH "toolchain file") 6 | else() 7 | message(FATAL_ERROR "Please define VITASDK to point to your SDK path!") 8 | endif() 9 | endif() 10 | 11 | project(oclockvitaminimal) 12 | include("${VITASDK}/share/vita.cmake" REQUIRED) 13 | 14 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wl,-q -Wall -O3 -std=gnu99") 15 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-rtti -fno-exceptions") 16 | 17 | include_directories( 18 | ) 19 | 20 | link_directories( 21 | ${CMAKE_CURRENT_BINARY_DIR} 22 | ) 23 | 24 | if (NOT ${RELEASE}) 25 | add_definitions(-DENABLE_LOGGING) 26 | endif() 27 | 28 | add_executable(oclockvitaminimal 29 | oclockvitaminimal.c 30 | ) 31 | 32 | target_link_libraries(oclockvitaminimal 33 | taihen_stub 34 | ScePower_stub 35 | ) 36 | 37 | set_target_properties(oclockvitaminimal 38 | PROPERTIES LINK_FLAGS "-nostdlib" 39 | ) 40 | 41 | vita_create_self(oclockvitaminimal.suprx oclockvitaminimal 42 | CONFIG ${CMAKE_SOURCE_DIR}/oclockvitaminimal.yml 43 | ) 44 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | This is a minimalist version of Oclock Vita plugin which belongs to frangarcj (https://github.com/frangarcj/oclockvita). I removed the menu code 2 | and button hooks, it now auto-activates at start and set the CPU/GPU to max. All credits to frangarcj, i love his work, i haven't added a single 3 | line of code to his release, i only erased some stuff. This was meant for my private use but since some people showed interest, i decided to post 4 | it. 5 | 6 | # Oclock Vita Minimal 7 | taiHEN plugin for overclocking your PSVita 8 | 9 | Installation 10 | -------------------------------------------------------------------------------- 11 | 12 | Put "oclockvitaminimal.suprx" in 'tai' folder in the root of your Vita. 13 | 14 | Change config.txt in that directory to load plugin for title of your choice by adding new lines like below: 15 | 16 | ```text 17 | # titleid for your game (this one is for Root//Letter for example) 18 | *PCSB01019 19 | ux0:tai/oclockvitaminimal.suprx 20 | ``` 21 | 22 | After that just run the game. It will set the CPU/GPU to max when the game is started. 23 | 24 | Thanks to: 25 | 26 | https://github.com/Scorpeg 27 | https://github.com/BeatPlay/BetterAmphetaminPlugin 28 | -------------------------------------------------------------------------------- /oclockvitaminimal.c: -------------------------------------------------------------------------------- 1 | // Button Swap taiHEN plugin 2 | // Copyright (c) 2016 Scorp 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | static SceUID g_hooks[4]; 9 | 10 | static tai_hook_ref_t power_hook1; 11 | static int power_patched1(int freq) { 12 | return TAI_CONTINUE(int, power_hook1, 444); 13 | } 14 | 15 | static tai_hook_ref_t power_hook2; 16 | static int power_patched2(int freq) { 17 | return TAI_CONTINUE(int, power_hook2, 222); 18 | } 19 | 20 | static tai_hook_ref_t power_hook3; 21 | static int power_patched3(int freq) { 22 | return TAI_CONTINUE(int, power_hook3, 222); 23 | } 24 | 25 | static tai_hook_ref_t power_hook4; 26 | static int power_patched4(int freq) { 27 | return TAI_CONTINUE(int, power_hook4, 166); 28 | } 29 | 30 | void _start() __attribute__ ((weak, alias ("module_start"))); 31 | 32 | int module_start(SceSize argc, const void *args) { 33 | 34 | scePowerSetArmClockFrequency(444); 35 | scePowerSetBusClockFrequency(222); 36 | scePowerSetGpuClockFrequency(222); 37 | scePowerSetGpuXbarClockFrequency(166); 38 | 39 | g_hooks[0] = taiHookFunctionImport(&power_hook1, 40 | TAI_MAIN_MODULE, 41 | TAI_ANY_LIBRARY, 42 | 0x74DB5AE5, // scePowerGetArmClockFrequency 43 | power_patched1); 44 | 45 | g_hooks[1] = taiHookFunctionImport(&power_hook2, 46 | TAI_MAIN_MODULE, 47 | TAI_ANY_LIBRARY, 48 | 0xB8D7B3FB, // scePowerSetBusClockFrequency 49 | power_patched2); 50 | 51 | g_hooks[2] = taiHookFunctionImport(&power_hook3, 52 | TAI_MAIN_MODULE, 53 | TAI_ANY_LIBRARY, 54 | 0x717DB06C, // scePowerSetGpuClockFrequency 55 | power_patched3); 56 | 57 | g_hooks[3] = taiHookFunctionImport(&power_hook4, 58 | TAI_MAIN_MODULE, 59 | TAI_ANY_LIBRARY, 60 | 0xA7739DBE, // scePowerSetGpuXbarClockFrequency 61 | power_patched4); 62 | 63 | return SCE_KERNEL_START_SUCCESS; 64 | } 65 | 66 | int module_stop(SceSize argc, const void *args) { 67 | 68 | // free hooks that didn't fail 69 | if (g_hooks[0] >= 0) taiHookRelease(g_hooks[0], power_hook1); 70 | if (g_hooks[1] >= 0) taiHookRelease(g_hooks[1], power_hook2); 71 | if (g_hooks[2] >= 0) taiHookRelease(g_hooks[2], power_hook3); 72 | if (g_hooks[3] >= 0) taiHookRelease(g_hooks[3], power_hook4); 73 | return SCE_KERNEL_STOP_SUCCESS; 74 | } 75 | --------------------------------------------------------------------------------