Skip to content

Commit

Permalink
Added NoTrophyMsg
Browse files Browse the repository at this point in the history
  • Loading branch information
TheOfficialFloW committed Jul 26, 2018
1 parent e13ad44 commit 5d59350
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 0 deletions.
25 changes: 25 additions & 0 deletions NoTrophyMsg/CMakeLists.txt
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(notrophymsg)
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(notrophymsg
main.c
)

target_link_libraries(notrophymsg
taiHEN_stub
)

vita_create_self(notrophymsg.suprx notrophymsg CONFIG exports.yml UNSAFE)
8 changes: 8 additions & 0 deletions NoTrophyMsg/exports.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
NoTrophyMsg:
attributes: 0
version:
major: 1
minor: 0
main:
start: module_start
stop: module_stop
59 changes: 59 additions & 0 deletions NoTrophyMsg/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/*
VitaTweaks: NoTrophyMsg
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 tai_hook_ref_t savedata_aid_check_ref;

static SceUID hookid = -1;

static int savedata_aid_check_patched(int a1, int a2) {
int res = TAI_CONTINUE(int, savedata_aid_check_ref, a1, a2);
if (res == 0x80103933 || res == 0x80103935)
res = 0;
return res;
}

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) {
switch (info.module_nid) {
case 0x0552F692: // 3.60 retail
hookid = taiHookFunctionOffset(&savedata_aid_check_ref, info.modid, 0, 0x28B854, 1, savedata_aid_check_patched);
break;

case 0x5549BF1F: // 3.65 retail
case 0x34B4D82E: // 3.67 retail
case 0x12DAC0F3: // 3.68 retail
hookid = taiHookFunctionOffset(&savedata_aid_check_ref, info.modid, 0, 0x28BC80, 1, savedata_aid_check_patched);
break;
}
}

return SCE_KERNEL_START_SUCCESS;
}

int module_stop(SceSize args, void *argp) {
if (hookid >= 0)
taiHookRelease(hookid, savedata_aid_check_ref);

return SCE_KERNEL_STOP_SUCCESS;
}
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ Download [download_enabler.suprx](https://github.com/TheOfficialFloW/VitaTweaks/
ux0:tai/download_enabler.suprx
```

## 3. NoTrophyMsg

Download [notrophymsg.suprx](https://github.com/TheOfficialFloW/VitaTweaks/releases/tag/NoTrophyMsg), edit `ux0:tai/config.txt` and enable it in `*main` as follows:

```
*main
ux0:tai/notrophymsg.suprx
```

## Support

Support me on [patreon](https://www.patreon.com/TheOfficialFloW) for more content

0 comments on commit 5d59350

Please sign in to comment.