Skip to content

Commit

Permalink
adjustments
Browse files Browse the repository at this point in the history
install fuseId dumper
import fuseid.bin file
sort saves by type
show unrar progress
online db progress
  • Loading branch information
bucanero committed Feb 23, 2024
1 parent 906eaf4 commit 5c07313
Show file tree
Hide file tree
Showing 16 changed files with 194 additions and 76 deletions.
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,30 @@ All notable changes to the `apollo-vita` project will be documented in this file

## [Unreleased]()

## [v1.4.0](https://github.com/bucanero/apollo-vita/releases/tag/v1.4.0) - 2024-02-24

### Added

* Manage PS1 Virtual Memory Card images (VMC)
- Supports `.VMP` and external formats (`.MCR`, `.VM1`, `.BIN`, `.VMC`, `.GME`, `.VGS`, `.SRM`, `.MCD`)
- List, import, and export PS1 saves inside VMC images
- Import - Supported formats: `.MCS`, `.PSV`, `.PSX`, `.PS1`, `.MCB`, `.PDA`
- Export - Supported formats: `.MCS`, `.PSV`, `.PSX`
* Proper PSP save resigning using KIRK engine CMD5
- Uses unique per-console Fuse ID
- Fixes save ownership in games like Gran Turismo
* Added PSP FuseID dumper tool installer
* Save sort option by Type (Vita/PSP/PS1)
* Online DB: added PS1 saves listing

### Misc

* Updated Apollo Patch Engine to v0.7.0
- Add `jenkins_oaat`, `lookup3_little2` hash functions
- Add `camellia_ecb` encryption
- Add RGG Studio decryption (PS4)
- Add Dead Rising checksum

## [v1.2.8](https://github.com/bucanero/apollo-vita/releases/tag/v1.2.8) - 2023-11-12

### Added
Expand Down
39 changes: 34 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

**Apollo Save Tool** is an application to manage save-game files on the PlayStation Vita.

This homebrew app allows to download, unlock, patch and resign save-game files directly on your Vita.
This homebrew app allows you to download, unlock, patch and resign save-game files directly on your Vita.

![image](./docs/screenshots/screenshot-main.jpg)

Expand All @@ -17,16 +17,22 @@ This homebrew app allows to download, unlock, patch and resign save-game files d
* **Easy to use:** no advanced setup needed.
* **Standalone:** no computer required, everything happens on the PS Vita.
* **Automatic settings:** auto-detection of User ID, and Account-ID settings.
* **Multi-user:** supports multiple user accounts.
* **Multi-format:** supports PS Vita saves, PSP saves (Adrenaline), and PS1 saves.

## Save Management
## Vita & PSP Save Management

* **Save files listing:** quick access to all the save files on USB and the internal PS Vita memory (+ file details)
* **Save param.sfo updating:** allows the user to update the `param.sfo` User ID and Account ID information.
* **Save files patching:** complete support for Save Wizard and [Bruteforce Save Data](https://bruteforcesavedata.forumms.net/) cheat patches to enhance your save-games.
* **Save import/export:** allows the user to decrypt and export save files, and import decrypted saves from other consoles.
* **Save downloading:** easy access to an Online Database of save-game files to download straight to your Vita.

## PS1 Virtual Memory Card Management

* **VMC saves listing:** quick access to all save files on Virtual Memory Cards images.
- Supported VMC formats: `.VMP`, `.MCR`, `.VM1`, `.BIN`, `.VMC`, `.GME`, `.VGS`, `.SRM`, `.MCD`
* **VMC saves import/export:** allows the user export saves on VMC images to `.MCS`/`.PSV`/`.PSX` formats, and import saves to VMCs from other tools and consoles (`.MCS`, `.PSV`, `.PSX`, `.PS1`, `.MCB`, `.PDA` supported).

# Download

Get the [latest version here][app_latest].
Expand Down Expand Up @@ -60,7 +66,28 @@ On first run, the application will detect and setup the required user settings.
| **External Storage saves** | your saves must be stored on `<uma0/imc0/xmc0/ux0>:data/savegames/`. |
| **User Storage saves** | save-games will be scanned from `ux0:pspemu/PSP/SAVEDATA/`. |

**Note:** To decrypt PSP save files, game-specific save keys are required. You can dump the required keys using PSP plugins, such as:
### PS1

| PS1 | Folder |
|-----|--------|
| **External saves** | your saves must be stored on `<uma0/imc0/xmc0/ux0>:data/PS1/SAVEDATA/`. |
| **Virtual Memory Cards** | VMC images will be scanned from `<uma0/imc0/xmc0/ux0>:data/PS1/VMC/`. |

## PSP Saves Requirements

If you want to properly hash and resign PSP saves, you need to dump the `FuseID` from Adrenaline.
You can install the [FuseID dumper tool](https://github.com/bucanero/psp-fuseid-dumper/) using Apollo:
1. `Tools` :arrow_right: `PSP Key Dumper tools` :arrow_right: `Install PSP FuseID Dumper` option
2. Open Adrenaline and execute the _**FuseID dumper**_ application.
3. Once the `FuseID.bin` has been dumped, Apollo will detect and import the file to use it when needed.

### Save-game Key dumper

To decrypt PSP save files, game-specific save keys are required.
You can use Apollo to install and enable the PSP [save-game key dumper plugin](https://github.com/bucanero/psptools/releases/download/20220719/pspsgkey13.zip) on Adrenaline:
- `Tools` :arrow_right: `PSP Key Dumper tools` :arrow_right: `Install Save-game Key Dumper` option

**Note:** You can also dump the required keys using PSP plugins, such as:
- [SGKeyDumper](https://github.com/bucanero/psptools/releases/download/20220719/pspsgkey13.zip)
- [SGDeemer](https://github.com/bucanero/psptools/releases/download/20220719/SGDeemer111.rar)

Expand Down Expand Up @@ -111,6 +138,8 @@ The Online Database project aims to [add more save-games](https://github.com/buc
* [Dnawrkshp](https://github.com/Dnawrkshp/): [Artemis PS3](https://github.com/Dnawrkshp/ArtemisPS3)
* [Berion](https://www.psx-place.com/members/berion.1431/): GUI design
* [flatz](https://github.com/flatz): [SFO tools](https://github.com/bucanero/pfd_sfo_tools/)
* Draan/[Proxima](https://github.com/ProximaV): [KIRK engine](https://github.com/ProximaV/kirk-engine-full)
* [ShendoXT](https://github.com/ShendoXT): [MemcardRex](https://github.com/ShendoXT/memcardrex)
* [aldostools](https://aldostools.org/): [Bruteforce Save Data](https://bruteforcesavedata.forumms.net/)
* [Nobody/Wild Light](https://github.com/nobodo): [Background music track](https://github.com/bucanero/apollo-vita/blob/main/data/haiku.s3m)

Expand All @@ -137,7 +166,7 @@ You can also set the `PSVITAIP` environment variable to your Vita's IP address,

# License

[Apollo Save Tool](https://github.com/bucanero/apollo-vita/) (PS Vita) - Copyright (C) 2020-2023 [Damian Parrino](https://twitter.com/dparrino)
[Apollo Save Tool](https://github.com/bucanero/apollo-vita/) (PS Vita) - Copyright (C) 2020-2024 [Damian Parrino](https://twitter.com/dparrino)

This program is free software: you can redistribute it and/or modify
it under the terms of the [GNU General Public License][app_license] as published by
Expand Down
39 changes: 34 additions & 5 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

**Apollo Save Tool** is an application to manage save-game files on the PlayStation Vita.

This homebrew app allows to download, unlock, patch and resign save-game files directly on your PS Vita.
This homebrew app allows you to download, unlock, patch and resign save-game files directly on your Vita.

![image](./screenshots/screenshot-main.jpg)

Expand All @@ -17,16 +17,22 @@ This homebrew app allows to download, unlock, patch and resign save-game files d
* **Easy to use:** no advanced setup needed.
* **Standalone:** no computer required, everything happens on the PS Vita.
* **Automatic settings:** auto-detection of User ID, and Account-ID settings.
* **Multi-user:** supports multiple user accounts.
* **Multi-format:** supports PS Vita saves, PSP saves (Adrenaline), and PS1 saves.

## Save Management
## Vita & PSP Save Management

* **Save files listing:** quick access to all the save files on USB and the internal PS Vita memory (+ file details)
* **Save param.sfo updating:** allows the user to update the `param.sfo` User ID and Account ID information.
* **Save files patching:** complete support for Save Wizard and [Bruteforce Save Data](https://bruteforcesavedata.forumms.net/) cheat patches to enhance your save-games.
* **Save import/export:** allows the user to decrypt and export save files, and import decrypted saves from other consoles.
* **Save downloading:** easy access to an Online Database of save-game files to download straight to your Vita.

## PS1 Virtual Memory Card Management

* **VMC saves listing:** quick access to all save files on Virtual Memory Cards images.
- Supported VMC formats: `.VMP`, `.MCR`, `.VM1`, `.BIN`, `.VMC`, `.GME`, `.VGS`, `.SRM`, `.MCD`
* **VMC saves import/export:** allows the user export saves on VMC images to `.MCS`/`.PSV`/`.PSX` formats, and import saves to VMCs from other tools and consoles (`.MCS`, `.PSV`, `.PSX`, `.PS1`, `.MCB`, `.PDA` supported).

# Download

Get the [latest version here][app_latest].
Expand Down Expand Up @@ -60,7 +66,28 @@ On first run, the application will detect and setup the required user settings.
| **External Storage saves** | your saves must be stored on `<uma0/imc0/xmc0/ux0>:data/savegames/`. |
| **User Storage saves** | save-games will be scanned from `ux0:pspemu/PSP/SAVEDATA/`. |

**Note:** To decrypt PSP save files, game-specific save keys are required. You can dump the required keys using PSP plugins, such as:
### PS1

| PS1 | Folder |
|-----|--------|
| **External saves** | your saves must be stored on `<uma0/imc0/xmc0/ux0>:data/PS1/SAVEDATA/`. |
| **Virtual Memory Cards** | VMC images will be scanned from `<uma0/imc0/xmc0/ux0>:data/PS1/VMC/`. |

## PSP Saves Requirements

If you want to properly hash and resign PSP saves, you need to dump the `FuseID` from Adrenaline.
You can install the [FuseID dumper tool](https://github.com/bucanero/psp-fuseid-dumper/) using Apollo:
1. `Tools` :arrow_right: `PSP Key Dumper tools` :arrow_right: `Install PSP FuseID Dumper` option
2. Open Adrenaline and execute the _**FuseID dumper**_ application.
3. Once the `FuseID.bin` has been dumped, Apollo will detect and import the file to use it when needed.

### Save-game Key dumper

To decrypt PSP save files, game-specific save keys are required.
You can use Apollo to install and enable the PSP [save-game key dumper plugin](https://github.com/bucanero/psptools/releases/download/20220719/pspsgkey13.zip) on Adrenaline:
- `Tools` :arrow_right: `PSP Key Dumper tools` :arrow_right: `Install Save-game Key Dumper` option

**Note:** You can also dump the required keys using PSP plugins, such as:
- [SGKeyDumper](https://github.com/bucanero/psptools/releases/download/20220719/pspsgkey13.zip)
- [SGDeemer](https://github.com/bucanero/psptools/releases/download/20220719/SGDeemer111.rar)

Expand Down Expand Up @@ -111,6 +138,8 @@ The Online Database project aims to [add more save-games](https://github.com/buc
* [Dnawrkshp](https://github.com/Dnawrkshp/): [Artemis PS3](https://github.com/Dnawrkshp/ArtemisPS3)
* [Berion](https://www.psx-place.com/members/berion.1431/): GUI design
* [flatz](https://github.com/flatz): [SFO tools](https://github.com/bucanero/pfd_sfo_tools/)
* Draan/[Proxima](https://github.com/ProximaV): [KIRK engine](https://github.com/ProximaV/kirk-engine-full)
* [ShendoXT](https://github.com/ShendoXT): [MemcardRex](https://github.com/ShendoXT/memcardrex)
* [aldostools](https://aldostools.org/): [Bruteforce Save Data](https://bruteforcesavedata.forumms.net/)
* [Nobody/Wild Light](https://github.com/nobodo): [Background music track](https://github.com/bucanero/apollo-vita/blob/main/data/haiku.s3m)

Expand All @@ -137,7 +166,7 @@ You can also set the `PSVITAIP` environment variable to your Vita's IP address,

# License

[Apollo Save Tool](https://github.com/bucanero/apollo-vita/) (PS Vita) - Copyright (C) 2020-2023 [Damian Parrino](https://twitter.com/dparrino)
[Apollo Save Tool](https://github.com/bucanero/apollo-vita/) (PS Vita) - Copyright (C) 2020-2024 [Damian Parrino](https://twitter.com/dparrino)

This program is free software: you can redistribute it and/or modify
it under the terms of the [GNU General Public License][app_license] as published by
Expand Down
1 change: 0 additions & 1 deletion include/kirk_engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ int kirk_CMD14(u8* outbuff, int outsize);
int kirk_init(void); //CMD 0xF?

//sce-like funcs
int sceUtilsSetFuseID(u8*fuse);
int sceUtilsBufferCopyWithRange(u8* outbuff, int outsize, u8* inbuff, int insize, int cmd);

#endif
1 change: 1 addition & 0 deletions include/menu.h
Original file line number Diff line number Diff line change
Expand Up @@ -266,5 +266,6 @@ void drawDialogBackground(void);
int load_app_settings(app_config_t* config);
int save_app_settings(app_config_t* config);
int install_sgkey_plugin(int mode);
int install_fuseid_dumper(void);

#endif
6 changes: 4 additions & 2 deletions include/saves.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ enum save_sort_enum
SORT_DISABLED,
SORT_BY_NAME,
SORT_BY_TITLE_ID,
SORT_BY_TYPE,
};

enum cmd_code_enum
Expand Down Expand Up @@ -97,6 +98,7 @@ enum cmd_code_enum
CMD_EXP_PSPKEY,
CMD_DUMP_PSPKEY,
CMD_SETUP_PLUGIN,
CMD_SETUP_FUSEDUMP,
CMD_CONV_ISO2CSO,
CMD_CONV_CSO2ISO,
CMD_EXP_VMCSAVE,
Expand All @@ -112,7 +114,6 @@ enum cmd_code_enum
CMD_NET_WEBSERVER,

// SFO patches
SFO_UNLOCK_COPY,
SFO_CHANGE_ACCOUNT_ID,
SFO_REMOVE_PSID,
SFO_CHANGE_TITLE_ID,
Expand All @@ -134,9 +135,9 @@ enum cmd_code_enum
enum save_type_enum
{
FILE_TYPE_NULL,
FILE_TYPE_MENU,
FILE_TYPE_PSV,
FILE_TYPE_TRP,
FILE_TYPE_MENU,
FILE_TYPE_PSP,
FILE_TYPE_PS1,

Expand Down Expand Up @@ -227,6 +228,7 @@ list_t * ReadVmcList(const char* userPath);
void UnloadGameList(list_t * list);
char * readTextFile(const char * path, long* size);
int sortSaveList_Compare(const void* A, const void* B);
int sortSaveList_Compare_Type(const void* A, const void* B);
int sortSaveList_Compare_TitleID(const void* A, const void* B);
int sortCodeList_Compare(const void* A, const void* B);
int ReadCodes(save_entry_t * save);
Expand Down
27 changes: 18 additions & 9 deletions source/dialog.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ static int running = 0;

static int update_screen_thread(void* user_data)
{
while (running == 1)
while (running == SCE_COMMON_DIALOG_STATUS_RUNNING)
drawDialogBackground();

running = -1;
running = SCE_COMMON_DIALOG_ERROR_NOT_RUNNING;
return (0);
}

Expand All @@ -82,14 +82,17 @@ void init_progress_bar(const char* msg)
progress_bar_param.barType = SCE_MSG_DIALOG_PROGRESSBAR_TYPE_PERCENTAGE;
progress_bar_param.msg = (SceChar8 *) msg;

if (running > 0)
return;

sceMsgDialogParamInit(&param);
param.progBarParam = &progress_bar_param;
param.mode = SCE_MSG_DIALOG_MODE_PROGRESS_BAR;

if (sceMsgDialogInit(&param) < 0)
return;

running = 1;
running = SCE_COMMON_DIALOG_STATUS_RUNNING;
SDL_Thread* tid = SDL_CreateThread(&update_screen_thread, "progress_bar", NULL);
SDL_DetachThread(tid);
}
Expand All @@ -98,6 +101,9 @@ void end_progress_bar(void)
{
SceCommonDialogStatus stat;

if (running != SCE_COMMON_DIALOG_STATUS_RUNNING)
return;

do
{
sceMsgDialogProgressBarSetValue(SCE_MSG_DIALOG_PROGRESSBAR_TARGET_BAR_DEFAULT, 100);
Expand All @@ -110,11 +116,17 @@ void end_progress_bar(void)

sceMsgDialogTerm();
running = 0;

while (running != SCE_COMMON_DIALOG_ERROR_NOT_RUNNING)
usleep(100);
}

void update_progress_bar(uint64_t progress, const uint64_t total_size, const char* msg)
{
float bar_value = (100.0f * ((double) progress)) / ((double) total_size);
if (running != SCE_COMMON_DIALOG_STATUS_RUNNING)
return;

float bar_value = (100.0f * ((double) progress)) / ((double) (total_size ? total_size : ~0));

if (sceMsgDialogGetStatus() == SCE_COMMON_DIALOG_STATUS_RUNNING)
{
Expand All @@ -129,11 +141,8 @@ static void strWChar16ncpy(SceWChar16* out, const char* str2, int len)

while (*str2 && len--)
{
*str1 = *str2;
str1++;
*str1 = '\0';
str1++;
str2++;
*str1++ = *str2++;
*str1++ = '\0';
}
}

Expand Down
16 changes: 7 additions & 9 deletions source/draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@

void LoadRawTexture(int idx, void* data, int width, int height)
{
SDL_Surface* surface = SDL_CreateRGBSurfaceFrom(data, width, height, 32, 4 * width,
0x000000FF, 0x0000FF00, 0x00FF0000, 0xFF000000);

SDL_Surface* surface = SDL_CreateRGBSurfaceFrom(data, width, height, 32, 4 * width, 0x000000FF, 0x0000FF00, 0x00FF0000, 0xFF000000);
menu_textures[idx].texture = SDL_CreateTextureFromSurface(renderer, surface);
SDL_FreeSurface(surface);
}
Expand Down Expand Up @@ -287,7 +285,7 @@ int init_loading_screen(const char* message)
return (tid != NULL);
}

void stop_loading_screen()
void stop_loading_screen(void)
{
if (please_wait != 1)
return;
Expand Down Expand Up @@ -397,14 +395,14 @@ void drawSplashLogo(int mode)
}
}

void drawEndLogo()
void drawEndLogo(void)
{
SDL_Rect rect = {
.x = 0,
.w = SCREEN_WIDTH,
};

for (rect.h = 0; rect.h <= SCREEN_HEIGHT/2; rect.h += 3)
for (rect.h = 0; rect.h <= SCREEN_HEIGHT/2; rect.h += 5)
{
// clear the current display buffer
SDL_RenderClear(renderer);
Expand Down Expand Up @@ -444,7 +442,7 @@ static void _draw_MainMenu(uint8_t alpha)
drawJars(alpha);
}

void Draw_MainMenu_Ani()
void Draw_MainMenu_Ani(void)
{
int max = MENU_ANI_MAX, ani = 0;
for (ani = 0; ani < max; ani++)
Expand Down Expand Up @@ -491,12 +489,12 @@ void Draw_MainMenu_Ani()
}
}

void Draw_MainMenu()
void Draw_MainMenu(void)
{
_draw_MainMenu(0xFF);
}

void drawDialogBackground()
void drawDialogBackground(void)
{
SDL_RenderClear(renderer);
DrawBackground2D(0xFFFFFFFF);
Expand Down
Loading

0 comments on commit 5c07313

Please sign in to comment.