cellSaveData: Only cap fileNum and sizeKB for SDK 2.6 and older or fileListMax 0 #19905

Merged
digant73 opened 1:14pm on October 21, 2026 wanted to merge 415 Ξ” into rpcs3/rpcs3 master from
cellsavedata-filenum-cap

Pull Request Overview

  • Opened on October 21, 2026
  • Status Merged
  • Commit count 4 with first commit October 21, 2026

Total Delta

415 Total Diff Delta

Open Days

Open 17 weekdays

Test Delta

0 Diff Delta in Test Files
Breakdown by Phase

How long has this pull request spent in each phase of its lifecycle?

Fraction of total time Business days Phase
N/A 907.6 days Issue creation to work beginning
 
0.0 days Authoring 1 commit before pull request opened for review
 
0.0 days Awaiting first review
 
1.3 days Revising work with 3 commits in response to 5 reviews that left 13 comments
Set up deploy tracking to begin tracking full PR start-to-deploy times

Total time for pull request 1.3 business days from first commit authored to merge
Deploy tracking has not been set up

Author avatar

cellSaveData: Only cap fileNum and sizeKB for SDK 2.6 and older or fileListMax 0

Analysis, hwtest and fixes made by Opus 5.5. Tested by me.

(confirmed) Fixes #13792

Bug: Madagascar: Escape 2 Africa (#13792) reports its save as broken because its funcStat rejects the save when fileListNum < fileNum. When a save has more files than fileListMax, RPCS3 reports every file in fileNum and sizeKB but caps fileListNum. A PS3 also caps fileNum and sizeKB for games built with SDK 0x26FFFF or older (the game uses 0x230001). With fileListMax 0 it counts no file on any SDK. From SDK 0x270000 onward with fileListMax β‰₯ 1 it counts every file, as upstream does.

Fix: Before the existing loop, cut the sorted file list to fileListMax when sdk_ver <= 0x26FFFF or fileListMax is 0 (+6/βˆ’0, the loop is unchanged).

Results (hwtest, save with 3 files, fileNum / fileListNum / sizeKB):

filenum_hwtest_19905.zip

  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”

β”‚ SDK β”‚ fileListMax β”‚ upstream β”‚ this PR β”‚ PS3 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ≀ 0x26FFFF β”‚ 0 β”‚ 3 / 0 / 53* β”‚ 0 / 0 / 35 β”‚ 0 / 0 / 35 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ≀ 0x26FFFF β”‚ 1 β”‚ 3 / 1 / 53 (game: BROKEN) β”‚ 1 / 1 / 49 β”‚ 1 / 1 / 49 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ β‰₯ 0x270000 β”‚ 0 β”‚ 3 / 0 / 53* β”‚ 0 / 0 / 35 β”‚ 0 / 0 / 35 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ β‰₯ 0x270000 β”‚ 1 β”‚ 3 / 1 / 53* β”‚ 3 / 1 / 53 β”‚ 3 / 1 / 53 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ any β”‚ 8 β”‚ 3 / 3 / 53 β”‚ 3 / 3 / 53 β”‚ 3 / 3 / 53 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜


  • From the code, not run on upstream.


  • The SDK threshold was narrowed down on the PS3 with probes from 0x00230001 to 0x00470001, including 0x0025FFFF–0x00270000.


  • The same values hold for all 11 funcStat functions tested and for 3 file mixes.


  • fileListMax decides, not bufSize.


  • The output of this PR is identical to the PS3 output in every test. Madagascar 2 shows "Continue" again and loads its save.


This work implements Madagascar: Escape 2 Africa don't save (closed)

Quick summary

Hello developers good afternoon.

I noticed that the game Madagascar 2 simply does not save progress, the game does not save either at the beginning or as the game progresses, the game does not save any time, the other games that I play in the emulator are all normal, only this one has a problem. Could it be some bug going on? Thanks in advance.

Details

No response

Attach a log file

RPCS3.log RPCS3.log.gz

Attach capture files for visual issues

No response

System configuration

RPCS3 v0.0.27-14954-0524f4a5 Alpha | master | FW 4.90 | Windows 11 22H2 Genuine Intel 0000 | 16 Threads | 31.85 GiB RAM | AVX-512+ | FMA3 GPU: NVIDIA GeForce GTX 750 Ti (531.68)

Other details

No response

Comments Threads Pending Resolution

Resolved Comment Threads

Megamouse reviewed on October 21, 2026
Megamouse reviewed on October 21, 2026
Megamouse reviewed on October 21, 2026
Megamouse reviewed on October 21, 2026
rpcs3/Emu/Cell/Modules/cellSaveData.cpp
Outdated
1598
		// clang-format on
1599
1600
		files_sorted.erase(list_end, files_sorted.end());
Opus 5
1601
1602
		statGet->fileNum = ::size32(files_sorted);
Opus 5
Megamouse reviewed on October 21, 2026
rpcs3/Emu/Cell/Modules/cellSaveData.cpp
Outdated
1597
		// clang-format on
1598
1599
		// Up to SDK 2.6, or with fileListMax 0, fileNum and sizeKB only cover the files that fit in fileList
Opus 5
1600
		if ((g_ps3_process_info.sdk_ver <= 0x26FFFF || !setBuf->fileListMax) && files_sorted.size() > setBuf->fileListMax)
Opus 5
1601
		{
Opus 5