Author Topic: Feature Request - CHD Support  (Read 1347 times)

0 Members and 1 Guest are viewing this topic.

Offline showergel

  • Newbie
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Feature Request - CHD Support
« 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.  😊

Offline FeverDrive

  • Hero Member
  • *****
  • Posts: 1299
  • Karma: +54/-0
  • Blast Processing advocate
    • View Profile
Re: Feature Request - CHD Support
« Reply #1 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.
WELCO
METOT
HENEX
TLEVEL

Offline Akumajo77

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
  • Admin and tester Recalbox system
    • View Profile
Re: Feature Request - CHD Support
« Reply #2 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
The legend Will never die

Offline showergel

  • Newbie
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: Feature Request - CHD Support
« Reply #3 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.

Offline nuu

  • Hero Member
  • *****
  • Posts: 1831
  • Karma: +83/-2
    • View Profile
Re: Feature Request - CHD Support
« Reply #4 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.

Offline showergel

  • Newbie
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: Feature Request - CHD Support
« Reply #5 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. 

Offline lee4

  • codetype specialist
  • Hero Member
  • *****
  • Posts: 865
  • Karma: +49/-0
    • View Profile
    • gamehacking.org
Re: Feature Request - CHD Support
« Reply #6 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
ED64 v2.0, 3.0 & X7 | EDMD v3 | MEGAED X7 M15 v2.01 & PRO rev B | TED v2.4 | EDN8 v1.2N & Pro M19 N1 | SED v2.1 | SD2SNES rev E1 & PRO rev.B | EDGB v1.1 & X7 M17 rev B | EDGBA X5 M16 rev A & Mini M19 Rev B
SNES jr | Super NT | Mega SG | Super Retro Advance | SGB v1 | 16bitPocket GBC | PCE+SSD3

Offline nuu

  • Hero Member
  • *****
  • Posts: 1831
  • Karma: +83/-2
    • View Profile
Re: Feature Request - CHD Support
« Reply #7 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.

Offline zaphro72

  • Full Member
  • ***
  • Posts: 187
  • Karma: +8/-0
    • View Profile
Re: Feature Request - CHD Support
« Reply #8 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

Offline nuu

  • Hero Member
  • *****
  • Posts: 1831
  • Karma: +83/-2
    • View Profile
Re: Feature Request - CHD Support
« Reply #9 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.