Skip to content

Commit

Permalink
new version check
Browse files Browse the repository at this point in the history
improve download speed
update docs
  • Loading branch information
bucanero committed Oct 13, 2023
1 parent 5f77dbb commit abee19d
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 29 deletions.
22 changes: 21 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,26 @@ All notable changes to the `pkgi-psp` project will be documented in this file. T

## [Unreleased]()

## [v1.0.0](https://github.com/bucanero/pkgi-psp/releases/tag/v1.0.0) - 2023-10-14

### Added

* Package install as `ISO`/`CSO`/`Digital`
* PSP Go internal storage detection (`ef0`/`ms0`)
* Update database files from URLs (`Refresh` option)
* Enabled `Search` option (on-screen keyboard)
* Added PSX category
* PKGi new version check & notification

### Fixed

* Install and decrypt themes to `/PSP/THEME/`

### Misc

* Improved download speed (~400Kb/s average)
* Network proxy settings support

## [v0.8.0](https://github.com/bucanero/pkgi-psp/releases/tag/v0.8.0) - 2023-10-01

First public release. In memory of Leon & Luna.
Expand All @@ -15,7 +35,7 @@ First public release. In memory of Leon & Luna.
- Generic text database format support
- Filter unsupported or missing URLs when loading a database
* Content categorization and filtering
* Support for HTTP, HTTPS, FTP, FTPS links with TLS v1.2
* Support for `HTTP`, `HTTPS`, `FTP`, `FTPS` links with TLS v1.2
* Localization support (Finnish, French, German, Indonesian, Italian, Polish, Portuguese, Spanish, Turkish)
- Language detection based on PSP settings
* Enter button detection (`cross`/`circle`)
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ add_custom_target(createzip

add_custom_target(copy
COMMAND @echo "Copying to $$PSPMS/PSP/GAME/PKGI/EBOOT.PBP ..."
COMMAND @mkdir -p $$PSPMS/PSP/GAME/APOLLO
COMMAND @mkdir -p $$PSPMS/PSP/GAME/PKGI
COMMAND @cp -v EBOOT.PBP $$PSPMS/PSP/GAME/PKGI/EBOOT.PBP
DEPENDS ${PROJECT_NAME}
)
Expand Down
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ This homebrew app allows to download and install `.pkg` files directly on your P

### Notes:
* **content activation:** downloaded content requires a valid license to run. If your PSP hasn't been activated, you can use one of the following plugins:
- [npdrm_free plugin](https://github.com/qwikrazor87/npdrm_free) (PSP/PS1/PCEngine games and DLCs)
- [npdrm_free_mod plugin](https://github.com/lusid1/npdrm_free_mod) (PSP/PS1 games only)
- [npdrm_free plugin](https://github.com/qwikrazor87/npdrm_free) (PSP/PS1 games and DLCs)
- [nploader_mod](https://github.com/lusid1/nploader_mod) (PSP DLCs only)

# Download
Expand Down Expand Up @@ -62,12 +62,15 @@ You can refresh and sync an online database by adding the DB URL(s) to the `conf
For example:

```
url http://www.mysite.com/mylist.csv
url_games http://www.mysite.com/mylist.csv
url_demos http://www.demos.com/otherlist.csv
url_emulators http://www.example.com/emulators.csv
```

Using this setup, `pkgi.txt` will be updated with `mylist.csv`, `pgi_demos.txt` with `otherlist.csv` , and `pkgi_emulators.txt` with `emulators.csv`.
Using this setup,
- `pkgi_games.txt` will be updated with `http://www.mysite.com/mylist.csv`,
- `pkgi_demos.txt` with `http://www.demos.com/otherlist.csv`,
- and `pkgi_emulators.txt` with `http://www.example.com/emulators.csv`.

Next time you open the app, you'll have an additional menu option ![Triangle](https://github.com/bucanero/pkgi-ps3/raw/master/data/TRIANGLE.png) called **Refresh**. When you select it, the local databases will be syncronized with the defined URLs.

Expand All @@ -91,7 +94,7 @@ where:
| `type` | is a number for the item's content type. See the [table below](#content-types) for details. (set it to 0 if unknown)
| `name` | is a string for the item's name.
| `description` | is a string for the item's description.
| `rap` | the 16 hex bytes for a RAP file, if needed by the item (`.rap` files will be created on `/dev_hdd0/exdata`). Leave empty to skip the `.rap` file.
| `rap` | the 16 hex bytes for a RAP file, if needed by the item (`.rap` files will be created on `ms0:/PKG/RAP`). Leave empty to skip the `.rap` file.
| `url` | is the HTTP/HTTPS/FTP/FTPS URL where to download the `.pkg` file.
| `size` | is the size in bytes of the `.pkg` file, or 0 if unknown.
| `checksum` | is a SHA256 digest of the `.pkg` file (as 32 hex bytes) to make sure the file is not tampered with. Leave empty to skip the check.
Expand Down Expand Up @@ -215,10 +218,9 @@ Run `cmake . && make` to create a release build. If you want to create a `.zip`

## Debugging

To enable debug logging, pass `-DPKGI_ENABLE_DEBUG=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 `-DPKGI_ENABLE_DEBUG=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/PKGI` folder.

Expand Down
22 changes: 12 additions & 10 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ This homebrew app allows to download and install `.pkg` files directly on your P

### Notes:
* **content activation:** downloaded content requires a valid license to run. If your PSP hasn't been activated, you can use one of the following plugins:
- [npdrm_free plugin](https://github.com/qwikrazor87/npdrm_free) (PSP/PS1/PCEngine games and DLCs)
- [npdrm_free_mod plugin](https://github.com/lusid1/npdrm_free_mod) (PSP/PS1 games only)
- [npdrm_free plugin](https://github.com/qwikrazor87/npdrm_free) (PSP/PS1 games and DLCs)
- [nploader_mod](https://github.com/lusid1/nploader_mod) (PSP DLCs only)

# Download
Expand All @@ -46,7 +46,7 @@ You can also load additional database files:
- `pkgi_games.txt`
- `pkgi_dlcs.txt`
- `pkgi_themes.txt`
- `pkgi_avatars.txt`
- `pkgi_psx.txt`
- `pkgi_demos.txt`
- `pkgi_updates.txt`
- `pkgi_emulators.txt`
Expand All @@ -62,12 +62,15 @@ You can refresh and sync an online database by adding the DB URL(s) to the `conf
For example:

```
url http://www.mysite.com/mylist.csv
url_games http://www.mysite.com/mylist.csv
url_demos http://www.demos.com/otherlist.csv
url_emulators http://www.example.com/emulators.csv
```

Using this setup, `pkgi.txt` will be updated with `mylist.csv`, `pgi_demos.txt` with `otherlist.csv` , and `pkgi_emulators.txt` with `emulators.csv`.
Using this setup,
- `pkgi_games.txt` will be updated with `http://www.mysite.com/mylist.csv`,
- `pkgi_demos.txt` with `http://www.demos.com/otherlist.csv`,
- and `pkgi_emulators.txt` with `http://www.example.com/emulators.csv`.

Next time you open the app, you'll have an additional menu option ![Triangle](https://github.com/bucanero/pkgi-ps3/raw/master/data/TRIANGLE.png) called **Refresh**. When you select it, the local databases will be syncronized with the defined URLs.

Expand All @@ -91,7 +94,7 @@ where:
| `type` | is a number for the item's content type. See the [table below](#content-types) for details. (set it to 0 if unknown)
| `name` | is a string for the item's name.
| `description` | is a string for the item's description.
| `rap` | the 16 hex bytes for a RAP file, if needed by the item (`.rap` files will be created on `/dev_hdd0/exdata`). Leave empty to skip the `.rap` file.
| `rap` | the 16 hex bytes for a RAP file, if needed by the item (`.rap` files will be created on `ms0:/PKG/RAP`). Leave empty to skip the `.rap` file.
| `url` | is the HTTP/HTTPS/FTP/FTPS URL where to download the `.pkg` file.
| `size` | is the size in bytes of the `.pkg` file, or 0 if unknown.
| `checksum` | is a SHA256 digest of the `.pkg` file (as 32 hex bytes) to make sure the file is not tampered with. Leave empty to skip the check.
Expand All @@ -117,7 +120,7 @@ EP0001-UPDWEBMOD_00-0000000000000000,9,webMAN MOD v1.47.36,Backup Manager,,http:
| 1 | Game | `pkgi_games.txt`
| 2 | DLC | `pkgi_dlcs.txt`
| 3 | Theme | `pkgi_themes.txt`
| 4 | Avatar | `pkgi_avatars.txt`
| 4 | PSX | `pkgi_psx.txt`
| 5 | Demo | `pkgi_demos.txt`
| 6 | Update | `pkgi_updates.txt`
| 7 | Emulator | `pkgi_emulators.txt`
Expand Down Expand Up @@ -198,7 +201,7 @@ It will open the context menu. Press ![Triangle](https://github.com/bucanero/pkg

## Acknowledgements

* [mmozeiko](https://github.com/mmozeiko/): [PS Vita pkgi](https://github.com/mmozeiko/pkgi)
* [mmozeiko](https://github.com/mmozeiko/): [pkgi](https://github.com/mmozeiko/pkgi) (PS Vita), [pkg2zip](https://github.com/mmozeiko/pkg2zip)
* [qwikrazor87](https://github.com/qwikrazor87/): [Depackager](https://github.com/bucanero/psptools/tree/master/depackager)

# Building
Expand All @@ -215,10 +218,9 @@ Run `cmake . && make` to create a release build. If you want to create a `.zip`

## Debugging

To enable debug logging, pass `-DPKGI_ENABLE_DEBUG=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 `-DPKGI_ENABLE_DEBUG=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/PKGI` folder.

Expand Down
16 changes: 8 additions & 8 deletions source/pkgi.c
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ static void reposition(void)
}
}

static void pkgi_update_check_thread(void)
static void pkgi_update_check(void)
{
char *buffer;
uint32_t size;
Expand Down Expand Up @@ -659,6 +659,8 @@ static void pkgi_update_check_thread(void)
*end = 0;
LOG("download URL is %s", start);

pkgi_dialog_message("New PKGi Version Available!", "Update PKGi PSP to the latest version:\nhttps://github.com/bucanero/pkgi-psp/");
/*
DbItem update_item = {
.content = "UP0001-NP00PKGI3_00-0000000000000000",
.name = "PKGi PSP Update",
Expand All @@ -672,10 +674,10 @@ static void pkgi_update_check_thread(void)
pkgi_dialog_message(update_item.name, _("Successfully downloaded PKGi PSP update"));
LOG("update downloaded!");
}
*/

end_update:
free(buffer);
pkgi_thread_exit();
}

static void pkgi_load_language(const char* lang)
Expand Down Expand Up @@ -718,19 +720,17 @@ int main(int argc, char* argv[])

background = pkgi_load_image_buffer(background, png);

if (config.version_check)
{
// pkgi_start_thread("update_thread", &pkgi_update_check_thread);
}

memset(&input, 0, sizeof(pkgi_input));
while (pkgi_update(&input) && (state != StateTerminate))
{
pkgi_draw_background(background);

if (state == StateUpdateDone)
{
psp_network_up();
if (psp_network_up() && config.version_check)
{
pkgi_update_check();
}

pkgi_db_configure(NULL, &config);
state = StateMain;
Expand Down
4 changes: 2 additions & 2 deletions source/pkgi_download.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ static int update_progress(void *p, int64_t dltotal, int64_t dlnow, int64_t ulto
}

pkgi_dialog_update_progress(text, dialog_extra, dialog_eta, percent);
info_update = info_now + 500;
info_update = info_now + 1000;
progress_screen_refresh();
}
progress_screen_refresh();

return (pkgi_dialog_is_cancelled());
}
Expand Down

0 comments on commit abee19d

Please sign in to comment.