EverDrive Forum

General => Mega EverDrive => Topic started by: showergel on November 16, 2020, 12:56 AM

Title: Feature Request - CHD Support
Post by: showergel on November 16, 2020, 12:56 AM
In my collection, all of my disc-based games are stored in CHD format.  This spans across Sega's consoles and Sony's.  There are two obvious benefits - first is space savings (need smaller storage).  The second is time savings (less time to transfer data that's half the size).

In order to make my collection compatible with the Mega Everdrive Pro, I wrote a powershell script to convert CHD back to BIN/CUE.  It does its job as expected.  The side effect is, in addition to taking more than double the time to copy the decompressed data, I aldo needed a larger Micro SD Card.

SegaCD US Collection - 38.7GB  (CHD)   68.6 (BIN/CUE)

Utilizing CHD would save on time and space, and eliminate the need to keep two files to run a game. 

Discuss.  😊
Title: Re: Feature Request - CHD Support
Post by: FeverDrive on November 16, 2020, 05:59 AM
The side effect is, in addition to taking more than double the time to copy the decompressed data

It could be possible, the problem I see is this: to decompress the games it takes X amount of time on a modern PC, then on the Everdrive which obviously is less powerful than a modern PC, it will take many times longer.
People don't want to wait in order to play their games.
Title: Re: Feature Request - CHD Support
Post by: Akumajo77 on November 16, 2020, 03:08 PM
The side effect is, in addition to taking more than double the time to copy the decompressed data

It could be possible, the problem I see is this: to decompress the games it takes X amount of time on a modern PC, then on the Everdrive which obviously is less powerful than a modern PC, it will take many times longer.
People don't want to wait in order to play their games.
hello, the megacd has a reading of 150ks, with the cpu that it has in the fpga, I could unzip chd in real time, maybe when executing it, it takes a few seconds more, but then it should not have any problem, but of course,  if Krikzz has already had problems with simple cue + Bin, imagine with a chd ... XD
Title: Re: Feature Request - CHD Support
Post by: showergel on November 16, 2020, 08:04 PM
It could be possible, the problem I see is this: to decompress the games it takes X amount of time on a modern PC, then on the Everdrive which obviously is less powerful than a modern PC, it will take many times longer.
People don't want to wait in order to play their games.

Let me rephrase... decompressing CHD direct to SD Card takes a long time, mostly due to the performance of the SD card itself. 

For BIN/CUE, the MED Pro should only be seeking/loading from SD for whatever portion of data the SCD needs from the virtual disk image.  It would make no sense to decompress an entire CHD on the fly from SD Card to the same SD Card.  Might as well keep with BIN/CUE.  :)

Adding some clarity --  CHD theoretically offers the benefit of faster reading from an SD card because there's less data to hunt/wait for, and thusly load.  The CUE is indexed metadata inside the CHD format itself, and it's readable by sector if I understand correctly (no need to decompress the whole image, only the chunk the target sector data sits in).  A number of emulators that work with RetroArch that read ISO or BIN/CUE have implemented native CHD reading.   What I mean is, information is out there in GitHub on those respective emulator projects.  I realize the Cyclone-IV is an FPGA and doesn't equal code meant for x86/arm.  The point is there's a place to start understanding CHD I/O as other projects have been successful with their CHD-based I/O implementation.
Title: Re: Feature Request - CHD Support
Post by: nuu on November 23, 2020, 12:26 PM
Is this the same CHD as the MAME CHD format "Compressed Hunks of Data"?

If you had to decompress it I see no chance, considering the Mega Drive flashcarts don't even decompress zipped roms, but if it can be read in a similar way but faster than a normal CD image can be read, implementing the format makes sense and is a very good idea.

MAME should come with tools for handling CHD files, such as chdman.
Title: Re: Feature Request - CHD Support
Post by: showergel on November 24, 2020, 07:08 AM
Why yes, I am referring to Mame's Compressed Hunks of Data format as created by (or decompressed from) chdman.exe.  This is exactly the method used to create the CHDs in my collection (literally every single ISO I have is in CHD).  Chdman is the same tool I used to decompress those CHDs via the PowerShell script I wrote to get them back into BIN/CUE. 
Title: Re: Feature Request - CHD Support
Post by: lee4 on January 26, 2021, 06:42 PM
Quote from: krikzz
Any kind of compressed files likely will never be supported
https://twitter.com/krikzz/status/1353646918618984449
Title: Re: Feature Request - CHD Support
Post by: nuu on January 26, 2021, 07:11 PM
CHD isn't just any kind of compressed files as explained above. I don't know if it's doable though.
Title: Re: Feature Request - CHD Support
Post by: zaphro72 on January 26, 2021, 07:49 PM
CHD isn't just any kind of compressed files as explained above. I don't know if it's doable though.

The reply from Krikzz was specifically to somebody asking about CHD's
Title: Re: Feature Request - CHD Support
Post by: nuu on January 27, 2021, 05:09 PM
That doesn't mean much, his answer still sounded to me like it was about compressed files in general.