.changelog/3564.md
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.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.RETRO_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.System/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.pspSystemDirectory 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 explicit — Paths.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.stringByAppendingPathComponent: — Replaced stringByAppendingString:@"/font/" with the safer stringByAppendingPathComponent:@"font" to avoid double-slash issues.com.provenance.wii → "Wii" mapping to the _systemSpecificDirectory ObjC dictionary (was present in SystemIdentifier.systemDirectoryName but missing from the ObjC mirror)._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>.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).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.