m35 / jpsxdec

jPSXdec: cross-platform PlayStation 1 audio and video converter
http://jpsxdec.blogspot.com/
469 stars 24 forks source link

Support for .CHD files #38

Open andercard0 opened 3 years ago

andercard0 commented 3 years ago

Environment

jPSXdec version: v1.05 Operating system: Windows 10 - 1909 Java runtime environment java version "1.8.0_251

PlayStation Game (if applicable)

Name: Any (cause most of my games were converted into this format) Region code (e.g. SLUS-1234): Not applicable

Description

What were you doing?: No applicable

What happened?: Only would like to request, support for .CHD compressed files if possible ofc.

What was or was not supposed to happen?: To let us load instead of .bin + .cue or uncompressed formats, let us load .CHD file type. while Duckstation (playstation emulator) isn't yet fulling dumping the textures, I'd like to 'dump' these with JPsxdec.

Thank You!

m35 commented 3 years ago

This is a reasonable request.

I searched but could not find an existing Java library to handle the .CHD file format.

The jPSXdec code is mostly abstracted to support any kind of source format that allows for reading individual sectors. But .CHD would not be a supported format for replacing data (audio/video/images). Only .BIN can be supported for that.

However, as inconvenient as it is to have to convert .CHD files for BIN/CUE before using them, it is an existing workaround. My limited free time is focused on other parts of jPSXdec that don't have workarounds.

But if someone wants to contribute a change to add this, I'd gladly accept it. Since this is pretty self-contained and easier to understand change, it could even be a good first issue for a newcomer to work on.

RRX-JP commented 2 months ago

Since 32-bit memory space is sufficient for PSX CDs, it might be smart to read the bin in memory after extracting the CHD into cue,bin in memory.