Back to Provenance

3564

.changelog/3564.md

3.3.13.5 KB
Original Source

Added

  • Paths.systemPath — New Documents/System/ directory tree for per-console system files (BIOS, firmware, fonts). Provides systemPath(forSystemName:), systemPath(forSystem:), and systemPath(forSystemIdentifier:) helpers. Part of Epic #2725.
  • SystemIdentifier.systemDirectoryName — Computed property mapping each system to its conventional short directory name (e.g. .PSP"PSP", .DS"NDS"). Returns nil for systems without a dedicated system directory.

Fixed

  • PPSSPP "cannot find core resources" — PPSSPP now uses System/PSP/ as its MemStick and flash0 directory (was incorrectly using Battery States/<rom>/). Fixes resource-not-found errors when launching PSP games via PVThinLibretroCore on tvOS.
  • PVThinLibretroCore system directoryRETRO_ENVIRONMENT_GET_SYSTEM_DIRECTORY now returns a system-specific System/<Name> path for known systems (PSP, NDS, 3DS, PS2, DC, Saturn, N64, GC, AtariST, DOS) rather than the generic BIOS path.
  • PPSSPP font directory not createdSystem/PSP/font/ is now explicitly created before copying flash0 fonts from the bundle. Previously copyItemAtPath silently failed because the subdirectory didn't exist, leaving PPSSPP without fonts on first launch or after tvOS cache purge.
  • PPSSPP tvOS pathpspSystemDirectory now uses NSSearchPathForDirectoriesInDomains(NSCachesDirectory, ...) on tvOS (as required by App Store guidelines) and NSDocumentDirectory on iOS, matching the established pattern in DarwinFileSystemServices.mm and PVPPSSPPCore.mm.
  • Paths.systemPath tvOS explicitPaths.systemPath now explicitly returns cachesPath/System/ on tvOS via #if os(tvOS) guard, matching the pattern of URL.documentsPath and removing reliance on the indirect iCloud chain for tvOS caches guarantee.
  • Font path uses stringByAppendingPathComponent: — Replaced stringByAppendingString:@"/font/" with the safer stringByAppendingPathComponent:@"font" to avoid double-slash issues.
  • PVThinLibretroFrontend missing Wii system dir — Added com.provenance.wii"Wii" mapping to the _systemSpecificDirectory ObjC dictionary (was present in SystemIdentifier.systemDirectoryName but missing from the ObjC mirror).
  • PVThinLibretroFrontend wrong system dir path_systemSpecificDirectory was stripping only one path component from BIOSPath (format <docs>/BIOS/), placing system directories under <docs>/BIOS/System/<name> instead of the correct <docs>/System/<name>. Fixed by stripping two components to reach the documents root before appending System/<name>.
  • PPSSPP currentDirectory encoding — Use fileSystemRepresentation consistently for all Path() constructors in loadFileAtPath:; previously currentDirectory used cStringUsingEncoding:kCFStringEncodingUTF8 (NFC) while the others used fileSystemRepresentation (NFD on APFS).

Changed

  • tvOS cache-purge recovery documented — Added inline documentation explaining that bundle-derived assets (PPSSPP fonts) are automatically re-seeded on every core launch, and flagged a TODO for extending the CloudKit BIOS syncer to cover System/ subdirectories for user-placed firmware files.
  • _systemSpecificDirectory delegates to SystemIdentifier — Replaced the duplicated ObjC NSDictionary lookup table with a call to PVSystemDirectoryHelper.systemDirectoryName(forIdentifier:), which wraps SystemIdentifier.systemDirectoryName in PVPrimitives. Adding a new system now only requires updating the Swift enum.