Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PSP Livearea Refresh #630

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ add_executable(VitaShell
network_download.c
context_menu.c
archive.c
pbp.c
psarc.c
photo.c
audioplayer.c
Expand All @@ -124,6 +125,7 @@ add_executable(VitaShell
utils.c
elf.c
sha1.c
sha256.c
minizip/zip.c
minizip/ioapi.c
bm.c
Expand All @@ -148,10 +150,10 @@ add_executable(VitaShell
)

add_dependencies(VitaShell vitashell_user_stubs)
add_dependencies(VitaShell kernel.skprx)
add_dependencies(VitaShell user.suprx)
add_dependencies(VitaShell patch.skprx)
add_dependencies(VitaShell usbdevice.skprx)
add_dependencies(VitaShell kernel.skprx-self)
add_dependencies(VitaShell user.suprx-self)
add_dependencies(VitaShell patch.skprx-self)
add_dependencies(VitaShell usbdevice.skprx-self)

target_link_libraries(VitaShell
${CMAKE_CURRENT_BINARY_DIR}/modules/user/libVitaShellUser_stub_weak.a
Expand Down
2 changes: 1 addition & 1 deletion main.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

// VitaShell version major.minor
#define VITASHELL_VERSION_MAJOR 0x02
#define VITASHELL_VERSION_MINOR 0x00
#define VITASHELL_VERSION_MINOR 0x02

#define VITASHELL_VERSION ((VITASHELL_VERSION_MAJOR << 0x18) | (VITASHELL_VERSION_MINOR << 0x10))

Expand Down
2 changes: 1 addition & 1 deletion modules/kernel/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
#include <psp2kern/kernel/modulemgr.h>
#include <psp2kern/kernel/sysmem.h>
#include <psp2kern/kernel/threadmgr.h>
#include <psp2kern/kernel/sysclib.h>
#include <psp2kern/io/fcntl.h>

#include <stdio.h>
#include <string.h>

#include <taihen.h>

Expand Down
7 changes: 4 additions & 3 deletions package_installer.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ static int unloadScePaf() {
return sceSysmoduleUnloadModuleInternalWithArg(SCE_SYSMODULE_INTERNAL_PAF, 0, NULL, &buf);
}

int promotePsm(const char *path, const char *titleid) {
int promoteCma(const char *path, const char *titleid, int type) {
int res;

ScePromoterUtilityImportParams promoteArgs;
memset(&promoteArgs,0x00,sizeof(ScePromoterUtilityImportParams));
strncpy(promoteArgs.path,path,0x7F);
strncpy(promoteArgs.titleid,titleid,0xB);
promoteArgs.type = SCE_PKG_TYPE_PSM;
promoteArgs.type = type;
promoteArgs.attribute = 0x1;

res = loadScePaf();
Expand Down Expand Up @@ -243,7 +243,7 @@ int makeHeadBin() {
getSfoString(sfo_buffer, "TITLE_ID", titleid, sizeof(titleid));

// Enforce TITLE_ID format
if ((strlen(titleid) != 9) || (strncmp(titleid, strupr(titleid), 9) != 0))
if (TITLEID_FMT_CHECK(titleid))
return VITASHELL_ERROR_INVALID_TITLEID;

// Get content id
Expand Down Expand Up @@ -291,6 +291,7 @@ int makeHeadBin() {
return 0;
}


int installPackage(const char *file) {
int res;

Expand Down
6 changes: 5 additions & 1 deletion package_installer.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,16 @@
#define PACKAGE_DIR "ux0:data/pkg"
#define HEAD_BIN PACKAGE_DIR "/sce_sys/package/head.bin"

#define TITLEID_FMT_CHECK(x) (x == NULL) || (strlen(x) != 9) || (strncmp(x, strupr(x), 9) != 0)

typedef struct {
char *file;
} InstallArguments;

int promoteApp(const char *path);
int promotePsm(const char *path, const char *titleid);
int promoteCma(const char *path, const char *titleid, int type);
int promotePsp(const char *path);

int deleteApp(const char *titleid);
int checkAppExist(const char *titleid);

Expand Down
Loading