Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
update version 1.2.0
use gamekey DB to load save keys
fix #19
Leon&Luna menu
  • Loading branch information
bucanero committed Oct 29, 2023
1 parent e0d7da0 commit 757be4f
Show file tree
Hide file tree
Showing 15 changed files with 179 additions and 49 deletions.
39 changes: 39 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,45 @@ All notable changes to the `apollo-psp` project will be documented in this file.

## [Unreleased]()

## [v1.2.0](https://github.com/bucanero/apollo-psp/releases/tag/v1.2.0) - 2023-10-30

### Added

* Support `ef0` storage (PSP Go internal memory)
* Added AHX background music player
* Added on-screen keyboard
* Added URL Downloader (`Network Tools`)
* Auto-detect `X`/`O` button settings
* Compress `.ISO` files to `.CSO`
* Decompress `.CSO` files to `.ISO`
* Added Save-game Key database for PSP games
* New PSP cheat codes
- Persona (ULUS10432)
* New PSP unlock patches
- InviZimals: Shadow Zone (UCES01411, UCES01581, UCUS98760)
- InviZimals: The Lost Tribes (UCES01525)
- SOCOM: Fire Team Bravo 2 (UCUS98645)
* Custom checksum support
- InviZimals: Shadow Zone (UCES01411, UCES01581, UCUS98760)
- InviZimals: The Lost Tribes (UCES01525)

### Fixed

* Online DB: fixed file cache
* Simple Webserver: fixed folder links
* Fixed timestamp on debug logs

### Misc

* Updated `apollo-lib` (Patch Engine) to v0.5.5
- Add host callbacks (username, lan mac, wlan mac, sys name, psid, account id)
- Add `murmu3_32` hash function
- Add MGS5 decryption PS3/PS4
- Add Castlevania:LoS checksum
- Add Rockstar checksum
- Fix SaveWizard Code Type C
- Fix `right()` on little-endian platforms

## [v1.0.0](https://github.com/bucanero/apollo-psp/releases/tag/v1.0.0) - 2023-04-30

### Added
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

[![Downloads][img_downloads]][app_downloads] [![Release][img_latest]][app_latest] [![License][img_license]][app_license]
[![Build app package](https://github.com/bucanero/apollo-psp/actions/workflows/build.yml/badge.svg)](https://github.com/bucanero/apollo-psp/actions/workflows/build.yml)
[![Twitter](https://img.shields.io/twitter/follow/dparrino?label=Follow)](https://twitter.com/dparrino)

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

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

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

Expand Down Expand Up @@ -119,10 +120,9 @@ You need to have installed:

Run `cmake . && make` to create a release build. If you want to include the [latest save patches](https://github.com/bucanero/apollo-patches) in your `.zip` file, run `make createzip`.

To enable debug logging, pass `-DAPOLLO_ENABLE_LOGGING=ON` argument to cmake. The application will send debug messages to
UDP multicast address `239.255.0.100:30000`. To receive them you can use [socat][] on your computer:
To enable debug logging, pass `-DAPOLLO_ENABLE_LOGGING=ON` argument to cmake. The application will write debug messages to

$ socat udp4-recv:30000,ip-add-membership=239.255.0.100:0.0.0.0 -
ms0:/pkgi-psp.log

You can also set the `PSPIP` environment variable to your PSP's IP address, and use `make send` to upload `EBOOT.PBP` directly to the `ms0:/PSP/GAME/APOLLO` folder.

Expand Down
Binary file added data/leon_luna.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/luna._png
Binary file not shown.
15 changes: 7 additions & 8 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

[![Downloads][img_downloads]][app_downloads] [![Release][img_latest]][app_latest] [![License][img_license]][app_license]
[![Build app package](https://github.com/bucanero/apollo-psp/actions/workflows/build.yml/badge.svg)](https://github.com/bucanero/apollo-psp/actions/workflows/build.yml)
[![Twitter](https://img.shields.io/twitter/follow/dparrino?label=Follow)](https://twitter.com/dparrino)

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

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

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

Expand Down Expand Up @@ -104,26 +105,24 @@ The Online Database project aims to [add more save-games](https://github.com/buc
* [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/)
* [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)
* [PiNk/abyss](http://amigascne.org/abyss/pink/index.html): [Background music track](https://github.com/bucanero/apollo-ps2/blob/main/data/inside.ahx)

# Building

You need to have installed:

- [PSP SDK](https://github.com/pspdev/)
- [Apollo](https://github.com/bucanero/apollo-lib) library
- [mbedTLS](https://github.com/pspdev/psp-packages/tree/master/mbedTLS) library
- [libcurl](https://github.com/pspdev/psp-packages/tree/master/curl) library
- [libxmp](https://github.com/pspdev/psp-packages/tree/master/libxmp) library
- [mbedTLS](https://github.com/pspdev/psp-packages/tree/master/mbedtls) library
- [cURL](https://github.com/pspdev/psp-packages/tree/master/curl) library
- [libZip](https://github.com/pspdev/psp-packages/tree/master/libzip) library
- [dbglogger](https://github.com/bucanero/dbglogger) library

Run `cmake . && make` to create a release build. If you want to include the [latest save patches](https://github.com/bucanero/apollo-patches) in your `.zip` file, run `make createzip`.

To enable debug logging, pass `-DAPOLLO_ENABLE_LOGGING=ON` argument to cmake. The application will send debug messages to
UDP multicast address `239.255.0.100:30000`. To receive them you can use [socat][] on your computer:
To enable debug logging, pass `-DAPOLLO_ENABLE_LOGGING=ON` argument to cmake. The application will write debug messages to

$ socat udp4-recv:30000,ip-add-membership=239.255.0.100:0.0.0.0 -
ms0:/pkgi-psp.log

You can also set the `PSPIP` environment variable to your PSP's IP address, and use `make send` to upload `EBOOT.PBP` directly to the `ms0:/PSP/GAME/APOLLO` folder.

Expand Down
2 changes: 1 addition & 1 deletion include/menu.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ enum menu_screen_ids
//Textures
enum texture_index
{
leon_jpg_index,
leon_luna_png_index,
bgimg_png_index,
column_1_png_index,
column_2_png_index,
Expand Down
2 changes: 1 addition & 1 deletion include/menu_gui.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
void Draw_AboutMenu_Ani(void);
void Draw_AboutMenu(void);
void Draw_AboutMenu(int ll);

void Draw_UserCheatsMenu_Ani(save_list_t * list);
void Draw_UserCheatsMenu(save_list_t * list, int menuSel, u8 alpha);
Expand Down
2 changes: 1 addition & 1 deletion include/settings.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define APOLLO_VERSION "1.0.0" //Apollo Vita version (about menu)
#define APOLLO_VERSION "1.2.0" //Apollo Vita version (about menu)

#define MENU_TITLE_OFF 30 //Offset of menu title text from menu mini icon
#define MENU_ICON_OFF 35 //X Offset to start printing menu mini icon
Expand Down
36 changes: 20 additions & 16 deletions source/ciso.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ int convert_cso2iso(const char *fname_in)

uint64_t file_size, read_pos, read_size;
uint32_t index;
int index_size, block, plain;
int index_size, plain, ret = 0;

strncpy(fname_out, fname_in, sizeof(fname_out));
strcpy(strrchr(fname_out, '.'), ".ISO");
Expand Down Expand Up @@ -129,7 +129,7 @@ int convert_cso2iso(const char *fname_in)
if( fread(index_buf, 1, index_size, fin) != index_size )
{
LOG("file read error\n");
return 0;
goto end_iso;
}

/* show info */
Expand All @@ -145,7 +145,7 @@ int convert_cso2iso(const char *fname_in)
/* decompress data */
init_progress_bar("Decompressing...");

for(block = 0;block < ciso_total_block ; block++)
for(int block = 0;block < ciso_total_block ; block++)
{
if (block % 0x100 == 0)
{
Expand All @@ -155,7 +155,7 @@ int convert_cso2iso(const char *fname_in)
if (inflateInit2(&z,-15) != Z_OK)
{
LOG("deflateInit : %s\n", (z.msg) ? z.msg : "error");
return 0;
goto end_iso;
}

/* check index */
Expand All @@ -177,7 +177,7 @@ int convert_cso2iso(const char *fname_in)
if(z.avail_in != read_size)
{
LOG("block=%d : read error\n",block);
return 0;
goto end_iso;
}

if(plain)
Expand All @@ -194,30 +194,32 @@ int convert_cso2iso(const char *fname_in)
if (inflate(&z, Z_FINISH) != Z_STREAM_END)
{
LOG("block %d:inflate : %s\n", block,(z.msg) ? z.msg : "error");
return 0;
goto end_iso;
}
if(z.total_out != ciso.block_size)
{
LOG("block %d : block size error %d != %d\n",block, z.total_out, ciso.block_size);
return 0;
goto end_iso;
}
}
/* write decompressed block */
if(fwrite(block_buf1, 1, z.total_out, fout) != z.total_out)
{
LOG("block %d : Write error\n",block);
return 0;
goto end_iso;
}

/* term zlib */
if (inflateEnd(&z) != Z_OK)
{
LOG("inflateEnd : %s\n", (z.msg) ? z.msg : "error");
return 0;
goto end_iso;
}
}
update_progress_bar(ciso_total_block, ciso_total_block, "Done!");
ret = 1;

end_iso:
/* close files */
fclose(fin);
fclose(fout);
Expand All @@ -230,7 +232,7 @@ int convert_cso2iso(const char *fname_in)
if(block_buf1) free(block_buf1);
if(block_buf2) free(block_buf2);

return 1;
return ret;
}

/****************************************************************************
Expand All @@ -242,7 +244,7 @@ int convert_iso2cso(const char *fname_in)
FILE *fin,*fout;
z_stream z;
CISO_Hdr ciso;
int ciso_total_block;
int ciso_total_block, ret = 0;

uint32_t *index_buf = NULL;
uint8_t *block_buf1 = NULL;
Expand Down Expand Up @@ -316,7 +318,7 @@ int convert_iso2cso(const char *fname_in)
if (deflateInit2(&z, Z_BEST_COMPRESSION, Z_DEFLATED, -15, 8, Z_DEFAULT_STRATEGY) != Z_OK)
{
LOG("deflateInit : %s\n", (z.msg) ? z.msg : "error");
return 0;
goto end_cso;
}

/* mark offset index */
Expand All @@ -330,7 +332,7 @@ int convert_iso2cso(const char *fname_in)
if(z.avail_in != ciso.block_size)
{
LOG("block=%d : read error\n",block);
return 0;
goto end_cso;
}

/* compress block */
Expand All @@ -346,7 +348,7 @@ int convert_iso2cso(const char *fname_in)
if(fwrite(block_buf2, 1, z.total_out, fout) != z.total_out)
{
LOG("block %d : Write error\n",block);
return 0;
goto end_cso;
}

/* mark next index */
Expand All @@ -356,10 +358,11 @@ int convert_iso2cso(const char *fname_in)
if (deflateEnd(&z) != Z_OK)
{
LOG("deflateEnd : %s\n", (z.msg) ? z.msg : "error");
return 0;
goto end_cso;
}
}
update_progress_bar(ciso_total_block, ciso_total_block, "Done!");
ret = 1;

/* last position (total size)*/
index_buf[block] = write_pos>>(ciso.align);
Expand All @@ -369,6 +372,7 @@ int convert_iso2cso(const char *fname_in)
fwrite(index_buf,1,index_size,fout);
fseek(fout,0,SEEK_END);

end_cso:
/* close files */
fclose(fin);
fclose(fout);
Expand All @@ -382,7 +386,7 @@ int convert_iso2cso(const char *fname_in)
if(block_buf1) free(block_buf1);
if(block_buf2) free(block_buf2);

return 1;
return ret;
}

/****************************************************************************
Expand Down
7 changes: 5 additions & 2 deletions source/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,14 @@ int unlink_secure(const char *path)
*/
int mkdirs(const char* dir)
{
SceIoStat stat;
char path[256];
snprintf(path, sizeof(path), "%s", dir);

char* ptr = strrchr(path, '/');
*ptr = 0;

if (dir_exists(path) == SUCCESS)
if (sceIoGetstat(path, &stat) == SUCCESS && FIO_S_ISDIR(stat.st_mode))
return SUCCESS;

ptr = strchr(path, '/');
Expand Down Expand Up @@ -101,9 +102,11 @@ int mkdirs(const char* dir)
*ptr++ = last;
if (last == 0)
break;

}

if (sceIoGetstat(path, &stat) < 0 || !FIO_S_ISDIR(stat.st_mode))
return FAILED;

return SUCCESS;
}

Expand Down
Loading

0 comments on commit 757be4f

Please # to comment.