Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PBP extension for PS1 images #738

Open
undeadindustries opened this issue Nov 4, 2018 · 15 comments
Open

PBP extension for PS1 images #738

undeadindustries opened this issue Nov 4, 2018 · 15 comments

Comments

@undeadindustries
Copy link

undeadindustries commented Nov 4, 2018

Many of us use compressed PBP files for PS1 games with libretro.

Is there already a way to account for this in libretro-database?

If not, I'm wondering if we could update the dat files to support that?

Possibly we would add another field so the image field would have to be changed.
Possibly call it "compressed_image" or something like that?

@i30817
Copy link
Contributor

i30817 commented Nov 5, 2018

I'd rather if any compressed image support came it was chd, which is the mame format so it's:

  1. better engineered for various things including random access and a internal 'checksum' that is compression level agnostic and checksums 'all the contents' unlike some (this causes problems with duplicate cues or gdis or different platforms/dumps needing to scan different tracks).
  2. standardized for the MAME dumps.

Then if a new version of chd comes out that is revolutionary and you convert, you don't need to extract or add new hashes to checksum, just check the same internal checksum in the archive (to be fair, zip has this too, but zip is not random access nor is it a 'single' checksum).

Considering mame spreads everywhere, RA might very well be thankful for having a 'extra' parameter for chd, even if the actual dump chosen will eventually be different. Associating 'machine in mame' dump to another emulator using the MAME dats (that will eventually get provided by MAME itself) would probably be best, but that might be difficult.

Regardless, it's likely that they'll be imported eventually...

PSP will take longer though.

@andres-asm
Copy link
Contributor

andres-asm commented Nov 5, 2018 via email

@i30817
Copy link
Contributor

i30817 commented Nov 5, 2018

PBP is defective in PPSSPP, i tried it and it couldn't actually change discs on a actual multi-disc pbp. Or was that pcsx1? That too at least.

'multi-disc' formats support are a bit trash to say the least. I don't trust them.

Especially i don't trust them to be random access (this goes to all 'compressed' formats, except external harddisk compression and chd). They're made for maximum compression of single files and that is directly opposed to seeking efficiency. Chd on the other hand was a format originally made to compress hard-disk images, so it better have a 'seek sector -> start decompressing here' table.

Chd also opens the (unlikely) possibility that libchd that RA is importing into emulators will eventually support parent-child 'chd' roms relationship. This would be a very neat form of softpatching for cds (that i actually doubt will ever happen outside MAME, but still).

@RobLoach
Copy link
Member

RobLoach commented Nov 5, 2018

Feel free to re-open this when PPSSPP or any other cores support the format. If a third-party vendor provides DATs, we could consider bringing them in. Until then, I'm going to close this.

Thanks all!

@RobLoach RobLoach closed this as completed Nov 5, 2018
@undeadindustries
Copy link
Author

But this isn't for just PPSSPP, it's for PS1 also? I wasn't sure if that was the only reason it was closed?

@RobLoach
Copy link
Member

RobLoach commented Nov 5, 2018

Which core supports PDP? Do you know of a database that has hashes for them?

@undeadindustries
Copy link
Author

Beetle PSX HW. And I'm very sorry, I meant PBP files. PDP was a Typo.

About a DB that supports or has the hashes. I have all the files. I'm willing to do whatever legwork is necessary to make this happen. :-)

@RobLoach RobLoach changed the title PDP extension for PS1 and PSP images PBP extension for PS1 images Nov 5, 2018
@RobLoach RobLoach reopened this Nov 5, 2018
@RobLoach
Copy link
Member

RobLoach commented Nov 5, 2018

Thanks! I see the extension listed in mednafen_psx_hw_libretro.info.

PBP files unfortunately are not guarenteed to result in the same MD5 hashes. If you create a PBP, and then do it again, will can result in different hashes. Is the serial still readable? If so, we could have that read through RetroArch and things would "just work" ™️

@undeadindustries
Copy link
Author

How would I find out if the serial is readable? I can check tonight or tomorrow. Thanks!

@RobLoach
Copy link
Member

RobLoach commented Nov 5, 2018

Wait, this was added by @fr500 in libretro/RetroArch#4377 ....

Hmm, the scanner isn't parsing the .PBP file.

@RobLoach RobLoach reopened this Nov 5, 2018
@undeadindustries
Copy link
Author

Ahh. So this might be an "easy" feature? That is, if the scanner sees the PBPs?

@RobLoach
Copy link
Member

RobLoach commented Nov 5, 2018

Got pretty far on this over at pbp branch:
https://github.com/RobLoach/RetroArch/tree/pbp
Pull Request: RobLoach/RetroArch#7

Detects serial as...

[INFO] Found disk label 'SLUS00627'

We'd need to do some figuring out to get the dash in there. Would appreciate some testing there.

@RobLoach
Copy link
Member

RobLoach commented Mar 3, 2019

Hmm, looks like it was reverted: libretro/RetroArch#4378

Unsure if it was added back. @retro-wertz and @fr500, do you know what happened to PBP scanning?

@ghost
Copy link

ghost commented Mar 3, 2019

i cant remember the details from this, but i think just enabling getting serial from PBP will not work since its not the same format used to detect PS1's serial format (PBP's embedded serials dont have "-", ignore this if there is already existing database specifically for PBP)

with a little rework, it could would work by just using existing ps1 db

@RobLoach ah i think i remember now. the offset to scan for the embedded serial is different in PBP and cue/bin. PBP serial is way farther and i think its gonna be a bit problem for multidisks?.. (PBP serial is actually earlier at 0x130)

in anycase, it still about the way the serial is detected. the current ps1 detect method(current using keywords to start fetching the serial) should be modified for the pbp one(pbp header?).

https://www.psdevwiki.com/ps3/Eboot.PBP#Header_and_filetable
PBP type should be ME (0x12c) and serial at 0x130 and can even get title if needed at 0x358 (for multidisk, serial and title is repeated)

@berturion
Copy link

I miss this feature. All my PS1 games are in PBP format. It would be great if the scanner could recognize the game. The game serial (SLES-01234) is always present in the PBP file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants