rpcs3 icon indicating copy to clipboard operation
rpcs3 copied to clipboard

Support for Additional game format (ISO/CHD)

Open komawoyo opened this issue 7 years ago • 113 comments

Some games folders have over 10,000 files in a directory. Support to scan iso and read this game format may be beneficial. Similar homebrew that supports this is webmanMOD and game managers for the PS3

komawoyo avatar Jan 03 '18 01:01 komawoyo

You can mount the ISO and run it off the virtual drive

AniLeo avatar Jan 03 '18 01:01 AniLeo

Iso not really exist for ps3 game, so if you have iso, just extract or mount

Zangetsu38 avatar Jan 03 '18 02:01 Zangetsu38

Yeah most of my games are iso (from both retail and psn versions ) to help with file transfer and organization. Transferring many small files is much slower than one big file. Also, it has to do with space saving - Referencing this link (https://www.howtogeek.com/180369/why-is-there-a-big-difference-between-size-and-size-on-disk/)

Yes, at the moment I do mount it but its not really convenient and does not utilize the QT GUI for games listing

komawoyo avatar Jan 03 '18 06:01 komawoyo

psn versions

They need to be at dev_hdd0/game/GameID just like a real PS3, without tampering with them, you can't put them into some compressed file and then expect that having a read-only mount of it will work.

AniLeo avatar Jan 06 '18 02:01 AniLeo

Still an "issue", also misses the longterm label.

dio-gh avatar Oct 08 '19 17:10 dio-gh

It would be also very useful to have some kind of trimming/compressing tool inside of rpcs3 for ISO format *for example trimming PS3_UPDATE folder or additional languages)

QuaiGoner avatar Sep 22 '20 13:09 QuaiGoner

That sounds like a bit of a feature creep, especially since how game localizations are packed entirely depend on the given game. At that point you could just extract the ISO, throw out whatever you want, then turn it back into an ISO. Sounds pretty out of scope in my book.

dio-gh avatar Sep 22 '20 15:09 dio-gh

Incorrect, you don't need to write to discs since they're read only, you just need to map an ISO to dev_bdvd

Dumping games as ISO is the de facto way to dump games, Redump metadata library is also being built as both encrypted and decrypted ISOs

RPCS3 will eventually support mounting ISO, decrypted, encrypted or both. If anything, dumping to a game folder is what is wrong.

AniLeo avatar Oct 28 '20 05:10 AniLeo

Beside iso, i would like to add chd. Iso and chd are more practical to archive games. So this feature is highly desirable

Papermanzero avatar Nov 12 '20 00:11 Papermanzero

Unhappily load mounted ISOs in virtual drives in Linux not work. Windows works fine. I not has information if is an security feature in Linux not allowing rpcs3 to read all files in virtual drive. Now if instead is implemented internally in rpcs3 read discs dumps in format CHD is an much better option. CHD save much disk space, but has anothers details. In Windows is possible mount dump disc in DAA format using PowerISO and another good detail is about games that need hard disk installation. You start an game and wait the game installation. After close rpcs3 and browse to game folder and remove all folders after folder that is eboot.bin and sfo file thus is possible created hardlinks from mounted disc in virtual drive saving much more space. I has tested and doing hardlinks works without problems since that first install the game, create the hardlinks and only after install the game updates. In other hand if using CHD not is possible create hardlinks. Is possible also create DAA file of PSN hard disk games and thus saving disk space. Not crash in gameplay.

In moment waiting gcdemu to be released to Ubuntu 21.04 to test with rpcs3.

Augusto7743 avatar Apr 29 '21 14:04 Augusto7743

The first formats that should be supported are decrypted and encrypted PS3 ISO, which are the standards for properly dumping and storing PS3 discs on containers (same for PS1 and PS2 games but only as decrypted ISO).

CHD is not used at all to store PS3 games, mostly because console CFW nor emulators can read these yet. I don't know if you can keep encrypted ISOs as CHD and then decrypt them without having to convert to ISO and back as well, but I don't see why it can't be eventually supported, even if only for decrypted games.

DAA is useless, it's just a proprietary ISO-esque format with compression. Can just use CHD or any other non-proprietary ISO-alike format that supports compression.

Also, you don't want to keep digital games on read-only containers.

AniLeo avatar Apr 29 '21 15:04 AniLeo

I had tested MDS, MDF and DAA when creating ISO dumps for mount in virtual drives and DAA has much better compression and for mount I had used PowerISO works well also when creating hardlinks. If the digital game not has any new update is possible create ISOs compressed and mount in virtual drive that help to save 15 % or more disk space and also use few CPU resource.

Augusto7743 avatar Apr 29 '21 17:04 Augusto7743

No, directories on HDD should be writable regardless of whether the game actually writes to them or not. You cannot guarantee that a game won't try to write to storage without checking thoroughly on a game by game basis. You're not supposed to use read-only formats for them, and no one else does it regardless of emulator for that same reason.

MDS/MDF and DAA are all proprietary formats thus useless for us, so CHD is the way to go instead when it comes to compression.

AniLeo avatar Apr 29 '21 17:04 AniLeo

ISO and CHD is the way to go. PCSX2 implemented CHD for iso‘s and bin‘s. ISO is the redump format and chd should be the lossless compressed storage format

Edit: CISO would be also possible for lossless compression

Papermanzero avatar Apr 29 '21 20:04 Papermanzero

@AniLeo You are saying that has games write in game folder instead game data folder ? About MDS, MDF and DAA was only to share that is possible use the 3 files formats in virtual drive and works and not waiting RPCS3 to implement read both files formats. Exactly the 3 formats are useless to implement in RPCS3. CHD using the latest version is the correct choice.

@Papermanzero CISO has better compression ? Hey that format is about PSP games ? PS3 support boot PSP games, but is strange for me RPCS3 emulating PSP. RPCS3 starting PSP games is strange. Users like it, but is better use an PSP emulator.

Augusto7743 avatar Apr 30 '21 03:04 Augusto7743

I would also very much appreciate ISO/CHD format. The first is possible even now, without much hassle if you're using a front-end for your game library. Sadly there is no virtual CD/DVD/BDVD software that can work with CHD format at this time, otherwise we would have been set. I've made some tests with chd compression of PS3 ISOs and sadly the gains (600-900 MB less) were not that impressive as they are with PSX and PS2.

stzokev avatar Dec 11 '21 17:12 stzokev

"The first is possible even now, without much hassle if you're using a front-end for your game library." How is possible ?

PS3 CHD is compressed data and PSX compress audio track in FLAC being the because have more compression ratio.

Loading PS3 games in CHD will help to use extremely less disc space and CHD not is slow to read.

Augusto7743 avatar Dec 11 '21 20:12 Augusto7743

@Augusto7743 With a middle man script of course, something like this https://github.com/ptmorris1/RPCS3-ISOLauncher-Launchbox About the compression, in PSX and PS2 I've seen some titles get compressed 50% more or less e.g. from 3 GB -> 1,5 GB. While for PS3 600-900 MB for a 10GB + iso file is not very impressive.

stzokev avatar Dec 11 '21 22:12 stzokev

Unhappily not for Linux. Have PS3 games 12 GB being compressed to 8,3 GB. Have games with more compression ratio. CHD is solution.

Augusto7743 avatar Dec 13 '21 04:12 Augusto7743

CSO (which is used for PS2 and PSP) could be also a possibility. Every format which can be reverted is good

Papermanzero avatar Dec 13 '21 14:12 Papermanzero

@Augusto7743 With a middle man script of course, something like this https://github.com/ptmorris1/RPCS3-ISOLauncher-Launchbox About the compression, in PSX and PS2 I've seen some titles get compressed 50% more or less e.g. from 3 GB -> 1,5 GB. While for PS3 600-900 MB for a 10GB + iso file is not very impressive.

Depends on the game. Not all ps3 games compress well if at all.

RinMaru avatar Dec 13 '21 17:12 RinMaru

Depends on the gaming data. It is like ps2 games. Some games do not compress well, because the disc size is almost completely used with relevant data.

Papermanzero avatar Dec 13 '21 19:12 Papermanzero

Throwing my 2 cents in, I wonder if RPCS3 could use dolphin's RVZ disc format? I recently asked on the forums for non gc support and there is a PR for it linked below.

in my brief testing I find it often gets on par with chd for compression within reason, however is significantly faster the encode and decode (testing on a slower system was a difference of nearly 15min to compress my Atelier Ayesha dump compared to chdman, which compressed it from 16gb to 13gb. I didn't bother timing decompression since I frankly didn't have enough time to wait for chd.

it could be nice to have for lower end systems that barely make the cut as it is. or for people with larger libraries

https://github.com/dolphin-emu/dolphin/pull/10507

Quackdoc avatar Mar 16 '22 08:03 Quackdoc

RVZ is a specific format which uses the disc building format of the gamecube/wii Means RVZ uses only the game data. It trims the dummy data away and finally compresses the remaining game data and stores it in RVZ. To get the original iso (redump) back, an own written algorithm to create the dummy data is used.

This can be done for the PS3, the xbox and the x360 as well. But someone has to find out how to different the game data from dummy data. And someone has to develop an algorithm to create the original dummy data back in case it is trimmed away.

Then you would have an lossless format

Papermanzero avatar Mar 16 '22 13:03 Papermanzero

Xbox has random padding data too, yes.. but is this the case for playstation games as well?

mirh avatar Mar 16 '22 13:03 mirh

Yes, all modern gaming consoles use padding between the actual game data

Papermanzero avatar Mar 16 '22 13:03 Papermanzero

from all the games ive tested, a small sample size of 2 ps2 games and 1 ps3 game. each one showed comparible compression to CHD. while using reccomend zstd settings.

each one when reverted to ISO had matching md5sums at least so I think the potential is there.

Quackdoc avatar Mar 16 '22 13:03 Quackdoc

The question is about the gain. What was the gain before and after CHD compression? With padding it is not as effective as with trimming and rebuilding (what rvz actually does)

Papermanzero avatar Mar 16 '22 15:03 Papermanzero

im not sure I follow, in the 16gb game, as I said both rvz and chd compressed the game to around 13gb.

the compress and revert speeds were of significant difference. both losslessly reverted verified by using md5 checksums.

can you elaborate on what you mean? do you mean exact file size difference? if so I don't have it, but would not br against getting it when i get the chance.

Quackdoc avatar Mar 16 '22 15:03 Quackdoc

Actually it depends on the game.

But 16GB compared to 13GB is not a big gain. So it seems both (chd and rvz) did only pure run-length-encoding to compress the data. But there was neither a trimming (what rvz does) nor a codec like flac (what chd does) applied to shrink the iso.

So in theory you could also use 7zip on the iso and you would have the same 13GB.

Papermanzero avatar Mar 16 '22 16:03 Papermanzero