Offer to install PSP firmware updaters instead of running them

Opening an official updater (a PSP/GAME/UPDATE EBOOT.PBP, identified by the
MSTKUPDATE disc ID) from the main screen now brings up a confirmation dialog
that unpacks the firmware into the NAND directory, where the emulated
flash0/flash1 live. Running the updater itself doesn't work, so there was
nothing useful to do with one before.

Unpacks the file list for the model we claim to be (iPSPModel), on a worker
thread, with a progress bar - for which PSARUnpackOptions gets an optional
progress callback.

AGENTS.md: translate UI strings last, in a separate commit

The English string is what all ~47 languages get derived from, so rewording it
after the sweep means redoing the sweep. Check the wording first.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Henrik Rydgård
2026-08-24 17:23:14 +02:00
co-authored by Claude Opus 5
parent c989c2553e
commit 4b761f0715
12 changed files with 333 additions and 1 deletions
+18 -1
View File
@@ -49,6 +49,7 @@
#include "UI/RemoteISOScreen.h"
#include "UI/DisplayLayoutScreen.h"
#include "UI/SavedataScreen.h"
#include "UI/InstallUpdateScreen.h"
#include "UI/InstallZipScreen.h"
#include "UI/Background.h"
#include "UI/GameBrowser.h"
@@ -68,7 +69,9 @@ static void LaunchFile(ScreenManager *screenManager, Screen *currentScreen, cons
screenManager->push(new InstallZipScreen(path));
} else {
// Check if we already know that this game isn't playable.
auto info = g_gameInfoCache->GetInfo(nullptr, path, GameInfoFlags::FILE_TYPE);
// If coming from the main screen, the info will already be computed here since the icon is displayed etc.
// Otherwise, we probably technically should wait for it...
auto info = g_gameInfoCache->GetInfo(nullptr, path, GameInfoFlags::FILE_TYPE | GameInfoFlags::PARAM_SFO);
switch (info->fileType) {
case IdentifiedFileType::PSP_UMD_VIDEO_ISO:
@@ -82,6 +85,20 @@ static void LaunchFile(ScreenManager *screenManager, Screen *currentScreen, cons
screenManager->push(new SavedataPopupScreen(Path(), path, title));
return;
}
case IdentifiedFileType::PSP_PBP:
case IdentifiedFileType::PSP_PBP_DIRECTORY:
{
// Check if it's an update file. If so, we'll offer to install it directly,
// instead of running it (which currently will not work).
if (info->id == "MSTKUPDATE") {
std::string title = info->GetTitle(); // includes the version.
// The unpacker wants the PBP itself, not the folder it happens to sit in.
const Path pbpPath = info->fileType == IdentifiedFileType::PSP_PBP ? path : path / "EBOOT.PBP";
screenManager->push(new InstallUpdateScreen(pbpPath, title));
return;
}
break;
}
default:
break;
}