The loader thread writes memory, kernel objects and the symbol map
without g_frameMutex, and fires SYMBOL_MAP_UPDATED for every module it
loads. Each one made the GUI thread refill the symbol lists while the
loader went on adding symbols, so booting the XMB (which loads a long
chain of modules there) with the disassembly window open crashed in
SymbolMap::FillSymbolListBox.
Readers holding g_frameMutex now also check the new PSP_IsBooting() and
skip while it's true. BOOT_DONE refills the lists once the boot is done.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Booting the XMB from a 6.60 firmware checks 40 command 1 signatures, at
55ms each in a Release build, since the bignum code worked a byte at a time
and did a full modular inversion for every point addition and doubling.
Now it works on 32-bit words (plain C, so the same on ARM), keeps points in
Jacobian coordinates with one inversion at the end, and computes u1*G + u2*Q
for verification in one pass. A verify takes 79us, and a 30 second XMB boot
in headless went from 2.96s to 0.79s.
Results are unchanged, including command 0xC's private key coming out
multiplied by 2^168 mod N, which the old Montgomery form did.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Command 1's ECDSA check, behind every ECDSA-signed (type 6) module, takes
55ms in a Release build, and booting the XMB from a 6.60 firmware does it
40 times. The vectors are signatures from those modules.
kirk1_ecdsa_verify() factors the check out of kirk_CMD1 so the test can
call it without building a whole command 1 block.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The provider answers a taken name with a renamed copy, "name (1)" or
"name (1).ext", but it also replaces characters FAT doesn't allow with '_',
which isn't a conflict. Create, copy and rename now only report
ALREADY_EXISTS (and undo) for the numbered form of the sanitised name.
Also take the image picker's result from ClipData when there's no data URI,
like the document picker does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A query on a second authority closed the cached client while another
thread could still be using it. Now each authority keeps its own client,
dropped only when its provider dies.
docs/android-todo.md lists the review findings left for later (image picker
decoding on the main thread, the VR exit in onDestroy, the achievements
host override receiver), and android-device-testing.md describes the
LeakCanary/StrictMode setup.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The screen under a popup is only laid out, not recreated, so the grid kept the
cell size it was created with.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The grid and the list each get their own icon size (GameGridScale and the new
GameListScale), changed by the zoom shortcuts and the settings popup for the
view mode of the browser it's opened from. A saved view of 2 (the old large
list) reads as the list.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A recreate (font scale, resolution change) re-sent the launch intent's
game to native, which booted it over whatever was running.
- Exceptions in posted commands (bad parameters, setPrimaryClip) no longer
crash the app; the request is answered as failed.
- Close tombstone streams and the free-space fd on error paths.
- Keep the CameraHelper across graphics restarts (it leaked a SurfaceTexture).
- Don't treat an unreadable document name as a name conflict, which deleted
the file just created.
- Tree picker: convert to a document URI even if the persistable grant fails.
- ShortcutActivity: don't open a second picker on recreate, and finish when
the old file chooser is backed out of.
- Skip null names/MIME types in listings, null device in the Joy-Con check.
Debug builds now set a StrictMode VM policy (leaked closables, registrations,
activities), and -PleakCanary adds LeakCanary to debug builds.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
protoc was still on 3.25.3 while the runtime was on 4.x; both are now 4.36.2.
appcompat stays at 1.7.1, since 1.8.0 needs minSdk 23.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The XMB polls scePowerGetBatteryLifePercent about once a second and draws
it in its status bar. When running the VSH, return the host's battery
level there and in the power callback's percentage bits. Games still see
a full battery, so a run doesn't depend on the host's charge.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The two columns of loose text didn't fit in portrait. Now the status, warnings
and folders are in groups on the left (or on top), and Move Data and OK on the
right (or below). The move's progress gets a progress bar.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Loading a .ppmap cleared the map first, which also forgot which modules were
loaded and where. The file's modules came back at the addresses they had when
it was saved, and none of them active, so every symbol in a module vanished
until that module happened to load again. It now merges into the map: the
file's modules are matched to ours by name, and its names win.
Unnamed data was saved with "(null)" as its name, which came back as a label,
and data without a name was dropped on load.
The no$ format only has absolute addresses, so it now only saves functions of
loaded modules, and loading attaches them to the module they're in.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Instead of "volume:path" strings, the volume and the path in it are kept
apart, and IsInside() says which side is the folder.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
So code that handles them can be tested anywhere. Elsewhere, file operations
on them just fail, as they did when they were taken for native paths.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It's possible to try to recv more than fits in memory using
sceNetAdhocPtpRecv, but it's ok as long as the received data fits,
as shown by the new pspautotests net/adhoc/ptp. We refused it with
INVALID_ARG on every call. Now the recv is limited to what fits in
memory, and the game's length is put back if the call fails without
waiting.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DeleteDir takes a folder's contents along there, so a copying move's cleanup
is one storage call per top-level item instead of one per file and folder.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From pspautotests net/inet/apscan2: sceNetApctlScanSSID2 takes an SSID
to look for (or NULL), doesn't change the state, and ends with
SCAN_STOP about 2.2s later. Its results, read with GetBSSDescIDList2
and GetBSSDescEntry2, are separate from the User ones and cleared when
it starts, and a ScanUser called meanwhile runs after it. A scan for
one SSID looks among the access points recent scans made up.
A User scan's SCAN_REQUEST now comes at once and SCAN_COMPLETE 2.2s
later; the handler used to see both at the end. Results are filled in
when a scan ends, so both lists are empty until then, and a second
ScanUser before the first ends fails with 0x80410a80 (net/inet/offline).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Fixes#20703
MGS: Portable Ops makes a recruit from the strongest access point a scan
finds (after mashing O to fill the meter), and won't take the same one
again for a long time. The made-up access points never changed, and the
configured one was always the strongest at 99%, so after a recruit or
two every scan came up empty. Now each scan makes up new BSSIDs, SSIDs
and strengths, and sorts them strongest first.
The User functions now also match pspautotests net/inet/apscan and
net/inet/offline: IDs from 1 (slot 0 is valid but empty), 0x80410a09
past the last one found and 0x80410a82 past the 20 slots, a 33-byte
SSID, and no SCAN_STOP event after SCAN_COMPLETE. The ...2 functions
Peace Walker uses keep their old numbering and SCAN_STOP.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The rename, copy and undo paths of MoveDirectoryContentsSafe(), and
CheckNewMemstickFolder() on a renamed PSP folder, in the scratch folder,
so on a device they run through content URIs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>